Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,786,442 Members 40,099 Now Online
XDA Developers Android and Mobile Development Forum

cache to sd card

Tip us?
 
saul972
Old
(Last edited by saul972; 8th November 2008 at 03:09 AM.)
#1  
Senior Member - OP
Thanks Meter 1
Posts: 103
Join Date: May 2007
Location: Dallas
Default cache to sd card

Has anyone tried this


http://modmygphone.com/forums/showthread.php?t=4851


Root the phone. How to do it is already here...

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

You are changing to the cache directory.
Deleting the web cache directory.
Making a new one on the sdcard.
Linking symbolically the new one to the old one.

Now open your browser and surf. Your phone does NOT know you did this and it thinks it still has the old one. If you plug your phone into your computer and check you will see a lot of files with 8 character names. (after having surfed of course)

To your phone it is as though the webviewCache is still in the same spot. In reality it is on your SD Card where you have plenty of room for it.

******Warning*****

After doing this to my phone a few hours I tried dowloading an app from the market and I was getting error messages. So I reset my phone thinking it would fix the problem but when i tried to get pass the google log in screen it said my account didn't have the data plan. I re-flashed using the RC28 update.zip file and got it back up. just my experience
 
cookzitall
Old
(Last edited by cookzitall; 7th November 2008 at 10:04 PM.)
#2  
Senior Member
Thanks Meter 5
Posts: 219
Join Date: Oct 2007
can some one help..when i run the first line cd /data/data/com.android.browser/cache it said canr cd to thats location....wat is the problem???

i just noticed that the first line only works if u have cache saved already....i cleared mine n thats y it didnt read the whole line lol opps
 
neoobs
Old
#3  
Retired Moderator
Thanks Meter 10
Posts: 1,271
Join Date: Mar 2008
Quote:
Originally Posted by saul972 View Post
Has anyone tried this


http://modmygphone.com/forums/showthread.php?t=4851


Root the phone. How to do it is already here...

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

You are changing to the cache directory.
Deleting the web cache directory.
Making a new one on the sdcard.
Linking symbolically the new one to the old one.

Now open your browser and surf. Your phone does NOT know you did this and it thinks it still has the old one. If you plug your phone into your computer and check you will see a lot of files with 8 character names. (after having surfed of course)

To your phone it is as though the webviewCache is still in the same spot. In reality it is on your SD Card where you have plenty of room for it.
The last line could essentially save apps on the SD card as well can it not?

BTW apps are saved in several locations, the main apk is in /data/app/ while the data itself is saved in /data/data/ I wonder if you could just link to /data/ as sdcard/data/
 
haitiankid4lyf
Old
#4  
Senior Member
Thanks Meter 0
Posts: 269
Join Date: May 2008
quick question.. where does the cache go if u remove the sdcard and/or you mount it to a pc?
does it save on the device?
does it just not save?
or does it give you an error?
 
Stericson
Old
#5  
Stericson's Avatar
Retired Senior Mod / Senior Recognized Developer - Godfather of Android Theming
Thanks Meter 380
Posts: 1,193
Join Date: Nov 2008
it just doesn't save, I tried it
 
hbguy
Old
#6  
Senior Member
Thanks Meter 0
Posts: 176
Join Date: Jul 2007
Location: Huntington Beach
Default undo changes??

Happy Thanksgiving everyone,

I was wondering if anyone could write out the code on how we could undo these changes. I'm sure its very similar to what stericson wrote for the market cache but I just wanted to make sure on the details. Thank you!

hbguy
P.S: This site is truely GREAT because pros are patient with noobs
 
budvar
Old
#7  
Junior Member
Thanks Meter 0
Posts: 5
Join Date: May 2007
The undo for this would be:

Code:
cd /data/data/com.android.browser/cache
rm webviewCache
mkdir webviewCache
chmod 771 webviewCache
busybox chown app_18 app_18 webviewCache
rm -R /sdcard/webviewCache

To explain:
- change to the correct directory
- remove symbolic link to the sd card
- re-create original directory
- change the access permissions back to defaults
- change ownership back to defaults
- remove cache on the sd card

Few points on this.
I've not actually done this completely, just used my linux knowledge, and tested the chmod/chown steps procedure on my TC5-RC8, but not really sure if it's necessary (there for the sake of accuracy)
Had to use busybox chown as chown not natively found
I'm new to android and have made the assumption everyone's webviewCache is orginally owned by app_18? For all I know, this is randomly generated. I'm sure someone can confirm.

I wouldn't use this method and randomly remove the sdcard...that would be asking for data corruption on the sd card...
 
hbguy
Old
#8  
Senior Member
Thanks Meter 0
Posts: 176
Join Date: Jul 2007
Location: Huntington Beach
thanks budvar!

can someone confirm please?

hbguy
P.S: This site is truely GREAT because pros are patient with noobs
 
hanumantmk
Old
#9  
Junior Member
Thanks Meter 0
Posts: 4
Join Date: Nov 2008
Default webcache owner

Don't think the app owner is always 18. Permissions on my webcache dir are for app_24
 
Studio1b
Old
#10  
Member
Thanks Meter 9
Posts: 56
Join Date: Nov 2008
Web on da as would be sweet throw 8gb In and have no worries about on board space or lag time as the unit deletes cache I hope to see this added to the next firmware for users that plan on using a bigger sd card g1 is a great phone
[SG2-T989] Jedi Mind Trick JB 6 , [G2] ILWT CM7 419 , [TP 16GB/32GB] Android Open Kang Project
get up to 8GB space on Dropbox for free and sync with your phone I have 20 GIGS
BTC ADDRESS : 121a4hMSfd9L1UBigVr9DFZ5pv8q76gnyh

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes