I'm running a custom ROM (MIUI xiaomi.eu 12.0.2/Android 10QKQ1.90910.002) and my phone is rooted. I want to encrypt my old deleted data (photos and videos) so that they can't ever be recovered after selling my phone because right now I can recover them using apps like diskdigger.
Asked
Active
Viewed 264 times
1 Answers
1
You cannot encrypt data which has been deleted. As Tetsujin mentioned, you are meant to encrypt the data beforehand. You can then discard the encryption key.
What you want to accomplish, then—ensure that cleartext deleted data be unrecoverable—is inherently difficult. It's not trivial to hide these things from experienced forensic laboratories.
That said, unless you are trying to protect your data against an adversary such as a nation state, there are steps you can take. Re-encrypt your phone now and, after ensuring that data encryption is enable, initiate a full wipe. This should render apps like DiskDigger ineffective.

Joseph
- 126
- 2
adb shell dd if=/dev/urandom of=/data/local/tmp/bigfile
until low storage warning appears, then just do factory reset – alecxs Feb 15 '21 at 19:30blkdicard
on block device ofuserdata
partition in recovery mode before flashing a new ROM. More details: How to make a complete factory reset, without anyone being able to retrieve my data? – Irfan Latif Feb 15 '21 at 19:48adb shell
to execute commands. – Irfan Latif Feb 15 '21 at 21:17