-4

After taking backup of Contacts and other information. I want to zerofill the internal memory (In order to wipe-out the data completely). The device is 'rooted'. But, little confused on where to start & how to start. Can somebody provide some information with code snippets to do it.

The memory is where data is stored should be reset with zeros.

kumar
  • 691
  • 1
  • 7
  • 16
  • Its quite possible. Requesting people who knows it to comment. – kumar Apr 10 '14 at 12:39
  • This is about as close as you can get http://stackoverflow.com/questions/7191906/how-do-i-zero-ise-a-secret-key-in-java – Nathan Apr 10 '14 at 12:40
  • 1
    This is so that a file that is deleted is not recoverable? – weston Apr 10 '14 at 12:42
  • @Nathan that is quite different one. – kumar Apr 10 '14 at 12:58
  • @Nathan its not just over writing a file. There is a technique called zerofill. Google yourself for information, which will be used for erasing the date in hard disk. – kumar Apr 11 '14 at 07:53
  • 3
    phones use emmc memory, since wear leveling is enabled on these devices, you can never guarantee that zero filling will do a secure erase, so you should format the whole partition using secure erase emmc command, if you have root access – nandeesh Apr 16 '14 at 17:13
  • @nandeesh, yes i have root access. But want to know how to do secure erase. Can you share some code with us. – kumar Apr 17 '14 at 06:13
  • It depends on the type of emmc available on the device. You need to refer the data sheet of emmc and issue the ioctl – nandeesh Apr 17 '14 at 13:42

1 Answers1

0
process = Runtime.getRuntime().exec(new String[]{"su","-c","dd if=/dev/urandom of=/mnt/sdcard/zero"});

process.waitFor();
kumar
  • 691
  • 1
  • 7
  • 16
  • Where to execute this? How to execute this? Please explain, don't just throw a piece of code without a context. – cablop Nov 01 '22 at 13:53