Jump to content

Cache's to SD


Recommended Posts

Posted

Hi forum,

I've just upgraded to Paul's excellent ROM and have set-up symbolic links to have my Dalvik, Web, Gmail, Maket etc caches stored on my sd card. My question is, if I apply an update will I have to set-up the links again or is it only after a full-wipe?

Thanks!

Posted
Hi forum,

I've just upgraded to Paul's excellent ROM and have set-up symbolic links to have my Dalvik, Web, Gmail, Maket etc caches stored on my sd card. My question is, if I apply an update will I have to set-up the links again or is it only after a full-wipe?

Thanks!

AFAIK, the symlinks will be lost if you flash an update.zip that includes a system partition, as (for example) the MCR ROM you are running actually formats the entire system partition on each update.

BUT, I'm not familiar with the locations of the caches you mention. If they are on /data (which I think, on reflection is more likely), then only a wipe should really affect it, although you'd really need to try it and see. If you open the latest update.zip from Paul, and browse through it, you can see what files in /data get updated. I can tell you that data is not formatted by Paul's ROM, so I think you'll be fine if the stuff is on /data (before symlinked off to SD)

Welcome to the forum :)

Guest volatile_ink
Posted
AFAIK, the symlinks will be lost if you flash an update.zip that includes a system partition, as (for example) the MCR ROM you are running actually formats the entire system partition on each update.

BUT, I'm not familiar with the locations of the caches you mention. If they are on /data (which I think, on reflection is more likely), then only a wipe should really affect it, although you'd really need to try it and see. If you open the latest update.zip from Paul, and browse through it, you can see what files in /data get updated. I can tell you that data is not formatted by Paul's ROM, so I think you'll be fine if the stuff is on /data (before symlinked off to SD)

Welcome to the forum :)

Thanks for the fast reply.I'm going to upgrade my account to 'Plus' when I get a credit card on my birthday!  B)

For the browser, gmail, market and maps, the code looks like this (snippets only). 

cd /data/data/com.android.browser/cache 

rm -R webviewCache

mkdir /sdcard/cache/webviewCache

ln -s /sdcard/cache/webviewCache webviewCache

Here's what I have for Dalvik:

rm -rf /data/data

ln -s /system/sd/data /data/data

rm -rf /data/dalvik-cache

ln -s /system/sd/dalvik-cache /data/dalvik-cache

It's not that much work to run the code after each update is released, but there seems to be  a lot of Beta's coming out and I don't want to get left behind. Does anyone know if this code could be put into a script? If so, I assume it would be a text file with a '.sh' extension? 

Thanks.

Posted
Thanks for the fast reply.I'm going to upgrade my account to 'Plus' when I get a credit card on my birthday! :)

For the browser, gmail, market and maps, the code looks like this (snippets only).

cd /data/data/com.android.browser/cache

rm -R webviewCache

mkdir /sdcard/cache/webviewCache

ln -s /sdcard/cache/webviewCache webviewCache

Here's what I have for Dalvik:

rm -rf /data/data

ln -s /system/sd/data /data/data

rm -rf /data/dalvik-cache

ln -s /system/sd/dalvik-cache /data/dalvik-cache

It's not that much work to run the code after each update is released, but there seems to be a lot of Beta's coming out and I don't want to get left behind. Does anyone know if this code could be put into a script? If so, I assume it would be a text file with a '.sh' extension?

Thanks.

Yeah. Grab the app Gscript from the market (Lite version is free, and it's all you need).

Now type in the commands once (using the soft keyboard, I know it's a hassle, but do it once).

When you save the script, it goes into a folder on your SD card, and you just need to whack this app in (if you use app2sd then it will still be there) and run the script to re-do your commands. I don't know how it will behave when you haven't wiped the data partition, as some of the commands might not need to be redone.

In particular

For the browser, gmail, market and maps, the code looks like this (snippets only). 


cd /data/data/com.android.browser/cache 

rm -R webviewCache 

mkdir /sdcard/cache/webviewCache 

ln -s /sdcard/cache/webviewCache webviewCache
This one should be fine without being redone (I think:)) The other ones
rm -rf /data/data

ln -s /system/sd/data /data/data


rm -rf /data/dalvik-cache

ln -s /system/sd/dalvik-cache /data/dalvik-cache

Look like they'll need to be repeated after each update.zip that formats system.

HTH

Guest volatile_ink
Posted

 Very nice. Thanks for the help, it will certainly save me a lot of time!

Posted
Very nice. Thanks for the help, it will certainly save me a lot of time!

No problem. :) Let us know how it goes.

Guest volatile_ink
Posted
No problem. :) Let us know how it goes.

Going to try this when the next MCR comes out (with 2.1 hopefully!). Will feedback then!

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.