[Info] Flashed 4.2? Can't find your /sdcard data? - Galaxy S III General

Note from the Author -
I am moving on to the N5 now and ditching my S3. I will continue to maintain this thread, however - please do PM me if you think that something needs to be changed or updated in this thread as I doubt I will be answering questions within the thread as much. Please don't PM support questions to me. Only PM updates that need to be made in the thread.
It's been a blast!
Regards
Dan
I see this question / problem comes up a lot. Rather than retype my answer every time, I have created this thread so I can easily just give people a link to it.
Scenario
You've flashed a 4.2 ROM for the first time coming from 4.1 but Titanium Backup cannot see previous backups on /sdcard and file managers cannot see your /sdcard data. You are concerned you have lost your data.
Or.... You're looking in the storage menu and you notice the total of the "used" should leave you more "free" space
Yes! Have I lost my data?
No
Background info
Older android devices have the below (simplified) layout.
/system - Where the ROM goes (internal memory)
/data - where your apps and app data goes (internal memory)
/sdcard - your sd card (removable media)
The S3 works differently
/system - Where the ROM goes (internal memory)
/data - where your apps and app data goes (internal memory)
/sdcard - your sd card (internal memory)
See that last part? The /sdcard is now on internal memory too. Samsung have actually used the clever FUSE file system, to create the /sdcard mount point (exFAT) inside /data (EXT4). So /sdcard is actually mounted to /data/media. That's how "internal storage" goes down if you install an app or if you take a photo. It all goes into /data at the end of the day.
Back to the problem
With 4.2, /sdcard is no longer mounted to /data/media
Now, It is mounted to /data/media/0
When you use a file manager (or titanium backup) to look in /sdcard, it looks pretty much empty (which it is). Because you're looking in /data/media/0 but all your data is in /data/media
So what to do?
Quite simple and very easy.
Use a file manager with root explorer capabilities. I prefer root explorer but ES* and Solid should manage this too.
Go to /data/media
You should see:
0
legacy
obb
Along with all your other folders. Legacy and 0 are the same. Leaving 0, legacy and obb UNTOUCHED, MOVE all the other folders (which you will notice are all your missing folders and files) into the 0 folder. The only folders that should be left behind are the 3 mentioned above.
That's it. Done.
Anything else to be aware of?
Yes actually, many older recoveries still probably see /data/media as the location of /sdcard, so nandroid backups may end up there instead of /0. For example, often you end up with /data/media/clockworkmod instead of /data/media/0/clockworkmod. Some recoveries have a setting to change the location to /data/media/0 (Such as Philz recovery)
Because the Settings > Storage > sdcard shows the space free and used for /data as "sdcard" but only looks in /data/app, /data/data and /data/media/0 to get the breakdown of what is using the space, you will find that anything just in /data/media will show aup s used space, but the breakdown of apps, pictures, media etc will not show these files so it appears that they do not add up.
Example...
You have:
1 GB apps
1 GB Pictures and Video
4 GB Nandroid (Misc) - but this is in wrong place /data/media
Used space will show 6 GB
But breakdown will show
1 GB apps
1 GB Pictures and Video
0 GB Misc
So it looks like you lost 4 GB. It's a good idea to check /data/media every now and again to ensure nothing goes there by accident.
I hope this helps.
*Since ES have changed their UI a bit, here is a little "How To" locate /data/media using ES.
Open ES File explorer and press the phone with a globe icon in the top left corner.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Under "Tools" choose "Root explorer" and accept the SuperUser access prompt.
At this pop-up, press back
Press the "/" button (Which means "root directory" in Linux world)
You will now be able to see /data and within there, /media
Here you see the 0, Legacy and Obb folders that I should have and also a ClockworkMod fodler which I shouldn't. You will see otehrs... Move everything except Legacy and Obb into "0".
Click to expand...
Click to collapse

Thank you!
Quite interesting, but it raises some small questions.
1) How are things mounted in alternative 4.2.x ROMs ? CM 10.1 ? Is the same problem present ?
2) For a way to dual-boot 4.1.2 and 4.2.2 what would be the best / simplest approach expected from a kernel like Siyah or GoogyMax ?

Thanks for this how-to/information! I hope someone will read it and the repeating questions will, maybe not disappear, but getting less.
xclub_101 said:
2) For a way to dual-boot 4.1.2 and 4.2.2 what would be the best / simplest approach expected from a kernel like Siyah or GoogyMax ?
Click to expand...
Click to collapse
I assume there will be no issue for dual booting as Siyah for instance creates a new folder in which the 2nd rom is placed. The kernel just has to know where to put this 2nd rom folder (not sure if it makes any difference at all). The only tricky thing will be to link the data for both roms as done by a plugin.

I see this question / problem comes up a lot. Rather than retype my answer every time, I have created this thread so I can easily just give people a link to it.
Scenario
You've flashed a 4.2 ROM for the first time coming from 4.1 but Titanium Backup cannot see previous backups on /sdcard and file managers cannot see your /sdcard data. You are concerned you have lost your data.
Or.... You're looking in the storage menu and you notice the total of the "used" should leave you more "free" space
Yes! Have I lost my data?
No
Background info
Older android devices have the below (simplified) layout.
/system - Where the ROM goes (internal memory)
/data - where your apps and app data goes (internal memory)
/sdcard - your sd card (removable media)
The S3 works differently
/system - Where the ROM goes (internal memory)
/data - where your apps and app data goes (internal memory)
/sdcard - your sd card (internal memory)
See that last part? The /sdcard is now on internal memory too. Samsung have actually used the clever FUSE file system, to create the /sdcard mount point (exFAT) inside /data (EXT4). So /sdcard is actually mounted to /data/media. That's how "internal storage" goes down if you install an app or if you take a photo. It all goes into /data at the end of the day.
Back to the problem
With 4.2, /sdcard is no longer mounted to /data/media
Now, It is mounted to /data/media/0
When you use a file manager (or titanium backup) to look in /sdcard, it looks pretty much empty (which it is). Because you're looking in /data/media/0 but all your data is in /data/media
So what to do?
Quite simple and very easy.
Use a file manager with root explorer capabilities. I prefer root explorer but ES* and Solid should manage this too.
Go to /data/media
You should see:
0
legacy
obb
Along with all your other folders. Legacy and 0 are the same. Leaving 0, legacy and obb UNTOUCHED, MOVE all the other folders (which you will notice are all your missing folders and files) into the 0 folder. The only folders that should be left behind are the 3 mentioned above.
That's it. Done.
Anything else to be aware of?
Yes actually, many older recoveries still probably see /data/media as the location of /sdcard, so nandroid backups may end up there instead of /0. For example, often you end up with /data/media/clockworkmod instead of /data/media/0/clockworkmod. Some recoveries have a setting to change the location to /data/media/0 (Such as Philz recovery)
Because the Settings > Storage > sdcard shows the space free and used for /data as "sdcard" but only looks in /data/app, /data/data and /data/media/0 to get the breakdown of what is using the space, you will find that anything just in /data/media will show aup s used space, but the breakdown of apps, pictures, media etc will not show these files so it appears that they do not add up.
Example...
You have:
1 GB apps
1 GB Pictures and Video
4 GB Nandroid (Misc) - but this is in wrong place /data/media
Used space will show 6 GB
But breakdown will show
1 GB apps
1 GB Pictures and Video
0 GB Misc
So it looks like you lost 4 GB. It's a good idea to check /data/media every now and again to ensure nothing goes there by accident.
I hope this helps.
*ES has updated it's UI and isn't as obvious as before how to get to /data/media so see below:
Open ES > menu > tools > root explorer
When prompted, accept root access request
At the top of the screen (you've probably defaulted to sdcard) press the "/" button to get to the root of your device. From here you can browse to /data/media

Just wanting to check I've got it right before I flash sentinel 4.6
I can use megawipe to clean up the internal memory.
Install the rom from external sd card
Copy everything from data/media in to data/media/0 and I should end up with just 3 folders with 0 my external sd card
Sent from my GT-I9300 using xda app-developers app

no, 0 will be your internal SD, not external

Glebun said:
no, 0 will be your internal SD, not external
Click to expand...
Click to collapse
But it was the external previously ???
Sent from my GT-I9300 using xda app-developers app

KingAzzA said:
But it was the external previously ???
Sent from my GT-I9300 using xda app-developers app
Click to expand...
Click to collapse
No, never.
/data/media has always been /sdcard. The 0 comes from 4.2 because it adds multi-user support and 0 is the default user. So /data/media/0 becomes /sdcard
/extSdCard is not affected by this at all.

So if I'm using megawipe to wipe everything off my internal sd card I don't need to move anything about once the rom is flashed
Sent from my GT-I9300 using xda app-developers app

KingAzzA said:
So if I'm using megawipe to wipe everything off my internal sd card I don't need to move anything about once the rom is flashed
Sent from my GT-I9300 using xda app-developers app
Click to expand...
Click to collapse
There would be nothing to move. Just ensure you back up photos etc to your computer first.
Make sure you have a rom to flash on your external sd too. I think megawipe wipes the ROM too.
Although personally I think its easier just to move the files

Reason I'm planning on using mega wipe is because everytime I uninstall an app it still leaves folders behind. Not sure which ones to delete so gonna go for a fresh start and reinstall the apps from titanium
Thanks for the help anyways.
It makes sense now
Sent from my GT-I9300 using xda app-developers app

Hmm...Seeing as someone is finally concerned about issues with the storage in 4.2,I'll first ask my question here before I move on to creating another thread,as I can't find anything no matter how much I search.
So,I was on UltimaROM 12 and,well,it freaked out some day (Dunno why,but it hadn't been working 100% well for quite a few days in addition to being slow like any Samsung ROM-The blame is on Samsung,not Kryten) and I thought I'd give AOSP another chance.So I installed Carbon ROM with Temasek's kernel and fell in love.The phone puts stock S3s to shame now.However,seeing as converting a 32gb microSD to FAT32 from exFAT is a loooooong process,I found this beauty and thought I could finally enjoy AOSP on the S3.However,now no music player finds my music,which is in the external SD card.PowerAmp for example (And any other I tried in fact) searches only in /storage/sdcard0 and /storage/emulated/0,without caring about what's in /storage/sdcard1.So that's about it,but as I listen to A LOT of music on the go,this drives me crazy.What's strange is that file managers and any other media application see the data in my external storage just fine,so eg in Gallery all my photos/videos are there.
Can anyone help before I resort to using binding commands (Or apps like FolderMount) to try and fix it?I just hope I won't have to format to FAT32,because I tend to watch HD movies on the phone and,well,i would kiss the movies bye-bye.
Thanks in advance guys!

Its not really related to this thread but most aosp rom / kernel combinations do not support exFAT so you may have to go to FAT32
Since exFAT is closed source, I would prefer to stay away from add on support modules
Its not long process to go to fat32. Copy data off. Format. Copy data back
Sent from my GT-I9300 using Tapatalk 2

rootSU said:
Its not really related to this thread but most aosp rom / kernel combinations do not support exFAT so you may have to go to FAT32
Since exFAT is closed source, I would prefer to stay away from add on support modules
Its not long process to go to fat32. Copy data off. Format. Copy data back
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
First off,thanks for replying.Secondly,it's not exFAT as it turns out.I tried an old microSD formatted to FAT32 and it had the same behaviour.Anyway...Thanks,I'll see what I'll do.
Sent from my GT-I9300 using xda premium

Odd stuff!

how can I fix this ? I have 4.86gb free storage for my device storage... but it said that I habe no free memory...
*this is happened when I open the GALLERY

babyyeobo14 said:
how can I fix this ? I have 4.86gb free storage for my device storage... but it said that I habe no free memory...
*this is happened when I open the GALLERY
Click to expand...
Click to collapse
can you provide details?
ROM
Screenshots of storage menu

rootSU said:
can you provide details?
ROM
Screenshots of storage menu
Click to expand...
Click to collapse
my Rom is wannam lite v7.0 (leaked firmware 4.2.2)

babyyeobo14 said:
my Rom is wannam lite v7.0 (leaked firmware 4.2.2)
Click to expand...
Click to collapse
Please now provide a screenshot of /data/media from a file manager please.

rootSU said:
Please now provide a screenshot of /data/media from a file manager please.
Click to expand...
Click to collapse
here sir.

Related

[Q] Moving apps to sd-ext3 - does not work (darktremor) *FIXED*

*EDIT* seems I fixed it
Hello,
I bought myself a new SD card and want to make a partition to install my apps on, rather than in the phone's real internal memory. Sorry for the long story, kindof explaining what I have already tried Hope you'll read it.
So I selected "partition SD card" in clockworkmod recovery, chose 512 MB and 0 MB swap. Afterwards I followed the steps as said by erwinP here: http://forum.xda-developers.com/showthread.php?t=1015532&page=164 I flashed the script (beta 3 version) and put my backup of my SD card back through the mounting option in CWM. I also installed A2SD GUI app for this script.
I first installed a busybox installer, but I got errors when installing. However I have come to read that cyanogenmod already includes busybox so this is not a problem I assume.
When I thus rebooted my phone it booted in the ADW launcher, and only the apps I had (partially) on SD already were shown. When opening the A2SDGUI app, I toggled "apps are on SD!" assuming I could put them all in the new internal memory, however it does nothing, only say "caution: your kernel must support the filesystem!"
So I thought perhaps my kernel is outdated (I was running CM 7.0.2) so I flashed nightly #177 (as I was going to do it anyway, and it has a new kernel). After that I rebooted back in my launcherpro and had all my apps back (even though the ones on SD look a bit odd in the settings), but the A2SD GUI app wouldn't open because I had no script, so I flashed that again. But now it STILL gives the same caution without doing anything else.
In CM settings I have allowed installation at an external place and said to install in internal memory next time. But it still says "internal memory 175 mb, used xxx mb", shouldn't I see internal memory 512 mb?
I hope anybody has experience with this, using CM7 and can help me with this
Cheers!
The internal memory space that u see in settings is the phone /data partition, and it will not include the ext3 partition of sdcard.
And if u face issues with A2SDGUI app, then uninstall and reinstall it. Still issues use the terminal emulator commands. A2SDGUI will be the graphical interface of terminal emulator commands AFAIK.
Sent from my Blade using XDA App
reinstalling actually fixed the "info" tab, showing how much MB is free on each partition etc, which did not work before either. However the moving still gives the same caution... odd
Perhaps I'll try the terminal commands
*edit* using a few terminal commands, I still get a LOT of errors. Tons of lines so here a few examples:
cp: can't create '/DATA:dta2sd.lg2"': File exists
rm: can't remove '/data/dta2sd.lg1': permission denied
[!] no block device /dev/block/mmcblk4
and when trying to convert to ext3 partition type, I get an error "[X] kernel does not support EXT3 partition. cannot continue". Very strange that a new CM7 mod would not support EXT3?
If anybody would have a clue, that would be great
I don't think you need to toggle "apps are on SD" I think after running the script apps are automatically sent to your ext partition.
Sent from my HTC Wildfire using xda premium
I was wondering the same, since there IS memory being used from the EXT partition. Still I wonder why the internal memory is still 106 MB being used, I would think more would be available after using the EXT partition...
Just to be clear, when I (in the settings - apps) move an app "from SD card to phone", it moves it to the EXT partition right? And when moving to SD it just moves it from the EXT partition to the SD as before?
Not too sure mate, I don't use it now thanks to 3xeno's thread for custom mtd partition, I don't really use that many apps anymore just Facebook, xda, Google+ and a few customization tools so don't need an extra partition now.
If you want to free up some memory take a look at custom mtd partition, it works better than a2sd as things run more stable when on the internal memory. If you have hundreds of apps though you can use a2sd aswell as an mtd partition.
http://forum.xda-developers.com/showthread.php?t=1233340
Sent from my HTC Wildfire using xda premium
Same problem,but a little change in conditions, actually I am thinking to start a new topic to get some help, bro u r first!
So in my case it is a change from cm7.0.3 to #177cm7, as I used app2sd script by darktemor in the stable release, with 512 MB a2sd partition, filled with 50+app, every thing can be moved to SD,but never my a2sd partition showed any memory usage, it is as of its birth size!, dont know where all app stored, but still all worked,.
Now attracted by #177cm7, I switched to it after taking a titanium backup, then I installed titanium backup to restore app, alas my a2sd partition is gone!, also I can't use a2sd script, it gives frequent reboots, but. Now I am thinking of repartition my card, till then I am using the built in cm7 feature to move apk to card, if any one got some clues, help us
Sent from my HTC Wildfire using XDA App
Hello wolfway
As already said: when looking to the internal memory space, you won't see any changes.. I know that I said that in my previous posts, so sorry about that.
And about the selecting the "apps are on SD!": if you do that, you move all the apps that are on your SD-EXT partition to your 'real' internal memory. So don't do that
Perhaps you should try all over again.. Reflash the latest nightly, wipe the dalvik cache and reflash the DTA2SD script. Then go to the market, download A2SDGUI and run it.
I just did that and went to "settings -> Applications -> Manage applications -> SD-card" and saw that my latest app was on the sd-card. Apparently flashing a new nightly removed my DTA2SD script (looking at the installer script, it seems logical I think), so apps were installed on my sd-card again with the build-in froyo A2SD.
What I did: I opened the A2SDGUI and went to the tab "system info". I wrote down how much of the internal memory and how much of the SD-EXT I had left (51 mb and 363 mb respectively). Then I went back to "settings -> applications ->..." and moved that one app that was located on my sd-card, to my internal memory. I then went back to A2SDGUI and looked up how much mb free I had. I then noticed that my SD-EXT dropped from 363mb to 361mb, which means that the DTA2SD script worked
Next I went to "settings -> CyanogenMod settings -> Application settings -> install location" and I selected "internal". My guess is that all new apps now will be installed on the internal memory or the ext-memory.
Really sorry again to have caused confusion!
Erwin
Erwin your last post made me confused!
So what exactly do i need to do? Never choose install location to external in 'application management'( taking about cm7 #177 build, not any other rom)? Or can i do it?, as my need is to keep internal memory free, and to put all my bulky collection of apk's to sd-ext.
Another doubts are..
1. Can i use dta2sd in cm7 #177 build? Does it support it?
2. Why do i need to put app to sd-ext, when there is already an option in cm7 to install them on sd?
3. What are the benifits i get if i use ext4 insted of ext3? Does cm7 support it?
4. Is it the android secure folder in which app are installed in sd?(if i have no ext3)
5.and a last one, if i use dta2sd script in cm7#177,(does it work?) And partition my sd to ext-3+fat32+swap partition, then chose install location to internal, will all my apks will be installed on ext3 by default?or should i have 2 move them using a2sd app? And where will the apk stored if i move a system apk to sd after the above conditions?
Sent from my HTC Wildfire using XDA App
showlyshah said:
Erwin your last post made me confused!
So what exactly do i need to do? Never choose install location to external in 'application management'( taking about cm7 #177 build, not any other rom)? Or can i do it?, as my need is to keep internal memory free, and to put all my bulky collection of apk's to sd-ext.
Another doubts are..
1. Can i use dta2sd in cm7 #177 build? Does it support it?
2. Why do i need to put app to sd-ext, when there is already an option in cm7 to install them on sd?
3. What are the benifits i get if i use ext4 insted of ext3? Does cm7 support it?
4. Is it the android secure folder in which app are installed in sd?(if i have no ext3)
5.and a last one, if i use dta2sd script in cm7#177,(does it work?) And partition my sd to ext-3+fat32+swap partition, then chose install location to internal, will all my apks will be installed on ext3 by default?or should i have 2 move them using a2sd app? And where will the apk stored if i move a system apk to sd after the above conditions?
Sent from my HTC Wildfire using XDA App
Click to expand...
Click to collapse
I'm sorry, I don't have enough time to answer all of your questions, but:
- I don't think it is possible to choose which apps you want to store on sd-ext, and which on internal memory
- I'm working on the CM7 nightly 176, which is the same as the 177. And it works for me.
- the build-in apps2sd can't move the hole app to your sd-card, but only a portion. It is then stored in the android.secure folder. Dta2sd moves the app completely to your sdcard, but you can't access it with a file explorer or something similar: it is an other partition. So you don't have to move your app to your sdcard: the dta2sd does all the magic for you!
For more information, go to the link where you've downloaded the script, you can find some very usefull information there!
Hopefully that helps
Erwin
Thankz for ur quick reply,i will check out the link
Sent from my HTC Wildfire using XDA App
cheers for the reply. Actually what you say is what I actually already have so that would mean that it did work (as I did flash the script again after my CM nightly). However the internal memory still shows only 53 mb left, but I guess that is normal then?
Can you go to a2sdgui and take a screenshot of your memory settings like this
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
53mb doesn't sound right to me, and dta2sd script shouldn't be using up all the space on your SD card, use root explorer to hunt down whichever file is taking up all the space on your card.
Sent from my HTC Wildfire using xda premium
hey,
the SD card is from another thing I think (made another thread about it, but still might be a nightly or this script problem)
screenshot in thumb (notice also my RAM is EXTREMELY low, I used to have 180 with my stable CM7, another problem I have to figure out I guess)
Something isn't setup right there for sure.
have you thought about reflashing and starting again or have you tried that already?
Sent from my HTC Wildfire using xda premium
wolfway said:
hey,
the SD card is from another thing I think (made another thread about it, but still might be a nightly or this script problem)
screenshot in thumb (notice also my RAM is EXTREMELY low, I used to have 180 with my stable CM7, another problem I have to figure out I guess)
Click to expand...
Click to collapse
Hello!
Just back from a very fine vacation, so sorry for the delay in answer. I checked my real internal memory using a2sdgui, and I have only 49mb free memory left. So it seems that the low "real" internal memory is normal.
I think it has to do with the moment you flash the script. Just untill that moment you stuff up your "real" internal memory, it is only after installing the script you can use the extra amount of storage. Dta2sd doesn't move apps to sd-ext that are already installed, so your "real" internal memory stays as it is. But when you install apps after flashing the script, they will be installed on your sd-ext. You can easelly check this by installing apps and checking a2sdgui after every installation.
Btw, this is just a hypotisis
Erwin
May be this will help you
forum.xda-developers.com/showthread.php?t=1267099
Sent from my HTC Wildfire using XDA App
ErwinP said:
Hello!
Just back from a very fine vacation, so sorry for the delay in answer. I checked my real internal memory using a2sdgui, and I have only 49mb free memory left. So it seems that the low "real" internal memory is normal.
I think it has to do with the moment you flash the script. Just untill that moment you stuff up your "real" internal memory, it is only after installing the script you can use the extra amount of storage. Dta2sd doesn't move apps to sd-ext that are already installed, so your "real" internal memory stays as it is. But when you install apps after flashing the script, they will be installed on your sd-ext. You can easelly check this by installing apps and checking a2sdgui after every installation.
Btw, this is just a hypotisis
Erwin
Click to expand...
Click to collapse
So if apps already installed don't move to the ext partition, I wonder what happened in my case?
I did a fresh install of cm7 177 and deleted my partition first and just used the custom mtd partition instead of a2sd, a couple of days ago I backed up my SD, re-partitioned and reinstalled a2sd beta3, used terminal to send data to SD activate zipalign and up my dalvik heapsize. As you can see from my screenshot above I have way more than 50mb internal memory,alright a lot of that comes from the mtd partition, but what I'm trying to say is all my apps where installed weeks before I added a2sd and they moved to sd-ext when running the script.
Sent from my HTC Wildfire using xda premium
first of all thanks a lot everybody for the answers. Just got back from a long holiday so I can play around with my wildfire again And it works now.
So I deleted a2sdgui and installed S2E. I then checked to move applications to the ext partition and rebooted. So now everything is on the EXT partition. Then I went to the settings -> applications and went to the "on SD" tab. Some were still on SD, when unchecking those boxes (thus moving from SD to "internal memory"), I could see less memory used and more on the EXT partition, whilst no (or barely) any change in the data section, good !
However my data section used was still about 75%. However I've noticed that I have a dalvik cache of 74 MB which is the reason why... I deleted it hoping to reboot with a smaller dalvik cache but that did not work, so I moved the dalvik cache too using S2E. I had a LONG boot time, and for some reason all my google settings had to be set again and all google data synched again, but now my data used is only about 25% (from app data, which for some reason can't be moved with S2E for me).
So it was working good the whole time I think, I was just mislead by the huge amount of dalvik cache using up my data section.
One more question, is S2E a totally different thing than darktremor? Does it need the darktremor script installed to work? Or is it a standalone app, and can you just install the app without the script (thus if you would flash a new ROM, you would not have to reflash the script).
I hope the moving of the dalvik cache won't make my phone too much slower but I guess that's one thing I'll have to find out
Thanks again
wolfway said:
One more question, is S2E a totally different thing than darktremor? Does it need the darktremor script installed to work? Or is it a standalone app, and can you just install the app without the script (thus if you would flash a new ROM, you would not have to reflash the script).
Click to expand...
Click to collapse
could anybody answer this question for sure? cheers
also, if I restore a nandroid backup, will my partition be gone or will everything be restored correctly over both partitions?

IDEA: Hacking internal/external sdcard mount paths

Hello.
I'm using the latest aurora and I'd like to discuss an idea I had.
Since the U8800 has plenty internal memory and it's quite fast comparing to an average sd card, it'd be great if we could use the internal memory for the tasks that need "speed" instead of "space".
Running apps from the sd card is the perfect example!
So the idea would be, while keeping the external sdcard mounted on /mnt/sdcard, having /mnt/sdcard/Android/data, for instance, point to the «internal sdcard path»/Android/data.
What do you think would be the best solution:
- hacking the mount points?
- using links?
- other solution?
Any developer or filesystem savvy user can point the advantages or dangers of using this solution?
- e.g.: the system or some apps may check if the external sd-card is mounted before trying to read/write to /mnt/sdcard/Android/data... that would mean the system/those apss may think that path isn't reachable with the ext-sdcard unmounted, altough they can be read.
Suggestions? Rants? Ideas?
Regards!
I have wondered if the /data/app or maybe the whole /data partition could be mounted in the internal storage partition. That would give 2gb space for apps and associated files instead of 3-400 ish and would mean no need to move apps to sd card which would mean faster loads at startup due to internal memory being faster.
VuDuCuRSe said:
Hello.
I'm using the latest aurora and I'd like to discuss an idea I had.
Since the U8800 has plenty internal memory and it's quite fast comparing to an average sd card, it'd be great if we could use the internal memory for the tasks that need "speed" instead of "space".
Running apps from the sd card is the perfect example!
So the idea would be, while keeping the external sdcard mounted on /mnt/sdcard, having /mnt/sdcard/Android/data, for instance, point to the «internal sdcard path»/Android/data.
What do you think would be the best solution:
- hacking the mount points?
- using links?
- other solution?
Any developer or filesystem savvy user can point the advantages or dangers of using this solution?
- e.g.: the system or some apps may check if the external sd-card is mounted before trying to read/write to /mnt/sdcard/Android/data... that would mean the system/those apss may think that path isn't reachable with the ext-sdcard unmounted, altough they can be read.
Suggestions? Rants? Ideas?
Regards!
Click to expand...
Click to collapse
Well this is known for a while now . Quoted from my thread here:
vold.fstab - CHANGE THE DEFAULT SDCARD: -thanks to julle131
There is this file named vold.fstab at your /system/etc/ folder, which controls which of your sdcards (Internal/External) will be mounted when you connect your phone to the PC. The last 2 lines are the only that matter. These are the two possibilities:
EXTERNAL SDCARD MOUNTED (DEFAULT):
dev_mount sdcard /mnt/sdcard auto /devices/platform/msm_sdcc.4/mmc_host
dev_mount emmc /mnt/sdcard1 14 /devices/platform/msm_sdcc.2/mmc_host
INTERNAL SDCARD MOUNTED:
dev_mount sdcard /mnt/sdcard 14 /devices/platform/msm_sdcc.2/mmc_host
dev_mount emmc /mnt/sdcard1 auto /devices/platform/msm_sdcc.4/mmc_host
change them as you wish with a root explorer or before flashing.
Click to expand...
Click to collapse
Make this change and every app will use the internal sdcard. Gallery works ok with images to external sdcard, it just might take a while for the first refresh. But I don't know if you'll notice any difference in terms of speed....
Cheers
spirosbond said:
Well this is known for a while now . Quoted from my thread here:
Make this change and every app will use the internal sdcard. Gallery works ok with images to external sdcard, it just might take a while for the first refresh. But I don't know if you'll notice any difference in terms of speed....
Cheers
Click to expand...
Click to collapse
That's not what he talked, I think. He said that the apparel would be installed on the external sd card, but the data would be moved to the internal one. And we have speed, but the main card would be the external one.
I think its a great idea if I understood it right!
Sent from my U8800 using xda premium
mrasquinho said:
That's not what he talked, I think. He said that the apparel would be installed on the external sd card, but the data would be moved to the internal one. And we have speed, but the main card would be the external one.
I think its a great idea if I understood it right!
Sent from my U8800 using xda premium
Click to expand...
Click to collapse
Oh I see! Sorry about that. As far as I know apps are not choosing were to put their data. They just say to the OS "I want these things to be at the sdcard" and the OS puts them at the correct place. So you can't "hack" the app to "see" at somewhere else. On the other hand the OS initialises on boot which card is the primary and which is the secondary. So my knowledge stops there and I can't imagine a way to make this separation between app data and the rest...
I hope for someone else's help!
PaulMilbank said:
I have wondered if the /data/app or maybe the whole /data partition could be mounted in the internal storage partition. That would give 2gb space for apps and associated files instead of 3-400 ish and would mean no need to move apps to sd card which would mean faster loads at startup due to internal memory being faster.
Click to expand...
Click to collapse
Maybe this cannot be done, because I think that the mapping of the partitions and mounts comes from the bootloader, but there is already the solution of resizing the data partition using the space of internal storage.
PaulMilbank said:
I have wondered if the /data/app or maybe the whole /data partition could be mounted in the internal storage partition. That would give 2gb space for apps and associated files instead of 3-400 ish and would mean no need to move apps to sd card which would mean faster loads at startup due to internal memory being faster.
Click to expand...
Click to collapse
That's a great idea!
I almost don't use the so called "internal sd card", therefor I have 2GB of fast empty space being wasted.
Why not simply mounting the internal sd-card partition in the data folder and the data partition on the internal sd card folder?
I only use the internal sd card to hold ringtones and other small stuff that I need to be in accessible 100% of the time, so a few hundred MB are enough!
Me gusta!
Every ROM flashes it's own fstab, right?
So all we'd need to do would be, editing the fstab before flashing it.
-----------------
Regarding the my first idea... I don't think one can simply mount a path on another path. We'd need a "virtual" device pointing to /mnt/sdcard-internal/data/ then mount that virtual device on /mnt/sdcard-external/data/.
My knowledge of unix mount/filesystems is not much more than what's explained here: https://help.ubuntu.com/community/Mount
OK, just found this:
http://askubuntu.com/questions/11079/mount-a-directory-to-look-like-a-drive
there is a FUSE filesystem named bindfs that probably does exactly what you want. For example the following:
bindfs -n /media/USB-HDD-01/ISO/ /home/johnc/ISO-images
Click to expand...
Click to collapse
would result in ISO-images to show up as a mounted filesystem in the Places sidepanel in Nautilus. The -n is required because otherwise bindfs tries to use the allow_other FUSE option, which by default is not allowed for regular users (if you use bindfs in /etc/fstab this is not a problem).
The first directory you give is the existing one, the second directory you give is an empty directory under which the contents of the existing one will appear.
Click to expand...
Click to collapse
So, bindfs depends on FUSE... and there's a port of fuse to android: https://github.com/seth-hg/fuse-android but looking at the README I get the feeling that it's not really working. The last step would be having a kernel with FUSE support... and regarding that, I have no idea, how easy it is to get a kernel like that for our U8800 :\
Finding such a solution to expand the DATA partition indirectly would be great!
I used to apply genokolar's custom partition method as "1.2G DATA + 1.46G INTERNAL SD" before, but i found out that it has some issues with Official 2.3 Roms. One of them -the most important IMHO- is the BOOTLOOP problem occurring in some specific situations!!!
See the details in my post here:
http://forum.xda-developers.com/showpost.php?p=25853141&postcount=134
(Seems that I don't encounter the bootloops on Custom Roms, but i'm not %100 sure and never will be )
So i unfortunately gave up using it, and revert to the stock partition .
I will be grateful to the one who will find a better and reliable solution. Hope to see it soon...
I still have to gather more information on the official update "modus operandi".
My goal is to simply reformat both partitions and then swap their mount points.
If the official update formats the partitions before applying the flashing official ROM files, then partitioning changes shouldn't cause any failure on the official update.
But like I said, I'm still yet to confirm that info.
Gen's idea was great (I learned a lot just by looking at his scripts) but resizing partitions has its dangers.
Since "no one" really uses the internal memory, why not simply exchange its room with /data, right?
This would be awesome! I would love to have 2gb for apps, instead of cluttering my phone.. plus the 2gb of internal storage are just a waste for me.. I never use them.. so this would be great!

p-3113 Swap ExternalSDCard 2 Internal

Here's a script I modified originally its a script written by mattiadj so I gotta give him props
Here's his thread its for the Galaxy S III I think - http://forum.xda-developers.com/showthread.php?t=1772234
This will make your external SDcard as Internal and your Internal SDCard external
It mounts data/media to your extSdcard
Please make a backup before you do this, just in case.
Let me know if you have any problems
1. Anyway.. you will need to place this script in your /data folder (Yes you need to be rooted)
2. Next use ES file manager and give it 777 permission (For the non-linux users, that's full permission on it, Read, write, execute for just user)
-----------------to do this with ES file manager just press and hold down on the file and look at its properties. At the bottom you can see Permissions, hit the Change button and check-mark everything for user
3. Use Smamager (Download it if you dont have it, ... .its free) and goto the script file and open as script/execute, then when it opens choose "Is executable" and then click "Su" & "Boot". Click "Save".
4. Reboot and enjoy.
To go back to the normal setup just delete the script or open it back up in smanager and clear the SU & Boot options.
In order for some apps to function properly you will have to copy some folders from your old internal sdcard to your "New" one.
For example.. aptoide wouldnt work until the aptoide repos folder was copied over. If you want you can just copy over everything to be safe. I on the other hand just picked and chose what I needed
xalien8dx said:
2. Next use ES file manager and give it 777 permission (For the non-linux users, that's full permission on it, Read, write, execute for everyone)
-----------------to do this with ES file manager just press and hold down on the file and look at its properties. At the bottom you can see Permissions, hit the Change button and check-mark everything
Click to expand...
Click to collapse
IMO, this is terrible advice. The script is probably getting run as root, and you're opening it up to be written by anyone. Imagine if malware edited the script? Think of what malware could do if it had root access...
Sent from my Galaxy Tab 2
imnuts said:
IMO, this is terrible advice. The script is probably getting run as root, and you're opening it up to be written by anyone. Imagine if malware edited the script? Think of what malware could do if it had root access...
Sent from my Galaxy Tab 2
Click to expand...
Click to collapse
Changed it to just user read, write, execute..
thanks
So, after this what happens to the internal SdCard. Does it, or is it still being used, and if so for what...?
^ same ? and has anyone tested this and is it safe?
All this is is a modded script from mattiadj. It was written for the GS3, so I changed it to work on the 3113 tablet
Here is what it does quoted from mattiadj
My aim was to use the external sd as internal sd and the original internal sd ONLY for apps installation.
So now my 64gb external sd is used for all tasks which the internal sd was used and the original internal sd is only used for apps storage!! All extra files (resources, caches, etc etc) are stored in my external SD, which is now mounted as internal
Click to expand...
Click to collapse
The original internal sdcard is mounted by default from the system as /data/media as well as /sdcard and mnt/sdcard
so with this script it puts data/media as extSDCard and /sdcard and /mnt/sdcard are mounted to the original external SDcard
you can still access the internal SDcard from data/media or /extSDCard or mnt/extSDcard
my code
Code:
sleep 5
mount -o remount,rw /
mount -t vfat -o umask=0000 /dev/block/vold/179:25 /mnt/sdcard
sleep 5
mount -o bind /data/media /mnt/extSdCard
this can be easily modified to work on other systems.
Hope this helps,
N8
Tried this out last night. For me it works only if run manually... After reboot, I get long "checking SD for errors" and when it actually mounts SD it gets mounted twice- as both internal sdcard and extSdCard.
Sent from my GT-P3100 using Tapatalk 2
I ran this with SCript Manager (Play Store) and it works great on my p3113. My External SD card was mounted as internal and my Internal Memory was mounted as ExternalSDcard. I am going to love having this script!
If your having problems with it mounting as your internal and external try unmounting/remounting your external card in settings under storage. Or if your skilled enough try changing the second sleep value in the script to a higher number like 10 that should fix it
Works famously. For the apps that have issues just clear data under settings and it seems to be golden.
Sent from my GT-P3113 using xda app-developers app
I haven't done anything quite like this before but I have a use in mind. My GPS program, Sygic, puts the mapset on the internal sd card. Just the Western USA states are 500 mb If I get this running, and have Sygic do it's normal install, will the mapset to to the 32 GB MicroSD card that I have?
king200 said:
I haven't done anything quite like this before but I have a use in mind. My GPS program, Sygic, puts the mapset on the internal sd card. Just the Western USA states are 500 mb If I get this running, and have Sygic do it's normal install, will the mapset to to the 32 GB MicroSD card that I have?
Click to expand...
Click to collapse
It should. For example, I use Amazon MP3 and when I downloaded a song before they went to the internal card. Now they are stored on the external. The device reads your external as though it is the internal.
Sent from my GT-P3113 using xda app-developers app
so is there Anyway on how to force this to start on boot?
Sent from my GT-P3113 using xda app-developers app
kdog48 said:
so is there Anyway on how to force this to start on boot?
Sent from my GT-P3113 using xda app-developers app
Click to expand...
Click to collapse
Yes
in script manager choose su and boot. If you follow the first post it will execute on boot. Or if you have a rom with init.d support place this script in your /etc/init.d folder, I dont have a rom with init.d support so I dont know if that would work but it should. If someone could test this and let me know I would appreciate it. Im not sure if you still have to set permissions to execute on it.
Well I've had problems downloading certain apps to SD it says insufficient memory delete 0mb of data so I actually will just manually use it haha
Sent from my GT-P3113 using xda app-developers app
Working 100% using a 32GB memory card! thanks for this!
hi guys
is applicable to 2 10.1 GalaxyTab P5100?
requires Android 4.1.1 or 4.0.4. ?
Thank you.
If this works, I will name my next born child after you!
Anyway, I would like to know if this will work on Cyangenmod 9.0.0? Or will it only work on the stock rom. I have my old stock rom of 4.0.4 saved if I need to go back... because I will if this works.
does root explorer have the 'su boot' option? never used it to run scripts...:silly:
I already used the thank link... but stilll thank you so, so much! I just recently got my 8gb 3113... needless to say, I REALLY needed some space. If any, it was a good lesson for me to definitely choose the 16GB Nexus 4.
MadDogE134 said:
does root explorer have the 'su boot' option? never used it to run scripts...:silly:
Click to expand...
Click to collapse
It's from SManager.

[Q] How much space is actually usable on Nexus 10?

Google advertizes that I can get up to 32GB of internal memory on the Nexus 10.
I am thinking about getting this tablet, but it doesn't have a MicroSD card slot, so I need to know this:
How much of the internal 32GB can I actually use?
Does the ROM take up some of that space, and how much?
isaacwg said:
Google advertizes that I can get up to 32GB of internal memory on the Nexus 10.
I am thinking about getting this tablet, but it doesn't have a MicroSD card slot, so I need to know this:
How much of the internal 32GB can I actually use?
Does the ROM take up some of that space, and how much?
Click to expand...
Click to collapse
29.71 GB of free space + you can get more via usb otg.
Not bad...
lKBZl said:
29.71 GB of free space + you can get more via usb otg.
Click to expand...
Click to collapse
Well, that's not too bad. And USB OTG looks quite interesting.
Thanks for the quick reply.
isaacwg said:
Well, that's not too bad. And USB OTG looks quite interesting.
Thanks for the quick reply.
Click to expand...
Click to collapse
I ordered a USB OTG from Amazon but it's coming from China is there a USA source?
This may help you...
ClutchKargo said:
I ordered a USB OTG from Amazon but it's coming from China is there a USA source?
Click to expand...
Click to collapse
On Amazon's website, when looking at a product, under the "add to cart" box, there is another box labeled "More Buying Choices".
That is probably what you want.
So what about the ROM?
OK, here is one thing that is not quite clear to me.
lKBZl, you said that the Nexus 10 has 29.71 GB of free space, but where is the ROM stored?
Am I right in assuming the ROM is stored on a separate partition, and the usable partition is 32GB?
So wouldn't that make the internal memory's real capacity larger than 32GB?
16gig
What about 16gig version ?
Ashirmittal said:
What about 16gig version ?
Click to expand...
Click to collapse
13.05gb on my 16gig, but I have an USB otg so no worries for me as I have plenty micro SD cards for storage.
Sent from my Nexus 10 using XDA Premium HD app
isaacwg said:
OK, here is one thing that is not quite clear to me.
lKBZl, you said that the Nexus 10 has 29.71 GB of free space, but where is the ROM stored?
Am I right in assuming the ROM is stored on a separate partition, and the usable partition is 32GB?
So wouldn't that make the internal memory's real capacity larger than 32GB?
Click to expand...
Click to collapse
32 gb is the total size of the storage capacity.
29.71gb is what is left for you to use as you wish.
Of the 3 or so gb missing, part of that is the os partition (/system) that contains the rom, kernel, etc.
And a smaller portion of that is strictly from the format process, small files that allow the memory to work.
trickster2369 said:
32 gb is the total size of the storage capacity.
29.71gb is what is left for you to use as you wish.
Of the 3 or so gb missing, part of that is the os partition (/system) that contains the rom, kernel, etc.
And a smaller portion of that is strictly from the format process, small files that allow the memory to work.
Click to expand...
Click to collapse
OK, thanks. That clears things up for me.
isaacwg said:
OK, thanks. That clears things up for me.
Click to expand...
Click to collapse
Lol I though you'd have understood that with the space left from the 29,71 to 32, it means that there is rom and etc.
If you guys want to buy an otg adapter, I recommend not to buy a cable like this: http://www.amazon.com/T-Flash-Adapt..._2?ie=UTF8&qid=1357413912&sr=8-2&keywords=otg
since then you won't be able to use a pendrive and a headphones. Something like this is better (in my opinion):
http://www.amazon.com/SANOXY-Micro-...F8&qid=1357413953&sr=8-7&keywords=otg+adapter
I looked at afew of the otg cables when I ordered my case, but none of them get any really good reviews. Maybe I am to picky dunno I will look to see if I can find any around where I live.
Can someone with a Nexus 10 tell me how much total space is on the /system partition, how much on the /data partition and how much on the mnt/sdcard partition. Also of which how much of that is available on a clean phone on each partition. Thanks
Gizmotech said:
Can someone with a Nexus 10 tell me how much total space is on the /system partition, how much on the /data partition and how much on the mnt/sdcard partition. Also of which how much of that is available on a clean phone on each partition. Thanks
Click to expand...
Click to collapse
Total values are what you're looking for.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Thanks. And this is for a clean rom with nothing installed yet right?
It looks like /data and /sdcard are not separate partitions instead directories on the same partition unless you have binded the 2 directories Can someone confirm this please?
I'm a little late to the party but a 32GB once formated usually lose ~7% once formated as FAT/NTFS.
EXT4 should probavbly be no difference.
MB
->
300GB=279GB
320GB=297GB
400GB=372GB
500GB=465GB
1TB=0.931TB
2TB=1.86TB
3TB=279TB
->
PB
So the 32GB without any files* should have 29.7GB
*No OS or boot files etc.
It's not exactly 7% but it's close and easier to calculate than the "1024^1000=banana/shoe+cat=value".
Thank you but I was more concerned with the partition sizes as if /system partition is full, it doesn't matter how much space you have available in /data or /sdcard, it won't allow to install apps or games. I can't understand why they didn't have one partition with directories instead of partitions. That way we wouldn't have issues such as free space on one directory/partition and full up on another. I think in this sense, the iphone storage management is better.
Gizmotech said:
Thank you but I was more concerned with the partition sizes as if /system partition is full, it doesn't matter how much space you have available in /data or /sdcard, it won't allow to install apps or games. I can't understand why they didn't have one partition with directories instead of partitions. That way we wouldn't have issues such as free space on one directory/partition and full up on another. I think in this sense, the iphone storage management is better.
Click to expand...
Click to collapse
Apps (end user installed) aren't stored in the /system partition the OS is. Apps go in /data.. It would be insanely hard, and nearly impossible to fill up the /system partition.
The only phone I know (probably more) that has ever ran out of useful /system space is the Nexus One which is the reason Google stopped upgrading it because ICS wouldn't fit on the /system partition. End users got crafty though and figured out a way around the limitation by crafty partitioning magic with the Micro SDCard slot.
Yes, but the Nexus 10 does not have an SD Card slot so there won't be any other way of expanding storage once the internal storage fills up. But I see what you mean about the /system partition.
Could never get my head around this Android partitions. So am I correct to say the APK and App data are stored in the /data partition? And Game that require additional download able content is stored in the /Sdcard partition?
Now my question is, is the /data partition and /sdcard partition two separate partitions or two directories on a single partition on the nexus 10? The reason why I am asking is because if you look at the storage info of my phone (screenshot below) /data partitiom and /sdcard partition are showing different storage capacity and usage whereas your nexus 10 shows those two to have identical capacity and usage.
My concern is if one partition is full up, and you may have useless space on the other partition where as if they were directories, either they will share the space on demand. Not sure if I am explaining it correctly but for example I have a Galaxy Ace 2 which if I was to fill up the /sdcard partition, and have a adequately free /data partition, then often that free space is useless for some apps as it requires available space on the /sdcard partition. Now if they weren't partitions and instead directories, which I think the configuration is on the nexus 10, it would still show available space as both directories combined would make one partition. Which would then leave me to wonder why didn't they do the same for my Galaxy Ace 2
Ignore sdcard 2nd part, this is created on removable sdcard for purposes of Link2SD app.
Gizmotech said:
Yes, but the Nexus 10 does not have an SD Card slot so there won't be any other way of expanding storage once the internal storage fills up. But I see what you mean about the /system partition.
Could never get my head around this Android partitions. So am I correct to say the APK and App data are stored in the /data partition? And Game that require additional download able content is stored in the /Sdcard partition?
Now my question is, is the /data partition and /sdcard partition two separate partitions or two directories on a single partition on the nexus 10? The reason why I am asking is if one partition is full up, and you may have useless space on the other partition where as if they were directories, either they will share the space on demand. Not sure if I am explaining it correctly but for example I have a Galaxy Ace 2 which if I was to fill up the /sdcard partition, and have a adequately free /data partition, then often that free space is useless for some apps as it requires available space on the /sdcard partition. Now if they weren't partitions and instead directories, it would still show available space as both directories combined would make one partition.
Click to expand...
Click to collapse
They are essentially in the simplest terms exactly as you described. Two folders pointing to the same partition. That is why you can wipe your "sdcard" but all your apps remain intact in /data even though it's the same partition.
The reason your Galaxy Ace is like that is because you have a legit removable SDCard storage and it isn't part of the internal storage.. This complication in partitions w/ real sdcards is why Google refuses to put SDCard slots on any of their devices.

[REF] S3 Storage (Data Loss Recovery / Prevention / Info)

Note from the Author -
I am moving on to the N5 now and ditching my S3. I will continue to maintain this thread, however - please do PM me if you think that something needs to be changed or updated in this thread as I doubt I will be answering questions within the thread as much. Please don't PM support questions to me. Only PM updates that need to be made in the thread.
It's been a blast!
Regards
Dan
S3 Storage (Data Loss Recovery / Prevention / Info)
This thread is intended to give you an overview of some of the Storage of the S3 from a Data Loss and recovery perspective. It is not intended to cover USB sticks or mods to Swap / Mount other storage. It is solely to cover day-to-day data concerns and give a background to how these things work
Please note, if you have recently swapped between Android 4.1 and 4.2 and cannot find your sdcard data, you need to read [Info] Flashed 4.2? Can't find your /sdcard data?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Before we get started...
Here are a couple of threads you should get familiar with before posting on XDA.
Forum Rules - use Search before posting
Post Questions or Support queries in Q&A, NOT General
Backround of Android storage (Pre-S3)
Firstly, I think we need to understand how Android worked historically as this will help us to understand how the S3 works now.
A legacy android device, lets pretend the HTC desire on Android 2.2 as this was a standard configuration at the time. It had 2 major partitions (and several minor ones which are irrelevant to this topic). It has the /system partition and the /data partition. These were partitions of the internal NAND flash memory.
/system is where the Android operating system lives. The user could not delete or change anything in here (unless you were rooted). All the software that came with the phone was installed in the /system partition
/data is where all the userdata goes. Whenever you installed an app from the market, it installed to /data/app and it put all it's important data into /data/data. Also any system settings you changed (Wallpaper, ringtones etc) all were stored in /data/data. When you did a factory reset, it wiped /data and everything in it.
Of course, having these 2 partitions was not enough for everyday use. There was no where to store your music, photos, documents etc. /data is just for app data and settings. So this is where /sdcard comes in
/sdcard is the Android mount point for the External SD card in this legacy android device. This means that when you inserted a Micro SD card, Android used /sdcard as it's internal reference to where the card's storage is. The /sdcard was a necessity before you could take photos. Over time, bigger apps started to put other data here. For example, a GPS / Map application would store its apk (application package) in /data/app and store your personal configuration settings in /data/data but it may download and store offline maps somewhere on the /sdcard. In older devices, the internal Memory (NAND Flash) was usually too small to allow much data on it. Many users would have to root to get more storage space or keep uninstalling apps to keep the "low on space" warnings at bay
How the S3 is different
Well, the S3 is substantially different. There are of course SOME similarities. For example, the S3 still has internal NAND Flash Memory. This is often referred to as the eMMC (Embedded MultiMedia Card) - which still contains the /system and /data partitions, used in exactly the same way.
The main difference is /sdcard. The S3 is designed specifically so using an external micro sd card is NOT a necessity. It has a larger NAND Flash internal memory (eMMC) so it can also have an "internal SD card". This is where people start to get confused. The entire internal memory is an eMMC which is essentially an internal SD card, however a partition of that internal memory is /sdcard.
OK, I know - let me explain. /sdcard is a mount point that Android uses to know where to store /sdcard data. But on the S3, instead of storing it on a required external sd card, it points to an internal memory partition. Now here is the clever bit. The /sdcard actually points to /data/media (or /data/media/0 in Android 4.2 onwards). So you continue to have your /data partition, but within /data you have:
/data/app
/data/data
/data/media
The clever thing is that the file system that android uses for /system and /data is a Linux file system called Extended FS. In our case, we use the Ext 4 file system. This is important to understand because these file systems do not work with Windows so an external SD card would usually be Fat 32 file system, or exFAT so we could plug it into our windows computers and read the contents. What Samsung have had to do is use the FUSE file system to allow /sdcard (or /data/media) to exist as a FAT file system within the EXT 4 file system. Clever stuff. But it has it's pro's and cons...
You lost me at file system
All electronic systems that have an operating system and store data use a file system. Think of it in it's simplest form. Imagine a school text book. It has lots of chapters about different things. It has a "Table of Contents" in the first few pages, telling you where each chapter in the book is so if you want to know what page chapter 13 is on, you look in the contents and find the page and go straight there - The alternative is looking through each page individually to find the chapter. Not a quick process.
Well data storage works the same. When you put a file on a hard drive, sdcard, USB stick (or whatever) it is written to a specific location. When it is written to this location, the location is added to the file system. So when you put word.doc onto the drive, The file system is informed of the (very complicated) location of the file. When you tell Windows, Android (or whatever) that you want to open word.doc, the operating system consults the File system and goes to retrieve the data from its true and real (yet very complicated) location on the drive.
There are many file system types still in use today. Usually they are operating system specific. For example, Ext 4 is a Linux file system (and Android by Proxy as it is Linux kernel based) and Windows cannot read Ext file systems. Similarly, exFAT is a Microsoft file system (also used for sdcards on the S3) and cannot be used (easily) on Linux machines. Since most everyday users of the S3 are Windows users, you can see now hopefully why it was important for Sasmung to use "magic" and implement FUSE to allow an exFAT file system to be used for /sdcard, within the Ext 4 partition of /data
Did I REALLY need to know ALL that?
You know what? Probably not but it may go some way to help understand the limitations we will cover later on.
A bit more info for the S3
Obviously, the internal memory supplied with the S3 may not be enough for all users so they added the ability to add expanded memory in the form of the Micro SD card. Android uses the Mount point of /extSdCard now, instead of /sdcard like it used for legacy devices - because /sdcard is already in use elsewhere.
One thing many of you have probably noticed is that with the S3, there is no option to mount the /sdcard or /extSdCard as USB Mass storage on your computer. You must use MTP or PTP.
PTP - Photo Transfer Protocol. When you connect your S3 to your computer using PTP, Your computer sees it as a camera. It will show photos on your "camera" and will set about implementing the default camera options (such as suggesting you import your photos) etc. It won't show documents or other media necessarily.
MTP - Media Transfer Protocol. When you connect your S3 to your computer, it will be seen as a media player. This should allow you full access to all the files on there, including word documents and the such like.
One of the reasons for this is that because /sdcard points to something using the FUSE file system and is not a true partition, it would be difficult to allow it to be used as USB Mass Storage. It may or may not be possible but the biggest advantage of using MTP / PTP is that the computer and the S3 can both access the internal memory at the same time. With USB Mass Storage (UMS) this is quite awkward and can result in errors.
Deleting data
This is partially why we needed to understand a little about file systems. So I could explain to you how data is handled when it is deleted.
As I explained earlier, when you write a file to memory, a corresponding entry is written to the file system to advise the OS where the data is. Sure, you may think you are writing the file to /sdcard/documents/work directory on the internal memory, but in reality these directories or folders do not actually exist at a memory hardware level. The data is written to a block and the file system is informed where that block is, how big the file is, what directory it should appear in to the OS etc. When a file is written the memory, the OS see's the available space go down and the used space go up. All this information comes from the file system.
When you delete the file, the actual data is NOT deleted. It remains where it is on the memory. The block is not overwritten. When the OS is told by the user to delete the file, the File system entry is deleted. This changes the free/used space as the file system is no longer accounting for the data, however the truth is the data still exists. When the next request to write a file to the memory comes from the OS, the file system will think the block where the old data was is empty and will overwrite it.
It is this difference between the file system and reality that allows data to be recovered by external software. if you do not write any data to the memory, external software can scan the memory for data whilst bypassing the file system all together. Ff course the window is small. You only have a very limited time to recover data before the file system allows the data to be overwritten with a new entry.
This is not just true of a deleted file. Even formatting the memory (which is actually just re-creating a new, blank file system) leaves all the data in tact behind-the-scenes and can all still be recovered until you start writing data to the memory. Cool huh?
Wow, all this time I've been stressing, is it really that simple?
Awwww snap! You got me. No it is not that simple. All this PC software, example: Piriform recuva only works on a computer drive. In windows, imagine this is anything with a Drive Letter. C: drive etc.
The only way to get a drive letter on your sdcard is to use USB Mass Storage mode, which as previously discussed - is not possible on your S3 (unless you are rooted, you can mount USB mass storage in custom recovery or use a UMS app from Play). The alternative is to use a card reader on your PC and put the sdcard in it.
There are also apps like Undelete for root users - which again, you guessed it - requires root. So if you're not rooted, it's simplest to use a card reader which can be bought for peanuts.
It's worth mentioning, NONE OF THE ABOVE will work with /sdcard on internal memory. It is not possible to get your data back once deleted from internal memory. Once gone, it's gone forever. You can only restore from /extSdCard (removable, external SDcard)
Phone won't boot, can I get my data back from internal memory?
Let's start by saying, it depends why your phone won't boot. If it's an SDS (Sudden Death Syndrome) type issue, where your internal eMMC (NAND FLash memory) has failed, then no. However, if you believe this is not the case then you can get your /sdcard data using adb BUT you need a custom recovery to be flashed via Odin before you do this. Read [REF] Understanding the basics before rooting your S3
However, if out of curiosity - you do still want to get your data off, using adb , read below:
Pre requisite is having adb "installed" on your windows PC. Download THIS file and follow the instructions in the readme.
You need to observe the following. For android 4.1.x and earlier, /data/media for android 4.2.x and newer, /data/media/0 - I will assume 4.2.2 for this guide,.
1) Boot into recovery, connect usb and go to "mounts and storage". Toggle the "mount data" options to mount these partitions. Tip, when mounted, the option then becomes "unmount data"
2) Open "cmd" in Windows and type the below code, which will copy all your data to a folder called sdcard on your windows desktop
Code:
adb pull /data/media/0/ c:\users\rootsu\desktop\sdcard
Also note, this assumes you have windows vista or newer. Also, it assumes your windows username is rootsu.
That's it, simple.
Display and Digitiser won't work, can I get my data back from internal memory?
You can use adb and a custom recovery to pull data from your /sdcard or even app data from /data/data
Pre requisite is having adb "installed" on your windows PC. Download THIS file and follow the instructions in the readme.
You need to observe the following. For android 4.1.x and earlier, /data/media for android 4.2.x and newer, /data/media/0 - I will assume 4.2.2 for this guide,.
1) Boot into recovery, connect usb and go to "mounts and storage". Toggle the "mount data" options to mount these partitions. Tip, when mounted, the option then becomes "unmount data"
2) Open "cmd" in Windows and type the below code, which will copy all your data to a folder called sdcard on your windows desktop
Code:
adb pull /data/media/0/ c:\users\rootsu\desktop\sdcard
Other things you may want to pull.....
Code:
adb pull /data/data/com.android.providers.telephony/databases/mmssms.db c:\users\rootsu\desktop\sdcard
Code:
adb pull /data/data/com.android.providers.contacts/databases/contacts2.db c:\users\rootsu\desktop\sdcard
Also note, this assumes you have windows vista or newer. Also, it assumes your windows username is rootsu.
That's it, simple.
Data corruption
When data becomes corrupt, there's really not a lot you can do. The file system knows where the data is already. If it's corrupt, you're stuck. Most common causes of corruption are:
1) Dirty unmount of /sdcard. SD card pulled out whilst it is being written to / phone shuts off whilst being written to. SOMETIMES - Plugging the card into a card reader in windows, Windows will ask to fix it and MAY fix it.
2) Fake SD card. This is really the MOST common. Get a card reader ans use:
h2testw.exe for windows to test your card in a card reader. Set it to read the full size of the card, which will take hours but well worth it.
If you get a result like this:
Code:
Warning: Only 63995 of 63996 MByte tested.
The media is likely to be defective.
3.8 GByte OK (8072512 sectors)
58.6 GByte DATA LOST (122989248 sectors)
Details:2 MByte overwritten (4096 sectors)
...Then you have a fake card, that is really 4 GB. I'll explain this.
Commonly, fake cards are reprogrammed to "think" they are high capacity cards, such as 32 GB or 64 GB to defraud buyers out of money. This is common on eBay (Never buy cards from eBay).
When these cards are formatted, the file system also thinks it is this fake capacity. Normally, when a card is full, the file system will report to the OS there is no more space and this prevents additional writes to the card. However, in the case where the card is 4GB and the File system thinks it is 64 GB, the tricked file system doesn't know the card is full. The file system keeps allowing data to be written to the card, over writing the existing data but without replacing the file system entries. The file system thinks data that has been overwritten hasn't been overwritten so when you try to open one of these files, it is essentially "corrupt" or non-existent.
Preventing data loss
Time to wise up guys. It is possible to recover data off your removable media, but internal memory - very unlikely. No apps on your PC or Android will help with deleted data. So you need to backup.
Dropbox - Use dropbox to automatically upload your photos to online storage.
Foldersync - Use FolderSync to upload important sdcard files to your dropbox account, or better yet - got a computer thats always on at home? Set foldersync to schedule a sync over wifi whilst you're asleep.
Other info
Interesting tidbits
Quite an exhaustive reference guide you got here rootSU thanks this will sure come handy for all of us :good:
Cheers
Thank you very much for taking the time to write this. It's a non academic approach to a sum of keywords and all of them are explained in such a manner that it would be almost impossible to misunderstand
Nice!
Nice post!
There are a few other interesting tidbits of info that might be worth mentioning:
- eMMC has an internal micro-controller that runs very specific firmware (and SDS was mainly caused by a bug in that firmware)
- eMMC (just like SSD) has specific writing/erasing limits and commands to deal with that - as a very general idea it can write about 4k at a time but can only erase in much larger blocks - like 64k (at least, but a 16GB model could have a much bigger block); normally on the same erase-size block there is very special list maintained, and based on that list wear leveling is implemented;
- all flash-based memory AGES - there is only a limited amount of erase/writes cycles possible before a point where the info is no longer reliably-stored; in some models that value can be incredibly small! to avoid writing more to some regions than other a mechanism call wear leveling is implemented; that one can have a big impact on both speed and reliability (but really don't expect it to create miracles)
- since it is very important for the speed and reliability of the flash memory to return unused blocks to this internal lists there are special TRIM commands that informs the firmware that the block can be garbage-collected; with an OS that supports TRIM, when a file is erased the blocks are also TRIMmed; this is one extra level that makes recovery basically impossible under normal circumstances
- this does not really mean that things are completely impossible to recover, just that you might need to spend so much on it that recovery would be impractical for any item worth less than 100000 US$ to 1 million US$
EDIT
- also just as with SSD it is not a bad idea to keep a good percentage of the flash memory free - IMHO at least 4GB for 16GB models, 6-8GB for 32GB models - that will improve performance since fragmentation (CLARIFICATION - free-space fragmentation) will grow much slower
- unfortunately there is no program for eMMC similar to smartctl (or any other SMART-data reading program) on normal SATA/IDE/SCSI disks - there seem to be some proprietary commands that are somehow similar but those are generally undocumented.
xclub_101 said:
Nice post!
Click to expand...
Click to collapse
I've put a link to your post in post 1. Where as it's not strictly relevant to my point, it is interesting stuff....
Fragmentation isn't an issue on ssd's. Its an issue on hdd because the head must physically move to another area of the Platter to get the data. That's the slow down. Defrag of a hdd moves all the used blocks (data) together so the actuator doesn't need to move much.
Performance degrades over time on ssds because every write, if data already exists must be erased too. But this hasn't really been an issue so much since TRIM became widely available.
-----------------------
Sent via tapatalk.
I do NOT reply to support queries over PM. Please keep support queries to the Q&A section, so that others may benefit
rootSU said:
...
Fragmentation isn't an issue on ssd's.
...
Click to expand...
Click to collapse
Thank you.
Also sorry for the misunderstanding with my contraction - what I wanted to say was free space fragmentation - that one does matter a lot on solid-state memory because of the garbage collection and some controllers have been famous for having a huge drop in performance with little free space - I will try to also correct that post.
xclub_101 said:
Sorry, I used a misleading contraction - what I wanted to say was free space fragmentation - that one does matter a lot on solid-state memory because of the garbage collection and some controllers have been famous for having a huge drop in performance with little free space - I will try to also correct that post.
Click to expand...
Click to collapse
Yep, it's true about Garbage collection, but TRIM *should* handle this nicely as should "over provisioning" although probably, some cheap SSD's may not over provision.
EDIT> Actually (sorry everyone for off topic) if you're interested in SSD's, these articles are a "fun" read... (I put fun in speech marks as it depends how geeky you are )
http://en.wikipedia.org/wiki/Trim_(computing)
http://www.pcworld.com/article/2038...-ssds-what-makes-these-speedy-drives-hum.html
Update to post 1:
Note from the Author -
I am moving on to the N5 now and ditching my S3. I will continue to maintain this thread, however - please do PM me if you think that something needs to be changed or updated in this thread as I doubt I will be answering questions within the thread as much. Please don't PM support questions to me. Only PM updates that need to be made in the thread.
It's been a blast!
Regards
Dan
Awesome bits of info. This is the game changer. I learned a whole lot just by reading here in XDA. I've only been using Android for a few weeks but thanks to XDA, I've already rooted, installed a bunch of apps and kept my OCD in check.
my device memory has corrupted and when i start recovery mode i get "E: faild to mount /cash (invalid argument) "

Categories

Resources