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

Root Dalvik-Cache Cleaner Script

savoxis

Android Expert
Aug 10, 2010
812
708
38
Pacific NW
www.savoxis.com http
So. I decided to get off my high horse and do some thinking.

It is POSSIBLE that when you delete applications thru the Application Manager the dalvik-cache (dex file) could be left behind.

Just because I personally have not experienced this does not mean it is not possibly a bug. So I made an init script, this script will go thru your dalvik-cache comparing the dex files within with your installed applications. When it finds a dex file that does not have an application associated with it it will remove the dalvik-cache entry.


This package is a recovery flashable zip, it will work on any rom that supports init.d scripts and even on roms that do not, if you run the cleaner manually.

After you flash this it will automatically run during init.

You can manually run thru a rooted terminal by typing dalvik-cleaner

like I said, I havent had any problems with this, but I keep my app turnaround low and my mtds clean. I could see this helping a few of you where your old dalvik cache entries are somehow not getting erased, or if you manually delete apks,
 
So. I decided to get off my high horse and do some thinking.

It is POSSIBLE that when you delete applications thru the Application Manager the dalvik-cache (dex file) could be left behind.

Just because I personally have not experienced this does not mean it is not possibly a bug. So I made an init script, this script will go thru your dalvik-cache comparing the dex files within with your installed applications. When it finds a dex file that does not have an application associated with it it will remove the dalvik-cache entry.


This package is a recovery flashable zip, it will work on any rom that supports init.d scripts and even on roms that do not, if you run the cleaner manually.

After you flash this it will automatically run during init.

You can manually run thru a rooted terminal by typing dalvik-cleaner

like I said, I havent had any problems with this, but I keep my app turnaround low and my mtds clean. I could see this helping a few of you where your old dalvik cache entries are somehow not getting erased, or if you manually delete apks,

Thanx for going out of your way to make something like this! I have what is probably a stupid question, but is this just a one time cleaning, or does this zip clean as needed automatically? If that makes sense..lol
 
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