20

I am getting rid of my Samsung Galaxy S4 and want to know what steps I should take to make sure that private information has been deleted from the phone. I have removed the SD card and cleared all of the gallery files as well as music. What other steps can I take to make sure that the phone is as sterile as possible?

4

3 Answers 3

20

Remove the SD Card and SIM Card, and then do a Factory Reset.

If your device doesn't use full disk encryption, and you are worried about someone using advanced forensic tools to recover your data, you might want to overwrite the internal storage area with random data. You can do this by creating a file containing random data that fills up the entire free space. Once you've done that, do another factory reset.

If you've flashed and/or rooted your device, you would want to flash a stock ROM, and restore the default boot loader.

2
  • 1
    The tools needed to recover are hardly "advanced". If your device does not have full disk encryption, you really need to do a full wipe of all partitions of the internal storage except the bootloader, then reinstall stock 'ROM', but if you mess this up you could brick the device. Getting a professional you can trust to do this for you is going to cost a lot more than the device is worth, so honestly I would just recommend that privacy-conscious non-experts just destroy used devices rather than selling them... :-( Jun 24, 2015 at 19:17
  • For example, this tool will recover a lot of data and all you need to know how to do is compile for Linux/ARM and root the device: cgsecurity.org/wiki/PhotoRec Jun 24, 2015 at 19:19
6

Make sure you've deregistered your phone from e.g. Google (especially Play), Facebook, Dropbox etc.

Encrypt the phone, optionally create a file full of random data that fills up all available disk space1, then factory reset. Repeat as many times as you like.

1 dd if=/dev/urandom of=random.txt bs=1G count=2, replacing 1G with however much space is left (credit)

6
  • 1
    I doubt this suffices; personal information might be stored not just in free (deleted) space but also in files that don't get properly deleted. Jun 24, 2015 at 19:21
  • Would filling up disk space with random data like that even work? Doesn't the type of memory used in phones typically use wear leveling? (E.g. Similar to an SSD?) So even if the disk is full there might still be sectors that haven't been overwritten.
    – Ajedi32
    Jun 24, 2015 at 19:32
  • @Ajedi32 I assume that (especially with multiple write cycles) most data would be overwritten. Without specialist tools it's presumably impossible to force all sectors to be written to and erased.
    – user43185
    Jun 24, 2015 at 19:36
  • @JoshHolland Is it possible to deregister a device from Google (especially Play) anymore? If so, how? Sep 2, 2015 at 9:20
  • 2
    @RockPaperLizard I thought it was under settings on the web interface, but apparently you can't.
    – user43185
    Sep 2, 2015 at 9:50
0

Your best bet is to flash a factory image, maybe a more daunting task if you aren't familiar with it. However, check out sammobile.com for images and instructions, or YouTube of course.

In theory, with Android, a factory reset can tend to leave data behind: Ars article

With a system image, it effectively rewrites all partitions on the device, leaving it clean.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .