[Q] System computes free space on /data instead of sd:ext - EVO 4G Q&A, Help & Troubleshooting

Forgive me if this has been asked/answered before. I found similar threads related to the /system partition, but nothing related to the /data partition.
I'm running a custom ROM with A2SD (sd:ext)-- specifically, an ample 1GB partition on /system/sd. As you're probably aware, /data/app symlinks to /system/sd/app. Currently, I have 52MB free on /data, and 355MB free on /system/sd.
Here is my situation:
I have a large app (74MB) installed in .android_secure. Since I don't want apps in .android_secure (for my own personal irrelevant reasons), I would typically go into Settings->Applications (or TitaniumBackup) and actually move the app to the phone (which puts it into /data/app, hence /system/sd/app). The problem is that the system's move program that moves the app calculates the free space on the /data partition (52MB) instead of the free space in the finer destination, which is /system/sd/app (355MB), and ultimately rejects the move because it doesn't think there is enough free space (when there really is).
I was thinking of resizing the /data partition to "trick" the move program. But the only thing I can really steal space from is the /system partition, which isn't such a great idea. Seeing as my dalvik cache and app data takes up 350MB (or about 85%) of the /data partition, I'm further concerned I might eat up my /data partition, even without apps installed directly on it!!!
How have others dealt with this problem? I've seen some stuff about moving the dalvik cache to the sd card, though there are much better arguments AGAINST doing that.
Any help is much appreciated!
Related commands (FYI):
df -k - Shows the storage allocation and usage by partition
du -hs <path> - Calculates the free space (recursively) for given path. Note: it will not include any data within any symlinks.

Related

cache2cache

Can the Desire benefit from using cache2cache? The Hero and Eris both use this in some of the sense roms, not sure if the Desire devs have taken any notice?
-------------------------------
http://forum.xda-developers.com/showthread.php?t=726467
Cache Location (Cache2cache):
By default, the dalvik-cache has been relocated from the internal /data/dalvik-cache/ directory to the internal /cache/dalvik-cache directory. The Eris comes with an internal /cache/ file block of 130mb that is not used! After reviewing a number of xda member file system usage reports (thanks xtrROM and xtrSENSE users!) the MOST reported use of this space was 5%... So by moving the dalvik-cache to this free area you now have over 150mb on internal /data/ for apps and over 75mb in internal /cache/ for dalvik-cache. This means that you can probably install close to 100 apps WITHOUT having to partition and move anything to the SD Card ext!
Well as we have s-off we can just resize the partitions instead It's quite easy to do. BTW I don't remember the std partition layout so can't say if this is really a problem

sd-ext/a2sd - 128mb free /data: insufficient memory

Perhaps I don't understand the purpose of sd-ext/4ext/a2sd etc [I'm sure this is the case!]
I'm running the Aurora v3 rom - basically a sense2.1 with an ext partition. I cannot understand why I've 128mb free in /data after installing pretty much all my apps yet I'm getting insufficient storage errors; I can't install anything despite having a lot of /data free- it seems if my sd-ext if nearly full I can't use my /data?
1. The rom's files flash to /system, and a few to /data. As it's large, we partition the sd card with a 4ext part of say 342mb for overspill of the system/data files.
2. If we change the hboot (to cm7) such that the /system is smaller - overflowing into sd-ext - we get a larger /data partition for apps on the internal memory. (I've done this for for Oxygen/Redux roms and had over 340mb /data with no sd-ext.) Thus alpharev say's we'd get 287mb /data.
3. This rom installs apps to /sd-ext, and/or /data[?]; in Android's App usage I'm reporting 152mb used, 135mb free (the 287mb /data?); and 128mb free storage.
4. 4ext recovery reports 1.7mb free of 342mb for sd-ext - it's full. Which makes sense if apps install to /sd-ext, but why not fill the internal /data first? adb shell df -h gives:
Code:
Filesystem Size Used Available Use% Mounted on
/dev/block/mtdblock4 5.0M 796.0K 4.2M 16% /cache
/dev/block/mmcblk0p1 7.1G 4.5G 2.6G 63% /sdcard
/dev/block/mtdblock5 287.6M 159.3M 128.3M 55% /data
/dev/block/mmcblk0p2 331.3M 329.6M 1.7M 99% /sd-ext
/dev/block/mtdblock3 145.0M 122.8M 22.2M 85% /system
5. To me this means /data has 128mb free for apps; sd-ext is full with system files and apps - seeming to me that apps take space up on both /data and /sd-ext, duplicating space usage. Obviously I'm wrong on this but that's how I see my space disappearing lol Yet I cannot install any apps as I've insufficient storage.
6. Clearly I'm misunderstanding things after installing just 150mb apps and thinking I'd have 287mb of apps /data, not just /sd-ext: why shrink hboot's /system to make a large /data if the apps go to sd-ext?
7. I've not moved dalvik cache to sd as I thought I'd not need to given the seemingly large /data, and it's free amount. Clearly I can do so but why isn't my /data space available?
Sorry for long post and sounding dumb, I'm really trying not to be!
These Roms use sdext for both Rom and part of the apps and possibly dalvik too. Traditionally it would just be apps and maybe dalvik.
With these bigger roms, you need bigger ext to get the same. Yes when ext is full, you can't install anything. Maybe you need a bigger ext partition
Sent from my HTC Desire using XDA App
Thanks for the reply.
That's what I thought - I just cannot understand why I cannot use the free /data though; what's the point of changing to the CM7 hboot when your /data is limited to that of the sd-ext? Isn't it doubling up on storage use by apps, placing them in sd-ext and /data, and when one is full you can't utilise the other?
Sorry for sounding stupid, it just makes no sense to me.
btw I checked out your dGB, looks great. I do love miinimalist roms but also prize my Sense-720p'd camera!
No its not doubling up. The point is that /data/app and /data/dalvik-cache are symlinked to /sd-ext/app and /sd-ext/dalvik-cache.
However, /data/data where the libs, preferences and databases are, remain on /data/data
So when you install an .apk, it installs the app to /sd-ext/app, the dalvik is created on /sd-ext/dalvik-cache and the libs & db's etc will install to /data/data
If sd-ext is full, there is no where for the apk to go.
Thanks for clearing that up for me, I feel kinda stupid - I just couldn't get my head around it: why the nand wasn't being used for apk placement but I see they are split up and components spread over the combined sd-ext and /data. Thanks!
No probs. Not seen you on AF for a while?
OT
Android Forum? = xda? I've been offline a lot recently as this Indian Summer has made for some prime ultrarunning weather, but also takes a ton of time (by definition) although I've been rocking Redux/Aurora roms recently. Just been perusing the Desire forum today and there's been a ton of awesome rom progress since my last visit. I remember your help and work on Redux/thread/pm, great stuff. Still a beginner but it's very interesting learning this stuff, just also takes a lot of time for a non programmer!
Of potential note, 'found' a bug in gnu parted trying to partition out a 512mb 4ext sd-ext via 4EXTRecovery (madmaxx82 located it, I merely experienced it!) Always feels good to in a tiny way contribute

Change Download Location for Market/Play?

Apologies ahead of time if this has been answered before. I spent about 30 minutes Googling and trying solutions without any luck.
My situation is that I'm on MikG 3.11 and am using the built in A2SD to store all the apps on a 2GB SD-Ext partition. I have enough apps that the ~160MB internal /cache partition is pretty much filled with Dalvik Cache files in the /cache/dc subdirectory (only 3MB left on the partition).
Unfortunately, Google Play (formerly Market) seems to download app installs and updates into /cache with file names like "Download.apk" and "Download-1.apk" and then installs the apps from there. Since there is so little space, any app above 1.5MB or so fails to download and install (it seems to need the space for the download and then space to extract the download, so you can only get apps that are about 1/2 the size of the remaining partition space).
Is there any way to change where Google Play/Market downloads apps to install? I've got plenty of space on /data or the SD-Ext partition.
I found old directions to fix this issue by entering the following at terminal to create a sym link for Market to download on the SD card:
Code:
mkdir /mnt/sdcard/market-download-cache
su
cd /cache
mv download download.bak
ln -s /mnt/sdcard/market-download-cache download
ls -ahl
Unfortunately, Play/Market no longer uses a "download" sub-directory on /cache, so this won't work.
To fix the problem, I tried using "a2sd cachesd" to free up space on /cache by moving the Dalvik Cache to the SD-Ext partition, but that made for a really laggy experience (presumably because my SD card has bad random r/w access). I could also presumably just unmount the partition from /cache and make /cache a sym linke to a folder on the SD Ext card, but it doesn't seem that would perform much better.
My only thought at this point for a long term solution is to copy the current /cache contents to /system/sd/cache, mount the current partition on /cache at /mnt/cache (unmounting it from /cache first), create a sym link from /cache to /system/sd/cache, then set up a sym link from /mnt/cache/dc to /system/sd/cache/dc. All of this would have the effect of keeping the Dalvik Cache on the same internal partition where it currently resides while letting Play/Market have plenty of space in the new /cache which would actually be a directory on the SD-Ext partition. But, this seems kind of hacky and could negatively impact other things that might need /cache.
My short term solution is that every time I need to install or update apps, I just go into /cache/dc with Root Explorer and delete a bunch of the cached data to free up enough space for the app(s) and then do the update/install through Play/Market. The OS then seems to recreate the cached information the next time I run the app whose cached data I deleted (for example, I deleted the IMDB cached data and the next time I ran IMDB it took a long time to come up but then worked fine-- presumably the delay was recreating the cached data/app). The OS also seems to recreate the dalvik cached files on boot (not sure if that is a general feature or just in the MikG ROM I'm using).
In any case, I think all of the above is accurate so even if nobody has better solutions, maybe this will help others understand why they can't install/update apps even though it seems they have plenty of space.
If anybody is out there that has a good long term solution to this (like a place you can change the directory where Play/Market downloads), please let me know.
It's probably not cool to respond to your own post, but I had another idea for fixing this problem:
It looks like /data has 140MB of space left on it-- could I move the Dalvik Cache to that partition so there would be plenty of space on /cache to let Market/Play work?
As far as I can tell, /data/dalvik-cache is already a link (maybe a hard link?) to /cache/dc, so presumably I could just switch that to the Dalvik Cache was actually on /data?
Any thoughts on whether this would work and if it is a good idea or bad idea?

[Q] SD-card partitioning / storage layout on desire

Dear XDA forum,
since a few roms i always get a "low on storage" warning, even after factory reset and flashing a new rom.
So i'd want to ask for a small summery of what storage there is inside the desire and on the sdcard and how to solve this problem
My sdcard is 16GB class 10. I didnt partition it manually (i think).
according to my desire it has effective 14.2gb.about 2gb are used and 4gb are free? that doesnt sound right.
so i guess its 2 partitions?
could anyone please tell me which mountpoint is which?
and how do i solve the low storage problem? do i need some a2sd script or do i have to more the internal storage to the sdcard?
which mountpoints do the scripts actarlly move?
i have no problem with repartitioning my sdcard. i was given to understand that u usually need a fat32 partition (for apps i guess) and an ext2/3 partition afterwards. some scripts even allow a swap partition at the end of the sdcard to be used as swap space. is that a good idea?
i know its a lot of questions :/ but i hope for some good answers :>
thanks & greetings,
soomon
my advice would be to backup your sd card and (re)partition using gparted, start from scratch because I don't know what your current configuration is, step 5 here
choose ext3/ext4 partition (max ~1.5GB) depending on rom requirements, most support ext4 and should be slightly faster. most roms don't need swap partition.
in simple terms, your space will get taken up by apps (apks), dalvik cache, app cache and app data. most custom roms will automatically move apks to your sd-ext partition. there are various different scripts which move the other bits around. generally it is better to keep app data on internal (/data partition)
regardless of which rom you choose, use an app like 'diskusage' to browse all your partitions, so you can work out where and how all your space is being use.
to maximise space you also need to be s-off and correct hboot for the rom (again should be stated within each rom thread, or search within it)
ok so the first partition on the sdcard will become my sd-ext which will replace the /data partition on the internal storage.
I guess is hould try data2sd then?
with a class 10 it should not get that slow and i get loads of space on that partition.
thanks for your help.
also use links2d,very usefull.....
hi again,
as i see in a terminal emulator by typing "df -h"
my data is 150mb and has 15mb left, so i guess i better moe the whole partition to the sdcard as i'd have to move all the apps to the sdcard anyway sooner or later.
my /system has only 5mb of 250mb left. is that a problem?
soomon said:
hi again,
as i see in a terminal emulator by typing "df -h"
my data is 150mb and has 15mb left, so i guess i better moe the whole partition to the sdcard as i'd have to move all the apps to the sdcard anyway sooner or later.
my /system has only 5mb of 250mb left. is that a problem?
Click to expand...
Click to collapse
depends entirely what rom you're running if any, and what scripts it uses. basically you should be able to find some way to install many apps without running out of space (one of the main reasons for rooting in the first place ).
with your current setup, you could try something like link2sd to just move apps and dalvik to sd, see if you have enough space that way. you shouldnt have to manually 'move to sd', keeping them on 'internal' tricks them to sd-ext. (you can use something like 'diskusage' to check they're actually on the sd-ext)
the system partition is meant to be mostly full. free space on /system is wasted space.
you're still on stock hboot, which is why your data partition is so small.
if you install another rom, many of them have a smaller system size, so if you're s-off you can flash a different hboot to repartition your internal memory layout: your system size will reduce to roughly match your rom, and the saved space is converted into extra data space, see alpharev.nl for hboots.
e.g. if your rom system is 140MB, will fit nicely into cm7r2 hboot with 145MB system, and you get 287MB of data instead of 150MB. 287MB can be enough to store app data and dalvik cache if you don't have too many apps.
i refer you to these sets of guides for further reading, should explain a lot more, and better than i have...
thanks eddie,
i'm still s-on and stock hboot, but i use a custom rom: http://forum.xda-developers.com/showthread.php?t=1766550
i guess the problem is that LBE gues 4 and lookout together need over 22mb of space :/
i'll try link2sd then.
thanks!
hm.. when i try to install link2sd i get "insufficient storage available". that program is not even 1MB in size and i have 15mb of free space on the internal storage.. what can i do?
edit: i'll try to install it at home with an adb tool. maybe i have more luck with that.
follow instructions for a2sd with that rom (scroll down). this will move apps and dalvik to sd-ext automatically. or follow/search the thread for other methods, it's regularly discussed...
[not used link2sd, it should in theory do the same thing, but my advice would be to stick with the instructions as that's the recommended way if you really need/want to install link2sd...uninstall something else to make more space ]
ofc removing apps might help (althrough i only installed 2 or 3). but 15mb should be enough to install a 800kb software
gonna try to install some apps later after running a2sd.
thanks a lot man didnt see that information.

7.6Gb of system data???

I have 7.6Gb of system data according to Disk Usage (app). What the heck is this and how do I shrink it?
I've seen up to 2Gb before on other droids but this is the first time I've seen it this huge.
EDIT read something re: that these were the system files but I don't think so, I'm scanning the /sdcard or /storage/emulated/0 partition which is only 54Gb or so (hence the system files are already excluded as they are on a different partition?)
i do not know what exactly you are talking about
the size of /system? 3.4GB with 1.6GB free or 1.8BGused
do you have root and installed app to /system?
if you are looking a /storagre/emulated/0 i see 3040MB system data
yeah, Titanium Backup says system is 3.61GB with 1.28GB Free, but either way it's a big waste of space

Categories

Resources