Problems moving cache - Android Community Forums
Register Members List Social Groups Calendar Search Today's Posts Mark Forums Read


Go Back   Android Community Forums > Android Discussions > Android OS Discussions


Android OS Discussions General discussion about Android OS / Platform. No commercial posts please!

Reply
 
Thread Tools Display Modes
  #1  
Old 01-02-2009, 01:11 AM
kitsunisan's Avatar
kitsunisan kitsunisan is offline
kitsunisan is holding on for a Hero
Phone junkie!
 
Join Date: Oct 2008
Posts: 1,233
kitsunisan is on a distinguished road

Knowledge 
Total Awards: 1

Default Problems moving cache

So, after getting root, first thing I did, naturally, was try and move browser/market cache, but I've run into a snag. I came across a thread by Damnitpud listing the move commands, lets take the browser cache as an example:
cd /data/data/com.android.browser/cache
rm -R webviewCache
mkdir /sdcard/cache/webviewCache (if you have already made the cache folder in your microSD)
ln -s /sdcard/webviewCache webviewCache
Pretty straightforward, one would think, but when I get to this step:
cd /data/data/com.android.browser/cache
rm -R webviewCache
I get rm failed for _R, no such file or directory. Don't want to play around with the commands, thought I'd check first here to prevent getting a shiny new brick.
And the market cache failed at the same step, it said permission denied. I was using terminal emulator, since telnet isn't connecting for some reason.
Reply With Quote
Ads
  #2  
Old 01-02-2009, 01:12 AM
JohnnyLicious's Avatar
JohnnyLicious JohnnyLicious is offline
JohnnyLicious is in love with asian girls :P
Android Community App Guru - Staff Android
 
Join Date: Oct 2008
Location: 909 So Cal
Posts: 3,325
JohnnyLicious is on a distinguished road

Android Community Staff Award 
Total Awards: 1

Send a message via AIM to JohnnyLicious
Default Re: Problems moving cache

yea telnet isnt letting me connect either i don tknow what else to do lol
Reply With Quote
  #3  
Old 01-02-2009, 01:23 AM
kitsunisan's Avatar
kitsunisan kitsunisan is offline
kitsunisan is holding on for a Hero
Phone junkie!
 
Join Date: Oct 2008
Posts: 1,233
kitsunisan is on a distinguished road

Knowledge 
Total Awards: 1

Default Re: Problems moving cache

Found the issue, I think, it was a noobish move, I didn't type in su in terminal emulator, worked after that. I just needed SU status there.
Do have a quick question about it though, does it create a visible folder on the sd card? I went through the steps moving the browser and market cache through terminal emulator, every step went through alright, but no folder shows. How do I know if I got it right?

Last edited by kitsunisan; 01-02-2009 at 01:27 AM.
Reply With Quote
  #4  
Old 01-02-2009, 01:24 AM
JohnnyLicious's Avatar
JohnnyLicious JohnnyLicious is offline
JohnnyLicious is in love with asian girls :P
Android Community App Guru - Staff Android
 
Join Date: Oct 2008
Location: 909 So Cal
Posts: 3,325
JohnnyLicious is on a distinguished road

Android Community Staff Award 
Total Awards: 1

Send a message via AIM to JohnnyLicious
Default Re: Problems moving cache

really let me try that then lol.

thanks
Reply With Quote
  #5  
Old 01-02-2009, 01:43 AM
rynosaur's Avatar
rynosaur rynosaur is offline
rynosaur is looking for a Dev ADP1 back cover!
Posting is my life!
 
Join Date: Oct 2008
Location: Dekalb, IL
Posts: 2,019
rynosaur is on a distinguished road
Send a message via AIM to rynosaur Send a message via Yahoo to rynosaur
Default Re: Problems moving cache

The instructions for moving the browser cache are faulty on AC. This is the proper symlink command (the last command):

ln -s /sdcard/cache/webviewCache webviewCache

the original AC post omits the "cache" subdirectory that you have to set up in /sdcard, which will lead Android to send your browser cache files to some dark, unknown place Most likely back to device memory, but I dunno.


the "cache" subdirectory contains marketCache, webviewCache, and streetCache . . . you can add app caches to this directory on the sdcard if you like. Others have done it with success.

I improvise and do the browser cache this way, and it actually seems to work better at minimizing the total space Android Browser will ever take in device RAM:

su
cd /data/data/com.android.browser
rm -R cache
ln -s /sdcard/cache cache

so with this method the OS will look to the cache subdirectory and create webviewCache in the sdcard/cache, as far as I can tell this way is simpler and works better, but I'm no linux genius, I could be wrong.
Reply With Quote
  #6  
Old 01-02-2009, 02:12 AM
kitsunisan's Avatar
kitsunisan kitsunisan is offline
kitsunisan is holding on for a Hero
Phone junkie!
 
Join Date: Oct 2008
Posts: 1,233
kitsunisan is on a distinguished road

Knowledge 
Total Awards: 1

Default Re: Problems moving cache

Thanks for the tip, I'll check it out in the morning, 1am here ant it's bad to do this stuff bleary eyed.
Reply With Quote
  #7  
Old 01-02-2009, 02:17 AM
JohnnyLicious's Avatar
JohnnyLicious JohnnyLicious is offline
JohnnyLicious is in love with asian girls :P
Android Community App Guru - Staff Android
 
Join Date: Oct 2008
Location: 909 So Cal
Posts: 3,325
JohnnyLicious is on a distinguished road

Android Community Staff Award 
Total Awards: 1

Send a message via AIM to JohnnyLicious
Default Re: Problems moving cache

thanks alot i will try it.
Reply With Quote
  #8  
Old 01-02-2009, 03:13 AM
rynosaur's Avatar
rynosaur rynosaur is offline
rynosaur is looking for a Dev ADP1 back cover!
Posting is my life!
 
Join Date: Oct 2008
Location: Dekalb, IL
Posts: 2,019
rynosaur is on a distinguished road
Send a message via AIM to rynosaur Send a message via Yahoo to rynosaur
Default Re: Problems moving cache

By the way, you cannot use the "clear cache" button in Android Browser ever again, or your symlink will be destroyed and the browser will start caching in the flash mem again. Using "clear user data" in the applications menu seems to do the same thing. To clear out the sdcard caches periodically, I just cd to each subdirectory and:

rm -R *

Be very careful when/where you issue this command because it will recursively delete every file in the directory you issue this command, and there's no trash can in linux: deleted means deleted. I always issue the "ls" command right before I clear out a directory to make sure I can see exactly what's about to go.

Have fun!
Reply With Quote
  #9  
Old 01-02-2009, 05:19 AM
Mi|enko Mi|enko is offline
Mi|enko has no status.
Smoke signaler
 
Join Date: Dec 2008
Location: Seattle, WA
Posts: 17
Mi|enko is on a distinguished road
Send a message via ICQ to Mi|enko Send a message via AIM to Mi|enko Send a message via MSN to Mi|enko Send a message via Yahoo to Mi|enko
Default Re: Problems moving cache

I did this for the browser and market. Worked a treat. Browsed to 2 sites, as well as loaded up the market for a few minutes, and my cache folder grew to 7 megs from 0. While this doesn't seem like much, that's actually quite a bit for the memory on the phone itself (plus I have a 16 gig card).

The only problem I'm having is the TuneWiki one. It says it can't cd it. Any ideas?
Reply With Quote
  #10  
Old 01-04-2009, 01:31 PM
ilasno ilasno is offline
ilasno is rooted, and hopes to become worthy of it!
Smoke signaler
 
Join Date: Jan 2009
Posts: 7
ilasno is on a distinguished road
Default Re: Problems moving cache

Forgive my ignorance, but can you explain the benefits of moving the app caches to the SD card? Is it anything beyond not using the space on the phone itself? Are the caches that space-consuming?
Reply With Quote
Reply

Bookmarks


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump

Ads

Similar Threads
Thread Thread Starter Forum Replies Last Post
moving apps to Sd card Stericson General Mod My Android Discussions 11 11-09-2008 10:51 AM
Moving Contacts almightyA Android-powered Hardware discussions 20 11-02-2008 12:57 PM


All times are GMT -5. The time now is 11:50 PM.


Powered by vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

Copyright © 2008-2009 Android Community / R3 Media LLC, All Rights Reserved.