Move All yourCaches to SD card at once.

Search This thread

necromancerr

Senior Member
Dec 13, 2008
67
1
I wrote a small script with help of stericson that will move all your caches to sd card. Right now, it will move caches for following apps;
1)Market
2)browser
3)street view
4)imeem music
5)tune wiki player

all these tutorials used from www.modmygphone.com, i just used all and wrote a script to make my job easier.

This script will make a folder called cache in your sd card, and 5 sub folder, for each apps.

Instructions:
copy the file to your sd card in home directory. make sure you have root.
go to terminal, and type in following commands
#mkdir /data/local/bin
#cp /sdcard/transfer.sh /data/local/bin
#chmod 0755 /data/local/bin/transfer.sh
#transfer.sh

it'll execute itself, if you get any error messages saying "bla bla bla" dir doesnt exist, that is because either you don't have that app installed or you have never used that app before and it doesnt have any cache to transfer.

Leave comments or suggestions. i will make maps work this weekend. i dnt have time right now.

http://rapidshare.com/files/184145725/transfer.sh

i am not responsible if it bricks your phone. I am pretty sure it wont though
 
Last edited:

Birba

Senior Member
Feb 27, 2006
317
30
Can you upload it somwhere else? I cannot access rapidshare at the moment.

Thanks
 

betawind

Member
Dec 13, 2007
25
0
Tempe, AZ
Hey Birba, copy and paste the below into notepad, save as transfer.sh :)

chmod 0777 /data/local/bin/transfer.sh

mkdir /sdcard/cache

rm -R /data/data/com.android.vending/cache
mkdir /sdcard/cache/marketCache
ln -s /sdcard/cache/marketCache /data/data/com.android.vending/cache

rm -R /data/data/com.android.browser/cache/webviewCache
mkdir /sdcard/cache/webviewCache
ln -s /sdcard/cache/webviewCache /data/data/com.android.browser/cache/webviewCache


rm -R /data/data/com.google.android.street/cache
mkdir /sdcard/cache/streetCache
ln -s /sdcard/cache/streetCache /data/data/com.google.android.street/cache


rm -R /data/data/com.imeem.gynoid/cache
mkdir /sdcard/cache/imeemCache
ln -s /sdcard/cache/imeemCache /data/data/com.imeem.gynoid/cache


rm -R /data/data/com.tunewiki.lyricplayer.android/cache/webviewCache
mkdir /sdcard/cache/tunewikiCache
ln -s /sdcard/cache/tunewikiCache /data/data/com.tunewiki.lyricplayer.android/cache/webviewCache


Oh and thank you for this necro, much appreciated for those of us who get hand cramps typing out all these commands on the G1 keyboard
 
Last edited:

pixel-painter

Senior Member
Jan 9, 2009
239
26
Seattle
Doesn't it seem like it would be a good idea to copy the cache over before you delete it :)

I'm a bit of linux noob.. but perhaps instead of deleting you could change it to mv and then you would not need to make the directory on the SD card either

so


rm -R /data/data/com.android.vending/cache
mkdir /sdcard/cache/marketCache
ln -s /sdcard/cache/marketCache /data/data/com.android.vending/cache

would become

mv /data/data/com.android.vending/cache /sdcard/cache/marketCache
ln -s /sdcard/cache/marketCache /data/data/com.android.vending/cache
 
Last edited:
Sd card myheim!!!

OK please help i have searched all over. I have 2 Questions & Requests:

1. How do I install a script file? I know it automaticlly changes the Registry of the android OS or the Internal/FileSystem whateva its called but how to i install it??? Please help & Be detailed.



2. This is the big one. If a script file does automaticlly change the Internal file system (Android Registry) without using the Abd Shell. Can u please make the upload the script files to "INSTALL & RUN APPS FROM THE SD CARD" its been very difficult using the "adb shell" on my desktop.

Ive tried everything. I even tried to use the "ASTRO" file browser to modify the correct files but evenwith root it wont allow you to modify or switch files.

PLease Help. My SD Card is already perfectly partioned and ready to go.
 

ghassan99

Senior Member
Aug 3, 2006
79
3
Thanks, that was an excellent post.

For steel, you can probably add this in the script file:

rm -r /data/data/com.kolbysoft.steel/cache/webviewCache
mkdir /sdcard/cache/steelCache
ln -s /sdcard/cache/steelCache /data/data/com.kolbysoft.steel/cache/webviewCache


-Gus
 

Beast84

Senior Member
Oct 28, 2007
1,126
41
Albuquerque
if you get any error messages saying "bla bla bla" dir doesnt exist, that is because either you don't have that app installed or you have never used that app before and it doesnt have any cache to transfer.

Would this error cause this to not work properly? In my case, I don't have imeem or tunewiki installed so I don't need these cache's moved. Would this cause a problem?

Also, how do you create a .sh file? I tried deleting these 2 commands myself but I couldn't find a .sh option in the save as drop down menu
 
U

unknown.soul

Guest
I don't have imeem or tunewiki installed so I don't need these cache's moved. Would this cause a problem?
Nothing bad will happen because their caches won't be moved in the first place.

Also, how do you create a .sh file? I tried deleting these 2 commands myself but I couldn't find a .sh option in the save as drop down menu
Save as transfer.txt, then rename to transfer.sh
 

Beast84

Senior Member
Oct 28, 2007
1,126
41
Albuquerque
Nothing bad will happen because their caches won't be moved in the first place.

Ok so I won't constantly have to dismiss errors on the phone due to this? Also does the script have to stay on the root of my SD or can I delete it after I perform the commands?

Save as transfer.txt, then rename to transfer.sh

I tried that but it didn't change the file extension. The original I downloaded says sh file. The one I made still says text document
 

necromancerr

Senior Member
Dec 13, 2008
67
1
Hey Birba, copy and paste the below into notepad, save as transfer.sh :)

chmod 0777 /data/local/bin/transfer.sh

mkdir /sdcard/cache

rm -R /data/data/com.android.vending/cache
mkdir /sdcard/cache/marketCache
ln -s /sdcard/cache/marketCache /data/data/com.android.vending/cache

rm -R /data/data/com.android.browser/cache/webviewCache
mkdir /sdcard/cache/webviewCache
ln -s /sdcard/cache/webviewCache /data/data/com.android.browser/cache/webviewCache


rm -R /data/data/com.google.android.street/cache
mkdir /sdcard/cache/streetCache
ln -s /sdcard/cache/streetCache /data/data/com.google.android.street/cache


rm -R /data/data/com.imeem.gynoid/cache
mkdir /sdcard/cache/imeemCache
ln -s /sdcard/cache/imeemCache /data/data/com.imeem.gynoid/cache


rm -R /data/data/com.tunewiki.lyricplayer.android/cache/webviewCache
mkdir /sdcard/cache/tunewikiCache
ln -s /sdcard/cache/tunewikiCache /data/data/com.tunewiki.lyricplayer.android/cache/webviewCache


Oh and thank you for this necro, much appreciated for those of us who get hand cramps typing out all these commands on the G1 keyboard


This will not work because when u save the file it has to be in UNIX format. Android being based on linux needs this format to work. U either have to be in linux to save this file. If in windows u have to use a program called textpad. it is just an evalutation version. buy if you want.
 
Last edited:

necromancerr

Senior Member
Dec 13, 2008
67
1
Ok so I won't constantly have to dismiss errors on the phone due to this? Also does the script have to stay on the root of my SD or can I delete it after I perform the commands?



I tried that but it didn't change the file extension. The original I downloaded says sh file. The one I made still says text document


U need to be in linux to save file in sh format. More than saving the file insh format they need to be in unix format. Use either linux or use textpad in windows. It'll work
 

necromancerr

Senior Member
Dec 13, 2008
67
1
Would this error cause this to not work properly? In my case, I don't have imeem or tunewiki installed so I don't need these cache's moved. Would this cause a problem?

Also, how do you create a .sh file? I tried deleting these 2 commands myself but I couldn't find a .sh option in the save as drop down menu


Don't worry abot that. The script will still work. If u ever get imeem, then u'l need to run the script again. Then it'll say that some files and folders already exists but u'll be fine
 

JesusFreke

Inactive Recognized Developer
Oct 23, 2008
736
54
Dallas
This will not work because when u save the file it has to be in UNIX format. Android being based on linux needs this format to work. U either have to be in linux to save this file. If in windows u have to use a program called textpad. Its a free program.

textpad FTW! It is an application that I use ALL the time.

BUT it is not free. It does has an unlimited evaluation, with a very non-intrusive registration reminder thingy. If you use Textpad as much as I do, please pay for it, and support the authors, so we can have more textpad goodness in the future :D

To save a file in unix format with textpad, go to file->save as, and then there is a "File format" field down at the bottom, where you can choose between PC, Unix and Mac.
 

necromancerr

Senior Member
Dec 13, 2008
67
1
textpad FTW! It is an application that I use ALL the time.

BUT it is not free. It does has an unlimited evaluation, with a very non-intrusive registration reminder thingy. If you use Textpad as much as I do, please pay for it, and support the authors, so we can have more textpad goodness in the future :D

To save a file in unix format with textpad, go to file->save as, and then there is a "File format" field down at the bottom, where you can choose between PC, Unix and Mac.

thx for clarification. i dont use that program alot. so i didnt know that. thank you very much.
 

Beast84

Senior Member
Oct 28, 2007
1,126
41
Albuquerque
textpad FTW! It is an application that I use ALL the time.

BUT it is not free. It does has an unlimited evaluation, with a very non-intrusive registration reminder thingy. If you use Textpad as much as I do, please pay for it, and support the authors, so we can have more textpad goodness in the future :D

To save a file in unix format with textpad, go to file->save as, and then there is a "File format" field down at the bottom, where you can choose between PC, Unix and Mac.

And once I change this to Unix, how do I save it as a .sh file? I still don't see the option anywhere. And renaming the file still doesn't change it

EDIT: I think I got it. I had to go into the preferences & manually add .sh as an extension. Is that how you did it JF?
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Maybe I missed it it scanning through the posts, but why do this? What benefits are there?

    Thanks.

    P: I guess the proses is the same on the mytouch 4g?

    If I remember correctly, this was back before apps2sd, if not at the same time.
    G1 users are very familiar with the "Low on space" notification, this would theoretically help to free up extra space you could use to install more apps.

    IE: move your cache out of /data, move more apps into /data
    This caused a lot of stability and speed problems for me, though, so I wouldn't rely on it. As it takes longer for the cache to be written/read to/from the SD card than it does to read it from /data.

    So if you're feeling adventurous, and have made a nandroid backup, you can go ahead and try it... I don't recommend it though.