[MOD][ALPHA][2013-02-14] Save internal memory: dalvik-cache on /system AROMA

Search This thread

Zirias

Senior Member
Aug 6, 2012
113
41
Baden-Baden
sekrit.de
WARNING: This is far from complete, read carefully to know whether it is safe!

I created a tiny mod that automatically moves dalvik-cache to your /system partition in order to gain space on /data. The idea to do it came from here: http://petermolnar.eu/linux-tech-coding/how-to-move-dalvik-cache-to-system-partition-in-android/

Fiddling with the bootimage seemed to cumbersome and on a ROM supporting init.d-scripts, it should be possible to fix all from there (remount /system rw and check whether symlink is damaged from a dalvik-cache wipe attempt). This is my first working-for-me zip to automate the process in a flashable zip.

The installer contains an option to revert the mod -- works for me.

Prerequisites
For this to work, you need:
  • A ROM that supports init.d scripts
  • busybox installed (of course)
  • A custom recovery with all busybox links in place (should work on most)
  • Enough free space on /system for dalvik-cache

Limitations
  • Untested -- so far tested only on my Sensation with SuperXE 4.2.1 ROM
  • Prerequisites unchecked -- this includes busybox and space requirements on /system. Check yourself for now before flashing
  • Dalvik cache wipe non-functional -- at least for me on 4EXT Touch recovery. But it doesn't do any harm, at least.

Benefits
  • More space on /data -- around 150 MB for me

Downsides
  • /system must be kept rw

TODOs
  • Check some prerequisites to make it safer to flash
  • Analyze why dalvik-cache wiping does not work, maybe provide own wiping-option in AROMA
  • Check whether this works on ROMs with dalvik-cache on /cache; it already looks there after /data, so it SHOULD work

dalvik-syscache_0.2a_ALPHA.zip - use at your own risk.Nandroid keeps you safe, so please test after backup :)!

Older versions
Changelog
* 0.2a:
  • Added dalvik-cache wipe option in AROMA
  • Minor cosmetic changes
 
Last edited:

manuelkuhs

Senior Member
Aug 2, 2004
113
8
Limerick City
Very nice idea!

On a related note - is there no safe way to repartition our device and just shrink the /system partition, giving it to /data instead?
 
Last edited:

Zirias

Senior Member
Aug 6, 2012
113
41
Baden-Baden
sekrit.de
Thanks, although the idea is old, just tried to automate it.

On a related note - is there no safe way to repartition our device and just shrink the /system partition, giving it to /data instead?
I don't think so. No idea what kind of partition table is used, but given the fact it's all on the same internal mmc block device, even the recovery partition, I assume it would be quite risky. But maybe someone around knows better?
 
  • Like
Reactions: manuelkuhs

Zirias

Senior Member
Aug 6, 2012
113
41
Baden-Baden
sekrit.de
AW: [MOD][ALPHA][2013-02-14] Save internal memory: dalvik-cache on /system AROMA

great job!
but i want to know if there any harm to our phone when system partition been read and write much more frequently than before?

No worries there, it's the same underlying block device. The only "issue" with having /system rw is it's maybe easier to accidently mess with your Rom at the command prompt. But wear on the flash is the same, no matter what partition is used for dalvik-cache.

Sent from my HTC Sensation XE using xda app-developers app
 
  • Like
Reactions: theggs

theggs

Senior Member
Oct 3, 2011
75
8
Zhenjiang,Jiangsu
trying it on cm10.1..it works!save 200+mb in /data. now more apps can be installed. now i can install much more apps thx for your great job!:)
just for one thing, this mod just move dalvik-cache in /data to /system, and dalvik-cache in /cache is still there. so still can only creat 50mb swap partition in /cache with the turbo boost.

Sent from my HTC Sensation using Tapatalk 2
 

Zirias

Senior Member
Aug 6, 2012
113
41
Baden-Baden
sekrit.de
trying it on cm10.1..it works!save 200+mb in /data. now more apps can be installed. now i can install much more apps thx for your great job!:)
just for one thing, this mod just move dalvik-cache in /data to /system, and dalvik-cache in /cache is still there. so still can only creat 50mb swap partition in /cache with the turbo boost.

Hi, thanks for testing!

For your issue: I think there should be only one dalvik-cache (either in /data or in /cache), the other one probably being a leftover of another rom. could you try wiping dalvik-cache & cache and see which one is re-created at boot? [If really both, I'll gonna have a look at CM 10.1 myself...]

edit: uninstall the mod before wiping please ...
 
Last edited:
  • Like
Reactions: theggs

theggs

Senior Member
Oct 3, 2011
75
8
Zhenjiang,Jiangsu
tired and still get dalvik-cache in both /date and /cache without this mod. and with this mode, dalvik-cache in both /cache(67.73mb) and /system(238.32mb).
 

Zirias

Senior Member
Aug 6, 2012
113
41
Baden-Baden
sekrit.de
tired and still get dalvik-cache in both /date and /cache without this mod. and with this mode, dalvik-cache in both /cache(67.73mb) and /system(238.32mb).

Ok thanks ... I just researched a little on this and probably your ROM splits dalvik-cache in two parts, for system apps (on /cache) and user apps (on /data).

Of course I could make this mod move both of them to /system, but I think I'll first try to implement some checks for available space in order to make this a safe operation. I'll think about solutions ...

edit: for stripped-down / AOSP roms, this should always be safe, having around 450 to 500 MB free space on /system -- but in order to make this mod safe for all, I think I'll have to work a little on it :)
 
Last edited:
  • Like
Reactions: theggs

Caspertje19

Senior Member
Apr 2, 2007
329
33
Purmerend
Nice idea!

Just wondering since most of us have s-Off, isn't there a way to repartition the band, so I can make more space on data instead of system? I always use aosp roms, so there isn't needed much space on system for me

Sent from my HTC Sensation using xda premium
 

Zirias

Senior Member
Aug 6, 2012
113
41
Baden-Baden
sekrit.de
Just wondering since most of us have s-Off, isn't there a way to repartition the band, so I can make more space on data instead of system? I always use aosp roms, so there isn't needed much space on system for me

Yep, I had that idea, too. Especially using AOSP, the space on /system is wasted.

I'm still not sure whether repartitioning is possible, but now I think I wouldn't dare to, given the fact that recovery resides on the same block device -- I'd worry to brick my phone fiddling with the partition table.

So, for me, moving dalvik-cache to system and installing apps I constantly use to /system/app seemed to be the "next-best" solution.

I'll update this mod probably this weekend, adding some logic checking space-requirements should make it safe to flash.
 

topgeardave

Senior Member
Aug 5, 2011
1,430
603
Nice idea!

Just wondering since most of us have s-Off, isn't there a way to repartition the band, so I can make more space on data instead of system? I always use aosp roms, so there isn't needed much space on system for me

Sent from my HTC Sensation using xda premium

Only people I know who can create custom hboots are alpharev and thalmus_

Sent from my HTC Sensation using xda app-developers app
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    WARNING: This is far from complete, read carefully to know whether it is safe!

    I created a tiny mod that automatically moves dalvik-cache to your /system partition in order to gain space on /data. The idea to do it came from here: http://petermolnar.eu/linux-tech-coding/how-to-move-dalvik-cache-to-system-partition-in-android/

    Fiddling with the bootimage seemed to cumbersome and on a ROM supporting init.d-scripts, it should be possible to fix all from there (remount /system rw and check whether symlink is damaged from a dalvik-cache wipe attempt). This is my first working-for-me zip to automate the process in a flashable zip.

    The installer contains an option to revert the mod -- works for me.

    Prerequisites
    For this to work, you need:
    • A ROM that supports init.d scripts
    • busybox installed (of course)
    • A custom recovery with all busybox links in place (should work on most)
    • Enough free space on /system for dalvik-cache

    Limitations
    • Untested -- so far tested only on my Sensation with SuperXE 4.2.1 ROM
    • Prerequisites unchecked -- this includes busybox and space requirements on /system. Check yourself for now before flashing
    • Dalvik cache wipe non-functional -- at least for me on 4EXT Touch recovery. But it doesn't do any harm, at least.

    Benefits
    • More space on /data -- around 150 MB for me

    Downsides
    • /system must be kept rw

    TODOs
    • Check some prerequisites to make it safer to flash
    • Analyze why dalvik-cache wiping does not work, maybe provide own wiping-option in AROMA
    • Check whether this works on ROMs with dalvik-cache on /cache; it already looks there after /data, so it SHOULD work

    dalvik-syscache_0.2a_ALPHA.zip - use at your own risk.Nandroid keeps you safe, so please test after backup :)!

    Older versions
    Changelog
    * 0.2a:
    • Added dalvik-cache wipe option in AROMA
    • Minor cosmetic changes
    1
    Thanks, although the idea is old, just tried to automate it.

    On a related note - is there no safe way to repartition our device and just shrink the /system partition, giving it to /data instead?
    I don't think so. No idea what kind of partition table is used, but given the fact it's all on the same internal mmc block device, even the recovery partition, I assume it would be quite risky. But maybe someone around knows better?
    1
    AW: [MOD][ALPHA][2013-02-14] Save internal memory: dalvik-cache on /system AROMA

    great job!
    but i want to know if there any harm to our phone when system partition been read and write much more frequently than before?

    No worries there, it's the same underlying block device. The only "issue" with having /system rw is it's maybe easier to accidently mess with your Rom at the command prompt. But wear on the flash is the same, no matter what partition is used for dalvik-cache.

    Sent from my HTC Sensation XE using xda app-developers app
    1
    trying it on cm10.1..it works!save 200+mb in /data. now more apps can be installed. now i can install much more apps thx for your great job!:)
    just for one thing, this mod just move dalvik-cache in /data to /system, and dalvik-cache in /cache is still there. so still can only creat 50mb swap partition in /cache with the turbo boost.

    Hi, thanks for testing!

    For your issue: I think there should be only one dalvik-cache (either in /data or in /cache), the other one probably being a leftover of another rom. could you try wiping dalvik-cache & cache and see which one is re-created at boot? [If really both, I'll gonna have a look at CM 10.1 myself...]

    edit: uninstall the mod before wiping please ...
    1
    tired and still get dalvik-cache in both /date and /cache without this mod. and with this mode, dalvik-cache in both /cache(67.73mb) and /system(238.32mb).

    Ok thanks ... I just researched a little on this and probably your ROM splits dalvik-cache in two parts, for system apps (on /cache) and user apps (on /data).

    Of course I could make this mod move both of them to /system, but I think I'll first try to implement some checks for available space in order to make this a safe operation. I'll think about solutions ...

    edit: for stripped-down / AOSP roms, this should always be safe, having around 450 to 500 MB free space on /system -- but in order to make this mod safe for all, I think I'll have to work a little on it :)