[TUTORIAL] Everything you wanted to know about app2sd, ext3, ext4 partitions!!

neo1691

Member
Dec 19, 2010
19
5
0
Visit site
Hello Everyone!!
i am just giving the same information here for my fellow android mates!!



Nows here what we are here for!!! Clear your doubts guys!!!

Ok, so here's the deal, in a very longwinded way that should hopefully explain everything and answer ALL questions.

You have an SD card in your phone and, a bit like normal PC Hard Drives, you can "partition" them (split them into two or more sections of different filesystems). Normally, your SD card is just one big FAT32 partition, which is fine for storing your pics, messages, emails, etc.
Now, other then your Phone's SD card, your phone will have its own internal flash memory (or "NAND") storage. Tradditionally with Android, you could only install applications to this NAND storage, you cannot install them onto your SD card. So if you have an empty 32GB SD card, but only 5Mb of internal phone storage, you still wont be able to install many apps, if any at all.
This was done to protect the apps from things like piracy - it's not easy to access the location where apps are installed on your phone's internal storage (normally impossible without root), so you can't for example buy an app, copy it, refund it, then install it again.

Still, this is no good for those of us who like to install lots and lots of apps, legitimately, as we run out of internal storage very quickly.

So Google came up with a way to install apps to the SD card. A folder is created called something like .android_secure and this stores (I believe) encrypted versions of applications, but there's a few catches:

1) Apps aren't automatically stored here, you have to manually "move" them
2) Not all apps are capable of being moved, in fact most apps aren't, the developer needs to update their app and allow it. Some apps aren't and wont be updated and some developers may not want to allow it for whatever reason.
3) Not all app data is moved, most of it is but some data is left on your phone so many people still run out of internal storage quickly.
4) You can force ALL apps to be moved to this area by default, but it breaks incompatible ones - such as Widgets, which are unable to load due to the SD card not being "prepared".

So that's Froyo's version. Before Froyo existed, some very clever people came up with a thing called "Apps2SD". Remember I said that your SD card normally is one big FAT32 partition? Well, Apps2SD works by having your SD card patitioned into TWO filesystems. A normal FAT32 partition for your usual stuff and a secondary "EXT" partition. EXT is just a filesystem, like FAT32 or NTFS, but it's the filesystem used by Android internally. The SD card is normally FAT32 because it's a "universal" filesystem, that just about any machine will be able to read, whereas EXT filesystems are generally Linux only, but I digress.
EXT has several different versions. The most common one you'll see is ext3. The main difference between ext2 and ext3 is "journaling", which is just a fancy way of saying that should an operation (such as copying, writing or reading) be interrupted unexpectedly (say, by you turning your phone off), then no data should be lost or corrupted. You know how when you turn your phone on, it says "preparing SD card"? It takes a few minutes, but what it's actually doing is checking that the FAT32 partition hasn't been damaged, because FAT does NOT have journaling. If you used a computer back in the Windows 98 days, you may remember that lovely blue "Scandisk" screen that had to run every time you didn't shut your computer down correctly - that's the same thing. But then Windows 2000/XP came along with NTFS, which also has journaling, meaning you had less chance of loosing data. But I digress once more.
So you have your SD card partitioned into EXT and FAT32. Generally it doesn't matter if it's ext3 or ext4, but you don't get any real advantage with ext4 over ext3 in this instance. Apps2SD then runs a special script on your phone which "symbolically links" the folder from your phone's internal storage where your apps are normally stored, to the ext partition on your SD card. A symbolic link is a bit like a shortcut for folders, except it's transparent to the OS: In other words, Android doesn't know that when it's installing it's apps to the internal phone storage, it's actually being stored on the SD card. This effectively boosts your internal phone memory from the previous 5mb that you had in my example above, up to whatever size you made the ext partition on your SD card (often 512Mb or 1Gb, but it depends on how many apps you install).
Plus, because it's "journaled", it doesn't need to be "prepared", meaning it's ready to go as soon as the phone starts - so your widgets and apps work immediately (unlike "forced" Froyo Apps2SD, where widgets disappear).

The catch with Apps2SD is that whatever space the ext partition takes up is taken away from the SD card. So if you have a 4Gb card (with something like 3.5Gb of actual storage) and you make a 512Mb ext partition, your SD card will "shrink" to 3Gb. The space isn't actually lost, it's just being used by the ext partition. If you reformat your card, you'll get it back.

Finally, there's a difference between "Apps2SD" and "Apps2SD+". Remember I said that your apps are stored on a special folder inside your Phone's NAND storage? Well, that was a bit of a lie. It's actually stored in TWO places. There's a second area which is called the Davlik Cache. You don't really need to worry about what this is for (Hint: IT's to do with the Java runetime your phone uses to run apps), all you need to know is that apps use it to store data, which also eats up internal phone memory. Apps2SD+ moves davlik cache to the ext partition on your SD card as well, freeing up even more space. Some people believe that this may come at the cost of performance, as the internal NAND memory should be faster than your SD card (Which is why you also get people arguing over which "class" SD card is better for Apps2SD - the logic being that a faster SD card means less impact from this move), but the truth of the matter is that your applications will be running from your Phone's RAM anyway, so performance isn't really impacted at all. Since most apps are only a few hundred Kb's in size, or a couple of MB at the most, it's a non-issue.

Finally, any recent version of Apps2SD/Apps2SD+ should work with an SD card that is or isn't formatted with an ext partition. It'll check for this partition when your phone first boots and if it's not there, just use internal phone storage.
Having an ext partition WITHOUT Apps2SD+ shouldn't cause any issues, either, so you can format your SD card whenever you're ready.

So in summary:

Apps2SD "fakes" your phone's internal memory and puts it all on a hidden section of your SD card.
Apps2SD+ pushes even more content to the SD card, freeing up even more space on the phone itself.
"Froyo" Apps2SD has various limitations that "old" apps2SD does not, but is much easier to handle as it doesn't involve any kind of "partitioning".
 

srkmagnus

Retired Moderator
May 23, 2010
13,434
210
0
Visit site
Very good read and will be useful to anyone wanting to learn more about memory. The lack of storage doesn't seem to be a problem for the newer, high end phones. But for us still on a CDMA Hero, patiently waiting for the contract to expire, moving apps to the sd card is a real help.

Thanks for the write up.
 

neo1691

Member
Dec 19, 2010
19
5
0
Visit site
Very good read and will be useful to anyone wanting to learn more about memory. The lack of storage doesn't seem to be a problem for the newer, high end phones. But for us still on a CDMA Hero, patiently waiting for the contract to expire, moving apps to the sd card is a real help.

Thanks for the write up.

welcome.. :)

even i have a galaxy 3. pain not to see a section for that.. :(

Acid lestitious 2.0. Fugumod 2.2
 

droidace

New member
Apr 9, 2012
1
0
0
Visit site
Re: [TUTORIAL] Everything you wanted to know about app2sd, ext3,

Sir, it's not only that i was looking for a simple (yet clear) explanation for the APP2SD and SD partitions .. it is the great deal of appreciation and THANKS for the great writing. You have explained/summarized this on the best way I have ever seen in the past 2.5 years

HATS OFF!

P.S. I had to register to express my gratuity.
 

neo1691

Member
Dec 19, 2010
19
5
0
Visit site
Re: [TUTORIAL] Everything you wanted to know about app2sd, ext3,

Sir, it's not only that i was looking for a simple (yet clear) explanation for the APP2SD and SD partitions .. it is the great deal of appreciation and THANKS for the great writing. You have explained/summarized this on the best way I have ever seen in the past 2.5 years

HATS OFF!

P.S. I had to register to express my gratuity.

Welcome!! Old thread :p
 

GuusA

New member
Dec 28, 2012
1
0
0
Visit site
re:

I have a cheap tablet Android 4.0 with an internal SD-card AND an external SD-card.
The external card is used before in another tablet (with APP2SD!).
Problem: there is no app at all that has a possibility to move to SD-card with APP2SD+ or with Android-app control itself.
The app-info is simply not giving a possibility to move the app to SD!
?What can be the reason that there comes up no possibility to move apps to SD?
 

Cellmeister

Well-known member
Jan 12, 2011
252
19
0
Visit site
re:

I have a cheap tablet Android 4.0 with an internal SD-card AND an external SD-card.
The external card is used before in another tablet (with APP2SD!).
Problem: there is no app at all that has a possibility to move to SD-card with APP2SD+ or with Android-app control itself.
The app-info is simply not giving a possibility to move the app to SD!
?What can be the reason that there comes up no possibility to move apps to SD?

From what I understand you are trying to use APP2SD APP's from an external SD card that came from another device,

Since the APP2SD is from a different device the information for it to work (owner) for your device is on the device it came from, hence it will not work.........

You could try to put the Ex SD card in your PC/MAC and see whats there (maybe data) that you can retrieve...

If you just want to use that external SD you have to format on your device 1st & that will Delete all info on it....

Hope that helps
 

trikkers

New member
Apr 4, 2013
1
0
0
Visit site
re:

Thank you for the article it was very easy to comprehend. I am curious as to your opinion of which app2sd+ you considered to be Best in Show? I would also appreciate your device as to the best practice for partitioning a 32 gigabyte SD card for a samsung tab 2 7.0 8 gigabyte tablet. (android 4.1.1)
 
Last edited:

Assassins Leader

New member
May 8, 2013
1
0
0
Visit site
re:

Thank You sir for sharing this wonderful information.People mainly have superficial knowledge regarding these little things...................Good to see that there are still some people who have in depth knowledge about these things. What one fool can do another can
 

dostbhaskar

New member
Sep 8, 2013
1
0
0
Visit site
re:

Well I am using android for less than 30 days. My 8 gb sd card is destroyed by apps2sd and came to 128 mb only. Window7 can not format this card any more. Developers saying that it is not the fault of their apps. I didn't expected them to say otherwise. So I was trying to figure out if anything could be done retrive the card. It IS n?ed to use gparted in ubuntu and try to reformate in ext3.
However your post is mind blowing. Especially the subject selection. I registered just to say thanks. Can u please update for ICS.I am not if the things are changed since froyo.
However keep up the good work.
 

Paul627g

AC Moderator All-Star
Moderator
Nov 25, 2010
15,963
2,752
0
Visit site
re:

Nice. Thanks for the write up.

Hello Everyone!!
i am just giving the same information here for my fellow android mates!!



Nows here what we are here for!!! Clear your doubts guys!!!

Ok, so here's the deal, in a very longwinded way that should hopefully explain everything and answer ALL questions.

You have an SD card in your phone and, a bit like normal PC Hard Drives, you can "partition" them (split them into two or more sections of different filesystems). Normally, your SD card is just one big FAT32 partition, which is fine for storing your pics, messages, emails, etc.
Now, other then your Phone's SD card, your phone will have its own internal flash memory (or "NAND") storage. Tradditionally with Android, you could only install applications to this NAND storage, you cannot install them onto your SD card. So if you have an empty 32GB SD card, but only 5Mb of internal phone storage, you still wont be able to install many apps, if any at all.
This was done to protect the apps from things like piracy - it's not easy to access the location where apps are installed on your phone's internal storage (normally impossible without root), so you can't for example buy an app, copy it, refund it, then install it again.

Still, this is no good for those of us who like to install lots and lots of apps, legitimately, as we run out of internal storage very quickly.

So Google came up with a way to install apps to the SD card. A folder is created called something like .android_secure and this stores (I believe) encrypted versions of applications, but there's a few catches:

1) Apps aren't automatically stored here, you have to manually "move" them
2) Not all apps are capable of being moved, in fact most apps aren't, the developer needs to update their app and allow it. Some apps aren't and wont be updated and some developers may not want to allow it for whatever reason.
3) Not all app data is moved, most of it is but some data is left on your phone so many people still run out of internal storage quickly.
4) You can force ALL apps to be moved to this area by default, but it breaks incompatible ones - such as Widgets, which are unable to load due to the SD card not being "prepared".

So that's Froyo's version. Before Froyo existed, some very clever people came up with a thing called "Apps2SD". Remember I said that your SD card normally is one big FAT32 partition? Well, Apps2SD works by having your SD card patitioned into TWO filesystems. A normal FAT32 partition for your usual stuff and a secondary "EXT" partition. EXT is just a filesystem, like FAT32 or NTFS, but it's the filesystem used by Android internally. The SD card is normally FAT32 because it's a "universal" filesystem, that just about any machine will be able to read, whereas EXT filesystems are generally Linux only, but I digress.
EXT has several different versions. The most common one you'll see is ext3. The main difference between ext2 and ext3 is "journaling", which is just a fancy way of saying that should an operation (such as copying, writing or reading) be interrupted unexpectedly (say, by you turning your phone off), then no data should be lost or corrupted. You know how when you turn your phone on, it says "preparing SD card"? It takes a few minutes, but what it's actually doing is checking that the FAT32 partition hasn't been damaged, because FAT does NOT have journaling. If you used a computer back in the Windows 98 days, you may remember that lovely blue "Scandisk" screen that had to run every time you didn't shut your computer down correctly - that's the same thing. But then Windows 2000/XP came along with NTFS, which also has journaling, meaning you had less chance of loosing data. But I digress once more.
So you have your SD card partitioned into EXT and FAT32. Generally it doesn't matter if it's ext3 or ext4, but you don't get any real advantage with ext4 over ext3 in this instance. Apps2SD then runs a special script on your phone which "symbolically links" the folder from your phone's internal storage where your apps are normally stored, to the ext partition on your SD card. A symbolic link is a bit like a shortcut for folders, except it's transparent to the OS: In other words, Android doesn't know that when it's installing it's apps to the internal phone storage, it's actually being stored on the SD card. This effectively boosts your internal phone memory from the previous 5mb that you had in my example above, up to whatever size you made the ext partition on your SD card (often 512Mb or 1Gb, but it depends on how many apps you install).
Plus, because it's "journaled", it doesn't need to be "prepared", meaning it's ready to go as soon as the phone starts - so your widgets and apps work immediately (unlike "forced" Froyo Apps2SD, where widgets disappear).

The catch with Apps2SD is that whatever space the ext partition takes up is taken away from the SD card. So if you have a 4Gb card (with something like 3.5Gb of actual storage) and you make a 512Mb ext partition, your SD card will "shrink" to 3Gb. The space isn't actually lost, it's just being used by the ext partition. If you reformat your card, you'll get it back.

Finally, there's a difference between "Apps2SD" and "Apps2SD+". Remember I said that your apps are stored on a special folder inside your Phone's NAND storage? Well, that was a bit of a lie. It's actually stored in TWO places. There's a second area which is called the Davlik Cache. You don't really need to worry about what this is for (Hint: IT's to do with the Java runetime your phone uses to run apps), all you need to know is that apps use it to store data, which also eats up internal phone memory. Apps2SD+ moves davlik cache to the ext partition on your SD card as well, freeing up even more space. Some people believe that this may come at the cost of performance, as the internal NAND memory should be faster than your SD card (Which is why you also get people arguing over which "class" SD card is better for Apps2SD - the logic being that a faster SD card means less impact from this move), but the truth of the matter is that your applications will be running from your Phone's RAM anyway, so performance isn't really impacted at all. Since most apps are only a few hundred Kb's in size, or a couple of MB at the most, it's a non-issue.

Finally, any recent version of Apps2SD/Apps2SD+ should work with an SD card that is or isn't formatted with an ext partition. It'll check for this partition when your phone first boots and if it's not there, just use internal phone storage.
Having an ext partition WITHOUT Apps2SD+ shouldn't cause any issues, either, so you can format your SD card whenever you're ready.

So in summary:

Apps2SD "fakes" your phone's internal memory and puts it all on a hidden section of your SD card.
Apps2SD+ pushes even more content to the SD card, freeing up even more space on the phone itself.
"Froyo" Apps2SD has various limitations that "old" apps2SD does not, but is much easier to handle as it doesn't involve any kind of "partitioning".
 

JDSwitz

New member
Nov 16, 2015
1
0
0
Visit site
Hey: I know this is an ancient thread but ... I'm wondering if anyone can provide a bit of help with this topic.
I used this method to partition my 32 GB card, without really grasping the purpose of the different partitions. Consequently, I partitioned the FAT32 partition as half the card size (about 15.35 GB), which leaves the remaining EXT2 partition the same size. I realized my mistake as soon as I began installing a large amount of music, and was no longer able to back up the phone (the FAT32 partition was FULL). What I SHOULD have done was partition the FAT32 partition about 27 GB (for my music, video, etc.). The remainder would have been large enough for the EXT2 partition (App expansion space).
ANYHOW, I'm wondering if anyone has been able to use one of these partition tools to expand the FAT32 partition (shrink the EXT2), without wiping the system and starting all over. I've been able to do this with a standard drive on a windows system (shrink the partition that contains windows), as long as the new partition size is large enough to hold the existing data. I'd think this assumes Android isn't linking to an absolute address on the SD card. I've "Linked" many apps to the SD card. A 'safe' approach might be to back out (de-link) any apps that seem critical, to avoid bricking the phone. The phone is an inexpensive LG LS620 (AKA: Realm; Optimus Exceed 2; Pulse; LG L70). I have an original ROM, so could probably 'unbrick'. I guess I'm just looking for a shortcut.
Thanks in advance !
 

Golfdriver97

Trusted Member Team Leader
Moderator
Dec 4, 2012
35,367
113
63
Visit site
Hey: I know this is an ancient thread but ... I'm wondering if anyone can provide a bit of help with this topic.
I used this method to partition my 32 GB card, without really grasping the purpose of the different partitions. Consequently, I partitioned the FAT32 partition as half the card size (about 15.35 GB), which leaves the remaining EXT2 partition the same size. I realized my mistake as soon as I began installing a large amount of music, and was no longer able to back up the phone (the FAT32 partition was FULL). What I SHOULD have done was partition the FAT32 partition about 27 GB (for my music, video, etc.). The remainder would have been large enough for the EXT2 partition (App expansion space).
ANYHOW, I'm wondering if anyone has been able to use one of these partition tools to expand the FAT32 partition (shrink the EXT2), without wiping the system and starting all over. I've been able to do this with a standard drive on a windows system (shrink the partition that contains windows), as long as the new partition size is large enough to hold the existing data. I'd think this assumes Android isn't linking to an absolute address on the SD card. I've "Linked" many apps to the SD card. A 'safe' approach might be to back out (de-link) any apps that seem critical, to avoid bricking the phone. The phone is an inexpensive LG LS620 (AKA: Realm; Optimus Exceed 2; Pulse; LG L70). I have an original ROM, so could probably 'unbrick'. I guess I'm just looking for a shortcut.
Thanks in advance !
If it were me, I would probably just reflash the stock ROM and start over.
 

Mohammid Muza

New member
Dec 3, 2012
2
0
0
Visit site
I did not do exactly what you are asking but, being new to Apps2SD, I took my exitsting 32gb sd card and shrunk the single Fat32 part, using Minitool, and then created the 2nd ext2 part and the 3rd Linux part. Reinserted into phone and using Apps2SD Pro, it recreated the swap fil and seems to be working as advertised. All the original files in FAT32 are still available as before.
 

Leatherman0828

New member
Mar 23, 2015
1
0
0
Visit site
All that lecture on memory didnt help. App 2 SD would not move apps from internsl memory to external memory, i tried for seversl minutes with no results. I want a refund. Deleted this file b/c free version as good as paid. Still couldnt move files to external sd.
 

Forum statistics

Threads
943,140
Messages
6,917,473
Members
3,158,836
Latest member
Robbyworkman1995