• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root what should you wipe?

scotty85

Extreme Android User
Jul 25, 2010
11,131
7,412
ran across this on xda and found it interesting. im not sure who this fellow is,so take it for what its worth. :) from this post
in the amon ra thread.

first of all...Id like to point out some flaws in many of you guys' logic.

1. Why are you wiping dalvik cache in recovery anyway? The only reason I could see one doing this is flashing a kernel that is causing a bootloop (see #3) Dalvik cache resides in /data partition...and sometimes in both /data and /cache partitions. Which leads me to number 2.

2. I see a lot of people wiping dalvik cache, wiping cache, wiping data and then flashing a rom. Even some people doing it 3xs or more. This is pointless. If you are wiping data and cache in recovery...it deletes dalvik cache in the process. Whats the point in going in after doing this and wiping dalvik in advance options? You are wiping NOTHING when you do this. Theres nothing there to wipe. Proper wiping (to start clean with any rom), is wipe data factory reset, wipe cache, format /system under mounts and storage (and format /boot if you have a phone with the option, tbolt is not one of those phones). That removes all...and gives real results on what a rom is doing to your phone when you run one clean...which is what I do when I flash a new rom.

3. you can wipe dalvik cache in terminal like.

su
sysrw
cd /data/dalvik-cache
rm *
reboot

if you have dalvik cache located in both /data and /cache...do this

su
sysrw
cd /data/dalvik-cache
rm *
cd /cache/dalvik-cache
reboot



no need to even go into recovery for that so the argument that cwm sucks for wiping dalvik cache is pointless. Do it through terminal.


i found it somewhat interesting,as i have never formatted /system in my life... until droidth3ory started telling us to :eek: i still dont know how needed it is,as the new rom replaces /system and /boot,and i dont believe it will "mix them together",so form your own opinions on wether to change you believe this to be a good idea.
 
Well after some experimenting yesterday with my issue of my apps not going away after wipes, if you don't format data or factory reset all your data will still be intact when you change roms I can see that being an issue if going to a rom that is too different than the one you are currently running. I am still sure I did choose to do the factory reset, I even booted back into recovery and did it twice more...maybe I am going crazy

If I don't wipe /system going from a CM7 rom to an OMG rom I will have issues with FC and reboots, don't know why but the only way I can get OMG roms to rom after CM7 is with wiping /system otherwise the roms are just a force close factory.

I could see how if the /system of a rom does not include a something that is in the one you are coming from how it wouldn't wipe it and could cause issues, Also naming of system apps is not the same. Look at parts of the market specifically the vending.apk some roms have com.google.vending.apk while others are simply vending.apk. I noticed this with Theory and CM7, if you didn't wipe before going to a different one I could see issues coming from it.

Now I am not sure how roms are installed by recovery, if they just replace the /system folder on the root then it seems like that wouldn't cause any need to wipe. If they replace each folder within /system individually I can see some issues arising. If they replace each individual file then the differences within roms where files may be named different or some roms may have files others do not I can see where issues would be very likely to arise.

The cache/dalvik cache wipe I can understand if you wipe /data and wipe /system. Remember when you boot up if you have wiped dalvik it will all be recreated when booting, this is part of the reason a new rom boot takes a little longer than a reboot.

Ask me to clarify if my post is as clear as mud ;)
 
Upvote 0
Wipe data formats /data on your root. Wipe system formats /system on your root. Data houses your user apps and can be, at least partially, modified without access to root. System houses your system apps, build.prop, framework, ect... you need full access to modify anything in /system.
 
Upvote 0
I think they are mutually exclusive. The factory rest wipes /data /cache and a few other partitions but does not touch /system. The phone will not function other than in recovery or bootloader after /system is formatted.

Just to be clear, this is NOT a true factory reset. It does NOT load the stock ROM, etc. It is the equivalent of a factory reset if you never changed the ROM at all. Also, it does not delete the user content on the sd card other than .android_secure.
 
Upvote 0
Just to be clear, this is NOT a true factory reset. It does NOT load the stock ROM, etc. It is the equivalent of a factory reset if you never changed the ROM at all.

Don't those statements contradict each other. I think the "factory reset" option in recovery will restore your current rom to a "fresh flash" status other than any changes you did to anything that is within /system

Sidenote: Couldn't this thread be merged with the one scotty posted earlier today about wiping, they seem to be discussing basically the same things
 
Upvote 0
Don't those statements contradict each other. I think the "factory reset" option in recovery will restore your current rom to a "fresh flash" status other than any changes you did to anything that is within /system

Sidenote: Couldn't this thread be merged with the one scotty posted earlier today about wiping, they seem to be discussing basically the same things

My stock HTC ROM is long gone, so unless I reload the original ROM that my phone shipped with, the factory reset does not do a true factory reset. Some devices (not necessarily phones) store a true copy of the original firmware and software as shipped and can do a true factory reset. I just did not want people to get the impression that a factory reset would restore the HTC ROM (which is what a factory reset means to me--I think the action is poorly named).

I actually like DT's decision to not include the wipe in the script. As I have said elsewhere, it makes you stop and think about what you are doing. But I have to say that if I were to write the scripts for my own use I would include it.

Edit: yakitori is a themer, I think. He can be a bit blunt, but he is usually right. I think part of the issue is that the recoveries cut off the echo lines so you cannot see exactly what is being wiped. I noticed that Dalvik seemed to be subset of cache and data, but it only takes a few seconds so I did it anyway. Now it is included in the same command on twirp, so it takes no effort at all. The three common actions are to wipe cache and dalvik, and to wipe both plus system, or wipe both, plus system and data, so really the three actions in twirp are not redundant--three actions, three commands. Yes, Dalvik gets wiped twice, but it costs you ten seconds and no keystrokes so who cares.
 
  • Like
Reactions: scotty85
Upvote 0
Okay, thanks for clearing up the statement, we are talking about the same thing :D

I will still wipe as I always have, like I said before I have issues with OMG roms and not wiping system so that has become habit for me. I should even retry out a few roms because I didn't realize my phone was sensitive to /system errors, but I doubt I will if DT keeps his roms coming and better than par.
 
Upvote 0
I could see how if the /system of a rom does not include a something that is in the one you are coming from how it wouldn't wipe it and could cause issues, Also naming of system apps is not the same. Look at parts of the market specifically the vending.apk some roms have com.google.vending.apk while others are simply vending.apk. I noticed this with Theory and CM7, if you didn't wipe before going to a different one I could see issues coming from it.

Now I am not sure how roms are installed by recovery, if they just replace the /system folder on the root then it seems like that wouldn't cause any need to wipe. If they replace each folder within /system individually I can see some issues arising. If they replace each individual file then the differences within roms where files may be named different or some roms may have files others do not I can see where issues would be very likely to arise.

im under the impression that it is the latter... the system folder is simply replaced. but that could be wrong. hmmm shoud be able to come up with a clever way to test :D actually it wwould be as simple as creating a new folder inside system,relash the rom,and see if it disapears. without formatting /system of course.

i see the points of wiping dalvik being redundant(tho i agree with brizeys logic as well... who cares?) but it seems to be to be a bit redundant to format system and boot since they are just going to be replaced anyway.

when i didnt format /system in shift,i felt it was a lil less smooth,but it prolly wasnt,lol... and i certainly had no other noticable issues from it,such as FCs.
 
Upvote 0
I've always had issues running OMG based roms after a CM rom unless I format system. Most of the time it is system apps FC but it has been reboots and I have got stuck in a boot loop (that I wasn't happy with and wrote a very bad review of the rom here) I've also lost wifi on OMFGB where I couldn't turn it on at all. Back when I had the OG Droid I realized that not all phones are created equal. That statement is still true. Some phones will run OC to a certian speed on certian voltages while others will not. I think something that causes the issues with my phone and going from one base to another is present in some phones and not in others for whatever reason. Or maybe I'm a complete noob, who knows?
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones