MIUI uses Darktremor’s A2SD and it’s an excellent tool to give you a storage solution with a stable, issue free and easy A2SD method that’s full of features to change a number of settings. While MIUI supports this and it’s there, It however needs to be enabled within the Terminal Emulator via a few command line entries.
Some of us that have certain devices at some point may have used the solution of partitioning our SD Cards with an ext3/ext4 partition and using something called A2SD for our Android application and data storage solution. Now, there is of course other solutions like resized HBOOT partitions, but if you have a device of say the HTC kind that are low on storage and with a stock HBOOT partition then here we will help you through.
Some MIUI ROMs out there have A2SD enabled and with the Darktremor script running as standard and it does all the work automatically for you, but the direct ROM from China and the majority of the ROM’s don’t as they pretty much mirror the Chinese model.
If you are unsure of what A2SD is or any of what i am talking about, then take a look at this comprehensive guide and rundown of all types of A2SD and a full explanation of what it all is to get a little grasp on what we all doing here – A2SD, A2SD+, Froyo A2SD Explained – Differences And How To Partition Your Memory Card.
So you’ve read the detailed explanation? Maybe not and already know what your doing? Either way let’s get cracking on to what we need to know. To achieve A2SD for MIUI you first need a partitioned SD Card in the way of two file systems that are a FAT32 partition for all the main bits and pieces and then a ext partition for those apps.
I fully recommend checking out the above explanation of A2SD and it’s differences as it will explain it all thoroughly and also how to partition your SD card to where we want it to be.
Now assuming you have it all ready and you have MIUI flashed and booted lets get started.
A2SD Instructions and commands
Simply download the Terminal Emulator from the Android Market.
Then we will enter some commands to enable A2SD in MIUI and also Zipalign which we will explain after the initial commands.
Once your device is booted up, open the terminal emulator and type in these following commands.
$su
This command will allow the superuser rights allowing Root permission for Terminal Emulator.
#a2sd check
This command will check your current a2sd status and information.
You will see if you look at the information that it will say that the status is app and private app will be running from the internal storage.
#a2sd install
This command will then initiate the first step of enabling pushing apps to the ext partition and will reboot your device after the command is done.
Once your device has rebooted, open up the Terminal Emulator again and type in the following command like before to check the status of a2sd.
$su
This command will allow the superuser rights allowing Root permission for Terminal Emulator.
#a2sd check
This command will check your current a2sd status and information.
The information provided of the status should now state that the app and private app are now running from the SD card and not the Internal storage.
$su
This command will allow the superuser rights allowing Root permission for Terminal Emulator.
#a2sd cachesd
This command will move all apps cache to the SD card also and and will reboot your device after the command is done.
These set of commands will then enable A2SD+ and will have moved the cache over to the SD card giving you more space. Now an optional extra is to Ziplign and i will explain briefly what it is and the benefits of doing so now.
Zipalign
Zipalign is an archive alignment tool that was introduced with the 1.6 Android SDK initially and it optimizes the way an Android application package (APK) is packaged. It basically enables Android as a system to interact and work more efficiently with the applications, so it in turn makes the whole system run a lot faster and smoother. Zipalign if enabled will use much less RAM to execute applications and consume less freeing up more for your Android system to run.
Zipaligning will work best if it is done from the offset and if not a lot of unaligned applications are present on the system. If you have a quite large number of unaligned app this will result in the system most likely in often starting and killing processes, lagging, slowing things down and draining battery. So if your are doing this from the beginning of flashing MIUI then it’s recommended, but if you have a fair few applications already installed and a system running already then it’s recommend not too.
$su
This command will allow the superuser rights allowing Root permission for Terminal Emulator.
#a2sd zipalign
This will enable Zipalign and it will also initialise it on every boot of the system so there’s no need to redo the command every time you reboot.
Now you should have a complete partition all set up for all your applications and data to run off your SD Card leaving that internal storage free and plenty of room for apps from the Android Market. You can check out your storage of the ext3/ext4 partitioned side of the SD card from the following route – Settings > System > SD card Settings and their you will see at the bottom a sectioned labelled A2SD+ and what space you have. I hope this helps if you have any trouble with storage and you have fun.
Source – Android Developers – XDA Developers Forum
Land of Droid: Android Apps – Android Phones – Android News – Android
Brilliant! That fixed A2SD on my MIUI. No more wondering as to why the apps wouldn’t move to sd-ext, or what app to unistall next to free space. Thanks a ton for helping me unlock all of my MIUI and A2SD goodness.