As someone who quite often mods their Smartphone and devices i am on forums checking out custom ROMs, tweaks and more quite a bit. Well recently i have been noticing a trend, and that is quite a number of individuals don’t quite understand the difference between A2SD, A2SD+ or Google’s own Froyo A2SD solution.
Below is something that was written and compiled together that explains it all. It’s quite simple really and if your are into Linux at all then it’s even easier to grasp.
The SD card in your phone is 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.
Your phone will have its own internal flash memory (or “NAND“) storage.
Traditionally with Android, you could only install applications to this NAND storage, you could not install them onto your SD card.
Froyo A2SD (or FA2SD)
In Froyo (Android 2.2) Google came up with a way to install apps to the SD card.
A folder named .android_secure is created on the SD Card and this stores versions of applications.
But there’s a few catches:
Apps aren’t automatically stored here, you have to manually “move” them
Not all apps are capable of being moved, in fact at this stage most apps aren’t, the developer needs to update their app and allow it.
Some apps aren’t and won’t be updated and some developers may not want to allow it for whatever reason.
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.
You can force ALL apps to be moved to this area by default, but it breaks incompatible ones.
The SD Card Fat32 partition is not “mounted” (more about mounting later) until after the phone boots up. Widgets load during boot, so if the app behind the Widget is on the SD Card the Widget won’t work.
When the SD Card in your phone is accessed as a disk drive (using the USB cable) it must be “unmounted”. When it is unmounted, the phone cannot see it or any apps on it.
Non-Froyo A2SD (or A2SD)
Before Froyo existed, some very clever people at CyanogenMod came up with a thing called “Apps2SD”, now referred to here as A2SD.
A2SD works by having your SD card partitioned into TWO filesystems: The 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 Linux and is the filesystem used internally in the Android operating system.
ext has several different versions and 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. FAT is not a journaling filesystem, which is one of the main reasons Microsoft moved to a journaling filesystem (NTFS) for Windows NT/2000/XP/Vista/Win7. ext4 is an update of ext3 but is not as common and offers no advantage in the Android operating system.
The original A2SD ”symbolically linked” the folder from the phone’s internal storage where apps are normally stored, to the ext3 partition on the SD card. A symbolic link is a bit like a shortcut for folders, except it’s transparent to the operating system. 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 in the ext3 partition on the SD card. Current A2SD is integrated directly into the framework, rather than using the symbolic linking described above. A2SD effectively boosts your internal phone memory by whatever size you made the ext3 partition on your SD card (usually 512Mb).
Plus, because ext3 is a native Linux filesystem, it doesn’t need to be “mounted”, meaning it’s ready to go as soon as the phone starts – so your widgets and apps work immediately (unlike Froyo A2SD, where widgets disappear because the apps stored on the SD card can’t be located until the card is mounted after the phone finishes booting up).
There are, however, two downsides with A2SD:
Whatever space the ext3 partition takes up is taken away from the user accessible space on the SD card. So if you have a 2Gb card (with something like 1.7Gb of user accessible storage) and you make a 512Mb ext3 partition, the space available for storing emails, music, videos etc on your SD card will “shrink” to 1.2Gb.
The phone is now forced to access the SD Card continually to retrieve apps and data from the ext3 partition. This is made worse if you implement A2SD+ (discussed later) which also moves the phones internal cache onto the ext3 partition. This continually “thrashing” between the ext3 and fat32 partitions results in a substantial decrease in read/write speeds to the fat32 partition. This will be observed as a slowdown when recording and playing back video for example.
Finally, there’s a difference between A2SD and A2SD+. There’s an area in read/write NAND memory which is called the Dalvik cache. It’s used by the Java runtime to cache the file/framework structure your phone uses to run apps. A2SD+ moves the Dalvik cache (which is 40Mb+) to the ext3 partition on your SD card as well, freeing up even more internal phone memory. Some people believe that this may come at the cost of performance, as Dalvik cache should be in the fastest possible memory and this may be the phones internal NAND memory. Expect to see some further changes on the way the Dalvik cache is handles in future A2SD releases.
Finally, any recent version of A2SD/A2SD+ should work with an SD card that is or isn’t formatted with an ext3 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 ext3 partition WITHOUT A2SD/A2SD+ shouldn’t cause any issues, either, so you can format your SD card whenever you’re ready.
A2SD “fakes” your phone’s internal memory and puts most of it a hidden section of your SD card.
A2SD+ pushes even more content (the Dalvik cache) to the SD card, freeing up even more space on the phone itself.
“Froyo” A2SD (FA2SD) has various limitations that “old” A2SD does not, but is much easier to handle as it doesn’t involve any kind of “partitioning”. It also has positive as it doesn’t cause any slowdown in SD card access speed.
So there is the simple explanation of how it all works, nothing to it really. if you are thinking of installing a Custom Rom but are put off by it needing A2SD or A2SD+ and didn’t know what it was so backed off, then after reading this you can leave this site and return knowing what it is all about.
If you want to partition your Memory Card itself for that ext partition than use this guide that uses GParted below.