Ask / Submit

Securely erase device in order to sell it

asked 2016-06-13 13:03:13 +0300

irrep gravatar image

updated 2016-11-14 08:30:11 +0300

pawel gravatar image

I'd like to put my Jolla Phone for sale. Since I used it for six months as my primary device, there is a whole lot of private data there. I can sure change all my passwords such that one cannot access the accounts any more. But I would really like to securely erase the flash memory where my data has been stored.

Currently I just have it factory reset and logged into my guest wifi to download all the firmware upgrades. But I would like to prevent somebody from reading old emails or something like that.

edit retag flag offensive close delete



You would like to have a look at this thread:

lakutalo ( 2016-06-13 13:19:45 +0300 )edit

I already read this thread but the conclusion there seemed to be that the standard reset feature does not securely erase the device.

irrep ( 2016-06-13 13:22:31 +0300 )edit

There isn't really more on that issue than the thread I referred to, the zen-desk article and deleting everything manually, I'm afraid.

lakutalo ( 2016-06-13 13:28:00 +0300 )edit

Is there any foolsprrof guide how to prepare the jolla for selling? Is there the possibillity to encrypt the complete device and make then a factory reset?

Tuep ( 2017-03-07 23:15:26 +0300 )edit

3 Answers

Sort by » oldest newest most voted

answered 2016-06-13 13:32:41 +0300

chemist gravatar image

Fill the now empty space with zeros with a file, you should be able to do that in recovery mode or factory reset afterwards just to have a clean experience for the new owner. Command to create a file of 1GB filled with zeros is

dd if=/dev/zero of=output.dat  bs=1M  count=1000
edit flag offensive delete publish link more



I'm afraid this isn't 100% secure, wear-leveling and the spare-area undermine that. Question, can we do a ATA-SECURE-ERASE?
If in doubt, use a nail and a hammer. I would't sell any memory-device to a stranger.

hoschi ( 2016-06-13 16:36:59 +0300 )edit

@hoschi I keep it short before I jump you for this very rational comment... No.

chemist ( 2016-06-14 01:31:03 +0300 )edit

Yes, zeroing the flash does wear out your flash, but so does taking a load of videos or using your device as a USB stick. I see no reason to worry about wear level, because zeroing the free space is a one time operation, after all. On the plus side, it lets you know that the flash functions proprtly.

Direc ( 2020-02-19 11:05:34 +0300 )edit

answered 2020-02-16 11:43:24 +0300

Sebix gravatar image

Additional to the answer of chemist, you also need to do the same with the swap partition. I was able to extract personal information there too.

The partition number of the SWAP may be different on different models, so I won't paste code here. But you can "dd" it with zeros and then simply recreate the swap there.

Do it again if you still find data (as noted here in comments, the storage is a SSD). You can check this by using grep with a known personal information (like usernames, passwords, server names, contact names, etc.)

edit flag offensive delete publish link more

answered 2016-11-14 05:30:44 +0300

DarkTuring gravatar image

updated 2016-11-14 05:32:15 +0300

@chemist @irrep

Linux command:

sudo wipe -firD /home

Haven't tried it but appears to be a standard linux command.

Forced (f), recursive (r), ignoring symlinks (D), overwrite with zeros (wipe), and verbose (i).

This will clean the device.

edit flag offensive delete publish link more


no. wipe "securely" deletes existing data - excluding situations of remapping and journaling. but it will not do anything about previously deleted files - they could still just sit on the drive, not indexed.

misc11 ( 2016-11-14 10:48:59 +0300 )edit

I think wipe has flags to nuke all space. Or yoy could use it to zero a partition instead of a file.

But beware; wipe is a big gun and can cause a lot of damage, too.

Direc ( 2020-02-19 11:08:06 +0300 )edit
Login/Signup to Answer

Question tools



Asked: 2016-06-13 13:03:13 +0300

Seen: 1,189 times

Last updated: Feb 16