What is Dalvik Cache?

Search This thread

ezterry

Retired Recognized Developer
Jan 16, 2010
1,829
967
Asheville, NC
Thanks for the Dalvik cache explaination... However, If I understand you right, when you put a new ROM on your device, the Dalvik is rebuilt... Some flash ROM guides tells me to wipe the Dalvik cache and other does not mention it... Is this procedure necessary or is it redundant?

PS. Would be nice if some moderator could clean this otherwise informative but messy thread... DS.

In theory it will re-generate thus not be needed for you to wipe it..

However in practice some invalid information seems to be leaked from the previous rom causing forcequits, stalls, and errors when major changes to a rom is made. (particularly when changes to the dalvik run-time environment are made)

I believe what is happening is that while the dex files are re-generated, the old ones are not deleted, so some of the earlier generated files can have links to some of the old not-yet-regenerated files.. causing problems.

If you do a full wipe its of course redundant .. however since the dex wipe if fast (at least in clockwork a bit harder in ra-recovery).. and if you don't do it you will need to wait for all dex files to re-generate incorrectly, then wipe and generate them correctly.. Its sometimes easier just to wipe and let them install cleanly. (its not duplicating anything.. probably a bit faster as the dex invalidation check also takes time)
 

Ancoor

Member
Sep 9, 2010
11
0
Sundbyberg
Thanks ezterry! Could I then clean the dalvik through clockwork, and it would be re-generated without needing to re-flash the whole thing? Would that leave my apps and config intact?
 

ezterry

Retired Recognized Developer
Jan 16, 2010
1,829
967
Asheville, NC
Thanks ezterry! Could I then clean the dalvik through clockwork, and it would be re-generated without needing to re-flash the whole thing? Would that leave my apps and config intact?

I think that is a trick question..

Many times for simular roms (such as updating between versions of ezGingerbread) you can simply wipe dalvik, flash and fix_permissions after boot all will run smoothly. (and keep all the previous settings)

(If you didn't wipe dex on first boot yes reboot to recovey, wipe dalvik-cache and then boot the rom+fix_permissions)

However sometimes if you are going between very diffrent roms (froyo to gingerbread for example) I find the system feels very laggy regardless of what I do until I wipe and install..) restoring data to specific apps manualy or via titanium or simular.
 

TheIneffable

Member
Jul 11, 2011
43
0
I remember wiping it because my cyanogenmod g1 wouldn't boot up. It took an hour of being patient. Then I just gave up, reboot, and wiped the Dalvik cache through Amon-Ra recovery. My phone wasn't stuck on the splash screen no more.
 

poch_1421

Senior Member
Jul 21, 2011
234
12
Manila
does the dalvik cache have something to do with reduced battery life? i was adviced to wipe everything except the dalvik cache
 

frankdrey

Senior Member
Dec 28, 2011
833
175
I Googled and the first result brought me here :D:D

And this has been said many times already. The answer is in this thread. Cyanogen explains it nicely.


Ontopic:
I wipe my dalvik-cache every morning and it helps keep my phone speedy. It just takes a few minutes to build up again. So I let it do that while I'm getting up:p
By the end of the day my phone is lagging from all the app data cached up.
I have the following specs:
ROM: froyobylaszlo
Swap 256mb class 4 sd (4gb total)
apps 2 ext: ~2gb
Now that I think about it, it could just be the swap being cleared.

And whenever I install a new ROM i superwipe and wipe one by one everything.
Makes me feel good :D
 

bradxray

Member
Oct 3, 2012
11
0
need a sticky

Sounds like there are so many people asking about this, it should be added to the android faq and terminology. This forum should also have a sticky so people can find a quick and dirty explination of what it is and wha it does and how to clean it, and a link to the wiki would be nice too.
 
J

jianC

Guest
A quick google search would have yielded relevant answers to the question more quickly ;)
 

bradxray

Member
Oct 3, 2012
11
0
Exactly. I read a bunch of stuff on xda, but all I found was vague answers and a bunch of confused people asking the same question over and over. Then I did a google search and found the answers on wiki. A shame that the answers are easier to find in wiki than it is on xda.

The stickies help prevent the loop of people asking a questions, moderators and users having to read it, people asking the same question, moderators and users having to read it, people asking the .........

If the point of the thread is to provide answers, once an answer is found, it should be put in the sticky so the thread doesn't just keep growing out of control in an infinite loop and wasting everyone's time, especially the moderators, who clearly have a huge job on their hands.
 

Top Liked Posts