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. issue with autocompletetextview and ime

hello,

  i have a dialog with a single autocompletetextview on an activity
that's in
  landscape mode.

  here's how i specify this autocompletetextview:
           <AutoCompleteTextView android:id="@+id/name_text"
                     android:completionThreshold="2"
                     android:layout_width="fill_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginLeft="5px"
                     android:inputType="textPersonName|textCapWords"
                     android:imeOptions="actionDone"
                     />

  with sdk1.5, when i put my finger on the textview to give it focus,
  the virtual/soft keyboard shows up.  i see the autocomplete mode
still works
  in the context of the keyboard:  as i type, i see suggestions show
  up below the text entry field.  very nice.

  anyhow, when i touch "Done", i get my dialog view back, but the
  autocompleteview dropdown list is still showing!  what's worse,
  when i try to dismiss the dropdown by selecting the same item that's
  already entered in the textfield, some sort of empty menubar shows
  up at the bottom of the screen (which i discovered i can dismiss
  by pressing the back button)!

  1. i would expect that when i finish entering the text using the
   virtual keyboard, by pressing "Done", that the autocomplete drop
   down should no longer show (autodismiss).
   is there any way to tell the view programmatically to not show
   if there's only one match and it's already entered??

   2. i can't figure out why the single line text field morphs into
    what looks like a multiline text area when in 'virtual keyboard'
    mode.

  any help/hints most  appreciated.

thanks,
/ eitan

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

2. Css overflow issue

Hi list,

In webview (as in Android Chrome) the css overflow property seem to be
neglected. Here's a simple demo : http://www.200ok.de/scrollingissue.html

Did someone come accross the same issue and knows of a elegant
workaround. This is very much appreciated!

Best, Hannes
--~--~---------~--~----~------------~-------~--~----~

3. How to increase Emulator's Internal memory capacity?

4. Simple GridView that displays text in the grids

5. ExpandableListView not expanding/collapsing when using a group View with a checkbox

6. Bluetooth, wireless keyboards, J2ME enabled / JSR28 compliance required - can it work?

7. x,y co-ordinate of mouse click