1

Can we wipe an Android phone completely using Encryption and Factory Wipe? (Samsung Galaxy S7 to be exact)

I have a Samsung Galaxy S7. I believe cell phones use flash storage (like SSD) and its not as secure as NOn-SSD wiping. https://www.quora.com/What-kind-of-storage-do-phones-use-i-e-SSD-HDD-and-flash

For example with Computers, I know that SSD drives that are already encrypted, is relatively safe to write to them and nobody can access your encrypted data- as long as nobody knows your password and nobody has access to your computer/HD or no malware etc. But If you write to an SSD drive unecrypted, even if you wipe it and encrypted it after, its not as secure. So wiping is not as 100% effective. So I am concerned about Cell Phone "hard drive storage" being flash storage: https://www.quora.com/What-kind-of-storage-do-phones-use-i-e-SSD-HDD-and-flash

My queston is, according to this guide https://www.ubergizmo.com/how-to/wipe-android-phone-tablet/

it says you simply Encrypt your cell phone with a really good password that nobody can figure out. and then do a factory wipe and that should wipe your cell phone 100% clean, so anything on your cell phone previously is 100% wiped. Is this true/accurate?

These guides also say something similar: https://www.psafe.com/en/blog/data-actually-gone-wipe-phone-clean/ Quote from this website: "After the encrypting process is complete, you hit the “Factory Reset” button, which makes your phone 100% clean and ready to sell."

Another layer of protection. My phone also has a program called "Shreddit." that supposedly wipes your phone clean, so if we do Encryption, Factory reset + use this program with US DOD 3 pass wipe Scheme..... should all the existing data on my phone be pretty much wiped and not accessible and recoverable? http://apps.palmtronix.com/shreddit/android/

Thanks guys, Thank you in advance!

1

Please note that encrypting after the data is on the drive is too late. Encrypt and factory reset only works reliably if you encrypt before you write sensitive data to the flash.

If you encrypt after the data is on the flash drive, the encryption process will first write an encrypted version of the data and then try to delete the unencrypted version (simplyfing a bit). This delete suffers from all the problems of standard delete, so the unencrypted data may remain.

3

"Android phone" actually means very little. Many vendors implement several technologies in completely different ways and Samsung uses a special security system called "Knox" which is used to store cryptokeys securely.

Knox works by concealing the unlock keys until the CPU provides the system with credentials. There are two ways to use it:

  1. Knox will release the keys to most system partitions as soon as the CPU demands them, no questions asked. This may sound stupid, but if you think about it, even when the system is decrypting the data already, there is no way for anyone to get past the lock screen if the bootloader is locked. Knox will still refuse to provide the CPU with Samsung Pay, Secure Folder and Samsung Health data without first being "unlocked" by biometric, PIN, Password or pattern credentials. If a system modification is detected, Knox will destroy these keys permanently and disable its ability to read or store new ones.
  2. The most secure one: Knox will not send any key to the CPU until the user enters authenticates, before the OS even starts. This means even your device doesn't get to know the key to mount all partitions without user input. Were Samsung to allow this on BL-unlocked devices, it would be safe to use a device with the bootloader unlocked.

Now, all recent Samsung Galaxy devices (like many other premium phones) should be encrypted by default, transparently to the user (or such feature can be enabled in Settings). It means that - upon "factory resetting" the device, you are recreating partitions with new keys and replacing the ones stored in Knox with the new. This means that anyone who gets the phone will only be able to see (provided they root the device) a bunch of pseudo-random garbage, but will never get the keys to make anything out of it.

TL;DR: Your data is safe

2

Yes, cellphones use a type of flash memory, and they can be difficult to erase properly because unlike a standard drive with a spinning platter you have wear leveling.

Flash devices have a limited number of writes they can perform in the same spot. To combat premature drive failure the firmware of the drive writes data to different locations. This means if you try to overwrite your data with garbage or just zero out your storage, you're likely to not overwrite the file(s) you were trying to get at.

Lots of flash will even have extra capacity, and just be limited by the firmware to the advertised space. This means a drive filled to 100% capacity with zeros could still retain some info not accessable directly by the operating system, but accessable forensically.

The good news is that drive makers are supposed to include a command, which when invoked securely wipes the drive. For a long time that wasn't being implented correctly, but your S7 should he new enough for that not to be a problem.

In summary, a factory reset on any current generation or recent gen phone should be enough. If your phone was encrypted from the start, that's all the better.

Edit: I went looking for the command that wipes the NAND, but I can't find it. Maybe I am remembering incorrectly. The safe option is still to encrypt and factory reset.

Cambridge technical report section 5 talks about factory resets [2017] http://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-909.pdf

  • Thanks for the quick reply, so according to: ubergizmo.com/how-to/wipe-android-phone-tablet it says that "Factory Reset does NOT delete all data"... So this is a guide for general android phones, but you're saying that the newer Samsungs like the Samsung Galaxy S7 that I have WILL wipe 100% any data with a simple factory reset? You said that my S7 should be new enough, so how can I find out if it actually is new enough? Is there a way to find out for certain? – Starzzzzz Oct 6 '18 at 4:31
  • Here's the latest research from Cambridge pertaining to factory resets and secure deletion. It's a paper from 2017. cl.cam.ac.uk/techreports/UCAM-CL-TR-909.pdf – Daisetsu Oct 6 '18 at 4:51
  • I haven't read the paper in a while so what I posted was from memory. I dont have time to re-read the paper right now. Section 5 is the relevant section to your concerns. – Daisetsu Oct 6 '18 at 4:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.