How is the internal space managed? - General Questions and Answers

Hi, this is probably a silly question, in the sense that the answer is simple, and yet right now I'm a bit lost. My total internal storage capacity, according to Windows when my phone is plugged, is 226gb. Also according to Windows, and file managers on Android, all the content is taking 180gb. So far so good. But on Windows I see free space: 16gb. So, 226 - 180 = 46.
Removing the 16gb free, that leaves me with something unknown taking 30gb. Is it the system, the apps, the apps data? If it's the system, I think 30gb is way too much. If it's the apps, also I think it's too much. If it's the app's data, that's actually OK, but I thought that data is usually on the internal storage. If not, were could it be?
I think this is a mix of all the three, but, to be certain, I would like to know a way to check the system size, the apps size and the apps data size. Can this be done? Thanks!
EDIT
OK, just found out that system is taking about 14gb and this is already excluded from the total capacity shown on Windows, so, I still don't know where the 30gb occupied space may be coming from.

Check device's internal storage's disk usage via du command. See also here:
How to Find Disk Usage of Files and Directories in Linux
This article explains 10 useful "du" (disk usage) commands that help you to find out disk usage of files and directories in Linux.
www.tecmint.com

Yes, du reports 180GB on internal sdcard, that I know. But if total is 226GB and free is 16GB, 226GB minus 180GB actually give us 46GB supposedly free, so, where are the 30GB left of the occupied space?

AFAIK a portion of the internal sdcard's total capacity is used to store certain functions including optimizations of the memory that support performance and endurance and therefore is not available for user storage.

xXx yYy said:
AFAIK a portion of the internal sdcard's total capacity is used to store certain functions including optimizations of the memory that support performance and endurance and therefore is not available for user storage.
Click to expand...
Click to collapse
It's not available, yet it shows as space taken? Would that take 30GB?

Sorry for making a new post instead of an edit, but there's new info and I think it should be separated. So, I've been playing around with the df and du command, and here are the results. I've deleted a 40GB folder from internal memory so forget about the numbers on the first post:
df output:
Code:
Filesystem Size Used Avail Use% Mounted on
/data/media 226G 160G 67G 71% /mnt/runtime/default/emulated
du output:
Code:
104M /data/adb
36K /data/anr
14K /data/apex
13G /data/app
3.5K /data/app-asec
3.5K /data/app-ephemeral
3.5K /data/app-lib
3.5K /data/app-private
3.5K /data/app-staging
0 /data/app-tmp
1.3M /data/backup
3.5K /data/bootchart
14K /data/cache
906M /data/dalvik-cache
9.2G /data/data
0 /data/data-tmp
3.5K /data/dpm
11K /data/drm
3.5K /data/extm
7.0K /data/gsi
1.4M /data/local
3.5K /data/lost+found
18M /data/magisk_backup_7d97454e4da0aa16d84783dfc5b6e31f1ca44c15
131G /data/media
3.5K /data/mediadrm
25M /data/misc
66K /data/misc_ce
105K /data/misc_de
3.5K /data/miui
2.8M /data/mqsas
11K /data/nfc
3.5K /data/ota
3.5K /data/ota_package
3.5K /data/per_boot
3.5K /data/preloads
12K /data/property
11K /data/rclone
260K /data/resource-cache
40K /data/rollback
3.5K /data/rollback-observer
4.5K /data/ru.bkqovrzm.cvkvlilxi
4.5K /data/ru.guhkdbvd.bioxbkqve
4.5K /data/ru.tsglwgsm.qdvpylesc
3.5K /data/sdcard
7.5K /data/server_configurable_flags
3.5K /data/ss
59M /data/system
4.0M /data/system_ce
289K /data/system_de
3.5K /data/tmp
18K /data/tombstones
27K /data/unencrypted
306M /data/user
805M /data/user_de
168M /data/vendor
18K /data/vendor_ce
7.5M /data/vendor_de
156G total
I have a couple of questions here. Is it the /data/media from df equal to /data folder? If they are, according to df there are 160GB occupied, but according to du theres 156GB in use. Where are the 4GB left?
Also, if those paths does not relate to the same thing, according to df there are 160GB occupied on "/data/media", but according to du theres 131GB in use in "/data/media". Where are the 29GB left?
I hope my questions make sense. I feel like I'm missing something here about how spaces a partitions work on Android, so let's hope someone can clarify me that.
Thanks!

Only to have mentioned it:
Android typically ( ext4 FS ) allocates disk space in 4KB chunks. Means the disk space allocated for files you store always is a multiple of 4KB. So storing a file of size 1B will allocate 4KB, if you store a file of size 5KB then 8KB disk space get allocated ...
Disk space allocated for a file in the rarest case is file's real size.

xXx yYy said:
Only to have mentioned it:
Android typically ( ext4 FS ) allocates disk space in 4KB chunks. Means the disk space allocated for files you store always is a multiple of 4KB. So storing a file of size 1B will allocate 4KB, if you store a file of size 5KB then 8KB disk space get allocated ...
Disk space allocated for a file in the rarest case is file's real size.
Click to expand...
Click to collapse
So you mean those 4GB left may came from that fact? So the "/data/media" from df command is the "same" one as "/data/" from du command?

Data/media is its own thing and sits next to data/data, data/obb.. AFAIK its a new thing and contains all the media related to apps and games etc.. Presuming video and audio files.. I wouldn't delete it as it might bork apps but you might be able to delete certain ones if they won't affect the OS..
Any storage discrepancy will be in cluster size and bits to bytes conversions.

shivadow said:
Data/media is its own thing and sits next to data/data, data/obb.. AFAIK its a new thing and contains all the media related to apps and games etc.. Presuming video and audio files.. I wouldn't delete it as it might bork apps but you might be able to delete certain ones if they won't affect the OS..
Any storage discrepancy will be in cluster size and bits to bytes conversions.
Click to expand...
Click to collapse
I'm talking about the difference in labels between commands.
According to df:
Code:
Filesystem Size Used Avail Use% Mounted on
/data/media 226G 160G 67G 71% /mnt/runtime/default/emulated
According to du:
Code:
131G /data/media
156G /data/ (total)
So, if the "/data/media" label from df equals the "/data/media" label from du, I'm missing 30GB (160GB used vs 131 GB used). If the "/data/media/" label from df it's actually the data partition, then I'm missing 4GB (160GB used vs 156GB used). You get what I mean? If they're the same I could understand 4GB discrepancy, if they are not the same, are you saying the filesystem format actually eats up 30GB out of nowhere???

In your case /data/media is a mounted partition ( block device ) with fixed maximum size 226GB. It houses the directories /storage emulated/<UID>/Downloads, /storage emulated/<UID>/Musics, /storage/emulated/<UID>/Pictures, storage emulated/<UID>/Videos, ...
The mentioned partition may already have so-called bad blocks, i.e. unusable blocks. It is not uncommon for sd-cards to have 2-6% bad blocks when they leave the factory.

xXx yYy said:
In your case /data/media is a mounted partition ( block device ) with fixed maximum size 226GB. It houses the directories /storage emulated/<UID>/Downloads, /storage emulated/<UID>/Musics, /storage/emulated/<UID>/Pictures, storage emulated/<UID>/Videos, ...
The mentioned partition may already have so-called bad blocks, i.e. unusable blocks. It is not uncommon for sd-cards to have 2-6% bad blocks when they leave the factory.
Click to expand...
Click to collapse
And the /data folder is also inside this partition, right? Because that one is taking 156GB according to du... if not, why according to df /data/media has 160GB occupied and according to du /data/media has 131GB occupied? Why this discrepancy?

OMG. Become familiar with your device's Android OS's partition structure. Learn what is difference between partition and directory. GIYF ...

I'm trying, but I haven't found anything solid enough so I'm asking here.

Related

192 megs of ram?!

Hello,
I apologize if this has been covered... It seems that our forum is unable to search for 3 character terms, specifically "192" and "ram".
The G1 is listed as having 192 megs of memory. Yet, running "free" from my rooted RC33(JF1.41) shows:
Code:
$ su
# free
total used free shared buffers
Mem: 99040 96292 2748 0 316
Swap: 0 0 0
Total: 99040 96292 2748
#
So, where's my other 96 megs?! If -all- this extra ram is being used for 3d (god forbid) I'd gladly tweak a setting to reclaim more ram for RUNNING APPS, versus bling bling.
Anyone have any ideas here?
mystica555 said:
Hello,
I apologize if this has been covered... It seems that our forum is unable to search for 3 character terms, specifically "192" and "ram".
The G1 is listed as having 192 megs of memory. Yet, running "free" from my rooted RC33(JF1.41) shows:
Code:
$ su
# free
total used free shared buffers
Mem: 99040 96292 2748 0 316
Swap: 0 0 0
Total: 99040 96292 2748
#
So, where's my other 96 megs?! If -all- this extra ram is being used for 3d (god forbid) I'd gladly tweak a setting to reclaim more ram for RUNNING APPS, versus bling bling.
Anyone have any ideas here?
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?p=3262422
mystica555 said:
Code:
$ su
# free
total used free shared buffers
Mem: 99040 96292 2748 0 316
Swap: 0 0 0
Total: 99040 96292 2748
#
Click to expand...
Click to collapse
And ofcourse I end up reading the reply to my post -after- i write this one. Edited as I'm an idiot.
It still seems to me that 192 megs is A; misleading and B; clearly NOT enough to run this OS, along with radio "firmware" (why cant the radio have its own bloody discrete chip!?)
I presume this huge gaping usage of ram is why the Sprint Touch Pro shows 288 megs of ram; its really 384 with the rest being used by the phone's radio and framebuffer. Gah.
I wonder, will new Android hardware overcome this paltry 96 meg limit?
mystica555 said:
And ofcourse I end up reading the reply to my post -after- i write this one. Edited as I'm an idiot.
It still seems to me that 192 megs is A; misleading and B; clearly NOT enough to run this OS, along with radio "firmware" (why cant the radio have its own bloody discrete chip!?)
I presume this huge gaping usage of ram is why the Sprint Touch Pro shows 288 megs of ram; its really 384 with the rest being used by the phone's radio and framebuffer. Gah.
I wonder, will new Android hardware overcome this paltry 96 meg limit?
Click to expand...
Click to collapse
indeed .. but that would be why rooting the G1 is so nice .. move files over to a linux EXT2 partition on the SD card and viola!! ultimate space
i have 1.5G dedicated to the G1 .. keeps the phone free and clear
Flash is not SDRAM
LucidREM said:
indeed .. but that would be why rooting the G1 is so nice .. move files over to a linux EXT2 partition on the SD card and viola!! ultimate space
i have 1.5G dedicated to the G1 .. keeps the phone free and clear
Click to expand...
Click to collapse
I could care less about the total amount of installed apps; I've got plenty of free yaffs2 flash for what I end up running...I simply don't want my apps to get oom-killed.
I simply wish to run, ALL CONCURRENTLY, (cpu speed be damned!)
Connectbot
HelloAIM!
PicPush
StreamFurious or Last.fm
Gmail
AND the browser
without one or more (or the home screen) forcibly being killed due to out of memory errors.
Load Browser, 2 or 3 of those always end up dying.
A normal commute for me on the bus: I'm chatting on AIM. I've got a irssi session open on my VPS in Connectbot. Last.fm playing some futurepop. I tap the notification bar to read the new email I have, which contains an HTML link. Click the link...Boom, music stops playing. Close browser, homescreen reloads slowly. Go back to connectbot, well, im disconnected.
RAM = Godly.
Let's try this...
Code:
# cd /sdcard
# dd if=/dev/zero of=swap.fil bs=1M count=128
128+0 records in
128+0 records out
# mkswap ./swap.fil
Setting up swapspace version 1, size = 134213632 bytes
# swapon ./swap.fil
# free
total used free shared buffers
Mem: 99040 97112 1928 0 556
Swap: 131064 0 131064
Total: 230104 97112 132992
#
mystica555 said:
Code:
# cd /sdcard
# dd if=/dev/zero of=swap.fil bs=1M count=128
128+0 records in
128+0 records out
# mkswap ./swap.fil
Setting up swapspace version 1, size = 134213632 bytes
# swapon ./swap.fil
# free
total used free shared buffers
Mem: 99040 97112 1928 0 556
Swap: 131064 0 131064
Total: 230104 97112 132992
#
Click to expand...
Click to collapse
What does that do? Does it create a swap file on the sd card?
andonnguyen said:
What does that do? Does it create a swap file on the sd card?
Click to expand...
Click to collapse
Yessir
mystica555 said:
Code:
# cd /sdcard
# dd if=/dev/zero of=swap.fil bs=1M count=128
128+0 records in
128+0 records out
# mkswap ./swap.fil
Setting up swapspace version 1, size = 134213632 bytes
# swapon ./swap.fil
# free
total used free shared buffers
Mem: 99040 97112 1928 0 556
Swap: 131064 0 131064
Total: 230104 97112 132992
#
Click to expand...
Click to collapse
i'm slightly hesitant to try .. anyone? good / bad / indifferent???
What exactly will this do and will a reboot cancel this?
widto08 said:
What exactly will this do and will a reboot cancel this?
Click to expand...
Click to collapse
even if a reboot didn't cancel it .. the next update.zip would .. unless something was built into it
yeah a reboot will cancel... how can I make this permanent? What file can I put the swapon command into? I just tried init.rc, but that didn't work.
PROOF OF CONCEPT ONLY! Serious risks involved, still working on this!
As a test, it works. however:
This has a few(lot of?) problems!
Biggest: your sd card cant be mounted as a disk unless you stop swapping. or reboot.
Next: your sd card will die sooner rather than later, as you are doing what it never was intended to do (writing moving data back and forth when its really good just for storing files that may change. sometime.)
Finally, things can start to run slow...VERY slow...
Biggest issue, after my busride with last.fm never stopping, browsing, all the stuff that kept making me angry before. Then i got home and tried to make a phonecall... The dialer worked *reasonably* responsive.. All of about 10s to bring it up. However, MAKING the call took...an eternity.
Hit the green button to dial...phone starts ringing, friend answers, we start talking.. I look at the phone.. black screen...ITS WAITING FOR THE ANDROID PIC AND CALL TIMER THING TO COME UP...40s after i started the call, got a message saying that one process was not responding, force or wait. at this point, when *that* dialog came out of swap, lo and behold the process actually not responding was working fine behind said dialog...
So yeah. its got its benefits, but very large downfalls.
As you *WILL* destroy your flash after an unspecified amount of time, *do not* try to put this on your internal flash. Not in /cache for example. Flash cards are cheap; replacing the g1 because you nuked 64 megs of flash ram is not...
I will test a few methods of separating the flash card from the vfat filesystem (mountable via usb_mass_storage) and report back. Probably partitioning the card, one as swap and such.
ON the other hand, I may also try partitioning 128m as fat16, to make certain the small card's wear levelling scheme is able to do whatever it can to help mitigate the destruction-by-swapping.
Fat32 may not have the same wear levelling mechanisms at the card level on anything less than an SDHC, and guaranteed ext2 wont. Raw swap won't either... As far as I remember, flash wear levelling on sdcards is based entirely on how FAT allocates blocks. (someone knowledgeable about the SD/SDHC and wear levelling feel free to chime in!)
I'll post more later when I try a few more things!
I really hope this turns into a sound solution...and then I can die happy.
Or live with my G1 happily...yea thats better.
mystica555 said:
As a test, it works. however:
This has a few(lot of?) problems!
Biggest: your sd card cant be mounted as a disk unless you stop swapping. or reboot.
Click to expand...
Click to collapse
Which is why I put it in /system/sd/swap/swap.fil
mystica555 said:
Next: your sd card will die sooner rather than later, as you are doing what it never was intended to do (writing moving data back and forth when its really good just for storing files that may change. sometime.)
Click to expand...
Click to collapse
Not an issue for me. By the time it wears out, I will have upgraded to a newer faster card anyway.
mystica555 said:
Finally, things can start to run slow...VERY slow...
Biggest issue, after my busride with last.fm never stopping, browsing, all the stuff that kept making me angry before. Then i got home and tried to make a phonecall... The dialer worked *reasonably* responsive.. All of about 10s to bring it up. However, MAKING the call took...an eternity.
Hit the green button to dial...phone starts ringing, friend answers, we start talking.. I look at the phone.. black screen...ITS WAITING FOR THE ANDROID PIC AND CALL TIMER THING TO COME UP...40s after i started the call, got a message saying that one process was not responding, force or wait. at this point, when *that* dialog came out of swap, lo and behold the process actually not responding was working fine behind said dialog...
So yeah. its got its benefits, but very large downfalls.
Click to expand...
Click to collapse
Could this be due to the speed of your SD card? I am already noticing a marked performance increase.
I tell you what, if you can give me an idea of where to make this permanent, I am willing to run this card to destruction. I have another 8G class 6 card ready to go, and can swap out easily at any time. All I have to do is make regular backups on my laptop and I should be good to go. (And even then data loss is not really an issue for me anyway.)
Wear levelling..Different than I thought.
mystica555 said:
ON the other hand, I may also try partitioning 128m as fat16, to make certain the small card's wear levelling scheme is able to do whatever it can to help mitigate the destruction-by-swapping.
Fat32 may not have the same wear levelling mechanisms at the card level on anything less than an SDHC, and guaranteed ext2 wont. Raw swap won't either... As far as I remember, flash wear levelling on sdcards is based entirely on how FAT allocates blocks. (someone knowledgeable about the SD/SDHC and wear levelling feel free to chime in!)
Click to expand...
Click to collapse
Ok, I read a bit into this myself and it seems even back in 2003 wear leveling is done at a very low level: CHS/LBA blocks, versus FAT Blocks.
Sandisk Whitepaper from 2003
I would expect that this sort of wear-leveling is in effect on any of their current cards, including the microsdhc the G1 came with.
As such, it seems swap/ext2 won't have much if any difference compared to FAT filesystems. Its recommended to mount the ext2 with option "noatime" however, so that metadata won't be written for -every single read-.
t1n0m3n said:
Which is why I put it in /system/sd/swap/swap.fil
Click to expand...
Click to collapse
It seems I haven't read enough about where you can put files.. Is this /system/sd normal for a G1, or is this after you went and moved apps/caches to the SD card?
t1n0m3n said:
Not an issue for me. By the time it wears out, I will have upgraded to a newer faster card anyway.
Click to expand...
Click to collapse
Indeed! This is mainly a warning to not try and use the phone's internal flash.
t1n0m3n said:
Could this be due to the speed of your SD card? I am already noticing a marked performance increase.
Click to expand...
Click to collapse
I am 90% certain that it is the speed of the card. Note: I am still using the 1gb card that was installed initially, sadly this phone broke me. Payday friday though means a trip to microcenter
That, or you haven't run 64 megs of apps out of main ram into swap. I had a -lot- of junk running in the background, in addition to the laundry list of apps enumerated earlier in the thread. I think it was: connectbot, helloaim, browser with 4 windows, terminal, alarmclock, calendar (twice! wtf) tmo myfaves switcher, last.fm, maps, voice dialer (twice as well?) google talk messaging klaxon and about 2 or 3 others I cant remember. At peak usage, I had 68 megs swap used and all the ram used as well.
There should be a rather quick and dirty way of getting this into an init script. I'll mess with it at lunch tomorrow.
Right now, sleep is calling and this is one call I'm not forwarding to voicemail!
mystica555 said:
It seems I haven't read enough about where you can put files.. Is this /system/sd normal for a G1, or is this after you went and moved apps/caches to the SD card?
Click to expand...
Click to collapse
/system/sd is my ext2 partition on my SD card that I moved my apps/caches to.
Has anybody tried compcache yet? Its compressed swap and it is ideal for this device, if it can be made to run.
http://code.google.com/p/compcache/

whats is /dev used for?

I noticed that /dev partition doesnt seem to get used often. Was thinking about having the swap file sit there. It looks like the partition gets cleared out after a reboot which is fine by me. would gladly sacrifice some extra bootup time for faster swap file.
/dev is a pseudo filesystem containing handles for your hardware devices
do not touch it
/dev is actually mounted in RAM, so putting a swap file there doesn't make much sense.
I have a question:
If one does Apps2SD, you get a free space of around 75 MB on the data partition, right?
Can't this space be used for a swapfile instead of using the SD card? The internal memory should be faster than any SD card. Please correct me if I'm wrong.
djvw said:
I have a question:
If one does Apps2SD, you get a free space of around 75 MB on the data partition, right?
Can't this space be used for a swapfile instead of using the SD card? The internal memory should be faster than any SD card. Please correct me if I'm wrong.
Click to expand...
Click to collapse
yes but you will wear this memory out...then your phone will be useless... better to wear out a sd than wear out memory you cant replace

[REQUEST] Move App-Data to/back from /data to /sd-ext

Are there any plans to implement a Button into the App-Manager, to move the Data-Part of an app to the /ext2 Partition ?
Especially on low memory devices (like the G1) this will give us the chance to install a lot of apps without runnung to "low space on device".
I have written a very small bash-script to manually do this job, but it would be more comfortable with a Button.
move.sh
Code:
#!/system/bin/sh
#
#data_to_move=com.alk.copilot
#data_to_move=com.camelgames.blowup
#data_to_move=com.drodin.tuxrider
#data_to_move=com.gameloft.android.AMEU.GloftAsphalt5.asphalt5
#data_to_move=com.navigon.navigator
#data_to_move=com.polarbit.ironsightlite
#data_to_move=com.polarbit.ragingthunder
#data_to_move=com.polarbit.rthunder2
#data_to_move=com.polarbit.waveblazerlite
#data_to_move=com.estrongs.android.pop
su
mount -o remount,rw /data
mkdir /sd-ext/data
cd /data/data
echo About to Move ${data_to_move}
cp -r -p ${data_to_move} /sd-ext/data
rm -r -f ${data_to_move}
ln -s /sd-ext/data/${data_to_move} ${data_to_move}
unmove.sh
Code:
#!/system/bin/sh
#
#data_to_move=com.alk.copilot
#data_to_move=com.camelgames.blowup
#data_to_move=com.drodin.tuxrider
#data_to_move=com.gameloft.android.AMEU.GloftAsphalt5.asphalt5
#data_to_move=com.navigon.navigator
#data_to_move=com.polarbit.ironsightlite
#data_to_move=com.polarbit.ragingthunder
#data_to_move=com.polarbit.rthunder2
#data_to_move=com.polarbit.waveblazerlite
#data_to_move=com.estrongs.android.pop
su
mount -o remount,rw /data
mkdir /sd-ext/data
cd /data/data
echo About to unMove ${data_to_move}
rm ${data_to_move}
mkdir ${data_to_move}
cp -r -p /sd-ext/data/${data_to_move} ${data_to_move}
Apps that need lots of space should use the fat32 partition gracefully, using this hack would considerably slow down your system(even class6). Why double the reads and writes to the slow mmc?
Because not all apps using the fat32-Partition.
Navigon for example uses 14 MB of internal storage.
If you install such apps on a G1, you can quickly run out of space.
Low on cache space will considerably slow down the overall system performance.
I would not suggest to move the data of any installed apps, but from the big ones.
Apps like Navigation and 3D-Games are writing not frequently their data and if you own a G1 you are already swapping when using an Eclaid based ROM. So this wouldn't make a big difference in the livetime of your sdcard.
Perhaps someone could implement a partial move (e.g. only libraries) to avoid massive writes to the card ... and/or setting a threshold value, so apps with small data could not be moved.
For me, moving the apps in the Script above has given me additional 35 MB internal space and everything is still runnung "fast".
/data/data
TheGenesis said:
Because not all apps using the fat32-Partition.
Navigon for example uses 14 MB of internal storage.
If you install such apps on a G1, you can quickly run out of space.
Low on cache space will considerably slow down the overall system performance.
I would not suggest to move the data of any installed apps, but from the big ones.
Apps like Navigation and 3D-Games are writing not frequently their data and if you own a G1 you are already swapping when using an Eclaid based ROM. So this wouldn't make a big difference in the livetime of your sdcard.
Perhaps someone could implement a partial move (e.g. only libraries) to avoid massive writes to the card ... and/or setting a threshold value, so apps with small data could not be moved.
For me, moving the apps in the Script above has given me additional 35 MB internal space and everything is still runnung "fast".
Click to expand...
Click to collapse
there is already a script in existance to move things like that:
# lucid -d -sd
would move app data to the sdcard and symlink .. this (however) does not move individual pieces .. i would be interested to know the speed difference on these apps that you moved .. also .. this will create extra difficulty when attempting any nandroid backup/restore .. i have seen people putting up comments because their phone crashed due to the excessive number of symlinks across the phone .. if you are not careful with them you could lose all your data
The Space allocated by the "big apps" is mainly used by their ./lib dir. Because of this, it would be enough to move and symlink only those dirs.
With Games the "rest" goes to settings and scores.
On a G1 there is absolutely no difference in speed when moving data to sd.
Perhaps its because the G1 is not the top performer at all
I have played those games in the list with data in internal and on sd-ext and there is no difference in speed ... loading time is also the same.
I'm satisfied with the results, but these scripts didn't remove the data when apps where uninstalled or re-installed and thats the reason of my request.
Take a look on your storage and see how much space (libraries) should be on the sdcard.
Code:
du -sk /data/data/* | sort -rn | head
btw ... did you ever enabled JIT on a G1 and played ExZeus or Armageddon Squadron ?
Its amazing what is possible on this "outdated" Hardware!
P.S. Nandroid Backup runs perfectly with this symlinks (no recursive/double Backups)
Update:
Nandroid Backup only saves app and app-private ... could you edit this to save everything excluding "crap-dirs" ?
If nandbackup uses standard tar calls, you can use the following command:
Code:
tar pcvf /sdcard/nandroid/sd-ext.tar . -C /sd-ext --exclude dalvik-cache --exclude lost+found
... it would save everything the user place on the partition including userinit.sh
Restoring such a tarball works perfectly with nandbackup.
Thx in advance
Thom
Int. mem for SWAP ?
well, after the moving some heavy apps data
I have 54mb free Int. mem (out of 90)
is that possible to use 24-32mb of this (fast?)memory
for SWAP ? instead of linux swap
and does it make any sense?
...just tried to enable /swapfile.swp via Swapper2
though it says
-creating swap - ok
-changing permission - ok
-formatting swap - ok
but
- enabling swap(file) - FAIL
sorry if it's just another stupid question
G1, stock cm5.0.8 test4, 32mb linux swap
TheGenesis said:
Update:
Nandroid Backup only saves app and app-private ... could you edit this to save everything excluding "crap-dirs" ?
If nandbackup uses standard tar calls, you can use the following command:
Code:
tar pcvf /sdcard/nandroid/sd-ext.tar . -C /sd-ext --exclude dalvik-cache --exclude lost+found
... it would save everything the user place on the partition including userinit.sh
Restoring such a tarball works perfectly with nandbackup.
Thx in advance
Thom
Click to expand...
Click to collapse
Have you tried BART? http://forum.xda-developers.com/showthread.php?t=562292
It's included in the recovery, and lets you backup/not_backup whatever you want.
zelipukin said:
well, after the moving some heavy apps data
I have 54mb free Int. mem (out of 90)
is that possible to use 24-32mb of this (fast?)memory
for SWAP ? instead of linux swap
and does it make any sense?
...just tried to enable /swapfile.swp via Swapper2
though it says
-creating swap - ok
-changing permission - ok
-formatting swap - ok
but
- enabling swap(file) - FAIL
sorry if it's just another stupid question
G1, stock cm5.0.8 test4, 32mb linux swap
Click to expand...
Click to collapse
It's not a stupid question ... I have had the same Idea yesterday ...
I have googled about life spawn of the internal flash memory, but I haven't found any satisfactory answer yet.
Anywhere here who know how fast the internal flash is ?
What about write cycles and wear levelling ?
If it has no integrated wear levelling, swapping will kill the phone in a few days.
I think your enable swap has failed due to wrong permissions ... try to enable with a defered call in your userinit.
Update: I have checked my filesystem ... /cache has actually 29 MB free ... is it correct, that /cache is only used by OTA updates ? Probably we can create a priorized swap there in addition to ext.
Keep up the good work dude...this sounds great
TheGenesis said:
Navigon for example uses 14 MB of internal storage.
If you install such apps on a G1, you can quickly run out of space.
Low on cache space will considerably slow down the overall system performance.
I would not suggest to move the data of any installed apps, but from the big ones.
Apps like Navigation and 3D-Games are writing not frequently their data and if you own a G1 you are already swapping when using an Eclaid based ROM. So this wouldn't make a big difference in the livetime of your sdcard.
Perhaps someone could implement a partial move (e.g. only libraries) to avoid massive writes to the card ... and/or setting a threshold value, so apps with small data could not be moved.
For me, moving the apps in the Script above has given me additional 35 MB internal space and everything is still runnung "fast".
Click to expand...
Click to collapse
If navigon is using that much internal storage it's a very poorly written application. Low cache doesn't slow the system down, just apps that require such huge amounts of it.
I'm already swapping when using Eclair? Wrong, using swap on the sdcard is horrible, I'd never recommend it to anyone and I personally don't use it. I have 114 apps installed and my cache is 9% used, it seems to me like your apps aren't clearing their cache correctly, or they're just poorly written. The argument that 'you are already swapping so this wouldn't make a big difference in the livetime of your sdcard' is untrue, you are effectively doubling the amount of read/writes to the mmc, if not more, so the lifetime could potentially be cut in half, of course depending on use.
I'd say nice try, but this really just working around crap apps.
I use a 16 GB class 6 SD-Card with static wear-levelling.
Assuming that a standard-flash-nand-cell lasts about 10.000 write cycles, and my swap-write-turnover is currently about 1,6 GB per day, my SD-Card will last about 273 years (minus regular writes).
So I don't care about livetime.
Besides Navigon, there are many apps, that store their huge libraries to /data .... Games in most cases ... If you aren't using "bad written apps" its fine for YOU ... everyone else has to do some tweaks when installing some of them to the limited internal storage.
I have 278 apps installed and the only limit for me, is currently the free space on my sdcard.
If you haven't enabled swap since you have flashed your first Eclair ROM, you have probably never felt what is "speed" or you never need more than 1 app running simultaniously .... or you are using a different phone instead of a G1
You say "swapping to sd is horrible" ... I think you have used the wrong parameters ... when I diable swapping my system is lagging ... even when I work with one app the same time.
Did you enabled compcache while swapping ? Did you use a swapfile on FAT32 ? Is your swappinness levor 50 or above 60 ? Are you using al class 4 or slower sd-card ? Are you running heavy memory consuming apps without killing them from time to time ?
All these can turn a fast swapping system into an unusable phone.
You cannot enable swap and use the system like before.
Update:
I have copied 18 MB from cache to data and it tooks round about 18 seconds.
Same file from sdcard (FAT32) to sdcard tooks 6 seconds ...
I will use the sdcard
I should have listened to internal voice telling me not to argue with a fool cause people might not know the difference..
Something strange
I did some stupid (owing to absence of linux knowledge)
experiments regarding to swap_2_/
I believe if it possible it should be done through userinit/config
or smth during boot to enable r/w. give necc permissions etc.
I just used Swapper and RootManager
If I create .swp (it creates but does not work) in any place but /cache
it (just existence of this file) does system unstable, slow and unresponsive
in /cache or any existing or newly created folders inside /cache/ it's OK
before reboot when those new folders/files disappear
=
After a wile something happened with my phone (not a first or last time)
many apps caused FC, settings were lost etc
tried "fix uid missmatches" - dots filled out numerous screens
and after ~20min I decided to reboot
tried nandroid - same endless ....................................................
after the reboot I found no FCs but still missing settings for some apps
(sim_linked_data apps like CoPilot were OK) so I Titaniumed non-working apps
data (5-6 apps) and evrthng seems fine
=
BUT when I look at internal memory available
I find 73Mb (out of ~90) FREE
there was 53Mb free before the accident
Is that normal? And whats the limit?
I have my laps and brain scratched to find some application of this
=
just my experience
-compcache always gives me horrible slow phone - not using
-linux swap - best results compare to no_swap - allways use
Some apps are storing many data to /data and sometimes to /cache.
I think your restores have cleared some of them.
Try CacheMate instead of such manouvers
I have checked the write throughput using dd:
Internal Storage: 3,5 MB/s
Class 6 SD Card: 7 MB/s
... annoying ... USB to SD-Card is 3,5 MB/s and SD-Card via Card-Reader (PC) is about 9 MB/s.
Hey man, i had the same problem and decided to go a head and write a small tool that does exactly this, this is a UI tool that shows all the folders in /data/data (excluding system folders) and let you move your apps to your sd, you should have an APP2SD ROM installed with root (of-course) and sd card partitioned to EXT and FAT32.
Contact me if you want to check it out, i never found the time to publish it ([email protected])
hi,
I have tried that and it works, but...it works until reboot...
After reboot I don't see directory /sd-ext/data....
I don't know why it always been deleted....

[HELP] failure on microSD and wont even stable load on Windows/Ubuntu, CALL for help?

This is a post, asking for some short of last chance of help, before calling the professionals
Yesterday, my phone went off (with quite a battery still) and when restarting a worrying message appear : "Impossible to mound SD card, it may be corrupted".
(and of course, with a outdated backup on my pc for weeks...)
I have read other posts, and nothing seems to help:
http://forum.xda-developers.com/showthread.php?t=1917058
http://forum.xda-developers.com/showthread.php?t=367912​
The microSD is a Transcend 16GB class4, not sure this info is key, but let it be know.
As Android doesn't load, I switch to PC, I plug the microSD into a USB adapter and go
First on Windows:
I try to load content, SD appear for few seconds and then disappear again.
On DISKPART >> list volume, The error message: "Virtual Disk Service Error: the object has been "
Try ZAR-X, and it keeps on "Enumerating devices, please wait", and does not do anything else
As things get ugly, I switch to linux (Ubuntu)
Trying to load on folder browser I got:
Unable to mount sd-ext
Error mounting /dev/sdc2 at /media/ubuntu/sd-ext:
Command line 'mount -t "ext3" -o "uhelper=udisk2,nodev,nosuid" "/dev/sdc2" "/media/ubuntu/sd-ext/" '
exited with non-zero exit status 32: wrong fs type, bad option, bad superblock on /dev/sdc2,
missing codepage or helper program, or other error
In some cases useful info is found in syslog -try dmesg | tail or so​or:​Error mounting /dev/sdc2 at /media/ubuntu/sd-ext:
Command-line `mount -t "ext3" -o "uhelper=udisks2,nodev,nosuid" "/dev/sdc2" "/media/ubuntu/sd-ext"'
exited with non-zero exit status 32: mount: /dev/sdc2 is not a valid block device​or:​Unable to open folder for 15GB Volume
Error when getting information for file '/media/ubuntu/ES64-FA45': No such file or directory​
went back to basis and run "sudo fdisk -l" and here I notice similar behiviour that windows, during the first 30 seconds or so after inserting the microSD/USB into the computer I it apear (among other disks) :
Disk /dev/sdc: 15.9 GB, 15931539456 bytes
255 heads, 63 sectors/track, 1936 cylinders, total 31116288 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d450f
Device Boot Start End Blocks Id System
/dev/sdc1 1 29617187 14808593+ c W95 FAT32 (LBA)
/dev/sdc2 29617188 30617187 500000 83 Linux
/dev/sdc3 30617188 31116287 249550 82 Linux swap / Solaris​but after those 30 second, no trace of the usb in the fdisk-list
I wonder if there is something else I can do from my limited hardware availability, and even that following attempts could damage further the microSD
On mention posts, it is told about dd_rescue :
On Linux can try dd_rescue. It creates copy like normal dd but it does not abort on errors.
Copy card to file and then mount this file like drive
http://forum.xda-developers.com/showpost.php?p=13196906&postcount=19​
is that something I could apply? OR something else I could do on my side?
or my last chance would be to put the SD in the hands of professionals and let do the job with open-heart-surgery-microscopy-tools?
(like those on : http://card-recovery.biz/us/service.php)
The data I have in the SD and not in the backup is enough valuable indeed to go that way, (on the other hand, house&personal insurance may also cover part of this cost)
----
By the way, two more things:
S-OFF, on one post, it is said:
S-OFF
This actually sounds a lot like what can happen to SD cards on some HTC devices if the S-OFF goes bad
(http://forum.xda-developers.com/showthread.php?t=1917058)​but I can't find what shrike1978 was refering to​
Real Time backup sync
Even I do regulary backups (or I intent to) I come to this situation.
Is there a tool/app/configuration that allows to have a real time synced copy of the contents on the SD (and preferable internal memory of mobile also) so chances of going broke are reduce to nearly ZERO ?
(In my PC I have of course a RAID, really bad there is no such options on Mobiles at cent costs on SD nowadays)​
any help, please?

Question System is occupying 35gb of space

Hello I installed miui.eu and the flash back to global, but I both cases the memory on the phone said that 35 gb of space are being occupied by the system, does anyone know where can I search for the files, of how can I verify if something is eating up my space??
In general it's like that storage space used by the system = the sum of all system partitions. A partition has a fixed size and it doesn't matter what and how much is stored on the partition. The occupied space remains the same. On the other hand these partitions are all 'read-only' and you have no ability to store data on it. You are only allowed to use the last partition of your eMMC storage which is not a system one.
Nevertheless 35GB are still far too much! Even on an A/B device. I guess it's some system's stuff stored on /data and it's somewhere in a directory that's only accessible for the system. Android then treats it as space occupied by the system.
Root enabled? Then try the app 'disc usage' or much better would be the use of a terminal app e.g. Termux. It's able to show you the exact usage on /data + you could check the size of all your system partitions (if you want to).

Categories

Resources