Wiping Data, Cache, Dalvik, etc

Discussion in 'Bugless' started by mwahlquist, Oct 24, 2011.

  1. mwahlquist
    Offline

    mwahlquist New Member

    Joined:
    Mar 24, 2010
    Messages:
    78
    Likes Received:
    8
    Trophy Points:
    0
    Location:
    Virginia
    This is kind of tied to my previous posting, and I have a lot more research to do, but here is some information to start with.

    1. I have yet to find a program that actually WIPES anything from your handset. ClockworkMod Recovery doesn't seem to from the user interface. A format is NOT the same as a wipe, and while it makes your data difficult to recover, IT IS NOT GONE. Might be important to some of you. A format only "frames" the partition as new ignoring what the current bits are, but it leaves them in place. This explains why we are told to "wipe 3x", cuz we aren't wiping anything and 3 formats may be good enough to move on cleanly (but your data is still there).

    2. I would love to see someone implement dd commands into the automated "wipe" since then it would actually wipe the data. DD is available at an adb shell and I have used it to extract a forensic image of any of the mtdblocks I want. DD would also mean that we would only ever have to wipe once.

    3. Wiping Cache and Dalvik cache is a great idea for cleaning up your handset when you do not want to reload a ROM from scratch. It is completely unnecessary as a part of our current ROM replacement process (clockwork, etc). Dalvik is just a folder on /data, so it should be automatically "wiped" anytime /data is. /cache is also hit as a part of wipe data so it is redundant to keep doing it. However... keeping in mind that we seem to never be wiping anything, how many formats does it take to clean up our partitions enough to make em usable... maybe this is where the magic 3x comes from. Formatting is fine I guess, but your data is still there... and it is NOT wiped, so we shouldn't use that term. It will mislead the newbs into thinking they are protecting themselves... and they are not.

    If this data can be proven wrong I will be HAPPY to retract, but this is what I can see from the commands that are visible and the amount of time it take (decreasingly) to wipe the data.
    If clockworkmod already uses dd to perform the wipe/format, then we can safely do away with this 3x nonsense. NIST has reported numerous times that a single dd wipe is good enough for forensic destruction of data.

    Again, sorry if this upsets anyone... my only goal here is to make sure we know exactly what we are doing, and we do the best that we can. From what I can see that is not the case yet. Koush you are the man and your programs rock, I am just trying to get to the forensic truth of the matter.
  2. mwahlquist
    Offline

    mwahlquist New Member

    Joined:
    Mar 24, 2010
    Messages:
    78
    Likes Received:
    8
    Trophy Points:
    0
    Location:
    Virginia
    Seems RZRecovery may address ALL of these issues if not most. Anyone confirm what he uses for wipe>?
  3. metalspring
    Offline

    metalspring New Member

    Joined:
    Jan 9, 2011
    Messages:
    2,228
    Likes Received:
    24
    Trophy Points:
    0
    Location:
    hermitage, pa
    Hmm, I've been using rzrecovery for awhile now, I just tried the unroot/sbf stock/reroot thing to see if it would improve bugs in my phone and I really don't see a difference, maybe because I used rzrecovery so much?
  4. SupraRZ95
    Offline

    SupraRZ95 New Member

    Joined:
    May 4, 2011
    Messages:
    241
    Likes Received:
    0
    Trophy Points:
    0
    Tbh I'm not sure what the dealio really is here. I mean as long as people understand they should wipe their data/cache/dalvike more than once they should be good On cwm or rzrrecov. I'm guilty of wiping once. But its not like the data that isn't fully erased is bad. I don't really see how it all not being gone could be bad.

    Sent from my DROIDX using DroidForums
  5. metalspring
    Offline

    metalspring New Member

    Joined:
    Jan 9, 2011
    Messages:
    2,228
    Likes Received:
    24
    Trophy Points:
    0
    Location:
    hermitage, pa
    Oh yeah, the data not truly being gone can really be an issue...it almost defeats the purpose of formatting in recovery...leftover data can build up and really mess with phone performance...hence the whole thing about unrooting, sbfing stock and rerooting to reduce lag and little bugs that arise constantly...sbfing truly wipes the phone whereas wiping in recovery may not...it's definitely a problem with d1s since most people NEVER have to sbf anything
  6. SlammedDime
    Offline

    SlammedDime New Member

    Joined:
    Sep 1, 2010
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    0
  7. SupraRZ95
    Offline

    SupraRZ95 New Member

    Joined:
    May 4, 2011
    Messages:
    241
    Likes Received:
    0
    Trophy Points:
    0
    I THINK I read something along time ago where they actually can't make it delete every last bit of info for legal reasons. This includes all formatable data devices.

    Sent from my DROIDX using DroidForums
  8. omniphil
    Offline

    omniphil New Member

    Joined:
    Aug 19, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    0
    I never understood the whole process of formatting everything 3 times, if it doesn't work the first time, its not going to work there after. At least that's what i think.

    I load a lot of roms, and wiping 1 vs 3 times never made any difference for me. However I recently did that trick of going back to stock and rerooting, that made a huge difference. Phone is fast again. And I didn't even load a new rom. I backed up my existing rom, went to stock, rerooted, restored my rom and it was a night and day difference.

    I suspect this has something to do with wear leveling in the flash memory. If you just format, nothing happens really. the memory decides where new data goes to minimize write cycles to the memory. So you will be left with some blocks that are half full etc, so when a block is needed it needs to read the partial block, move it and write a fresh block which hurts performance. (vs just 1 step of writing to a fresh empty block) This is probably more noticeable on gingerbread roms as they have much less free memory available so more swapping takes place.

    When you go back to stock it does a total reset of the blocks of data and there won't be many partial blocks of data slowing stuff down, at least for a while until you do alot of reading and writing again. The potential downside is that resetting everything back to stock does add more than necessary write cycles to the device which could lead to early failure, but you'd probably be looking at the failing in 10 years instead of 12, or something crazy like that. We usually don't keep phones that long...

    Once you reset to stock, all the extra space is now used for file writes and it can do it quickly as it doesn't have to move partial blocks around, But once the amount of written data is greater than the space available after a reset then you will start to see the performance tanking. You ever notice how a new phone feels fast for like 6 months and then starts to crawl? You just filled up your available memory. (Even if you delete things it doesn't matter, writes are always done to an empty block first and nothing gets deleted until it needs to delete data for extra space, or once you "hit the wall")
  9. meishkov
    Offline

    meishkov New Member

    Joined:
    Feb 12, 2010
    Messages:
    957
    Likes Received:
    2
    Trophy Points:
    0
    Location:
    Sterling Heights, MI
    Very insightful I must say. Seems like an efficient way of how memory blocks work :)
    So technically if rzrecovery or cwr did the DD version of wiping then we wouldn't have to do the whole sbf to stock update deroot reroot etc I take it?? Man that sounds really nice, if its even possible. So then you just sbf a recovery back on to restore ur nandroid backup?

    Sent from my Droid using DroidForums
  10. omniphil
    Offline

    omniphil New Member

    Joined:
    Aug 19, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    0
    I think resetting all of the blocks back to square one is a low level process that would wipe the entire rom/ram. So I don't think its something you can do on a partition basis. So to nuke everything you basically lose the entire memory, so that your custom boot loader would be wiped out as well in the process and you'd no longer have root access.

    So you can "format" cache, data, whatever as many times as you want, it doesn't really do anything low level on the drive as far as the blocks...
Search tags for this page
clear dalvik cache droid x2
,
how long should it take to format cache htc one
,

how to wipe dalvik

,
should i wipe dalvik cache
,
what is a dalvic cache wipe in android
,
what is dalvik cache used for
,
what will happen if i wipe the dalvik cache
,

wipe dalvik cache

,
wipe dalvik cache droid bionic
,
wipe dalvik cache what does it do
,

wipe data and cache

,
wipe the data and dalvic cache