View Single Post
Old November 17th, 2010, 02:21 PM   #1 (permalink)
SUroot
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,294 Times in 3,987 Posts
Post [FAQ]ROOT MEMORY: a2sd+ / partitions (updated 10th August 2011)

WARNING: Rooting (and related processes) can be dangerous if you do not understand the concepts, risks and procedures involved.

Although we are often at hand to help, you will receive much better help if you have read the FAQ's and guides several times before undertaking the task of rooting. Not only will you understand the possible causes and fixes for issues you encounter, it will also help you to give US the information we need to help YOU!


Contents


Apps2SD+ / A2SD+
What is apps2sd+?
Isn't this in Froyo (2.2) anyway?
Are there any other advantages over moving apps in Froyo?
Is it any better in Gingerbread?
Are there any advantages over moving apps in Gingerbread?
How do I get it?
How do I make it work?
If I wanted to do it, is there a step by step process?
Yes but what ROM supports A2SD+?
I already have a ROM that supports a2SD+, now what?
How do I check it has worked?
It says "Information Unavailable" What's going on?
What? Internal memory is still going down though....
I have got Dark Tremor a2sd and my internal memory is smaller than expected
What is an EXT partition?
Whats the difference between EXT2/EXT3/EXT4?
OK, I used "Move to SD" but I haven't saved any space?
Are there other options when rooted?

Alpharev partition Tables

What is this?
How does that help with internal memory?
What new sizes are available ?
How do I do this?
How do I do undo this?
How easy is this to do?

Custom MTD partition layout


What is this?
How does it work?
Sounds too complicated, is there a guide?
Sounds Interesting and I am an advanced user, is there a guide?
Can it be reverted?
Custom MTD partition FAQ is not very comprehensive. Why?


Apps2SD+ / A2SD+



What is apps2sd+?
Apps2sd+ (or a2sd+) is a script / hack for use on rooted, custom roms. It uses a partition on your SD card for apps storage.
Back to top


Isn't this in Froyo (2.2) anyway?
No, this is different. Froyo allows you to move certain apps to the SD card. This relies on the developer coding the app to allow this.


A2SD+ allows all apps to be moved (automatically) and their associated Dalvik cache. Using a2SD+ will move more of an app than Froyo "Move to SD card"
Back to top

Are there any other advantages over moving apps in Froyo?
Yes, Froyo moves apps to your SD card's FAT partiton. Widgets and some apps will not function correctly here. Not only that, if you mount your SD card on your computer, some of the apps on SD will not function at all.

A2SD+ uses a partition which is not mounted when you mount your SD card. All apps will function and all widgets run without error.
Back to top


Is it any better in Gingerbread?
Yes Gingerbread "move to SD" is better than Froyo "Move to SD". It moves more than Froyo. It now moves the lib files of an app too. A2sd+ does not currently, so Gingerbread "Move to SD" moves more of an app than A2sd+ currently does.

Its worth noting that the Latest Dark Tremor a2sd+ Beta has the ability to move the data/data content to SD too, however, it is a BETA. Not a final release. If / When this works correctly, it will possibly move more than Gingerbread "move to SD"
Back to top


Are there any advantages over moving apps in Gingerbread?

Yes, the same other advantages as the "Other advantages" in the froyo section above.
Back to top


How do I get it?
You need to go through a rooting procedure (unrevoked recommended) and install a custom rom which has support for a2sd+

You can also flash it separately onto any rom providing it has init.d support.

You can download the Dark Tremor Beta separately. See the "Which ROM" section later on.

Pretty much all custom roms have init.d support but stock roms do not. If you want to add init.d support (running scripts at start up [initialisation - hence "init"]) you will have to do this
Back to top


How do I make it work?
Once you have rooted, you will need to make a partition on your SD card in EXT format. 512MB - 1GB is about right. Swap should = 0. You will then need to flash the custom ROM of choice.

Make sure you have moved all SD Apps back to internal memory first. The "Move to SD" option will be redundant so you must undo this.
Back to top


If I wanted to do it, is there a step by step process?

Assuming you are rooted;

1) Backup your SD card contents to your PC
2) Download GParted and Burn to CD/USB or use the Gparted with VMware guide.
3) Boot into recovery and select the mount as usb mass storage option (cwm recovery) before plugging the usb in. Plug the usb in when Gparted is at the language selection/keyboard mapping section
4) Resize the existing FAT32 partition from the back, leaving space after it and create an EXT partition in the space. Steps for the GUI are below.
  • In the drop down menu (top right) select the SD card (be careful not to select your HDD)
  • Right click on the FAT32 Partition and select resize
  • Press the Up arrow on "Free Space Following" until you have the desired sizes
  • Click Resize
  • right click in unallocated space and select New> EXT format of your choice
  • Click Apply

5) now you just need to flash your ROM with a2SD+ support.

Alternatively, you can download and ROM manager to partition the SD card, however you cannot easily check the partition is correct. Also, I do not recommend using ROM manager at all. It looks easy to use (and it is) but people using this can get into trouble and it takes away the requirement of knowledge on what it is doing, which is useful to help you get out of trouble.

If you want to change to a new SD card, take a nandroid backup first, copy the entire FAT partition to PC before following the above steps. Once complete, copy data back and nandroid restore.

Back to top


Yes but what ROM supports A2SD+?
Most custom ROMS have a2sd included and for those that do not, you can flash a2sd afterwards.

Check this post for lists of ROMS.
XDA - Everything Desire is Here!

Narrow down the kind of ROM you want, then read each thread to see what is included.

The post also links to a2sd scripts (Dark Tremor) for separate flashing.
Back to top


I already have a ROM that supports a2SD+, now what?
You should be able to so steps 1-4 above. If that doesn't work, step 5 is reflash your Rom. You shouldn't lose any data.
Back to top


How do I check it has worked?
Download "quick system info from" the market. It will show you an "a2SD" total size and free space.

If the free space is less than the total, the partition is being used for apps and it is working.
Back to top


It says "Information Unavailable" What's going on?
This means that 1 of 2 things are not working.

1) The Partition is not working correctly.
2) A2sd+ is not working correctly

If 1) boot back into your GPARTED live to fix / repartition.
Back to top


What? Internal memory is still going down though....
Yes, this will happen. Although it moves the app and dalvik cache to the EXT partition, app cache will always remain on internal memory so it will still go down.
Back to top


I have got Dark Tremor a2sd and my internal memory is smaller than expected
Dark Tremors latest a2sd script does not move Dalvik cache by default as before. You need to download "terminal Emulator" from the market and run it.

Type "su" and press enter
Type "a2sd cachesd" and press enter.

The desire will reboot and you will see a big chunk of additional free space on your internal memory

Full list of DarkTremor a2sd commands
Back to top


What is an EXT partition?

Its a partition using Linux File system. Linux is an alternative to windows, which Android is based upon. This is why you shouldn't try to partition EXT with Windows. Live CD's are bootable CD's using a Linux Base.
Back to top


Whats the difference between EXT2/EXT3/EXT4?

They're just different versions really. Newer incarnations of the same file system. Some ROMS don't yet support 4. Its still quite new. You should always be safe with 3 though.
Back to top


OK, I used "Move to SD" but I haven't saved any space?

Silly! I told you earlier you don't need to move anything. The script automatically does what you need. Move it back to internal memory.
Back to top


Are there other options when rooted?
Yes, titanium backup can move all apps to SD card, however again, this is not on a partition so has many shortfalls.

Also some custom ROMS allow the default installation location to be changed to external media, but this is the same as titanium.

There is something called data2sd which will allow you to move your entire /data partition to EXT. This is still in its infancy and does not work on all init.d roms. Read about it here
Back to top


Alpharev partition Tables


What is this?

Rooting opens up the phone to allow a lot more. However, HTC implement a security flag in the Radio NVRAM which prevents changes to system when android is running. Alpharev have devised a custom hboot flashing process that ignores the security flag (GSM devices only NOT CDMA). This is known as S-OFF. A guide to this process is here.
Back to top


How does that help with internal memory?
In itself it doesn't but it opens even more doors. Alpharev have also built custom hboot partition tables that can be flashed using fastboot.

Currently your partition is divided as follows:
/System 250MB
/Cache 40MB
/Data 147MB

/Data is where all your user apps and data is stored.

These partition tables change how the same space is distributed. One thing to be aware of though, is that not all ROMs will fit into all partition tables.
Back to top


What new sizes are available ?

Table name, system,cache,data

Bravo N1 table, 145,95,197
Bravo Data++, 180,5,252
Bravo Sense, 180,40,217
Bravo Oxygen R2, 100,5,332
Bravo CM7 R2, 145,5,287

Please be aware as previously mentioned, not all roms are compatible with every table. Most ROM's state which table they fit into, but if they dont, you will need to know how much space the ROM takes up in /system.
Back to top


How do I do this?
Once you are S-OFF, you need to ensure you are set up on your PC to use fastboot. Follow the FAQ. You need to fastboot flash these tables as hboot.
Back to top


How do I do undo this?

There is little point undoing S-OFF itself. Returning the desire to stock using an RUU is the most sure fire way. Alpharev also supply the standard desire partition table, which if flashed using fastboot, returns the partitions to normal whilst maintaining S-OFF. On the R2 Hboots, the supplied downgrader may be required.
Back to top


How easy is this to do?
Please be aware although many of us find it easy, it will not be easy for everyone. We would strongly urge you to understand what all this means before actually doing it. We love to help, so please ask as many questions as you like before jumping into it.
Back to top


Custom MTD partition layout


What is this?

This has a similar result as the Alpharev partition tables and still requires S-OFF. This is a little bit more advanced though, so if you feel you do not understand this, it is not something you should attempt. For advanced users only.

The difference here is instead of using pre defined partition layouts, you can set the partitions to the exact specific sizes you want. The trade off is its more work to set up and a bit more work every time you flash a new ROM.
Back to top


How does it work?
This uses a text file on the SD card called mtdpartmap.txt. Within this file contains the sizes you define for your partitions (it defines only system and cache. data is mafde up of the remaineder).

Once the text file has the sizes you want, recovery must be patched using a patch tool. This tells recovery of the new partition sizes. Upon flashing a rom, another patch tool is used to patch the boot.img of the ROM. This will need to be patched every time you flash a new rom. recovery only needs to be flashed once with any set of sizes.
Back to top


Sounds too complicated, is there a guide?
No.
Back to top


Sounds Interesting and I am an advanced user, is there a guide?
Yes, there are 2 guides. There is the original for Clockwork mod found here

There is also one by Rastaman-FB for Amon RA here
Back to top



Can it be reverted?
Once set up, if you want to revert - it can be done. Easiest way is to fastboot flash an upnpatched recovery.
Back to top


Custom MTD partition FAQ is not very comprehensive. Why?
Its an advanced subject matter. The guides should explain what you need to know. I repeat again - it is for advanced users only.
Back to top



*thanks to everyone for your input in this, past or future.
SUroot is offline  
Last edited by SUroot; May 23rd, 2012 at 04:03 PM.
Reply With Quote
The Following 70 Users Say Thank You to SUroot For This Useful Post:
Abhishekswarup (May 7th, 2012), alekos (November 19th, 2010), alexrid3r (December 24th, 2012), amit_eighty8 (May 9th, 2011), aprihi (March 20th, 2012), arcybarrios (November 25th, 2010), b3y0nd (August 9th, 2011), beeflin (March 20th, 2011), callet09 (December 28th, 2010), CarsnGadgets (November 18th, 2010), Casual Pete (February 17th, 2011), colheath (April 6th, 2011), D3LeT3 (July 8th, 2011), dan55 (September 27th, 2011), darthlinux (April 2nd, 2011), david_inuk (May 3rd, 2011), DC E1G (June 17th, 2011), deanshep85 (May 19th, 2011), deeplyconfused (November 21st, 2010), dgoldhar (March 29th, 2011), edwardmlyte (January 21st, 2011), Eris Ed (November 17th, 2010), ernolander (October 4th, 2011), Exiled_SouL (July 1st, 2011), Flumme (June 29th, 2011), flyte (November 18th, 2010), frankbonatelli (January 18th, 2011), gp144 (October 31st, 2011), happy-kat (February 28th, 2012), Harlem Ranger (February 21st, 2011), hcms (July 22nd, 2012), HDHNTER (February 22nd, 2011), HyperMidget (May 28th, 2011), Irios (February 20th, 2011), Jammy (January 20th, 2011), John - Rhoslan (November 20th, 2011), kamille316 (December 11th, 2010), kewlbuddy (February 4th, 2011), lekky (December 4th, 2010), LfcFan1977 (January 5th, 2012), Liamalone (February 23rd, 2011), middle_road (August 12th, 2012), MikeC1408 (December 8th, 2010), mollymalone (December 26th, 2011), Nidzo80 (October 10th, 2011), nivin (November 19th, 2010), No_u (March 20th, 2011), ntebis (December 17th, 2010), Paul8944 (August 20th, 2011), porter_james (February 17th, 2011), rayezor (August 7th, 2011), rgs (December 23rd, 2010), riverkid090 (January 10th, 2011), rtb35 (February 19th, 2011), Rushey (October 16th, 2011), s8lam2000 (May 7th, 2012), Sak01 (June 27th, 2011), sassan_sh (September 14th, 2011), shauny13 (November 17th, 2010), SHiFT3R (November 19th, 2010), slinemfc (June 30th, 2011), soki (December 5th, 2010), surib4u (July 16th, 2011), tessler65 (December 20th, 2011), tuffcheez (September 26th, 2011), twospirits (December 20th, 2010), Tyseyh (May 29th, 2011), Usta (June 17th, 2011), Xtasy (December 18th, 2010), zeegy (December 19th, 2010)