WTFis the /cache partition useful for?? - Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A

Hi
Sorry for absolutely-n00b-liking question, but is the utility of /cache partition??
It's 100megs big, and it's ALWAYS empty.
In past I controlled with "df", also when downloading apps from play store it's fully empty.
Really looks like 100megs wasted...
Someone could please clarify this?
Thansk you, bye.

Hi! First of all /cache is essential part of Android OS. It really seems absolute empty, but it stored temporary files. Andoid have very complex cache system. For example instead of closing app, Android caches it and put it on /cache partition for quick restart in the future and RAM salvage

Hi
In my previous (stolen :crying phone, /cache was really used, and sometimes filled...
I'll try with a simple script running in background, like "while 1; df /cache >> /sdcard/cachelog.txt; sleep 3" to monitor it's usage.
Thanks for your answer.
Bye.

Related

/cache almost not used on XMP! [RESOLVED, via a trick]

Hi
Since ever I noticed a weird thing on XMP: /cache partition is always almost empty.
Yes, I checked many times during a long time, it's like is never used.
Code:
$ df
/cache 101.5M 1.1M 100.4M 4096
I have only an empty lost+found dir and two files under recovery dir:
Code:
# ls
-rw-r--r-- root root 105 2012-12-15 02:07 last_install
-rw-r----- root root 3214 2012-12-22 10:36 last_log
For example, in a previous phone /cache was actively used by market for downloading packages before installing them.
Here on XMP I can't upgrade also small packages (40+ megs free on /data) 'cause they're downloaded in /data and fill it before being upgraded, and /cache remains always empty.
In addition, if for some reason playstore crashes while downloading a big app (30megs+), it leaves my /data (almost)full and I must remove by hand a large temporary file from /data/system.
Well, /data is used instead of /cache, 100mb wasted in this way.
Someone else finds experiences the same behaviour?
I was thinking about a linking trick to use that space (for dalvick or swap...), but I'd prefer it would be correctly used by system.
Infos: SK17i, stock .587, root, locked BL, link2sd.
Thanks, bye.
Same in Xperia Mini
Well, this isn't nice...
some ideas
Hello! I was doing several searches and come to some results:
Note: I will not try it on my phone (Xperia Mini Pro) because I'm still an apprentice to flash and modify it, and secondly I have no resources to change my phone if something goes wrong. Finally, sorry for the grammatical errors, I do not speak English natively.
The following are links taken from different forums / blogs (neither is my property).
The general idea is the same, use parted (or any similar app) to edit the partitions inside the phone.
One of the problems that arise and I have doubts about is, what is the file system of internal partitions? ext3?. is something that I have to keep reading.
This is the first blog I found where it gives a possible procedure to follow:
http://aarondiep.blogspot.com.ar/2011/11/resize-partition-on-android.html
Here's a post where one of the users that modify his partitions and, later, returned to stock status.
http://www.droidforums.net/forum/htc-droid-eris/78650-internal-storage-partitions-screwed-up.html
Here is a guide on how you use parted (includes screenshots) BUT IT DOES WITH THE SD CARD
http://mobilecon.info/how-to-partition-sdcard-using-parted-partition.html
Finally, a tool for YAFFS2 file system:
http://forum.xda-developers.com/showthread.php?t=1645412
I hope these links are useful. I really would like to use optimally all the hardware of the phone.
Exitos!! :laugh:
Hi!
Thanks for your interest!
Resizing partitions, I read time ago, is a really critical operation.
I expect to have /cache partition as it has been made, the problem is that apps do not use it!
Resizing that block device to, let's say, zero, would give space to other partitions, but we'd lack a cache.
I definitely believe one of master questions is: where the hell does playstore download packages before installing?
During a big upgrade (let's say angry birds Rio 30+ megs) with df I only see /data growing (and /cache always empty), but after a lot of searching for newest and biggest files (busybox ls -ltrh, busybox ls -Shl) I could not find where they are put.
Once found this download location (no, it's not /data/data/com.android.vending/cache/main), would be easy to bind /cache to this dir.
Apk files from Google Play is downloaded to: data/data/com.android.providers.downloads/cache/
Wysyłane z mojego SK17i za pomocą Tapatalk 2
Hi
Many thanks for this tip!
Well, it's true apk are downloaded there.
BUT I see a strange behaviour: when I recieve the "low memory" (space on /data partition) notification, the apk suddenly disappears! :what:
In logs I see a lot of "couldn't openat chache: no such file or directory" immediately before low space notification log line...
You can use cache as swap if your kernel support it..
Sent from my Walkie'Talkie
Hi
Well, i symlinked /data/data/com.android.providers.downloads/cache to /cache/cache, and the partition is now correctly used by play store.
Is really strange that this is not a system default, btw.
EDIT: the /cache/cache was regularly erased by system, I symlinked /data/data/com.android.providers.downloads/cache to /cache and all is ok now.
EDIT2: you must previously remove (rmdir) the existing /data/data/com.android.providers.downloads/cache!
Could you put the exact command?
luchoz said:
Could you put the exact command?
Click to expand...
Click to collapse
Code:
ln -s /data/data/com.android.providers.downloads/cache /cache
:good:
thank you!!
would use XD
New info!!
http://forum.xda-developers.com/showthread.php?t=1959691
Really interesting

ADB Data Recovery from my SII with cracked screen

Hello everybody, I'm Dejan and I could use some help please.
I have Samsung Galaxy SII GT 9100 with broken screen and I have some very important stuff in it. Screen is totally broken and I cant see a thing. Long story short i used Fuzzy Meep's app but I'm stuck deep in the mud so thats off. I booted phone in my custom recovery , installed ADB on PC and managed to connect to the device. But I can't make my way thru the sdcard. Here is what I did:
G:\ADB>adb.exe shell
~ # cd etc
cd etc
/etc # ls
ls
recovery.fstab
/etc # cat recovery.fstab
cat recovery.fstab
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags and options
> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
# data partition must be located at the bottom for supporting device encryption
/dev/block/mmcblk0p9 /system ext4 ro,noatime
wait
/dev/block/mmcblk0p7 /cache ext4 noatime,nosuid,nodev,j
ournal_async_commit,errors=panic wait,check_spo
/dev/block/mmcblk0p1 /efs ext4 noatime,nosuid,nodev,j
ournal_async_commit,errors=panic wait,check_spo
/dev/block/mmcblk0p10 /data ext4 noatime,nosuid,nodev,d
iscard,noauto_da_alloc,journal_async_commit,errors=panic wait,check_spo,encryptable=/efs/metadata
/dev/block/mmcblk0p12 /preload ext4 noatime,nosuid,nodev,j
ournal_async_commit wait
# vold-managed volumes ("block device" is actually a sysfs devpath)
/devices/platform/dw_mmc/mmc_host/mmc0/mmc0 auto auto defaults voldmanaged=sdcard0:
11,nonremovable,noemulatedsd
/devices/platform/s3c-sdhci.2/mmc_host/mmc1 auto auto defaults voldmanaged=sdcard1:
auto
/devices/platform/s3c_otghcd/usb auto auto defaults voldmanaged=usbdisk0
:auto
# recovery
/dev/block/mmcblk0p5 /boot emmc defaults recovery
only
/dev/block/mmcblk0p6 /recovery emmc defaults recovery
only
How do i mount internal memory and pull out my data? Any help is appreciated. Thanks
It's a CM LInaro Kitkat 4.4.2 with custom kernel. With older versions of Android I was able to do what I was attempting to do but I've read somewhere about certain change when mounting storage on 4.4.2.
Thanks in advance.
Noone? Reallu? At least some info about device reading out data directly from the storage chip?
denkodenko said:
Noone? Reallu? At least some info about device reading out data directly from the storage chip?
Click to expand...
Click to collapse
That isn't even remotely possible for an end user. The only people who might be able to do that is a company which specialises in recovery of data from dead HDDs'. If it is possible, expect it to be very very expensive. I've never seen a single person post here in 2.5 yrs saying they've had this done successfully. Even if this is was possible, fixing your screen would be cheaper.
Very few people here have attempted to do what you're doing with ADB (me included; frankly, if the data was that important to me, I'd pay $120 for a new screen to save myself hassles, but I wouldn't be in that situation to begin with because I back stuff up). Unfortunately, you're going to be in for a rather long wait if you don't manage to work this out on your own, many people who may have been able to help you don't post here anymore, they've moved onto other phones given it's been 3 yrs since this phone was released.
MistahBungle said:
That isn't even remotely possible for an end user. The only people who might be able to do that is a company which specialises in recovery of data from dead HDDs'. If it is possible, expect it to be very very expensive. I've never seen a single person post here in 2.5 yrs saying they've had this done successfully. Even if this is was possible, fixing your screen would be cheaper.
Very few people here have attempted to do what you're doing with ADB (me included; frankly, if the data was that important to me, I'd pay $120 for a new screen to save myself hassles, but I wouldn't be in that situation to begin with because I back stuff up). Unfortunately, you're going to be in for a rather long wait if you don't manage to work this out on your own, many people who may have been able to help you don't post here anymore, they've moved onto other phones given it's been 3 yrs since this phone was released.
Click to expand...
Click to collapse
Well at least I gave it a shot but yeah... you are probably right I shouldn't have bothered posting and I was pretty sure someone somewhere might have asked the exact same question unfortunately I couldn't find it. I know how annoying these questions can be and I'm very sorry if I made someone angry. Long story short - I managed to get my pictures and videos back, as well as contacts. I do back those stuff up. however I had some .bin files for work that I lost but I've been living with that. It just might take some time browsing on the Internet finding them again but I'd rather do that than trying to do anything with the phone. I bought it $100 last year, the screen alone is that much, there's no point in fixing it. And at last but not least, thanksfor the reply.
Nah, they're not annoying It's just a very unusual situation, and as I said, if you want help with that sort of stuff with this phone on here, because so many people have moved on, you need to be really patient, that's all.
Same story
Shortly broken display no touch input. I had custom KitKat rom.
I had almost given up trying to mount the internal sd card with ADB, following numerios forum post instructions
here is my solution using windows pc and ADB
I rebooted in recovery (I think it was 6,0xx)
Using command prompt (you also need adb.exe) :
adb remount
adb root
adb usb
Those 3 command somehow mounted the internal storage and I was able to use the "adb pull" comand to copy the whole internal sd card to my hard drive
After that I went with "adb shell" to check how the sd card was mounted and here is what I found:
"
/dev/block/vold/259:3 on /storage/sdcard0 type vfat (rw,dirsync,nosuid,nodev,noe
xec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=c
p437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/block/mmcblk0p11 on /emmc type vfat (rw,dirsync,relatime,uid=1023,gid=1023,
fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortn
ame=mixed,utf8,errors=remount-ro)
"

Cannot convert user app to system app using Link2SD

I upgraded my LG G2 android software to Lollipop a couple of days ago, and i have just rooted it successfully few hours ago. I am trying to convert Cerberus app to a system app which i actually succeeded when i still had Kitkat. Now that i have Lollipop, i cant seem to convert it anymore. Do any of you have any idea how to solve this within Link2SD app?
The error was "/system : not enough storage space". I tried to uninstall a system app to free up some system space and it did. But when i tried to convert Cerberus app again which has a size smaller than the available system space, failed again with the same error message. I checked the system storage info and surprisingly, there is no more system spaces left. What has just happened? I tried deleting another system apps again and did the same thing but still no go. Seems like something made my available system storage to be used up without any reason. Now i have a messed up software with full system space :S
I have attached a screenshot of Link2SD storage info. By the way, why does it say i only have a max of 2.66GB of system space? How can we increase that?
Thanks in advance for all your help!
Can you install Terminal Emulator from play store, open it, and run the command
Code:
dd
Or if you have got adb set up, you can also use the command
Code:
adb shell dd
And post here the screenshot (or readable output of any kind)? Because from screenshot, its showing that your /system partition is filled up. But running above command should clear scope for any confusion/reading bugs.
For increasing the space, you will have to repartition (since I dont have an LG phone, I cant provide much info on how to do this). And the end result would be something like-> your user-usable memory will decrease and the system usable memory will increase. In other words, you would be shrinking your /data partition and increasing size for /system partition.

Accidentally deleted block device on /dev/block

Hello guys
(this is my first post and not that familiar with the thread, so sorry for that)
So here's the thing: I was trying to increase my system partition to install the GApps pico, then I resized the data partition at
Code:
/dev/block/mmcblk0p29
found that it couldn't merge the space I shrunk to the system partition at
Code:
/dev/block/mmcblk0p27
, then I accidentally deleted the partition using
Code:
rm /dev/block/mmcblk0p29
and now it's gone.
I have tried to use
Code:
mknod /dev/block/mmcblk0p27 b 0 27
to rebuild a block device, however nothing could detect the device including mke2fs and e2fsck. Then I'm pretty clueless about what should I do.
That's all.
Thanks.
Deleting a block dev file won't affect the actual partition. It will be recreated every time the system reboots.
You tried to create the block dev with the MAJOR number of 0? How did you know that number? Maybe you should try ls -l /dev/block/mmcblk0* first, to find out the correct MAJOR number.
If you want to edit the partition table, the gdisk/sgdisk should be the correct tool usually.
---------- Post added at 01:04 PM ---------- Previous post was at 01:01 PM ----------
gdisk/sgdisk doesn't provide filesystem resizing function - you must do it with the corresponding filesystem utility like resize2fs, or alternatively, you must delete&recreate the entire partition.
Anyway, manually editing the partition is generally considered DANGEROUS, backup your data, rather than risk your data of permanent loss.
linuxnoobbbb said:
Deleting a block dev file won't affect the actual partition. It will be recreated every time the system reboots.
You tried to create the block dev with the MAJOR number of 0? How did you know that number? Maybe you should try ls -l /dev/block/mmcblk0* first, to find out the correct MAJOR number.
If you want to edit the partition table, the gdisk/sgdisk should be the correct tool usually.
---------- Post added at 01:04 PM ---------- Previous post was at 01:01 PM ----------
gdisk/sgdisk doesn't provide filesystem resizing function - you must do it with the corresponding filesystem utility like resize2fs, or alternatively, you must delete&recreate the entire partition.
Anyway, manually editing the partition is generally considered DANGEROUS, backup your data, rather than risk your data of permanent loss.
Click to expand...
Click to collapse
Thanks for replying, I didn't do the rebooting after deleting that, now it's back.
And I just having literally no idea about the major number, what's that for? In my case I just found the /system is mounted on /dev/block/mmcblk0p27 so I tried to use with major number 0 and minor number 27 to create a new one.
This phone is just an old phone, have freshly installed android 9, so there's no data losses worrying, but thanks for the advise anyway.
I have used resize2fs, it'll be successful when I shrink the data partition, but it's not working when I trying to expand the system partition, and it just saying "You requested a new size of 204810 blocks" then refuse to get a bigger block amount that I set. Seemed like the data and system partition are in the different devices(but it's not apparently). And I'm stuck with it right now.
About delete and recreate the partition, I kinda didn't get it. In my understanding, the partition is in those block devices, and you can edit the partition with tools like gdisk/fdisk etc, but now I found the /system and /data these two partitions are in the different block devices, so I can't simply modify the partition, even I was trying delete the block device, it doesn't work.
nonefffds said:
Thanks for replying, I didn't do the rebooting after deleting that, now it's back.
And I just having literally no idea about the major number, what's that for? In my case I just found the /system is mounted on /dev/block/mmcblk0p27 so I tried to use with major number 0 and minor number 27 to create a new one.
This phone is just an old phone, have freshly installed android 9, so there's no data losses worrying, but thanks for the advise anyway.
I have used resize2fs, it'll be successful when I shrink the data partition, but it's not working when I trying to expand the system partition, and it just saying "You requested a new size of 204810 blocks" then refuse to get a bigger block amount that I set. Seemed like the data and system partition are in the different devices(but it's not apparently). And I'm stuck with it right now.
About delete and recreate the partition, I kinda didn't get it. In my understanding, the partition is in those block devices, and you can edit the partition with tools like gdisk/fdisk etc, but now I found the /system and /data these two partitions are in the different block devices, so I can't simply modify the partition, even I was trying delete the block device, it doesn't work.
Click to expand...
Click to collapse
The black screen is EDL mode so unless the device has a programmer to flash to it it's just a paperweight
nonefffds said:
Thanks for replying, I didn't do the rebooting after deleting that, now it's back.
And I just having literally no idea about the major number, what's that for? In my case I just found the /system is mounted on /dev/block/mmcblk0p27 so I tried to use with major number 0 and minor number 27 to create a new one.
This phone is just an old phone, have freshly installed android 9, so there's no data losses worrying, but thanks for the advise anyway.
I have used resize2fs, it'll be successful when I shrink the data partition, but it's not working when I trying to expand the system partition, and it just saying "You requested a new size of 204810 blocks" then refuse to get a bigger block amount that I set. Seemed like the data and system partition are in the different devices(but it's not apparently). And I'm stuck with it right now.
About delete and recreate the partition, I kinda didn't get it. In my understanding, the partition is in those block devices, and you can edit the partition with tools like gdisk/fdisk etc, but now I found the /system and /data these two partitions are in the different block devices, so I can't simply modify the partition, even I was trying delete the block device, it doesn't work.
Click to expand...
Click to collapse
You must specify the major number when you do mknod.
It should be "/dev/block/mmcblk0p27 is mounted on /system".
You may try this:
https://forum.xda-developers.com/android/general/mounting-internal-storage-usb-mass-t2843152

Symlinks causing missing memory?

This may be a little complicated but here is the basic gist:
1. Android 2.1 (B&N Nook Simple Touch)
2. I backup the dictionary files in /system/media/reference and then delete the originals. This shows a corresponding increase in the available space in /system
3. I create a symlink to alternate dictionary files in /sdcard/Dictionary (or /data/media/B&N Downloads/Dictionary--same result either way)
4. After rebooting I have access to new dictionary. Then I change my mind and want a different dictionary.
5. I delete the symlinks in /system/media/reference
6. I create new symlinks to a different dictionary, reboot, etc.
7. Now I get tired of all this and want to return to the stock dictionary.
8. I delete the symlinks in /system/media/reference and prepare to copy the stock backups to their original location.
BUT
9. I see that there is no longer enough space on /system to restore the original files! As an example, the stock available space in /system is 55906 kb (80% full--that's with the dictionary files in their normal place). After a few symlink cycles it may drop down to something like 30359 kb (89% full). Restoration of the stock dictionary requires about 57000 kb available space.
Blah-blah-blah. I've done this many times now, each time searching diligently for what is taking up the space that should be free. The only way to get the space back is to restore an earlier nandroid backup.
Surely this is not supposed to happen with symlinks? To delete one I am using adb shell rm. Is there something else I should be doing?
Why does the use of symlinks in /system gradually erode available space?
I am working on a routine for swapping dictionaries on an e-reader (Nook Simple Touch--Android 2.1). I've got the shell commands nailed down and have constructed an app using Tasker. It all works g...
android.stackexchange.com
Yep, and I did see your comment which turned out to be really helpful, @alecxs! I've solved the problem and answered my own question over at Stack Exchange.
The key is to kill the background process which is holding on to the dictionary databases before doing any file manipulations. If that is done, everything works as it should and no funny /system storage losses.
Thanks so much for nudging me in the right direction.
don't thank me, I had something different in mind. but yes, reading your answer remind me some strange behavior in 5 years old backup script:
after lazy umount + rm -rf /data still there was ~1GB disk space occupied.
this is because deleted files remain open for running processes, just the inode becomes orphaned.
killing system_server immediately freed up these 1GB and solved for me. lsof is your friend

Categories

Resources