A
A
Anton2014-09-19 01:16:10
linux
Anton, 2014-09-19 01:16:10

How to securely erase data on an Android smartphone before selling it?

Actually a subject. It is necessary to completely wipe all the data on the smart in order to prevent their subsequent recovery by the new owner. On the move, only something like
dd if=/dev/urandom of=/dev/block/mmcblk0
dd if=/dev/urandom of=/sdcard
in the terminal right on the phone came to mind. But all this must be done from under a running OS, so some of the data may be probably blocked from reading / writing. Or, most likely, in the first option, the OS will crash altogether during the execution of the command. Through fastboot, these commands cannot be executed. We need a reliable way.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
Nazar Mokrinsky, 2014-09-19
@nazarpc

Delete everything important, fill it up with garbage (or create a file with initial data from /dev/urandom through the terminal until the free space runs out), delete the garbage.
It will be possible to recover only garbage, which is equivalent to the impossibility of recovering the original data.

O
Odinokij_Kot, 2014-09-19
@Odinokij_Kot

In no case do not completely overwrite mmcblk0 !!!
There is a bootloader, the firmware itself, and so on. Your command will work and after that you will get a brick, which can only be restored by the programmer. It is necessary to overwrite only separate sections of data, caches, internal storage, etc.
You need to load into an alternative recovery (for example, from cyanogen), connect to it via adb shell, and then it
should work with urandom, in general, the pseudo-random sequence generator is a slow thing.
where # is the number of the corresponding partition, depends on the phone. You can look at them either in the console itself, or in the recovery poke around in the mount section. According to the idea of ​​\u200b\u200bthe partition, it should be 3 - this is data - the system partition, cache - the partition of applications and sdcard, or something else similar - the internal memory of the device.
After zeroing these sections in the console, just in case, we execute
and turn off the phone.
Next, turn it on again in the recovery and from it we format or wipe the data, cache and sdcard partitions.
After that, we boot in normal mode and have a phone like out of the box when you first turn it on, with an initial setup interface. In order to return it to the same state again - we blow into the recovery and again we do wipe the data and cache sections from the menu.
PS. Partitions were overwritten with zeros because wipe from the recovery makes a simple quick partition format.

M
Maxim Vasiliev, 2014-09-19
@qmax

On samsungs - recovery mode.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question