Trying to understand the file structure. - Kindle Fire Q&A, Help & Troubleshooting

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

Related

A question about the /cache folder.

What for is this folder used anyway ? Maket cache, rom updates, installing programs from pc? Does anyone has a clue? Beacuse I see 130 MB of free space there (nand I suspect - which is FAST compared to SD).
/cache is a partition:
Code:
/dev/block/mtdblock4 on /cache type yaffs2 (rw,nosuid,nodev)
unless you want to repartition the nand (which nobody has done yet afaik) you won't be able to use this space... at least not really practicable.
First I want to know what it is used for, how much space will be used and in what condition. I have several ideas how to use it, but first I need to know how much space I have to play with.
The easy way to go is to use loop files for directories and mount them in the /data/ folder. The hard way is to go in recovery mode copy the contents of /data/ to SD linux partition, use tools provided from recovery and resize /data/ ana /cache/ then copy the backed-up contents on the SD to /data/.
Somebody ?
Not certain, but I thought the /cache was for an RUU downloading the HEROIMG.ZIP file that it needs to perform the update. Also, I though fastboot used it to store the img file temporarily when booting or flashing an image.
Not sure though, so might need more investigation.
DeXa said:
The easy way to go is to use loop files for directories and mount them in the /data/ folder. The hard way is to go in recovery mode copy the contents of /data/ to SD linux partition, use tools provided from recovery and resize /data/ ana /cache/ then copy the backed-up contents on the SD to /data/.
Click to expand...
Click to collapse
i don't think any of this is gonna happen, but don't let that stop you from anything. here are my worries:
- loop file for dirs: so then you have a (let's say) 80mb directory in /data. what are you going to with it? for me that would be to small for apps, it is even less than the regurlar internal /data.
- do you have tools to repartition the internal nand? i am just wondering, because it seems nobody has done it so far. or do you have reports of successfull partitioning? should it even work with parted?
kendong2 said:
i don't think any of this is gonna happen, but don't let that stop you from anything. here are my worries:
- loop file for dirs: so then you have a (let's say) 80mb directory in /data. what are you going to with it? for me that would be to small for apps, it is even less than the regurlar internal /data.
- do you have tools to repartition the internal nand? i am just wondering, because it seems nobody has done it so far. or do you have reports of successfull partitioning? should it even work with parted?
Click to expand...
Click to collapse
My idea was to use the loop file for dalvik-cache for example or any other dir that does not go beyond for example 80 megs. For partitioning there are nand tools available on the net, and it is not so hard to compile them for arm arch. Bul all of this is poinless if we do not know how much space is gonna be used from the /cache folder. And what for it is used by Android OS.
I don't really thing it will work too, but nobody knows till it's tested. This are just thoughts. Last night I found out that OS deletes the whole contents of the /cache folder on successful boot, all except dirs. That was strange for me cause last evening I had a couple of "Download.app, Download-1.app and so on" files which survived successful reboot, bug suddenly they were deleted. So the only thing that's left to experiment with is repartition nand, but for that ... again the min. free space has to be known.

Android on Kaiser: The difference between SD/NAND/EXT2?

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.

[Q] Apps to SD help please

I've been trying to learn up on apps to sd from reading several forums, and can't seem to find the right answers.
I've been rooting and ROMing for months now, but never had a need to push phones to SD. Now i think it's time, but have a few questions.
There's a Move to SD Card option under manager applications from the CM menu. How does that differ from the option to push apps to SD in titanium?
What's the story with ext3, ext4, and sd-ext partitions?
Do i need one of those, and if so which one?
I've noticed that when trying to put apps on sd using hte application settings, that i sometimes can't find the widget associated to an app. Is that normal?
Thnks for your help.
mangle
It's probably the same function. I haven't used Ti much though. I'm still a newbie with that app. The app itself has to support being put on the SD card in the manifest file for the app in order for you to be able to move it.
thanks for the reply. I guess i'm trying to figure out what the benefit of having an SDcard partition is when it comes to off loading apps to the SD card. There have been plenty of views on the thread. I'm sure someone out there has the knowledge.
The benefit is that it puts the bulk of the app on the the SD card to save space on your internal storage since those are usually smaller size than the SD card. It'll still save some data and prefs on internal storage but the apk for the app will be on the card. This is very useful for apps that are large like games which can sometimes be over 20MB.
You can read some of the developer docs here for more info on app2sd.
http://developer.android.com/guide/appendix/install-location.html
Best way I have found to move apps to sd is to partition your sdcard with ext3 (ext4 if your kernel supports it) and then use the link2sd app from the market to move your apps, their lib files, and their dalvik-cache files to the sd-ext. Saves a ton of space on the /data and /data/data partitions.
Also if your running gingerbread you should check out jermaine151's ext4_no_data_limit mods. They take the tiny /data/data partition (usualy the cause of low space errors) and move it to the larger /data partition, eliminating the low space issue. It also converts the ext3 /data and /cache partitions to the faster ext4 file system, speeding up apps.

[Q] Possible to convert to data/media file structure?

This might be a very noob-like question, but I was wondering if it would be possible to convert the file structure in use by the system.
Newer devices don't have a seperate sdcard partition anymore, there's just a single user partition "data" and the sdcard get mounted to "data/media". The advantage is that space between apps and your sdcard is shared, so you have a choice of filling your internal storage with media or with apps.
Sooo would it be possible to switch to that file structure?
Cheers

[Q] Where is the **internal SD card** stored on your Nandroid?

So, a Nandroid backup is made up of partitions: /system, /data, /boot, etc.
I presume the internal SD card (where your camera images and screenshots are stored--where there are like 50 folders of apps you've installed or even uninstalled) is in /data, but I can't find it.
Basically, where is the root of your SD card stored on your Nandroid backup? I'm using TWRP, if it makes a difference!
~Ibrahim~
P.S. If you were looking for the "Storage" folder when browsing the root (where /system, /data, etc. are located), where would that be in a Nandroid?
From what i recall Nandroid are either .IMG or .Win files... theyre not in .zip format or folder format.
you would need to decompile thise files and navigate thru them.
i honestly dont know where they would be at.
Right, I already extracted them.
However, I found the files I was looking for--somehow they were kept in that folder even after a full wipe!

Categories

Resources