Android Community
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 17

Thread: Problems moving cache

  1. #1
    Join Date
    Oct 2008
    Location
    Minneapolis MN
    Posts
    1,843

    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.

  2. #2
    Join Date
    Oct 2008
    Location
    909 So Cal
    Posts
    3,229

    Default Re: Problems moving cache

    yea telnet isnt letting me connect either i don tknow what else to do lol

  3. #3
    Join Date
    Oct 2008
    Location
    Minneapolis MN
    Posts
    1,843

    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 12:27 AM.

  4. #4
    Join Date
    Oct 2008
    Location
    909 So Cal
    Posts
    3,229

    Default Re: Problems moving cache

    really let me try that then lol.

    thanks

  5. #5
    Join Date
    Oct 2008
    Location
    Dekalb, IL
    Posts
    1,950

    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.

  6. #6
    Join Date
    Oct 2008
    Location
    Minneapolis MN
    Posts
    1,843

    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.

  7. #7
    Join Date
    Oct 2008
    Location
    909 So Cal
    Posts
    3,229

    Default Re: Problems moving cache

    thanks alot i will try it.

  8. #8
    Join Date
    Oct 2008
    Location
    Dekalb, IL
    Posts
    1,950

    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!

  9. #9
    Join Date
    Dec 2008
    Location
    Seattle, WA
    Posts
    18

    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?

  10. #10
    Join Date
    Jan 2009
    Posts
    7

    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?

Page 1 of 2 1 2 LastLast

Similar Threads

  1. moving apps to Sd card
    By Stericson in forum Developers Guild
    Replies: 11
    Last Post: 11-09-2008, 09:51 AM
  2. Moving Contacts
    By almightyA in forum General Phone Chat
    Replies: 20
    Last Post: 11-02-2008, 11:57 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •