1. You want that $100.00 in your pocket or an Amazon Fire TV don't you? Well here's the deal. With our new updated look we are in desperate need of an updated logo. The 'old' one has certainly served us well, but it's time. Find all the details here: bit.ly/1q0k6Wa
  2. DroidForums.net is currently undergoing a major software upgrade. If you are experiencing any problems logging in please: Contact Us

Always out of space

Discussion in 'Koush' started by Se7enLC, Oct 8, 2010.

  1. Se7enLC
    Offline

    Se7enLC New Member

    Joined:
    Nov 16, 2009
    Messages:
    1,263
    Likes Received:
    0
    Trophy Points:
    0
    I seem to always be out of space in /data. Kind of a rant, but maybe somebody has a suggestion.

    With CM5 and earlier, apps2sd fixed the lack of space by just mapping an extra partition on the SD card into /data, giving you as much space as you want, if I understand it correctly. CM6 and other Froyo ROMs use the official android SD card installs. They use some kind of DRM encryption to help prevent piracy, I suppose. Problem is - they don't actually copy the whole app to the SD card!

    Some examples:
    Flash is 13MB (8MB when installed to SD)
    Skype is 14MB (5MB)
    RockPlayer is 7MB (4MB)
    Tango is 14MB (9.3MB)

    The Firefox app that just got released tried to install 30MB - filled up /data completely and everything started crashing!

    Has anyone tried to go back to the old way of apps2sd? Or found another way to save space? It seems like every time I find a new and exciting app, I have to delete a few things to make space. Which is annoying since I have a 32GB card sitting there.
  2. ZeroBarrier
    Offline

    ZeroBarrier Banned

    Joined:
    Apr 23, 2010
    Messages:
    991
    Likes Received:
    0
    Trophy Points:
    0
    Yes, it can be done using Firerat's Apps2EXT script.

    *Solved*CM6 on motoDROID apps2ext firerat's method. does it work? - CyanogenMod Forum

    Read this thread, and then read the thread linked on the bottom of the first post.

    This should work as long as you're running a ROM that uses the /system/etc/init.d/ scripts at boot.

    This requires you to flash a compatible kernel (i.e. slayher's), as the stock cyanogen kernel does not allow you to mount mmcblk0p2 at the moment.

    To test if your current kernel supprts this, open Terminal Emulator and type:

    If no errors come up, then it worked and your kernel supports mounting mmcblk0p2.

    At the moment I'm running a MIUI ROM on my Motorola Droid and have Apps2EXT working flawlessly on the stock 16GB card, 512MB EXT partition and a 32MB swap partition running swap by way of Swapper 2.

    Enjoy. Post back to let me know how it worked for you or if you need any help.
  3. Se7enLC
    Offline

    Se7enLC New Member

    Joined:
    Nov 16, 2009
    Messages:
    1,263
    Likes Received:
    0
    Trophy Points:
    0
    Awesome! Just reading through the various scripts was interesting to see how apps2sd really functions. I didn't realize that it allowed you to move apps from /data to /sd-ext and back again individually and it updates the packages database accordingly. Very cool!

    My SD card isn't partitioned for that at the moment, so I won't be trying that until I have time to offload and re-load around 20 gigs of stuff, but I think I will try it out. Do you happen to know how far this is off from being included in the nightlies of CM6?
  4. ZeroBarrier
    Offline

    ZeroBarrier Banned

    Joined:
    Apr 23, 2010
    Messages:
    991
    Likes Received:
    0
    Trophy Points:
    0
    No idea how far away it is to being included in the nightlies, but it doesn't matter much; since Firerat updated the script to "self-destruct" when the feature is implemented in CM 6.1.

    Try it out, seriously speaking; you won't run another ROM without this script.

    Took me all of two days to figure out why I couldn't get MIUI to run the script successfully. Finally figured out that the ROM wasn't mounting mmcblk0p2 at boot, so I added 1 line to 05mountsd, rebooted, re-ran the script, and BOOM!!! Profit!
  5. furbearingmammal
    Offline

    furbearingmammal Super Moderator

    Joined:
    Jun 16, 2010
    Messages:
    10,354
    Likes Received:
    6
    Trophy Points:
    0
    Location:
    So far north in NY I smell maple syrup when the wi
    I just enabled Settings> Cyanogenmod settings> Application settings> Allow application moving and set the Install location to external. Haven't had an issue since with running out of internal storage. :)

    However, I will look at that script to see if it does anything for me in the future. :D
  6. ZeroBarrier
    Offline

    ZeroBarrier Banned

    Joined:
    Apr 23, 2010
    Messages:
    991
    Likes Received:
    0
    Trophy Points:
    0
    Actually, it doesn't move Apps to sd-ext, it moves the entire /data/app folder to /sd-ext/app, and if you choose to do so when you first run the script, it also moves /data/data to /sd-ext/data. So the only thing that takes up space on internal memory is /data/dalvik-cache.

    When you run ApkManager.sh to move apps around as you see fit (move more important apps to internal memory, something you don't want to have lag on like Maps/Navigation), what it actually does is it moves the apps you want to /data/app_i and puts a symlink for that app in /sd-ext/app/.

    All very cool stuff, once you use it once or twice and browse around the folders, you'll get a better idea.
  7. ZeroBarrier
    Offline

    ZeroBarrier Banned

    Joined:
    Apr 23, 2010
    Messages:
    991
    Likes Received:
    0
    Trophy Points:
    0
    Try not running out of space when you have around 250 apps, 53 of which are games that can reach up to 15MB (8MB using Apps2FAT on Froyo).

    :rofl3:
  8. furbearingmammal
    Offline

    furbearingmammal Super Moderator

    Joined:
    Jun 16, 2010
    Messages:
    10,354
    Likes Received:
    6
    Trophy Points:
    0
    Location:
    So far north in NY I smell maple syrup when the wi
    Holy Googa Mooga!

    :wink:
  9. Se7enLC
    Offline

    Se7enLC New Member

    Joined:
    Nov 16, 2009
    Messages:
    1,263
    Likes Received:
    0
    Trophy Points:
    0
    P3Droid kernel also doesn't work, sadly. I tried out Slayher and it worked, so I'm sticking with that for now.

    Or better yet, since I was running a nightly, there was already a mountsd script in the init.d directory. When I booted up with a compatible kernel, I found that /sd-ext was already mounted

    So far so good. It took a number of hours to pull everything off my 32GB SD card (even with a card reader) and even longer to put it back on after partitioning. I moved ALL my apps to the sd-ext partition and poked around a bit. It's only using /data for the dalvik cache, so it looks like I should be able to store around twice as many apps without it complaining about storage. The "SD Card and Phone Storage" setting option gives the incorrect size estimate, so you need to use du -d 1 -h -x /data to get an actual measurement of how much space is used on the /data partition.

    Thanks again for the suggestion! so far it's working flawlessly and I don't even notice any lag or slowness - probably because the cache is still on /data.

    I may tinker some more and move some commonly-used apps back to /data to speed them up even more, but it seems like they are fast enough as is.
  10. Ozzie
    Offline

    Ozzie New Member

    Joined:
    Aug 6, 2010
    Messages:
    824
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Minnesota
    ...you caught my attention with the swap partition...did you create the partition and set it up for a swap? I'm interested...
  11. Se7enLC
    Offline

    Se7enLC New Member

    Joined:
    Nov 16, 2009
    Messages:
    1,263
    Likes Received:
    0
    Trophy Points:
    0
    I take it back, this doesn't work at all. After rebooting, all my apps show up as unknown icons. sd-ext doesn't properly mount on boot, but 05mountsd does mount it when I run it. The apps still don't become available.

    EDIT: Got it working again. Problems began when I installed the firefox apk. Maybe there's some size limit on how large an app can be? Or maybe it was the fact that the app crashed the phone and required a battery pull to get it to come back up?
    Last edited: Oct 12, 2010
  12. furbearingmammal
    Offline

    furbearingmammal Super Moderator

    Joined:
    Jun 16, 2010
    Messages:
    10,354
    Likes Received:
    6
    Trophy Points:
    0
    Location:
    So far north in NY I smell maple syrup when the wi
    The ROM has to support it, the kernel has to support it, and even then you have to enable it and sometimes edit/create files to get it to work.

    Oh, and Dustpuppy used to be one of my favorite web comic characters.
  13. Se7enLC
    Offline

    Se7enLC New Member

    Joined:
    Nov 16, 2009
    Messages:
    1,263
    Likes Received:
    0
    Trophy Points:
    0
    Nevermind, it's still having some issues. While it's running, it seems to be fine, but if I hard-power off or pull the battery, when it boots back up it first won't get past the boot animation until I pull the battery, then it thinks none of the applications are installed. After a few more reboots it seems to recover. Not sure what the issue is, but next time it happens I will run aLogCat and see if there's any useful logs (if I can run the app, that is)
  14. ZeroBarrier
    Offline

    ZeroBarrier Banned

    Joined:
    Apr 23, 2010
    Messages:
    991
    Likes Received:
    0
    Trophy Points:
    0
    That's because you didn't safely unmount the sd-ext partition (it happens on occasion by itself and always if you forcefully reboot it with a battery pull), but a simple reboot will fix this by letting the phone properly unmount the partition before power cycling.
  15. Se7enLC
    Offline

    Se7enLC New Member

    Joined:
    Nov 16, 2009
    Messages:
    1,263
    Likes Received:
    0
    Trophy Points:
    0
    I'm not sure it's as simple as that. I had everything working properly for a few days, then I did a power-off (from the hold-power-button menu). When I turned it back on, /sd-ext didn't mount. When I rebooted, /sd-ext mounted but the apps were still all screwed up. The third reboot ended up with a lot of force-closes on acore, requiring a battery pull. Next reboot, /sd-ext didn't mount, etc.

    Once /sd-ext is mounted, is there maybe a way to force it to reload the application information?
  16. ZeroBarrier
    Offline

    ZeroBarrier Banned

    Joined:
    Apr 23, 2010
    Messages:
    991
    Likes Received:
    0
    Trophy Points:
    0
    It kind of is as simple as that, it's actually a known issue with this method (since it is unofficial and all), if the sd-ext partition doesn't unmount properly before a power cycle; then it does a partition check on sd-ext on next reboot. This delays the partition mounting and your phone proceeds in it's boot up sequence ignoring the data in /sd-ext/data/app/ (and /sd-ext/data/data/ if you have that bind option turned on). And since your phone thinks /data/app/ is actually in internal memory, then it doesn't bother reloading applications from there once booted up, so the only way around it is to reboot.
  17. Se7enLC
    Offline

    Se7enLC New Member

    Joined:
    Nov 16, 2009
    Messages:
    1,263
    Likes Received:
    0
    Trophy Points:
    0
    My point is that rebooting doesn't seem to fix anything - it keeps coming up with no applications until I restore to a backup, no matter how many times I reboot. Even if it does successfully mount the /sd-ext partition on boot (perhaps it is being mounted too late, but no amount of rebooting seems to make it mount again quick enough, if that is the case).

    I'm going to investigate the issue further and see if there's a particular situation that triggers it. I believe that it's whenever I take the battery out. Even if I shut the phone off first, that first boot after a battery swap tends to make things blow up.
  18. Se7enLC
    Offline

    Se7enLC New Member

    Joined:
    Nov 16, 2009
    Messages:
    1,263
    Likes Received:
    0
    Trophy Points:
    0
    Looks like that triggers it pretty reliably. Once it fails to mount ONCE, it gives up on all the applications it thought were installed and doesn't look for them again, even if it mounts fine on future reboots. I think the "fix" is to make sure that it is not allowed to finish booting if it cannot mount /sd-ext - since if it DOES finish booting, it corrupts the installed packages database and can't be recovered without a restore.

    I'm going to have to debug this using ADB - aLogcat doesn't give me a long enough scrollback. On a failed boot, There are so many "Application not found" messages that the actual sd-ext mounting error scrolls off the end and can't be found. I may try to modify the script to log to a file, but I don't believe that any files are writeable at the time the script is run (certainly not the SD card)
    Manually deleting packages.xml from the "real" /data partition STARTED to address the problem. Other apps showed up, but most of them were force-closing left and right, probably due to other differences in the /data/system and other directories.
  19. Se7enLC
    Offline

    Se7enLC New Member

    Joined:
    Nov 16, 2009
    Messages:
    1,263
    Likes Received:
    0
    Trophy Points:
    0
    Huzzah! I got it working reliably!

    I used the method found in this posting on xda as inspiration. I added the cm.filesystem.ready property to the end of the 05mountsd script and modified init.rc to delay sysinit until that property was true. I pulled the battery to corrupt the sd-ext filesystem, but the bootup completed fsck before allowing sysinit, preventing the problems I mentioned earlier.

    xda-developers - View Single Post - [Script][A2SD] Darktremor Apps2SD 2.7.5.2 (10/03/2010)

    I may package up this modification into an easily-installable .zip file, or I may just see if it can get included in the next CM release.
  20. ZeroBarrier
    Offline

    ZeroBarrier Banned

    Joined:
    Apr 23, 2010
    Messages:
    991
    Likes Received:
    0
    Trophy Points:
    0
    Nice!

    I'll probably need your help now to get this done, haha!
Search tags for this page
cm.filesystem.ready
,
cyanogenmod 10 out of space
,

cyanogenmod out of space

,
cyanogenmod storage space running out
,
driod razr out of space ob server message
,
droid razr m out of space on server
,
mail droid out of space
,
miui storage space running out
,

motorola droid out of space

,

motorola droid running out of space

,
net 10 android constabtly out of space
,
skype directory for ringtones#gsc.tab
,
storage space is running out in miui
,
storage space running out miui rom
,
why is my nexxus one always out of space