Linked by Thom Holwerda on Tue 10th Jul 2012 17:08 UTC
PDAs, Cellphones, Wireless I've been flashing CyanogenMod 9 nightlies for months now, and the process to do so has become pretty much muscle memory at this point (if cwm ever changes its menu order I'm screwed). One step of this process has always fascinated me simply because I have no idea what exactly it does and why I have to do it: clearing Dalvik cache.
Thread beginning with comment 526245
To read all comments associated with this story, please click here.
Comment by LB06
by LB06 on Tue 10th Jul 2012 18:47 UTC
LB06
Member since:
2005-07-06

Actually, you don't have to wipe the Dalvik cache. Or the regular cache for that matter. They will be automatically refreshed as required.

Reply Score: 1

RE: Comment by LB06
by kwanbis on Tue 10th Jul 2012 21:25 in reply to "Comment by LB06"
kwanbis Member since:
2005-07-06

Yeah, right.

Reply Parent Score: 3

RE: Comment by LB06
by jimmystewpot on Tue 10th Jul 2012 23:17 in reply to "Comment by LB06"
jimmystewpot Member since:
2006-01-19

that is definitely not my experience.. the number of problems I've had with my own custom roms that are as a direct result of not clearing the cache..... too many to count..

I wish it worked as the docs say.. maybe i miss something in my config

Reply Parent Score: 2

RE: Comment by LB06
by galvanash on Tue 10th Jul 2012 23:54 in reply to "Comment by LB06"
galvanash Member since:
2006-01-25

Actually, you don't have to wipe the Dalvik cache. Or the regular cache for that matter. They will be automatically refreshed as required.


While that is true for a non-rooted device, the minute you root an android device it goes out the window. Once you have rooted you have put the device in a state where it is entirely possible for things to get seriously out of whack because you will of course start installing things that don't follow all the rules religiously. That and odds are you will start changing boot-loaders and ROMs and other things that were _never_ meant to be changed in isolation, and there are different tools that do this differently - some clear the caches for you automatically when they think it is the right thing to do, but some don't...

In short, it is certainly possible to get away with not clearing the dalvik cache, but the rules are so complex as to what you can and cannot do without requiring a cache clear that it is simply more reliable to _always_ clear the cache when making a low level change. Think of it as good hygiene.

Reply Parent Score: 3

RE: Comment by LB06
by LB06 on Wed 11th Jul 2012 02:21 in reply to "Comment by LB06"
LB06 Member since:
2005-07-06

Well, I guess it depends on what you're running. When you update (to) a CM9 rom you'll notice that at the first boot Android is rebuilding the cache for all applications. THAT's the Dalvik cache rebuilding afaik.

So it seems we are all right. Yes, the Dalvik cache needs to be rebuilt, but you don't have to manually wipe it.

Reply Parent Score: 2

RE[2]: Comment by LB06
by FadeFx on Wed 11th Jul 2012 10:27 in reply to "RE: Comment by LB06"
FadeFx Member since:
2011-08-01

You all are partially right, there is no need to wipe dalvik cache after flashing a nightly build as the installer script does it for you, but, it is not always neccessary at all, only when there have been changes to the dalvik-vm, which indeed happens relatively rarely. However to be on the safe side cm does it on every flash.

So Thom, if u want to ease the process of flashing nightlies, get the rom manager pro (its worth those few bucks) and use it to download and flash the latest one, the pro version can even be used to notify you if a new version is available.

Reply Parent Score: 1