Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Safely wiping data from Android device: Gutmann or others?

Tags:

java

android

I've been reading a few articles on Gutmann method of securely wiping data. I understood that the method is designed for hard disks. I want to write my tiny app that securely wipes data (there are a few on Google Play, I know) from either phone memory or SD card.

My questions are

Question 1: Gutmann or others?

As for the above observation, is Gutmann algorithm both effective and efficient? I believe that it is indeed effective because it rewrites the data so many times that a technology like flash memory has no way to remember data 35-writes-older. I don't know if it's efficient: I mean, do I just need fewer random writes to achieve a result?

Question 2: do I really overwrite sectors?

A question that came into my mind is the following: if I overwrite a file in Java, does Linux kernel write new data on old sectors or does it allocate new sectors on physical media while deallocating the old ones? You know, this makes the difference...

like image 473
usr-local-ΕΨΗΕΛΩΝ Avatar asked Jan 22 '26 14:01

usr-local-ΕΨΗΕΛΩΝ


1 Answers

Re #2, the link you cited is not relevant. new FileOutputStream() doesn't overwrite the file at all, in the sense you mean. It creates a new one, or appends to an existing one. It is therefore most unlikely to reuse the same disk blocks. However new RandomAccessFile() in "rw" mode does indeed overwrite the file, and you would reasonable expect it to reuse the same disk blocks, although it is possible to imagine a filesystem that didn't.

like image 168
user207421 Avatar answered Jan 25 '26 02:01

user207421



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!