Root Dalvik-Cache Cleaner Script

Discussion in 'Android Devices' started by savoxis, Mar 25, 2011.

  1. savoxis

    savoxis Well-Known Member
    163

    Aug 10, 2010
    812
    708
    163
    ODOT Field Services Tech
    Pacific NW
    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,
     

    Advertisement
    jeckel, k.c.cole, bnitty and 2 others like this.
  2. lawizard

    lawizard Active Member
    16

    Jun 7, 2010
    39
    1
    16
    Attorney/writer
    Western, NC
    If you have Titanium you can also clean up you Dalvik Cache. I used the Dalvik Cache cleaner in Titanium and got back about 15mb.
     
  3. tigersfan1

    tigersfan1 Well-Known Member
    38

    Jan 29, 2011
    381
    11
    38

    Wait how do you do that because titanium only backups and restores
     
  4. KingOfGreen

    KingOfGreen Well-Known Member
    93

    Nov 3, 2010
    842
    179
    93
    Chandler, Az

    The pro version had an option to clean up dalvik cache and market dr, fixes broken market links dont know if it requires pro or not. It can also sync all backups to dropbox in pro version.
     
  5. dautley

    dautley VIP Member
    VIP Member
    243

    Jul 23, 2010
    1,823
    502
    243
    Dickson, TN.
    LOL! titanium does much more than backup & restore open it up, press the phones menu key and choose "more"
     
  6. tigersfan1

    tigersfan1 Well-Known Member
    38

    Jan 29, 2011
    381
    11
    38

    Wow never saw that before. I fell like an idiot. But doesnt clean that cache
     
  7. admn81

    admn81 Well-Known Member
    93

    Nov 20, 2010
    641
    150
    93
    MN
  8. admn81

    admn81 Well-Known Member
    93

    Nov 20, 2010
    641
    150
    93
    MN
    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
     
  9. Cl8rs

    Cl8rs Well-Known Member
    48

    Oct 22, 2010
    279
    17
    48
    Roseville, CA
    I am sorta wondering this myself...
     
  10. dautley

    dautley VIP Member
    VIP Member
    243

    Jul 23, 2010
    1,823
    502
    243
    Dickson, TN.
    Mine says "clean up the Dalvik cache" second from the top but it's the pro version.
     
  11. bnitty

    bnitty Well-Known Member
    38

    Dec 15, 2010
    242
    17
    38
    Wichita/Lawrence, Kansas
    works great cleared up 19.6mb of space effortlessly
     
  12. savoxis

    savoxis Well-Known Member
    163

    Aug 10, 2010
    812
    708
    163
    ODOT Field Services Tech
    Pacific NW
    This script cleans automatically every boot
     
  13. tigersfan1

    tigersfan1 Well-Known Member
    38

    Jan 29, 2011
    381
    11
    38
    I don't know if I did this right please tell me if I am wrong:
    Steps
    1) Put file on sd card
    2) Went into recovery and made a backup
    3) Installed it from my sd card
    4) Rebooted
    5) Went into terminal emulator and type in dalvik-cleaner
    6) Rebooted my phone

    Is that right?
     
  14. AndroidKris

    AndroidKris Well-Known Member
    53

    Dec 20, 2010
    385
    75
    53

    It appears you missed giving "su" permissions in step five.
     
  15. tigersfan1

    tigersfan1 Well-Known Member
    38

    Jan 29, 2011
    381
    11
    38
    Sorry forgot to put that down but I did do that so ya
     
  16. AndroidKris

    AndroidKris Well-Known Member
    53

    Dec 20, 2010
    385
    75
    53

    Then it appears you did everything right.
     
  17. tigersfan1

    tigersfan1 Well-Known Member
    38

    Jan 29, 2011
    381
    11
    38
    Ok probably was clean already then
     
  18. jeckel

    jeckel Well-Known Member
    16

    Mar 11, 2011
    76
    5
    16
    thank you :D!!!!!
     
Tags:

Share This Page

Loading...