Jump to content

Putting dalvik-cache on /cache


Recommended Posts

Guest Master_T
Posted

Hi everyone

I'm running MIUI 2.3.16 on the A1, but I guess this applies to any GB rom, so I'm opening a new thread.

I've always been annoyed at how the free space on /data just seems to get filled up on it's own, even if I'm not installing new apps. So I decided to have a look around with root explorer, and what I found out is that the culprit is the dalvik-cache, that resides on /data/dalvik-cache. The annoying thing is that while /data gets filled up with apps and dalvik cache, the /cache partition is EMPTY. It has only 1.44 mb occupied out of 75mb!

So I tried to move the dalvik-cache to /cache, but I'm having trouble. I tried to use Darktremor's A2sdGUI that has a function to move dalvik-cache to /cache, but it doesn't work, after the phone restarts the dalvik-cache is still on /data.

So I then tried to just create a symlink manually: I deleted the /data/dalvik-cache folder, and replaced it with a symlink to /cache/dalvik-cache.

But this doesn't work either, because when you reboot the system resets these folders and links, by re-creating /data/dalvik-cache folder and creating a link from /cache/dalvik-cache to that folder (while what I would like to do is the opposite!).

Can anyone help me figure this out? (if it is even possible?)

Guest thepasto
Posted

remove this line from your build.prop

dalvik.vm.dexopt-data-only=1[/CODE]

Guest Master_T
Posted

remove this line from your build.prop

dalvik.vm.dexopt-data-only=1[/CODE]

That line is not present :(

I tried adding it and setting it to "0", but to no avail, it still re-creates. the data/dalvik-cache and re-links /cache/dalvik-cache to it at reboot :(

Guest thepasto
Posted

That line is not present

I tried adding it and setting it to "0", but to no avail, it still re-creates. the data/dalvik-cache and re-links /cache/dalvik-cache to it at reboot

Ok a dirty fix :) Symlink /data/dalvik-cache to /cache/

Guest Master_T
Posted

Ok a dirty fix Symlink /data/dalvik-cache to /cache/

Tried it. SOME of the dalvic-cache files started being put in /cache but then, some time during boot, some script or application removes the link and re-creates the /data/dalvik-cache folder... any idea what could it be?

Guest Master_T
Posted (edited)

Well, I've written this script:


rm -f -r /cache/dalvik

mkdir /cache/dalvik

cp /data/dalvik-cache/* /cache/dalvik

rm -f -r /data/dalvik-cache

rm -f -r /cache/dalvik-cache

cd /data

ln -s /cache/dalvik dalvik-cache

I use SManager set to run the script at startup with root access. Probably very "primitive", but I'm a linux noob, so I'm not so used to bash scripts. But it seems to work, tho it would be better to find out why it gets reset at each boot.

Still, I now have 40 extra mbytes on /data, so I'm happy.

Edited by Master_T

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.