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

Root Dalvik Cache question

I was looking for the last post that I saw on what and why you wipe. I will tell you that if you are changing roms you should wipe both, and you can wipe battery stats as well. The batter stats will reset your battery so that it is calibrated, just have your phone fully charged when you flash a new rom and doing all the wipes. When I flash a new rom I will wipe cache and data and the battery, then flash the rom. Wiping will keep things like your log in info from interfering with the fresh flash. If you are flashing an update of the rom you are running then they will tell you to wipe or not. When they say to wipe they always mean data and the cache. Hope this kinda answers your question if not scary alien will be by to help.
 
Upvote 0
Why are there two of them on the phone?

In the root I have...

/cache/dalvik-cache/

and

/data/dalvik-cache/

Which one gets wiped when you do a wipe in Amon's?

prj,

The "normal" dalvik-cache is located in /data/dalvik-cache. I'm pretty sure that the presence of a dalvik-cache directory under the /cache directory is a result of flashing a ROM (like xtrSense) that has moved dalvik-cache from /data to /cache (giving you more room for apps by freeing-up /data).

I believe that a "Wipe Dalvik-cache" in Amon_RA's custom recovery will only wipe the /data/dalvik-cache and would suspect that the ROMs that have supported moving dalvik-cache from /data to /cache would have to have a process for managing this.
 
Upvote 0
prj,

The "normal" dalvik-cache is located in /data/dalvik-cache. I'm pretty sure that the presence of a dalvik-cache directory under the /cache directory is a result of flashing a ROM (like xtrSense) that has moved dalvik-cache from /data to /cache (giving you more room for apps by freeing-up /data).

I believe that a "Wipe Dalvik-cache" in Amon_RA's custom recovery will only wipe the /data/dalvik-cache and would suspect that the ROMs that have supported moving dalvik-cache from /data to /cache would have to have a process for managing this.

The Tazz (2.0) ROM that I have been using lately has a "split personality" - BOTH caches are used by the ROM:

/data/dalvik-cache <== Used by market apps (stored in /data/app)
/cache/dalvik-cache <== Used by pre-installed System apps (stored in /system/app)

I don't know if that is something which is specific to Tazz or is in every CyanogenMod 6 ROM, but the point is that it appears that both of them are in use for that ROM.

As far as I know, the "Wipe dalvik-cache" menu entry in Amon_RA ONLY wipes /data/dalvik-cache.

OTOH, the "Wipe data/factory reset" menu entry in Amon_RA appears to wipe BOTH the /data and /cache partitions. (It sure says that it is doing just that). Note that this also means that nonsense such as "double wiping" or performing "both a data/factory reset wipe and a Dalvik cache wipe" are merely vodoo operations.

I interpret those facts to mean that it is always better to simply use the "Wipe data/factory reset" when installing a new ROM - and completely ignore the "Wipe dalvik cache" menu entry, unless you are sure of the specifics of the ROMs you are dealing with.

eu1
 
  • Like
Reactions: scary alien
Upvote 0
Happen to see this post and all CyanogenMod based ROMs (i.e. all 2.2 Eris ROMs) and the ROMs I have worked on (xtrROM, xtrSENSE, Vanilla2.0) have split dalvik-cache in both the /data/ folder and the /cache/ folder.

My understanding is that amons recovery wipes both...

Also both above post are correct:

My ROMs move dalvik-cache from /data to /cache (giving you more room for apps by freeing-up /data). Both folder exist but the /data/dalvik-cache is a symlink to the actuall physical location on /cache/dalvik-cache.

All CyanogenMod ROMs use BOTH
/data/dalvik-cache <== Used by market apps (stored in /data/app)
/cache/dalvik-cache <== Used by pre-installed System apps (stored in /system/app).

Hope this helps!
 
Upvote 0
My understanding is that amons recovery wipes both...

Hi zach.xtr!

Thanks for chiming in and even more so - thank you for setting the bar in the 2.1 dev ROM space. I hope you are going to be around for a while doing dev work on the Eris (is the screen on your old Eris still functional after the mishap?).

Just now I was running some other experiments so I tried the "Wipe Dalvik-cache" menu item in Amon_RA. It only cleared /data/dalvik-cache, but not /cache/dalvik-cache. Makes you wonder about some of those bug reports on CM6 ROMs where the folks reporting did an overlay install, eh?

I guess Android has some sort of detection method for rebuilding cache entries from the .apk on each boot that is supposed to prevent version mis-match between the .apk and the .dex files in the cache, but I'm not exactly sure what that check is. The package file /data/system/packages.xml seems to store a "key" value as an attribute of < cert > tag within a < package > tag:

Code:
<package name="com.android.voicedialer" codePath="/system/app/VoiceDialer.apk" f
lags="1" ts="1217592000000" version="8" userId="10042">
<sigs count="1">
<cert index="1" [B]key=[/B]"308204a830820390a003020102020900936eacbe07f201df300d06092a8
64886f70d0101050500308194310b3009060355040613025553311330110603550408130a43616c6
...

... so maybe it is impossible for mismatch to occur even if it doesn't get wiped???

Well, in any event, doing a "Wipe data/factory reset" in Amon_RA v1.6.2 (Eris) wipes everything in both /data and /cache - including any dalvik-cache directories.

eu1
 
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