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

Root What does wiping cache and dalvik cache do?

Ph33zy

Newbie
Oct 5, 2010
11
0
I want to flash to a custom kernal and the instructions say to wipe the these two types of cache. From my understanding, it won't erase any data stored on phone right? In other words, I don't have to install all my apps or setup home pages again hopefully.
 
Everytime I have flashed a ROM or kernel (via ROM Manager), I have backed up the current ROM and wiped all data/cache. As I understand it, starting from scratch lowers the chances that you will have any conflicts that either effect performance or screw up your phone. Titanium Backup restores all of your data and apps, so you are left with only the homescreens. That 5 minutes is worth the peace of mind, in my opinion.

I know this doesn't directly answer your question, but it is food for thought.
 
Upvote 0
You don't have to wipe data to flash a new kernel - just cache and dalvik cache. You won't lose any data. You can never hurt anything by wiping those two things. It will just take longer to boot.

necropost I know

but I just did my first Dalvik cache clean - via Recovery mode - and jumped from 86mb internal memory to 126mb down to 102. I was stunned at the gain. I suspect the drop was due to it remaking caches.

dalvik cache is stored in /data by default, so it makes sense that you would see internal memory do that. Some roms have dalvik moved to the cache partition to just keep that space on /data clear all the time.
 
Upvote 0
It's my understand the Dalvik cache is a place where the Android OS re-compiles the executable programs the first time to optimize them. It only needs to do it once which explains the "cache" part -- unless you make a major change like replace the kernel. If you do that, you want to manually clear the Dalvik cache to force Android to recompile the apps for the the new kernel.

I also believe the main data Cache is used by the Android OS at runtime to write temporary files for specific reasons. You want to clear this out when you try a new ROM so it doesn't re-used that cached data.

Manually clearning both caches out allows the new ROM to be installed in a "cleaner" environment.

FYI - there is also a Battery "cache" of sorts where the OS keeps battery statistics. You want to clear this every once in a while -- especially if you're experiencing fast battery drains or change batteries.

Anyone feel free to correct me if I'm wrong. :)
 
Upvote 0
It's my understand the Dalvik cache is a place where the Android OS re-compiles the executable programs the first time to optimize them. It only needs to do it once which explains the "cache" part -- unless you make a major change like replace the kernel. If you do that, you want to manually clear the Dalvik cache to force Android to recompile the apps for the the new kernel.

I also believe the main data Cache is used by the Android OS at runtime to write temporary files for specific reasons. You want to clear this out when you try a new ROM so it doesn't re-used that cached data.

Manually clearning both caches out allows the new ROM to be installed in a "cleaner" environment.

FYI - there is also a Battery "cache" of sorts where the OS keeps battery statistics. You want to clear this every once in a while -- especially if you're experiencing fast battery drains or change batteries.

Anyone feel free to correct me if I'm wrong. :)

Yes, you can wipe your battery stats, it may give you a better indication of battery life.
I would always recommend wiping Davlik cache and cache when flashing a new kernel
 
Upvote 0
No, clearing the main Cache and Dalvik cache will do. Some people recommend doing it yourself in Recovery manually while others like myself just use the checkbox to automatically clear the cache in ROM Manager when you use it to load new ROMS.

I would always recommend wiping Davlik cache in clockworkmod recovery versus using the rom manager application to wipe cache and data, imo;)
 
Upvote 0
To clear cache a dalvik, power your phone off. Then power back on holding power and volume down. Navigate to recovery. Select wipe. Select wipe cache. Press power to confirm. After thats done Select wipe dalvik (if you are using ClockworkMod it will be located in advanced, if you are using AMON RA it will be located below cache). Then to wipe battery states, in Clockwork it should be under advanced and in AMON it is under wipe.
 
  • Like
Reactions: Mulan
Upvote 0
To clear cache a dalvik, power your phone off. Then power back on holding power and volume down. Navigate to recovery. Select wipe. Select wipe cache. Press power to confirm. After thats done Select wipe dalvik (if you are using ClockworkMod it will be located in advanced, if you are using AMON RA it will be located below cache). Then to wipe battery states, in Clockwork it should be under advanced and in AMON it is under wipe.

If I want to clear both my cache and dalvik, do I have to wipe and reinstall my ROM?
 
Upvote 0
No, when you boot up after wiping cache and dalvik, the system will rebuild the cache.

Thanks, I've been having battery issues so I installed a new kernal and hear its a good idea to wipe cache and dalvik.

Another question. In clockwork, I didn't see wipe cache. I saw "wipe data/factory reset" and "wipe cache partition." I did not see a "Wipe" holder as stated above.

It looks like this,
Clockwork-Mod-Boot-Screen-e1279545586372.jpg


I did find "Wipe dalvik cache" under advanced though.
 
Upvote 0
Thanks, I've been having battery issues so I installed a new kernal and hear its a good idea to wipe cache and dalvik.

Another question. In clockwork, I didn't see wipe cache. I saw "wipe data/factory reset" and "wipe cache partition." I did not see a "Wipe" holder as stated above.

It looks like this,
Clockwork-Mod-Boot-Screen-e1279545586372.jpg


I did find "Wipe dalvik cache" under advanced though.

1. It is necessary to wipe cache and dalvik when ever flashing a new kernel.. Or else you will bootloop.
2. Cache partition is cache so you are good there.

Hope that helps!

BTW; how did you capture a screen shot of recovery?
 
  • Like
Reactions: Calamachino
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