| News | Features | Interviews |
| Blog | Contact | Editorials |
| What's in the Dalvik cache? |
| By Thom Holwerda on 2012-07-10 17:08:40 |
| 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. |
| Comment by anevilyak |
| By anevilyak on 2012-07-10 17:15:40 |
| My understanding of it is that in the process of installing an Android app onto a particular device, various optimizations are made to its Java class files in order to perform more efficiently on the particular hardware contained in that device. These optimized variants are stored in the cache so they don't need to be recomputed each time (along with any JIT optimizations that are made as a result of runtime analysis of the program after you've run it a few times). Since the bytecode format can change between Android versions, that cache would potentially need to be cleared to force all that to be regenerated in the newer format. |
| RE: Comment by anevilyak |
| By fatjoe on 2012-07-10 18:19:32 |
|
The word you are searching for is AOT compilation cache. (the android cache partition also contains some data) |
| Not usinig GooManager? |
| By rklrkl on 2012-07-10 18:26:03 |
|
I've been using GooManager for a while (yes, it's on Google Play) to flash the nightly CM9 ROMs on my HP TouchPad - it might knock a step or two off your procedure, Thom! A bonus with GooManager is that it lists non-CM9 ROMs too, plus knows about the various Google Apps versions and will let you add those as well. Edited 2012-07-10 18:26 UTC |
| Comment by LB06 |
| By LB06 on 2012-07-10 18:47:39 |
| Actually, you don't have to wipe the Dalvik cache. Or the regular cache for that matter. They will be automatically refreshed as required. |
| RE: Comment by anevilyak |
| By Thom_Holwerda on 2012-07-10 19:54:23 |
| Thanks for the clear answer, Rene! |
| RE[2]: Comment by anevilyak |
| By anevilyak on 2012-07-10 20:24:17 |
| Will try to remember that, thanks! |
| No clue... |
| By Morgan on 2012-07-10 20:39:48 |
|
What is it? I have no idea. Is it truly necessary to clear the cache? Well on my first Android phone, a Motorola Cliq (SB200), if I didn't clear it the phone would crash after installing or updating CM7. On my Nook Color, I once forgot to clear the cache and it still booted fine. I wish I could offer more but that particular subject is over my head. |
| Why sometimes it works sometimes it doesn't |
| By janito.vff on 2012-07-10 20:53:56 |
|
I could be wrong, but some of the optimizations could be between different intermediate files (classes for example), and if there is a slight change in one of those interfaces between versions, the optimizations might no longer work. Therefore it could result in failure to boot (if the application was critical to the system), or maybe just some force-closes. Again, pure speculation... |
| RE: Comment by LB06 |
| By kwanbis on 2012-07-10 21:25:58 |
| Yeah, right. |
| RE: Not usinig GooManager? |
| By Bill Shooter of Bul on 2012-07-10 22:22:59 |
|
RomManager anyone? It used to work great for CM9 nightlies. For some reason it doesn't list them, only the CM7's now. In any case, a nightly in late june screwed up wifi bandwidth or latency. Then I screwed up and accidentally installed a CM 7.2 over CM9 with not fun results. Had to do a full wipe of data to get the phone working again. But it works great now! |
| News | Features | Interviews |
| Blog | Contact | Editorials |