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. api to install update apk in private-app folder

Hi fellow developers,

I have a question with regards to an update feature that I am trying
to put in my application. I am wondering if it is possible for an
application to download a new apk and install it inside the /data/app-
private folder (which i presume is for copy protected apps)?

Cheers
Zi Yong
--~--~---------~--~----~------------~-------~--~----~

2. change background color on focus

Hi,

i need to have the default selection color (orange), here is my code

<Button android:id="@+id/login"

                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="left"
                android:background="@drawable/login_background"
                android:text="Login"




                />



login_background.xml


 <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">

    <item android:state_focused="true" android:state_pressed="true"
android:drawable="@drawable/enter_button_pressed" />
<item android:state_focused="true" android:state_pressed="false"
         android:color="?"              // this should be default color

         />

    <item android:state_focused="false" android:state_pressed="true"
android:drawable="@drawable/enter_button_pressed" />

    <item android:drawable="@drawable/enter_button" />
</selector>


///////////////

can i set just color on focus or i must need to put another image in
focused section?
--~--~---------~--~----~------------~-------~--~----~

3. Managed filer query creates 'attempt to acquire a reference on a close SQLiteClosable'

4. Afterimage when using SURFACE_TYPE_PUSH_BUFFERS surface.

5. Google dev phone G1 activation problem

6. Injecting HTTP header into all requests issued by the emulator

7. Drawing ViewGroup content on a SurfaceView/SurfaceHolder Canvas