[Desire General] abaaaabbbb63:
Correctly partition your sd-card for extended memory use​

Many users on this forum don't know how to partition their sd-cards correctly, resulting in later problems with ROMs, like lag issues, or data losses. This guide will help you partition your sd-card correctly.

There are several potential partitions where app-data can be installed to, usually the internal memory-partition is used for that. Unfortunately, the Desire's internal memory if only 147mb in size, and can only be increased by a maximum of 100mb with a hboot change. With apps increasing in size in the last few years, and devs not caring anymore about their app size, this small internal memory can't hold more than 10-20 relatively small apps.

Since Android 2.2 Froyo, users have been able to move part of the apps on the sd-card, but it's still not enough, with most of the data and dalvik cache filling up the internal memory. Therefore most custom ROMs incorporate an extension that allow additional partition on the sd-card to be used exclusively as an extension to the internal memory partition 'data', which is referrred to as 'sd-ext'.

----------------WARNING----------------

Everything on your sd-card will be wiped. Backup your sd-card before proceeding.

I do not take responsibility for anything that happens with your phone/ sd-card.

----------------INFO----------------

There are two methods to correctly create an ext partition on your sd-card. These are:

- 4ext Recovery method

This method requires you to be S-OFF, but it's the easiest one.

-Gparted method

This can be done, regardless of being S-OFF or not.

These two methods are the best ones to use. Other means could result in sd-card damaging, or other problems. Do not use:

ROM Manager, CWM Recovery, Windows Minitool Partition Wizard etc.

All you need for this process:

A 4ext recovery compatible phone ( for the 4ext method)

A Micro Sd-card.

A computer.

A writable CD (For Gparted Method)

A rom with init.d scripts support.

A brain.

----------------4ext Method----------------

This method consists in flashing a new recovery on your phone, and it requires you to be S-OFF.

If you aren't S-OFF, check this out:

http://xdaforums.com/showthread.php?t=805811

Now. let's start.

[1] For Rooted ROMs

1. Go here: http://4ext.net/

2. Click on "4EXT Recovery Updater" and download the .apk.

3. Put the .apk on your sd-card.

4. Install the app, and open it.

5. Select "Online Install | upgrade". Confirm your phone model.

6. Select the latest "Touch" recovery, or "Classic", depending on your preferences.

Skip to [4]

[2] For ROMs that are not rooted (PB99IMG)

1. Go to this thread :http://xdaforums.com/showthread.php?t=1751258

2. Download the file: PB99IMG.zip

3. Place the file on the root of your sd-card (like... not in any folder)

4. Power off your phone

5. Boot in hboot (Power Down + Volume Down) or, if Vol Down is broken, in fastboot (Power Button + Back button) and select

"Bootloader".

6. Wait until a message appeares. Select yes.

Skip to [4]

[3] For ROMs that are not rooted (Fastboot)

This requires you to have ADB and Fastboot installed. Check out this guide : Long link

1. Download the PB99IMG from this thread :http://xdaforums.com/showthread.php?t=1751258

2. Extract the .img from inside the zip.

3. Put it on the the C:/ drive.

4. Boot your phone in fastboot (Power + Back button), then connect it to your PC.

5. Open CMD

6. Type "fastboot flash recovery C:/recovery.img"

Go to step [4]

[4] Partitioning your sd-card through recovery.

Now, you have installed 4ext recovery. We can continue.

1. Boot in recovery. (Power + Volume Down, then select "recovery")

2. Select "Tools".

3. Select "partition sd-card"

4. Select "Remove all partitions and start from scratch" (Hope you backed up your sd-card)

5. Select your sd-ext partition size. Recommended : minimum 512mb.

6. Skip sd-ext 2 (If asked for it)

7. Skip swap. (If the rom you want to install requires swap, then select 128 mb)

8. Choose Ext4 as your partition type. (Ext4 is faster than Ext3)

Voila, now you have an ext partition.

Skip to "Using the ext partition".

----------------Gparted Method----------------

1. Download gparted Live CD (.iso) from here: http://gparted.sourceforge.net/download.php

2. Once downloaded, burn it on a CD using a burning software.

3. Connect your phone to your PC, and select "Hard Disk" mode.

3. Restart your computer and enter boot menu (usually by pressing F2/F12)

4. In boot menu change the boot order to bring your CD drive on the top, save settings and exit.

5. Restart your computer. You will get some options. Select the one that says to boot Gparted, or something like that.

6. Select your language by entering a given number.

7. You will next have 3 options. Type 0 and hit enter.

8. Now you should be booted in Gparted. You should see your sd-card info, together with your PC's partitions. Select your sd-card.

9. After selecting, you can see your sd-card on the main screen, along with partitions. Delete all partitions, for a clean start.

10. Right click on the "Unallocated space", and click "New"

11. A box will appear. First, create a Fat32 partition. Click the drop down box and select "Fat32". Now write in the "Free space following" box the size of your future ext partition, and, if the ROM you want to install requires a swap partition, add 30 mb to that value. (Example: 1024mb+30mb= 1054mb)

*In order for especially windows-systems being able to mount your sd-card when connecting your device to a pc, sd-ext should be following your first sd-card partition (typically Fat32). Like... create the Fat32 partition first.

12. Now you'll see 2 partitions. Right click on the unallocated one again, write 30mb in the "Free space following" box, then select what kind of partition you would like between Ext 2,3 or 4 ( 4 recommended).

13. Now, right click on the unallocated 30 mb, and create a "Linux swap" partition, just in case.(Optional, only of ROM requires swap)

14. Click "Apply".

15. On the top left of your screen you can see an icon named as exit/turn off, click on it. You now finished partitioning.

Video for better understanding:

[YOUTUBE]7V64S6cEkGw[/YOUTUBE]

And yes, now you may copy back your stuff. (Again, hope you backed up)

----------------Using the Ext partition----------------

After creating an ext partition, you have to actually use it. Most ROMs have a2sd scripts incorporated that use your ext automatically (check the ROM thread), but some ROMs don't, or you just want another type of a2sd scripts.

You can use the following a2sd scripts:

Mounts2sd app (Easiest method, kids!)

https://play.google.com/store/apps/details?id=com.spazedog.mounts2sd&hl=en

Mounts2sd script

This is a script that lets you choose what you move to sd-ext.

http://xdaforums.com/showthread.php?t=1342387

CronMod

Another set of scripts. Each one has a description. Read it carefully.

http://xdaforums.com/showthread.php?t=1716124

Before flashing any scripts, remember to:

Do a nandroid backup

Delete any other a2sd scripts from the folder : /system/etc/init.d

Wipe cache and dalvik cache after installing a script.

Tip:

Unless you have a fast sd-card (Class 6 or Class 10), you should let your /data partition on your internal memory. Moving it to sd-ext could cause slowness. Move dalvik cache and system/app instead.

After you install one of these scripts, you can finally enjoy the extended memory of your phone.

Note: For most scripts, you will not see the actual ext partition as a memory extension (like, instead of 148 mb, you will not have 1148mb), but it will be there, doing its job.

To actually see your sd-ext, install a storage app, like this one : https://play.google.com/store/apps/details?id=ru.krikun.freespace.

----------------Problems?----------------

Still getting low memory warning?

1. Use the above suggested app to check your partition.

2. Are you using the correct hboot for your ROM?

3. Did you actually install a script? Did you configure it correctly (Mounts2sd)?

4. You may be having way too many apps, even for your extended memory. Uninstall some. Remember that memory is still limited.

5. Maybe your ROM doesn't support init.d scripts (needed for a2sd). Check out this thread :

http://xdaforums.com/showthread.php?t=1710980

6. If none of above work, start from the beginning, or use another method.

---------------------------------------Thanks---------------------------------------

-pyroblazer

-madmaxx

-AndroidGX

Special thanks:

-eddiehk6

-jmcclue

P.S. If you see anything wrong with this guide, or if you think I should add something, please tell me. Thanks.​