[Q] How to use /cache for apps - Motorola Droid and Milestone General

Some of you suggested using the cache partition for app cache - but when I use 'df' in Terminal Emulator it states that only 13604K of my 108544K cache partition are free.
When 'ls'-ing the /cache partition it lists files named "downloadfile.apk" to "downloadfile-34.apk".
Is this some OTA update?
That'd be strange, since the last (2.2.1) update came via PC only and i wiped everything that could be wiped via the recovery menu.
Furthermore the the creation dates of the .apks range from may to a few days ago.
But when I try to open them using Root Explorer it says "Error parsing package" and opening them via "View" gives me a blank screen.
Please enlighten me.
Thanks in advance

Those are temporary downloads from the market. Updates etc.

Does it only remove them on demand?
So I can remove them savely to make room for my appcache?

Once they're installed you can safely remove the apks in /cache

I was able to gain some space by wiping the dalvik cache so I'm gonna delay trying to use /cache
But I have one more question: several sources claim that using /cache for app-cache incompatible with App2SD - is that true?

I'm afraid I need some more clarification so I'm gonna push this thread...
I checked the sizes of my dalvik cache folder and /cache partition
df states that /cache has a total size of 108544K, 93793K used by .apk files I cannot open with Root Explorer and 13364K free
In my /data/dalvik-cache folder theres files summing up to 100956K
So they would barely fit in /cache if I delete all the .apks
I'm not sure if that would be a good idea...
Any suggestions?

Related

Nexus One Rom/Memory Issues

Hey guys, I have a memory issue with my Nexus One when it comes to available storage space. The rom available memory seems to get lower and lower everytime I flash a rom than the previous time. When I load roms like CM6 or Kang-o-Rang or MicroMod Supercircle 2.7 or any others I have 4-16 MB available and nothing has installed yet. I usually use A2SD EXT3 for these but now its extremely difficult to do anything when booting with so little space to begin with. A week ago, on most roms I have well around 150 MB free before installing anything. What may have caused this issue? I even tried booting CM6 with a different SD card not partitioned for A2SD and wiping everything and same result and now I really can't install anything. So is my phone faulty or is there something I can do? I am currently running recovery Amon RA 1.7.0.1 and issues seemed to have come up since using this recovery. I was using Clockwork Mod latest one before this a few days ago.
Any ideas?
Have you been wiping data + cache each time you flash?
Make sure you're calculating data space and not system space (which can be as low as it gets to be, it doesn't matter).
codesplice said:
Have you been wiping data + cache each time you flash?
Click to expand...
Click to collapse
I have wiped, cleared cache, delvik many many times. I suspect that the wipe is not working properly. I have tried two different recoveries and nothing works. My available space now running on Nexus FRF91 stock with root only I have 53.64 MB free. I have installed no third party apps yet whatsoever. I have not even logged in to google yet because it will download all my apps again. I have rebooted as well. I think theres an issue with my device and memory. Should I call HTC or my warranty is void?
Sounds like a weird problem, I would've tried to wipe a time or two more. I just wiped my device after flashing nightlies for the last two months without wiping and I noticed I had 170MB free when I booted up with a few apps installed.
I agree with SBS_. It sounds like the wipe isn't doing the job properly. Try to do it in all the possible ways (wiping through the ROM - using "Factory Reset" option, wiping through recovery - clearing data, cache and Dalvik-cache, and wiping through ADB command line), see if it changes anything.
Jack_R1 said:
I agree with SBS_. It sounds like the wipe isn't doing the job properly. Try to do it in all the possible ways (wiping through the ROM - using "Factory Reset" option, wiping through recovery - clearing data, cache and Dalvik-cache, and wiping through ADB command line), see if it changes anything.
Click to expand...
Click to collapse
I've tried everything except ADB command line. I will have to read into doing that as I am unsure what to do. I have wiped from recovery and through the rom at least 15 times each! lol
When you load a new ROM, did you try to use Root Explorer to see what's on your DATA partition? (under directory /data).
Jack_R1 said:
When you load a new ROM, did you try to use Root Explorer to see what's on your DATA partition? (under directory /data).
Click to expand...
Click to collapse
Great idea. Actually I have but not sure what suspicious files I should be looking to delete. I do own root explorer so any suggestions would be great. Thanks!
timahawk said:
Great idea. Actually I have but not sure what suspicious files I should be looking to delete. I do own root explorer so any suggestions would be great. Thanks!
Click to expand...
Click to collapse
I have this exact issue. I know how to wipe. I have gone as far as reloading HBoot and placing the stock EPF30 image. I have gone thru using clockwork and Amon. I know how to do factory resets. I know how to go to storage options with clockwork and format all partition options. I have spent months on this. Below is a readout, after blowing away everything.
~ # du -hc /data
du -hc /data
2.0K /data/lost+found
4.0K /data
4.0K total
~ # df -h
df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 192.9M 0 192.9M 0% /dev
/dev/block/mtdblock5 196.3M 109.5M 86.8M 56% /data
~ #
Another user that I have been working with has the exact issues as the user here and me. He contacted HTC. They are replacing his N1. There is something weird going on with some of these units. Just like a few months back, no one knew anything about the bad boot blocks issue causing many developers to change their ROM installs to accommodate those users with this issue. This low space on /data issue is another one that sooner or later will start to show up more and more, IMHO. For instance, at best using either Evils Sense Roms or MicroMods Hybrid sense Roms, I have 23MB free on initial install. This is after basically wiping formatting, resettings factory Data etc etc. At best, lets say using Enoms latest AOSP, I have maybe 75Mb free Internal memory, after initial install and NO applications downloaded installed on my part.
I really wish that folks here and on other threads would start to take this issue a little more seriously than basically saying a user isn't properly wiping his setup prior to an install. I have my beloved N1 since third week of January this year. Never had a problem with rooting, installing any of the original CM, or Paul M stuff from the early days here and on their Kitchen setups. Something has basically changed to cause these issues on a number of Nexus one setups. I have root explorer too and no manner of deleteing, via changing partition permissions from RO to RW makes any difference after wiping, formatting whatever prior to a fresh clean install of any current ROM.
I have approximately the same issue. I can't install anything..
Even after a full wipe of /data and all caches, I installed latest nightly-219-passion and the only possible way to install apps is by manually typing the adb push commands in commandline. It DOES NOT WORK using Market, File Manager, Titaniumbackup, ....
When I nandroid restore I have all my apps back but still CANNOT install any new apps using Market, File Manager, Titaniumbackup, ....
I already tried the fix_permissions script in both Amon_RA and RomManager but without success. I have system:system permissions on /data.
Is there a way to wipe /system aswell prior to an install, or does that happen when you flash a .zip?
Saphroxx said:
I have approximately the same issue. I can't install anything..
Even after a full wipe of /data and all caches, I installed latest nightly-219-passion and the only possible way to install apps is by manually typing the adb push commands in commandline. It DOES NOT WORK using Market, File Manager, Titaniumbackup, ....
When I nandroid restore I have all my apps back but still CANNOT install any new apps using Market, File Manager, Titaniumbackup, ....
I already tried the fix_permissions script in both Amon_RA and RomManager but without success. I have system:system permissions on /data.
Is there a way to wipe /system aswell prior to an install, or does that happen when you flash a .zip?
Click to expand...
Click to collapse
How did you install the nightly. Even with my issues of 109Mb used up on data before I install anything, I have the latest nightly running along with latest Gapps and approx 50 of my own apps, with 79Mb free internal. I used clockwork recovery, then under storage options, you can run format options, on boot, system, data, cache, and SD-EXT and then under advanced, wipe dalvik-cache. I also added the data factory reset option also. I then clean installed the nightly. Then after an initial setup to just have it running, flashed the gapps. I did initially have approx 75Mb free Internal before the Gapps install. Then I went down to 53MB after gapps. I verified I had the correct settings in settings:Cyanogen Mod for the file system. I then flashed the latest Dark Tremor script, ran the commands for a2sd check, a2sd reinstall, a2sd zipalign and a2sd cachesd to move the dalvik-cache to sd. I have an EXT3 setup on my SD card. After moving Dalvik cache I jumped from 28Mb free to 79Mb free where it's pretty much staying now. Not as much as others that don't have the issues on /Data but at least useable.

[Q] putting apps in /system/app, good or bad?

Hi, I've been putting some of my apps apks in /system/app, so that I have more free space in /data.
Mostly I just put apps there that I know I will never need to uninstall, like TiBackup, LauncherPro etc. When those apps update, I just manually move the newer apk into /system/app.
Question: Is it wrong to fill up /system to almost-full?
I know it's mounted read-only during normal use, so nothing else can write to it anyway.
Yup, I'd like to know tha answer to this question too!
I have heard of it being done quite abit. So it can't be that bad.
Yeah, it can't be that bad. But what if you filled it to 100%, is that bad?
Cache and data are housed in separate partitions as far as I know. So, I believe it's ok to fill it up completely, since most other things don't need write access to /system partition anyway. If it's not being written to during normal operation, then any free space on /system is basically wasted.
But I'd still like to hear from someone more knowledgeable if it is indeed fine to fill up the /system partition. Or if it's better to leave a certain amount of space, and how much space is recommended.
It depends on the ROM. If you're using CM, apps in the /system partition stores it's dalvik-cache in the /cache partition. So, if I am correct, more apps in the /system means less /cache space.
I tried putting LauncherPro in /system/apps and then removing it from /data/apps, but with no luck - it kept force closing on launch not ideal for a launcher! I haven't yet figured out why it wouldn't work, but I'm sure I'll get there in the end.
SF
geevee11 said:
It depends on the ROM. If you're using CM, apps in the /system partition stores it's dalvik-cache in the /cache partition. So, if I am correct, more apps in the /system means less /cache space.
Click to expand...
Click to collapse
On CM6, /cache is a different partition than /system, so it shouldn't affect cache space.
I'll observe the free space for a few days without adding additional apps on /system. Right now, I have 15MB free on /system, and 39MB free on /cache. I'll report back in a while.
r8dhex said:
On CM6, /cache is a different partition than /system, so it shouldn't affect cache space.
I'll observe the free space for a few days without adding additional apps on /system. Right now, I have 15MB free on /system, and 39MB free on /cache. I'll report back in a while.
Click to expand...
Click to collapse
I was talking about the dalvik-cache. Even if you install apps in the /system partition, it'll still have the dex files. So the more apps you put in your /system partition, the more your /cache will fill up = less ram.
I found out that apps in /system couldn't be updated through the market.
For instance: the facebook app that comes installed with google apps package of CM6 is installed in the /system dir of the phone. When I tried to update it through market it would fail every time. Once I deleted the app from /system and rebooted the phone, updating (installing) the app from market went fine.

How to download games over 20mb from the Market?????

hey guys
wazzzzzzzup
so, I'm on CM7 and wanna download Pocket legends from the Market but it says that I don't have sufficient space. I've tried deleting dalvik cashe and no good.
the game size is 28mb.
Any Ideas???
themohd said:
Any Ideas???
Click to expand...
Click to collapse
Delete the files /cache/download*apk in order to get some more space for the downloads. Maybe that's sufficient. If not you can move the cache to a virtual disk. Try searching in the forum.
It's a market 3.* problem. The downloads shouldn't go to /cache and should also be cleaned up after succesful installation.
Thnx for the rep.
deleting downloadfile.apk wasn't enough, I remeber using a virtual cache didn't work for me before, imma try that again .
thanx again dude
Do this in CWM (recovery):
- wipe cache partition
- wipe dalvik cache
If it doesn't work and you have very little internal space left, uninstall 2 or 3 bigger games so that there's enough space again.
How much free space do you have in /datadata? (Use Root Explorer to check, etc.)
If it's less than 28mb (or however big the game is), you need to either: 1) delete some apps, or 2) move apps to sdcard.
Thanx guys,
But I solved the problem without deletin' anything, by moving the cache to /Data/Cache
if anyone need it, here is it how:
in the terminator write this:
mkdir /data/cache
busybox rm -rf /cache
busybox ln -s /data/cache /cache
and thats all

Reduce /cache partition under CM7

Just a quick question:
What happens to system-dalvik-cache under /cache, if I resize this partition to e.g. 5 MB?
I've read somewhere that CM7 moves it to /data. true? Are there any other disadvantages of such a small cache-partition?
many thanks!
Someone?
10chars
Yes, on CM7, if the cache partition is too small, it will move it to the /data partition. I think it is /data/local/cache
Dalvik-cache never resides on /cache anyway. /cache is for Market and OS OTA downloads. If you make it too small - your Market downloads might fail.
I didn't even realize he was talking about dalvik cache. The dalvik cache resides on the /data partition by default for both system and data apps.
As Jack_R1 said, the cache is only used for temporary files, like OS upgrades and market downloads. If the cache partition gets below a certain point (I think it is 5MB), CM7 will automatically change the cache directory to the /data partition.
On my device the market download folder has already a symlink to my /data partition. Other then my system dalvik. At least it seems so.
Thanks for your help. So i can go ahead and resize with blackrose

[MOD][GUIDE][ROOT EXPLORER] Free up data space. Move Dalvik Cache to System.

GuYWith a deodexed and de-bloated Samsung Rom we have 500mb plus of free space on System partition which is wasted space.
I just tried something to free up some space for shared data/sdcard partition by moving Dalvik Cache from /data to /system then creating a folder link back in data to keep original location settings.
Took 30 seconds and freed up 260mb! This is what you do:
1. Using root explorer or similar. Go to /Data.
2. Navigate to "Dalvik-Cache" directory. Long press on it and select "move".
3. Navigate back to root directory and then to /System.
4. Paste the directory you must select rw first top right hand corner. It will take a minute to copy.
5. Now long press on the moved Dalvik-Cache directory in /System and select "Link to this folder" option.
6. Navigate back to /Data and paste the link.
7. Done! You now have moved the Dalvik-Cache location to unused space on System partition and left a sym-linked directory so Android thinks nothing has changed!
Note!: If you wipe Dalvik Cache from recovery a new directory will be recreated in Data and your moved directory in System will no longer be used it will just sit in System taking up space.
AFTER A DALVIK CACHE WIPE FROM RECOVERY YOU MUST DELETE THE DIRECTORY YOU CREATED IN SYSTEM AS IT IS NO LONGER USED. SIMPLY REPEAT THE ABOVE STEPS TO ACTIVATE THE MOD AGAIN.
Good luck. A REAL Dev could you please turn this into a CMW zip with the reverse undo counterpart to be flashed before a Rom upgrade.
UPDATE: looking at the link posted by a helpful person below (thanks!) I think we need to make /system mount as rw for this to work. Please help develop this idea more if anyone can help thanks
Sent from my GT-I9300 using xda premium
Is it work on cm10? I have over 1gb free on system partition
jnr21 said:
Is it work on cm10? I have over 1gb free on system partition
Click to expand...
Click to collapse
I'M not sure haven't used cm10 yet but it should do. Just discovered a Dalvik Cache wipe from recovery recreates the directory in Data to the MOD needs to be repeated after this... makes it very safe to try on cm10!
I'm hoping a real Dev can take this idea and bake it into to custom Rom's and find more data we can move to free up more space
Sent from my GT-I9300 using xda premium
Hi,
Maybe it's possible to do this via init.d script? It will be more convenient.
It's possible via init.d script to move dalvik-cache to /cache for example... so...
Just a thought or simply move it to /cache.
EDIT:found this: http://petermolnar.eu/linux-tech-coding/how-to-move-dalvik-cache-to-system-partition-in-android/
Is this similar to the function "Integrate sys Dalvik into ROM" from Titanium Backup?
[email protected] said:
Is this similar to the function "Integrate sys Dalvik into ROM" from Titanium Backup?
Click to expand...
Click to collapse
Yeah I guess it is but if you do it through titanium the Dalvik Cache files are put with their apk files so wipe Dalvik Cache in recovery no longer works... Not 100% sure this is right tho
Sent from my GT-I9300 using xda premium
viking37 said:
Hi,
Maybe it's possible to do this via init.d script? It will be more convenient.
It's possible via init.d script to move dalvik-cache to /cache for example... so...
Just a thought or simply move it to /cache.
EDIT:found this: http://petermolnar.eu/linux-tech-coding/how-to-move-dalvik-cache-to-system-partition-in-android/
Click to expand...
Click to collapse
Yeah should be possible. I think a CWM zip would be best along with an undo version. I now have /Data/app directory moved so before a Rom update or nandroid backup it will be necessary to undo the move. I'll see if I can work out how to do this. Hopefully someone could help out. I'M not code literate yet lol!
Sent from my GT-I9300 using xda premium
if u wanna free up the /data partition, it is a good and proper way to move the dalvik-cache elsewhere. but IMHO, the /system partition is not a good place to move to since by design the system partition is not suppose to have any frequent or unnecessary read write and thus it is ro by default. the other reason is its importance since it is the core part of the system. you can afford to pay for a corrupted data or cache partition but not the system partition since as long as the system files are save the whole system can be rebuilt in case of data loss etc
i am not against this trick and i only want to tell you my opinions. so if possible i would recommend u to put the dalvik cache somewhere else like the cache partition
ykk_five said:
if u wanna free up the /data partition, it is a good and proper way to move the dalvik-cache elsewhere. but IMHO, the /system partition is not a good place to move to since by design the system partition is not suppose to have any frequent or unnecessary read write and thus it is ro by default. the other reason is its importance since it is the core part of the system. you can afford to pay for a corrupted data or cache partition but not the system partition since as long as the system files are save the whole system can be rebuilt in case of data loss etc
i am not against this trick and i only want to tell you my opinions. so if possible i would recommend u to put the dalvik cache somewhere else like the cache partition
Click to expand...
Click to collapse
Yes I've discovered that it's prob not a good idea to leave System rw.... all that wasted space tho
Sent from my GT-I9300 using xda premium
rlorange said:
Yes I've discovered that it's prob not a good idea to leave System rw.... all that wasted space tho
Sent from my GT-I9300 using xda premium
Click to expand...
Click to collapse
u can resize the system partition, and then reassign the disk space freed up to other partitions
NOTE: this is risky and may brick your phone
if you r interested, you can get some more info in my blog posts (based on I9000)
Free more available disk space from NAND - PART I
Free more available disk space from NAND - PART II
freeNANDmod - get more space from NAND - PART III
freeNANDmod - get more space from NAND - PART IV
- symbolic linked dalvik-cache directory may cause issues in some application, use the bind mount instead of this
- titanium backup feature (integrate dalvik-cache to rom) is not mean what you think. it is not for moving dalvik-cache to the system partition
edit: i writed a script what can do exactly what we need.
auto check the dalvik-cache already moved to the cache directory, if yes bind mount the directory. if not, moved the cache then bind mount
you can adjust the cache and the data partition in the beginning of the file, dont touch anything else! default is defined for the SGS3
log file is /cache/dalvik_mover.log
after a full cache wipe the script will be move the dalvik cache after the next reboot
just unzip and put this file to the /system/etc/init.d/ folder
then set the permission to 0755
reboot
this script is not using the system partition, so no need to remount the system as r/w. its used the cache partition what have more free space anyway and always writeable.
and the bind mount method is compatible with everything.
rlorange said:
GuYWith a deodexed and de-bloated Samsung Rom we have 500mb plus of free space on System partition which is wasted space.
I just tried something to free up some space for shared data/sdcard partition by moving Dalvik Cache from /data to /system then creating a folder link back in data to keep original location settings.
Took 30 seconds and freed up 260mb! This is what you do:
1. Using root explorer or similar. Go to /Data.
2. Navigate to "Dalvik-Cache" directory. Long press on it and select "move".
3. Navigate back to root directory and then to /System.
4. Paste the directory you must select rw first top right hand corner. It will take a minute to copy.
5. Now long press on the moved Dalvik-Cache directory in /System and select "Link to this folder" option.
6. Navigate back to /Data and paste the link.
7. Done! You now have moved the Dalvik-Cache location to unused space on System partition and left a sym-linked directory so Android thinks nothing has changed!
Note!: If you wipe Dalvik Cache from recovery a new directory will be recreated in Data and your moved directory in System will no longer be used it will just sit in System taking up space.
AFTER A DALVIK CACHE WIPE FROM RECOVERY YOU MUST DELETE THE DIRECTORY YOU CREATED IN SYSTEM AS IT IS NO LONGER USED. SIMPLY REPEAT THE ABOVE STEPS TO ACTIVATE THE MOD AGAIN.
Good luck. A REAL Dev could you please turn this into a CMW zip with the reverse undo counterpart to be flashed before a Rom upgrade.
UPDATE: looking at the link posted by a helpful person below (thanks!) I think we need to make /system mount as rw for this to work. Please help develop this idea more if anyone can help thanks
Sent from my GT-I9300 using xda premium
Click to expand...
Click to collapse
Yes, to get this working you need a system mounted Always in r/w.
So i suggest you to move dalvik on cache partition.
And it's better to do the mod inside ramdisk
vadonka said:
- symbolic linked dalvik-cache directory may cause issues in some application, use the bind mount instead of this
- titanium backup feature (integrate dalvik-cache to rom) is not mean what you think. it is not for moving dalvik-cache to the system partition
edit: i writed a script what can do exactly what we need.
auto check the dalvik-cache already moved to the cache directory, if yes bind mount the directory. if not, moved the cache then bind mount
you can adjust the cache and the data partition in the beginning of the file, dont touch anything else! default is defined for the SGS3
log file is /cache/dalvik_mover.log
after a full cache wipe the script will be move the dalvik cache after the next reboot
just unzip and put this file to the /system/etc/init.d/ folder
then set the permission to 0755
reboot
this script is not using the system partition, so no need to remount the system as r/w. its used the cache partition what have more free space anyway and always writeable.
and the bind mount method is compatible with everything.
Click to expand...
Click to collapse
thank you very much works perfect

Categories

Resources