secure erase data partitio

by William Enck » Mon, 12 Apr 2010 19:45:27 GMT


Sponsored Links
 Does anyone know if the "Factory defaults" option in Android's recovery mode 
performs a secure erase of the data partition, or is it just a "quick format"? 
I'm not worried about a multiple pass overwrite, I just want to know if the 
partition is completely zero'd out. This should be sufficient for most users 
(since it is a NAND and not a magnetic disk --- and some say a zero pass is 
sufficient for magnetic disks).

Nothing obvious turned up in a quick web search (maybe I wasn't looking hard 
enough), so I took a look at what's going on.

Here's what I found:

mydroid/bootable/recovery/recovery.c:
- comments at the top indicate the factory reset option calls erase_root() on 
/data
- erase_root() calls format_root_device() in roots.c

mydroid/bootable/recovery/roots.c
- format_root_device() gets the MTD context "write" and calls 
mtd_erase_blocks(write, -1)

mydroid/bootable/recovery/mtdutils/mtdutils.c
- mtd_erase_blocks(MtdWriteContext *ctx, int blocks) appears to determine the 
total number of blocks if a negative value is passed.

It appears that, yes, Android zeros the entire /data partition.

Do others agree that this is what is happening? (and hopefully this thread 
shows up in search results for future references).

Thanks,
-Will

-- 
William Enck
PhD Candidate
Department of Computer Science and Engineering
The Pennsylvania State University
e...@cse.psu.edu



-- 
To unsubscribe, reply using "remove me" as the subject.



Other Threads

1. Capturing Hard key events on WidgetApp

I am developing a widget for that i need to control some mmi using
Hardware key...please let me know how can i
capture hardware key events on widgetApp as it is controlled by
Widgetprovider. If any body have any solution please let me know

thanks
Abhi

--~--~---------~--~----~------------~-------~--~----~

2. MapView hangs up unable to connect and polluated logs with thousands of stack traces: Connection pool shut down

Hi Google maps team,

Just in case nobody reported the error:

Best Regards,
Zied Hamdi

The Next Street Android Application
http://nextstreet.eu

08-07 19:50:30.538: WARN/System.err(12975):
java.lang.IllegalStateException: Connection pool shut down.
08-07 19:50:30.568: WARN/System.err(12975):     at
org.apache.http.impl.conn.tsccm.ConnPoolByRoute.getEntryBlocking
(ConnPoolByRoute.java:284)
08-07 19:50:30.568: WARN/System.err(12975):     at
org.apache.http.impl.conn.tsccm.ConnPoolByRoute$1.getPoolEntry
(ConnPoolByRoute.java:238)
08-07 19:50:30.568: WARN/System.err(12975):     at
org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager
$1.getConnection(ThreadSafeClientConnManager.java:175)
08-07 19:50:30.568: WARN/System.err(12975):     at
org.apache.http.impl.client.DefaultRequestDirector.execute
(DefaultRequestDirector.java:325)
08-07 19:50:30.568: WARN/System.err(12975):     at
org.apache.http.impl.client.AbstractHttpClient.execute
(AbstractHttpClient.java:555)
08-07 19:50:30.568: WARN/System.err(12975):     at
org.apache.http.impl.client.AbstractHttpClient.execute
(AbstractHttpClient.java:487)
08-07 19:50:30.578: WARN/System.err(12975):     at
com.google.common.io.android.AndroidHttpClient.execute(Unknown Source)
08-07 19:50:30.578: WARN/System.err(12975):     at
com.google.common.io.android.GoogleHttpClient.executeWithoutRewriting
(Unknown Source)
08-07 19:50:30.578: WARN/System.err(12975):     at
com.google.common.io.android.GoogleHttpClient.execute(Unknown Source)
08-07 19:50:30.578: WARN/System.err(12975):     at
com.google.common.io.android.GoogleHttpClient.execute(Unknown Source)
08-07 19:50:30.588: WARN/System.err(12975):     at
com.google.common.io.android.AndroidHttpConnectionFactory
$AndroidGoogleHttpConnection.getResponse(Unknown Source)
08-07 19:50:30.588: WARN/System.err(12975):     at
com.google.common.io.android.AndroidHttpConnectionFactory
$AndroidGoogleHttpConnection.openDataInputStream(Unknown Source)
08-07 19:50:30.598: WARN/System.err(12975):     at
com.google.common.DataRequestDispatcher.serviceRequests(Unknown
Source)
08-07 19:50:30.598: WARN/System.err(12975):     at
com.google.common.DataRequestDispatcher$DispatcherServer.run(Unknown
Source)
08-07 19:50:30.598: WARN/System.err(12975):     at java.lang.Thread.run
(Thread.java:1058)

--~--~---------~--~----~------------~-------~--~----~

3. Switching operators

4. Thread Problem, invalidate() not recalled

5. How to share data between the program that launches the thread and the thread itself?

6. how to know the phone model ,like dream , magic ,hero .etc?

7. how to know the phone battery Capacity use code ?