In short:
Is there a thread somewhere stating the pro's and con's of running Android from different types of "media" (SD, NAND, EXT2)?
If there is, please provide a link, I can't seem to find anything that isn't an unanswered question or small comments.
If there isn't, let this be a starting point for those looking for the answer to this question.
Longer:
I've seen this question pop up once and again but it might be that the topic is totally exhausted and people have stopped commenting on it. I can't seem to find an answer though; What are the pro's and con's of using NAND, EXT2, FAT32 or any combination of it?
I see a couple of installation alternatives and some I have been able to conclude myself but others not.
* Running from SD-card using HaRET
This option is the slowest in terms of Android performance. It has the added value of easily getting back to Windows Mobile by rebooting the phone, gaining easy access to the SD card and manipulation options.
* Running the system AND data on NAND
This option has in my view the fastest Android experience. Access to files on the SD card is a bit more cumbersome (there is the SD card split widget APK available but I have yet to see it working) and access to files for manipulation I can't comment on (haven't gotten to that yet).
* Running the system from NAND and data on EXT2
The performance seems almost as fast as the system+data on NAND. I have no idea about the added value of running anything from an EXT2-partition in the SD card but I'm guessing it will be slower. I have no idea if file access for manipulation is easier or not compared to the other options.
* Running the system AND data from EXT2
I have not tried this yet and cannot comment on it. Something tells me it will be slower than NAND because of SD card overhead.
* Running the system from EXT2 and data on NAND
I have not tried this yet and cannot comment on it.
Now, I've missed out on several of the installation options but I'll edit this post as soon as I get to investigating it further.
Any comments/experience/knowledge in this is greatly appreciated, as it can make things clearer as to what options to choose.
Well these are very good question and wanted to start a thread on this matter as well. I also could not find a strait answer anywhere.
I also want to know if there is an advantage using ext2 over fat32.
So, people out there having knowledge about this matter please share it.
Ext2 and Fat32 are both types of filesystem used on various different types of media, including SD card, Hard drives etc.
EXT2 is (one) of the native linux filesystems, and is fully supported in kernel, and is usually faster and more stable in that OS
FAT32 is the 32bit version of the old MSdos filesystem, used up to Windows 98, and still supported by windows machines, but slower and less stable than the native NTFS filesystem used by XP and above.
Nand is actually the type of flash ROM used by our devices, and not a filesystem as such, and running Android in Nand refers to where the information is stored, rather than the filesystem used to store it.
It's equally valid to say that we run WM in Nand also.
I think that in the case of Android EXT2 should be faster and more stable than fat32 since it's designed for Linux, and works better in that OS.
Zenity ik would like to thank you very much as this answers mij questions.
And i think this would many others aswell.
Don't forget - if you format your MicroSD to just EXT2 then you will make it very awkward to transfer files to/from the card on a Microsoft Windows based system.
This may, or may not be a problem for you.
Ultimately, the current ideal situation (IMHO) is to run your OS from NAND, and to store your data (music / movies / documents) on a FAT32 format MicroSD - as this enables you to swap the MicroSD card without turning off the device, and provides best cross-platform usability of the MicroSD for the purposes of transferring data to/from it.
Thank you all!
Thank you all for commenting! I will add your comments to the Android-wiki I'm building as this question could come back repeatedly from newcomers (and old ones who forgot )!
boli99 said:
Don't forget - if you format your MicroSD to just EXT2 then you will make it very awkward to transfer files to/from the card on a Microsoft Windows based system.
This may, or may not be a problem for you.
Ultimately, the current ideal situation (IMHO) is to run your OS from NAND, and to store your data (music / movies / documents) on a FAT32 format MicroSD - as this enables you to swap the MicroSD card without turning off the device, and provides best cross-platform usability of the MicroSD for the purposes of transferring data to/from it.
Click to expand...
Click to collapse
There is a program for allowing the mounting of EXT2 file systems on windows, however they are not signed. This is more problematic in Windows that are 64bit. The program is called 'ext2fsd' and you can get it from source forge. EXT2 is a better file system, and does not have the 4GB file size limit, and does not fragment (although on a SD card, this should not be an issue). EXT2 also has file permissions that Linux understands. Fat32 has no Access control file permissions.
I have just recently got polymod's eclair running with both system and data on ext2 partitions.
my question is...
I am just wondering what the boot order is...
and where(if possible) can it be changed?
system.img in the andboot folder VS system on partition.
I know it can be set in the installer. but lets say I had installed system on ext2 partition. and then later placed a system.img in the andboot folder.
can I swap between the two?
OK...
I figured it out myself,
You can use the installer to select boot options (Not just options to install)
so I have a system and data on partitons. (currently using)
and I also have a second build installed to .img files in the andboot folder. (for failsafe backup)
if I want to swap from one into the other
I enter installer and change the settings for the system and data to
their respective locations and then just QUIT.
I also still have a donut build in the android folder. as well as still running winmo.
quad boot system on my phone...LOL
Now thats a neat use of the installer, I think this find deserves it's own thread in fact, I'm certain others will find it useful
Tanks !
binlabin said:
* Running the system from NAND and data on EXT2
The performance seems almost as fast as the system+data on NAND. I have no idea about the added value of running anything from an EXT2-partition in the SD card but I'm guessing it will be slower. I have no idea if file access for manipulation is easier or not compared to the other options.
Click to expand...
Click to collapse
I've done some tries with this doing the partitioning from within android and then formatting the FAT32 partition from Windows 7 but the FAT32 partition doesn't work very well afterward. Really slow and sometimes crashes the explorer. Propably something to do with my SD-card. May try doing the partitioning and formatting from Linux to see if it works better.
Seems to me the main advantage of this option is to increase the size of available data storage which i suspect can become a limitation sooner or later in a pure NAND install.
EDIT: Now I've done it and gone NAND-System + EXT2-Data... Partitioned the SD-card from Ubuntu with gparted. Resized the FAT32 partition and created 3 primary EXT2 partitions. only the second (partition 3) should be used though with the setup I am using. It's charging right now so I haven't tried it out much yet but I will later on. However I noticed that I now have 171Mb free phone storage instead of 30-something that I had before (same apps installed).
EDIT2: Ran gparted again and shrinked the unused partition (partition 2) and expanded the data partition (partition 3) so I now have 369Mb free "Internal phone storage". Haven't noticed any speed differences between this and when I had data on NAND.
nand
By then one question:
If im install android in the NAND is more fast ready? But this process erase WM6?
Because now android work good in my HTC TYNT II but the camera and bluetooth not work and have one or two performance problems and for this dont like delete WM6 of my phone, and for this im use Android from my SD.
But look the NAND option because have a problems with the time live of my battery only lasts 5hours with android and SD.
Thanks for your help and cooperation
excellent thread which answers some questions that I had. Thanks to everyone who contributed. The only question remaining though and I have posted this elsewhere without getting an answer:
I partitioned a 2 gb sdcard with ~1.6gb Fat32 and the rest as a single Ext2. I selected system on nand and data on ext2 in the installer. After installation, it does show alot more memory for data as compared to data on nand, BUT I also have a data.img in andboot which is in the Fat32 partition, with a size around 250mb. The question is, is the data in that file or on ext2? If I backup data from installer, it creates a databackup.img in andboot with the same size as data.img. Seems to me the ext2 partition is just taking up space and not being used. Can anyone more knowledgeable shed some light on this? Thanks.
Not quite sure what is going on there, seems very counter-intuitive, I would have assumed that system on Nand, data on EXT2 would have installed the data partition to EXT2 on SD. This would seem not to be the case in this instance.
There are a few experiments you could try, if you are brave enough, since you may cause problems by trying any of these suggestions, which could mean a reinstall, I leave it to your judgement how to proceed
Ok firstly I assume you have a card reader, since you managed to partition and format the SD card in the first place. Remove the SD card, insert in card reader, delete the andboot folder, or the contents of the folder, ( may be wise to have a spare SD with either a winmo or android install handy at this point, just in case things go horribly wrong ).
Now with the cleaned SD, put it in the phone and boot, it should boot fine, IF the data is truly on the EXT2 partition.
That at least will answer one question, namely, where the heck is my data?
If this works fine, then I'd just put it down to some inner weirdness of android on non-native devices, if it fails then I'm wondering if your EXT2 partition may have problems, forcing the phone to dump it on the first available good partition, namely the FAT32 one.
Oh and if it does fail, you will have to reinstall, since your data will be toast.
Finally, good luck, I await with interest
As I recall, the install has the FAT32/Ext2 options incorrectly swapped. It has been this way for a while.
zenity said:
Not quite sure what is going on there, seems very counter-intuitive, I would have assumed that system on Nand, data on EXT2 would have installed the data partition to EXT2 on SD. This would seem not to be the case in this instance.
There are a few experiments you could try, if you are brave enough, since you may cause problems by trying any of these suggestions, which could mean a reinstall, I leave it to your judgement how to proceed
Ok firstly I assume you have a card reader, since you managed to partition and format the SD card in the first place. Remove the SD card, insert in card reader, delete the andboot folder, or the contents of the folder, ( may be wise to have a spare SD with either a winmo or android install handy at this point, just in case things go horribly wrong ).
Now with the cleaned SD, put it in the phone and boot, it should boot fine, IF the data is truly on the EXT2 partition.
That at least will answer one question, namely, where the heck is my data?
If this works fine, then I'd just put it down to some inner weirdness of android on non-native devices, if it fails then I'm wondering if your EXT2 partition may have problems, forcing the phone to dump it on the first available good partition, namely the FAT32 one.
Oh and if it does fail, you will have to reinstall, since your data will be toast.
Finally, good luck, I await with interest
Click to expand...
Click to collapse
Great idea, I'll try this on the weekend. I wont delete data though, I'll just rename andboot and backup data for good measure, because I want to be able to go back to the data by renaming it back if it doesn't work. I was also thinking if there is any way to get to the ext2 partition and read it... I'm on xp so I cant do it on my pc, and on the phone, I've looked around in astro n other file managers but cant see anything. But if the case is as golfnz34me points out, then I should just backup the data, and change the option to Fat32 in install and restore data. That should do the trick.
golfnz34me said:
As I recall, the install has the FAT32/Ext2 options incorrectly swapped. It has been this way for a while.
Click to expand...
Click to collapse
Thanks, will check this out. If its true, then great, more speed for my /data! I wonder how I missed this, been going through these forums regularly...
Ok I checked it out, and golfnz34me is correct it seems.
But now I found a new problem. I backed up data, and in the installer, set the data to SDCard, and tried to restore data. It gives various errors like
Code:
cannot determine filesystem size
failed
failed to format
...some other lines...
losetup: /dev/block/loop2: no such device or address
I created the partition with Paragon partition manager, and after getting this error I rechecked in PPM. I reformated the partition, but still get the error. In PPM the partition drive letter isnt assigned. Or, the partition isnt the active partition. Can one of those be the problem? The volume name is Ext2. Im not very experienced in partitioning etc, apart from normal ntfs partition for new hds in windows, so I didnt play with any options. I dont have a linux system either. Any got any ideas? Any help would be appreciated alot!
Not sure about using partition managers other than gparted, afaik most people are using the Gparted live cd if they don't have a linux install handy.
The errors all point to some sort of problem with the EXT2 partition, or it's formatting.
Also EXT2 partitions do not have drive letters, nor do they have to be active partitions.
Apps and data on SD card.
I cant seem to figure out how to make all the apps and other stuff install to the SD card. Do I have to partition the card into two partitions? or is there a way to install the system to Nand and make all the apps and data go to the SD card? Ive tried setting it to System on nand and data on SD partition but it says no partitions to install to or something.
I've been trying to add all apps+data+dalvik to my sdcard but only got the apps+dalvik to the sdcard.
After installing a few apps i was out of space internally and tried to mount a 4th sd partition as /data/data.
The problem was:
1. when all was done in recovery it was not used when rebooting the phone, this also applies to /etc/fstab
2. still canot figure out how to permanently mount /dev/block/mmcblk0p4 as /data/data or as an alternative mount it as /sd-ext2 and mount -o bind /sd-ext2 with /data/data
3. the froyo style apps2sd seems to me like a bunch of crap, the went to my fat32 partition ?
4. not the problem ? Partition1=fat32, partition3=ext3(apps), partition3=swap, partition4=ext3(data)
5. the phone totally crashed when trying to combine partition 2 and 4 as one with 2gb storage and mounting it to /data/
If anyone can figure out a solution to this it would be great
Btw, tried this on modaco r9, pinkolin pinky, auraxtsense and leedroid roms, all with sense. (I want to use sense just because!)
PLZ come up with a solution/patch/mod, this would be the lifesaver for us who want's alot of apps and still lots of free storage space
Iknow linux, but it made no difference with android in some ways.
I've tried several attempts to ln-s /sd-ext/data to /data/data as well, but ever boot it resets it and does it's thing.
Nothing I do seems to permanently change this thing.
Where can I change it ?
It's the same as with /data/app and /data/dalvik-cache ?
And if so, where is that ?
SYmlink works with /data/app and dalvik-cache, why not on /data/data ?
This is strange because I've moved my dalvik-cache to /cache without any problem.
Maybe froyo doesn't like being symlinked to external storage?
hawkn said:
I've tried several attempts to ln-s /sd-ext/data to /data/data as well, but ever boot it resets it and does it's thing.
Nothing I do seems to permanently change this thing.
Where can I change it ?
It's the same as with /data/app and /data/dalvik-cache ?
And if so, where is that ?
SYmlink works with /data/app and dalvik-cache, why not on /data/data ?
Click to expand...
Click to collapse
the symlink wont exist after reboot unless you add a correct script to the /system/ect/init.d/ directory!! but be warned i have tried this and its not worth the effort, even if your device dosent bootloop when you try to boot, it will be as slow as a stoned wildfire, if you have s-off, i suggest changing the partiton tables on your device, you can gain an extra 50mb+ on the data partition that way, and its alot safer!
Apologies ahead of time if this has been answered before. I spent about 30 minutes Googling and trying solutions without any luck.
My situation is that I'm on MikG 3.11 and am using the built in A2SD to store all the apps on a 2GB SD-Ext partition. I have enough apps that the ~160MB internal /cache partition is pretty much filled with Dalvik Cache files in the /cache/dc subdirectory (only 3MB left on the partition).
Unfortunately, Google Play (formerly Market) seems to download app installs and updates into /cache with file names like "Download.apk" and "Download-1.apk" and then installs the apps from there. Since there is so little space, any app above 1.5MB or so fails to download and install (it seems to need the space for the download and then space to extract the download, so you can only get apps that are about 1/2 the size of the remaining partition space).
Is there any way to change where Google Play/Market downloads apps to install? I've got plenty of space on /data or the SD-Ext partition.
I found old directions to fix this issue by entering the following at terminal to create a sym link for Market to download on the SD card:
Code:
mkdir /mnt/sdcard/market-download-cache
su
cd /cache
mv download download.bak
ln -s /mnt/sdcard/market-download-cache download
ls -ahl
Unfortunately, Play/Market no longer uses a "download" sub-directory on /cache, so this won't work.
To fix the problem, I tried using "a2sd cachesd" to free up space on /cache by moving the Dalvik Cache to the SD-Ext partition, but that made for a really laggy experience (presumably because my SD card has bad random r/w access). I could also presumably just unmount the partition from /cache and make /cache a sym linke to a folder on the SD Ext card, but it doesn't seem that would perform much better.
My only thought at this point for a long term solution is to copy the current /cache contents to /system/sd/cache, mount the current partition on /cache at /mnt/cache (unmounting it from /cache first), create a sym link from /cache to /system/sd/cache, then set up a sym link from /mnt/cache/dc to /system/sd/cache/dc. All of this would have the effect of keeping the Dalvik Cache on the same internal partition where it currently resides while letting Play/Market have plenty of space in the new /cache which would actually be a directory on the SD-Ext partition. But, this seems kind of hacky and could negatively impact other things that might need /cache.
My short term solution is that every time I need to install or update apps, I just go into /cache/dc with Root Explorer and delete a bunch of the cached data to free up enough space for the app(s) and then do the update/install through Play/Market. The OS then seems to recreate the cached information the next time I run the app whose cached data I deleted (for example, I deleted the IMDB cached data and the next time I ran IMDB it took a long time to come up but then worked fine-- presumably the delay was recreating the cached data/app). The OS also seems to recreate the dalvik cached files on boot (not sure if that is a general feature or just in the MikG ROM I'm using).
In any case, I think all of the above is accurate so even if nobody has better solutions, maybe this will help others understand why they can't install/update apps even though it seems they have plenty of space.
If anybody is out there that has a good long term solution to this (like a place you can change the directory where Play/Market downloads), please let me know.
It's probably not cool to respond to your own post, but I had another idea for fixing this problem:
It looks like /data has 140MB of space left on it-- could I move the Dalvik Cache to that partition so there would be plenty of space on /cache to let Market/Play work?
As far as I can tell, /data/dalvik-cache is already a link (maybe a hard link?) to /cache/dc, so presumably I could just switch that to the Dalvik Cache was actually on /data?
Any thoughts on whether this would work and if it is a good idea or bad idea?
Hi everyone!
I currently am running Glazed ICS 6-16-2012 Rom and I am attempting to understand the file folder structure within my Kindle Fire.
This comes about after playing around with different roms, and after running the TB restore, a few games I play not having the data, requiring me to start over. In an attempt to try and manually recover the data from a twrp recovery I did, I realized didn't have a good idea of the folder structure within Android. Thus I am hoping to get some clarification with the following questions. Thank you in advance for any advice.
1- what folders, if any are required on my sdcard if say I were to start with a fresh rom, with no apps installed other then what is included in the Rom? Using ES File Manager now, it looks to me like an completely unorganized folder ".estrongs, burstlyImageCache, game_cache" etc.
2- Could I copy my TB backup folder off the Kindle Fire then wipe the whole SD card, copy the TB backup back and restore to clean up excess junk folders?
3- Do apps/games put their save data wherever they chose, or is it kept in the program folder in the internal memory, /mnt/sdcard/...?
Thank you again for reading my ramble, cheers.
Silverbrain
1.: Usually Application you installed in SD card partition is under /mnt/sdcard/android/data/<application folder> . now this contains all the information and other data of the games, i think you can back-up this portion aside from using titanium back-up.
For application specific folder, they are usually located in /mnt/sdcard/.<appname> but this folder usually contains caches and can be deleted, since the app will just create them once run again.
2. I do not suggest to wipe your SD partition since technically this is not a standard SD card but partition part of the whole system.
Note: I'm not expert on this, but after playing around with a couple of android devices already, the structure is basically the same.
I think (if it is a unix derivative) the /sdcard is the partition location and /mnt/sdcard is where the system finds what is there. kindle fire does it this way because there is no removable memory card, so it creates an artificial one with a partition. So, for us human types, the locations refer to the same thing. /sdcard is the partition and /mnt/sdcard is where the system mounts it.
Thank you for the replies.
Ixthusdan- I get what you mean regarding the unix and the mnt folder, I technically cannot wipe that is it is just a spot on the internal memory.
vertcam9- I started looking around where you mentioned, and I am starting to understand a little better
The actual name of the partition is "media" and that's how it's identified to the system.
Where the media partition gets mounted is dependent on what gets booted. For example, TWRP will mount the media partition on /sdcard while CM7 will mount it on /mnt/sdcard and create a /sdcard symbolic link that points back to /mnt/sdcard. Most people generically will refer to the media partition as the /sdcard partition because that's what's visible on the system.
I believe the /sdcard thing is an android convention. Because many apps expect the /sdcard to be the primary "large" storage area easily accessible by the user, apps that expect to find large files... music or video files for example... will look there.
Most apps will store settings and small databases in the /data partition. I don't play many games, but someone decided to install Angry Birds on my KF. That game stores most of its files in /data/data/com.rovio.angrybirds. On the other hand, Titanium Backup will put most of its files on /sdcard/TitaniumBackup because it needs more space for backup files and because the /data partition is much more likely to get deleted when you switch ROMs, etc.
For the most part, even if you completely reformat the /sdcard partition, most of your android and app settings will remain intact because that is stored on /data.
kinfauns - Thank you for the extended explanation! I see what I think I need in the /data/data folder
I have a problem with my phone.
I believe that the internal partitions are messed up.
I have tried a couple of guides to fix this but no luck. I get "error formatting /data!" on recovery. I also tried using the formatting tools from adb shell (e2fsck, gparted).
The main problem is that when i restart my phone the /data partition gets wiped, and the phone reboots in blank, no apps no setting (some of them remain).
I wonder if i can solve this by setting my sd-card to be the new /data. I doesn't matter if i have to leave the sd-card on all the time. i mainly use this phone for developing apps.
Thanks.:good:
Felivel said:
I have a problem with my phone.
I believe that the internal partitions are messed up.
I have tried a couple of guides to fix this but no luck. I get "error formatting /data!" on recovery. I also tried using the formatting tools from adb shell (e2fsck, gparted).
The main problem is that when i restart my phone the /data partition gets wiped, and the phone reboots in blank, no apps no setting (some of them remain).
I wonder if i can solve this by setting my sd-card to be the new /data. I doesn't matter if i have to leave the sd-card on all the time. i mainly use this phone for developing apps.
Thanks.:good:
Click to expand...
Click to collapse
It could probably be done if you could get the sdcard to mount at boot, not sure if thats possible. You would need to create a flashable much like the ext4 mod, that edits the init.inc.rc file to mount the sdcard and /data to it. You would want to partition your sdcard with an ext3 or ext4 partition and use that for data.
Yes it can be done. That's how boot manager works, by modifying the ramdisk to load images from sdcard or emmc instead of the partition. I think I have an idea on how to make your request work.
Edit: If you feel like trying a project, what needs to be done is create a file data.img and mount it as loopback using busybox (ROM needs a working busybox).
Then the boot.img needs to be updated replacing the mount /data entry in init.inc.rc with the location of the loopback device and a loopback setup prior to this. The data.img created needs to be formatted ext3 or ext4. I know it's not too detailed but rather just a summary.