HTC Droid Eris Forum

Root What is dalvik cache?

What exactly is the Dalvik Cache and when do I need to clear it? Is it something that should be done when you replace one rom with another or is a data wipe all you need to do?

Any clarity on what a Dalvik cache is would be greatly appreciated. I just want to know the basics of what it is and when I do or do not need to use it.



#1 Tamasabian, May 9, 2010
im not exactly clear either, ui think it has to do with the application data though. from my work with the a2sd, the dalvik cache is a part of getting the apps to work. i say, any time you do a data wipe, do a dalvik wipe too
#2 andrizoid, May 9, 2010
got an answer :)
dalvik cache is a program cache area for the program dalvik. Dalvik is a java based virtual machine that is the bases for running your programs (the ones that have the .apk extension). In order to make access times faster (because there's not JIT (just in time) compiler installed by default), the dalvik-cache is the result of dalvik doing a optimization of the running program. Sounds confusing. It's similar to the prefetch files in Windows.
#3 andrizoid, May 9, 2010
Ok. So I should just clear it when I do a data wipe to flash a new rom? Will it be a problem if I just do a data wipe and flash a new rom without doing the dalvik cache?
#4 Tamasabian, May 9, 2010
i have had issues when i dont clear the dalvik cache, but never had issues when i do. just cear it, nothing bad will happen and only good can come of it
#5 andrizoid, May 9, 2010
is wiping the dalvik cahce the same as doing a 'wipe cache partition' when in ClockworkMod Recovery mode?

Thanks in advance

#6 gnetiv, Oct 21, 2010
Simply put: no, not in every case; it depends a great deal on the ROM you are using.

There are circumstances where it would have the same effect - for custom ROMs which are using cache2cache, it would have the effect of wiping the dalvik-cache for market apps only - and if it is a CyanogenMod6 ROM (e.g. many of the Eris "Froyo" ROMs), then it would wipe the dalvik-cache for the pre-installed or "system" apps.

I'm not trying to confuse you - it's just that your question, as posed - doesn't have a "one size fits all" answer.

The most general piece of advice that can be given is this: try to wipe as much as possible prior to installing a new ROM and avoid doing "upgrade" installs. If you want to be more clever than that (to avoid the hassles of re-configuring a new ROM), then you ought to understand how each of the ROMs (both the "before" and "after") are using /cache to see what you can "get away with".

#7 erisuser1, Oct 21, 2010
think the Davlik cache or Davlik zone was first introduced by Star Trek and originally carried the name of Delphic Expanse .
It is a narrow patch of space located between the Klingon Neutral Zone and the Cardassian Demilitarized Zone. It was mainly used as a recovery place when a temporaly anomaly occured.

Or something like that.

#8 Peter123, Oct 21, 2010
I thought it where the Time Lord's (Dr. Who) arch-enemy Davros from planet Skaro kept his Daleks ;)

Exterminate! Exterminate! :D

Dalek - Wikipedia, the free encyclopedia
#9 scary alien, Oct 21, 2010
Well. That is one version.
However one should not overlook other possibilities.

Delphic Expanse - Memory Alpha, the Star Trek Wiki

Visiting the Delphic Expanse you should be really careful: it is full of thermobaric clouds making navigation very complicated.
#10 Peter123, Oct 21, 2010
According to Wikipedia, Dalvik is named after a fishing village in Iceland. See
#11 doogald, Oct 21, 2010
Party-pooper! :D

Yeah, I've seen that before too (but what fun is that?) ;)

doogald, I had trouble launching that link (the parens freaked-out my browser), but this link might work better: Dalvik (software) - Wikipedia, the free encyclopedia

Quote from this link: Dalvik, like the rest of Android, is open-source software. It was originally written by Dan Bornstein, who named it after the fishing village of Dalv
#12 scary alien, Oct 21, 2010
Now seriously:

Biff Dalvik 3rd, was a 2nd rate software architect of the 1st version of Android at Google.
He actually did nothing useful at the company and the only reason they kept him there that he was a distant second cousin of Mr Google himself.

At his retiremnt party they honored him by naming a (then) useless piece of empty memory patch between the screen memory area and the keyboard driver - the Dalvik Cache.

That very area later became a valuable real esate of the phone memory.
#13 Peter123, Oct 21, 2010
Alright Peter, you win! :p
#14 scary alien, Oct 21, 2010
^ yippie.
#15 Peter123, Oct 21, 2010
Titanium has it as an option. Im not installing a rom or anything. Is it ok/good/bad to wipe the cache during normal operation? (rooted)
#16 maluminse, Mar 14, 2011
I use Cache Cleaner NG. It does it automagically.:D
#17 Bob Cat, Mar 14, 2011
Well, in my case it was a miracle that helps me. I have Sony Ericsson X10 mini come with pre-installed Office Suite. After failed updating, it always showing error when trying to update. So i rooted my phone and use titanium backup to wipe data (Office Suite & Office Suite Service Updater). Voila!! Office Suite return to its previous normal state and updating was working (just make sure have a stable connection so downloading update won't stop in the middle and causing that errror again) :D i need
#18 Erietha88, Mar 17, 2011
had "read only" error wit radio rip/spartacus rex (awesome streaming recorder btw) and when trying to download in net browser, even tho astro would still (mostly) see card and access files.

error check didn't fix it.

successfully fixed it by wiping cache/dalvik cache!

Thanks for all those who've added to the documentation of errors and fixes; I'm using rooted Evo via unrevoked3 and stock ui.

And thanks for explaining, I'm one of those that doesn't really grok and remember stuff unless I'm told WHAT it is and does and it makes sense.
#19 Gadgetsage, Apr 22, 2011
Tried with titanium wants non free app. So I skipped it.

I did dl ng cleaner thanks for that recommendation..
#20 maluminse, Apr 24, 2011
I just wanted to put my 2 cents in.

I was trying to install the latest ROM from CM and I was having trouble with the phone booting into boot, then to fastboot, only to find that it couldn't seem to find any image. After reading this thread I grew some balls and chose all 3 check boxes (backup current Rom, clear data and cache, and clear dalvik cache).

all of a sudden, worked like charm!

fair warning though, I lost all of my apps and all settings were reset. In comes google to save the day as I have been using the option to sync my device with google and it went and reinstalled everything over a 10 minute sync operation all by itself. I love my little pocket robot!

#21 kenmaude, Oct 11, 2011
This is par for the course, except in some very specific circumstances:

- you are going from stock to a very-close-to-stock ROM, such as xtrSENSE, Evil Eris, Plain Jane, or CondemnedSoul's 666th Sense. You generally should wipe Dalvik, but you can usually get away with not wiping data and be all set. (Note: xtrROM is *not* one of these ROMs - you need to wipe data/factory reset when you install this ROM, unless ...)

- usually (though not always) you can upgrade from one version of a ROM to another with just a Dalvik cache wipe.

We all who know this should apologize for not making this very clear to people rooting their phone for the first time.
#22 doogald, Oct 11, 2011
App2SD will also let you clear your cache and move apps to your SD card which could help. It's not been a total solution for me, but it has helped with this whole LG Ally not having enough memory thing.
#23 CussinSailor, Jan 13, 2012
Your in the wrong forum.;)
#24 Bob Cat, Jan 13, 2012
Welcome to the AndroidForums, CussinSailor (and thanks for not cussing, LOL ;) :)).

Yeah, you are going to see a big jump in performance when you get your next device. Bigger, better screens, more storage for apps, etc.

The Eris devs certainly did a lot with building apps2sd into a lot of the custom ROMs as I'm sure the Ally root guys did, too.

Be sure to check-out the Ally root sub-forum if you haven't already:

Ally - All Things Root - Android Forums

Cheers and again, welcome to the AndroidForums!
#25 scary alien, Jan 13, 2012