How to partition SD Card

If you’ve rooted your phone using Revolutionary you can partition your SD Card from the Recovery menu. After booting into recovery (Revolutionary CWM), you have an option Partition SD Card. It will ask you how big the EXT partition should be, and how big the Swap partition should be. After selecting the right values, it will automatically partition your SD Card.

If you didn’t use Revolutionary to root your phone, you can still follow the tutorial from here, and after inserting the key, it says that your phone is S-OFF, but it still asks you if you want to install Clockwork Mod. Press y and Enter and wait until the CMD disappears. Reboot into recovery once again and you should see the Partition SD Card option that I was talking about in the first paragraph.

Note that creating partitions this way will result having an EXT3 partition. If you want an EXT4 partition, connect to the phone with adb shell and follow only the 6th step of the following tutorial.

How manually partition SD Card

Don’t be afraid to do something manually. It may be a little bit harder than using a specialized software, but you can learn new things and you know you did it and it worked. For example, partitioning from ROM Manager proved to be a mistake, because I couldn’t select an EXT Partition bigger than 512Mb and it practically messed up my partitions… and using gParted to partition your SD Card is a little bit difficult since you have to install the image on a CD or stick, reboot your PC in gParted and try to get things working from there. From my experience, every time I’ve tried this using a stick to load the image, I couldn’t see the SD Card.

So.. doing something manually is better Smile

Step 1 – Connect to Phone

Restart your phone to recovery mode. Connect your phone to the PC via USB Cable. Use adb shell to connect to the phone

Step 2 – Display the partitions

Open parted (an application from the Android OS) to partition your SD Card
After you connect with adb shell write parted /dev/block/mmcblk0 and then <Enter>. Wait until you see (parted) in the left if your cursor and write print and <Enter>. You should get something like this:


As you can see, I’ve got a 3942MB SD Card. It has 3 partitions

  • Number 1 – 2886MB FAT32
  • Number 2 – 1024MB EXT3
  • Number 3 – 31.6MB linux-swap

I’m going to remove all these partitions in order to repartition the card. Note that you’ll lose all your data from the card.

Step 3 – Remove the existing partitions

You’ll have to remove the existing partitions first. So.. look at how many partitions you have, and then write remove <space> partition number <Enter>. 
For example:
rm 1
rm 2
rm 3


You can run the print command again to make sure everything was deleted. Now I have an empty unpartitioned SD Card

Step 4 – Create the partitions

Ok, let’s start computing the partitions size. For most of the custom ROM, you need an 1GB EXT partition, and a FAT32 partition.. You’ll also need a swap of 32 or 64MB. So, let’s say that you want to create a 1024MB EXT and a 32MB swap partition. Subtract these values from the entire partition size, and you’ll get the needed size of your FAT32 partition. In my case, I have a3942MB card, so 3942-1024-32 = 2886MB for FAT32

In conclusion, we’ll have to create:

  • 2886MB FAT32
  • 1024MB EXT2 (because parted only allows us to create EXT2 partitions, but we’ll convert it to EXT3 or EXT4 at the end of the tutorial)
  • 32MB swap

Now run the following commands in the (parted) shell:

  • mkpartfs primary fat32 0 2886 (first value is 0, second value is the size of FAT32 partition)
  • mkpartfs primary ext2 2886 3910 (first value is the size of FAT32 partition, second value is EXT4 partition> in our case 2886+1024=3910)
  • mkpartfs primary linux-swap 3910 3942 (first value is EXT4 partition>, in our case 2886+1024=3910, second value is the size of the entire SD Card, in our case 3942)

Note that for every command, the first value is the second value from the previous command. The first value from the first command should be 0 and the second value from the last command should be the size of the entire SD Card.

After you finish with creating the partitions, run print again and you’ll see the newly created partitions:


If everything is ok, run quit to exit the parted, and return to the adb shell


Step 5 – convert your EXT2 partition to EXT3 (skip it if you don’t want to do this)

In the adb shell, run the following command to convert your EXT2 partition to EXT3

Note that the last number from the command, 2, refers to the second partition. If your EXT2 partition has another number assigned (you can view the number using the print command), replace the “2” with your number, but if you’ve followed the tutorial and you didn’t create more or less partitions, it should be 2 )

tune2fs -j /dev/block/mmcblk0p2


Step 6 – convert your EXT3 partition to EXT4 (skip it if you don’t want to do this, but you must follow Step 5 if you have an EX2 partition to convert it to EXT3)

In the adb shell, run the following command to convert your EXT2/3 partition to EXT4

Note that the last number from the command, 2, refers to the second partition. If your EXT partition has another number assigned (you can view the number using the print command), replace the “2” with your number, but if you’ve followed the tutorial and you didn’t create more or less partitions, it should be 2 )

tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p2


If you want to check your filesystem too, you should run e2fsck -fpDC0 /dev/block/mmcblk0p2too

Step 7 – Finish

Finished. Check your work with print.

  • command:  parted /dev/block/mmcblk0 (open parted again)
  • command:  print (check all your system partitions and their sizes)
  • command:  quit (exit parted)
  • command:  reboot (reboot your system to the operating system)

Step 8 – Align your SD Card (optional)

In order to increase the access time, write speed and read speed of your SD Card, you may want to follow this tutorial


Control Your Android from a Browser with AirDroid

AirDroid for Android replaces your USB cable with your web browser. Transfer files back and forth, send text messages, play music, view your photos and manage applications — all without installing anything on your computer.

AirDroid is completely free; it doesn’t even contain ads. It functions as a web server, allowing your Android device and your computer to communicate over the network.

Getting Started

AirDroid is available for free from the Android Market. It supports Android 2.1 and later. Android 4.0 isn’t as well supported at the moment, but AirDroid should update with improved support soon.

Launch the AirDroid app once it’s installed and tap Start to start the AirDroid server.

AirDroid tells you exactly what to do — plug the IP address into your web browser’s address bar.

You’ll see a login page. Use the code from your Android to log in. This prevents unauthorized access to your device.

If you don’t see a login page, your Android device and computer are probably on different networks. They must be on the same network to connect. If your computer is connected via a wired connection, it’s possible the Wi-Fi network and wired network are isolated from each other.

AirDroid’s Home Screen

Once you’ve connected, you’ll see AirDroid’s main page, which contains links and statistics about your device. At the bottom right corner, you’ll see the Wi-Fi connection strength, bars of cellular coverage and battery level of your Android device.

Click the Detail link to see more information about your device’s storage and the files it contains.

Transferring & Managing Files

Click Files to view the contents of your SD card. If you want to clean out your file system, deleting files from here is quicker than going through a file manager on your Android.

Use the right-click menu to manage files — Delete deletes them permanently, while Export downloads them to your computer. Export as ZIP downloads several files or directories to your computer as a single file.

Use the Import button to add files to your device over the air, without lifting that USB cable.

Sending Text Messages

You can send SMS messages using the Messages panel. No need to pick up your Android and type messages in; participate in a conversation right from your web browser.

The Contacts and Call Logs panels allow you to browse your Android’s contacts and view its call history.

Playing Music

The Music panel allows you to use your Android device as a jukebox. Search for music and play it — you’ll get a widget that stays on AirDroid’s home screen.

The same Export and Import options allow you to transfer music files to and from your device.

Ring tones can be managed separately from the Ringtones panel

Viewing Photos

Use the Photos panel to show off photos on your monitor instead of your Android’s small screen.

Managing Apps

From the Apps screen, you can view your device’s installed apps. You can search for specific apps, or sort them by their size or installation date.

Use the Uninstall button to remove an app or the Export button to download it as an APK file to your computer.

If you want to install an app from an APK file, use the Install App button to upload it to your device and install it. To install apps from the Android Market, click the Market icon.

You’ll have to confirm each app removal and installation by tapping the option on your Android’s screen.

Using the Clipboard

If you want to copy and paste between your computer and your Android, use the Clipboard option. The From Device button copies the clipboard from your device into the clipboard box. The To Device button sends the text in the box to the Android clipboard.

Now you’re ready to replace your USB cable with your web browser. If it wasn’t for charging, you’d never have to touch your Android’s USB cable again.


How to Install Android Apps to the SD Card by Default & Move Almost Any App to the SD Card


Android apps install to the internal storage by default, but you can also set the SD card as your default install location. This trick allows you to move almost any app to the SD card – no root access required.

This tweak requires Android 2.2 or later. To change the default install location, you’ll need to use the ADB, or Android Debug Bridge, utility included with Google’s Android SDK.

Enable USB Debugging

First, you’ll need to enable USB debugging on your Android device. Open the Settings screen, tap Applications, and select Development.

Tap the USB Debugging checkbox to enable it. This will enable debug mode, allowing you to change the settings on your Android device from your computer. You may want to disable debug mode after completing this process.

Install the Android SDK

You’ll need to download and install Google’s Android SDK on your computer. If you don’t already have Oracle’s Java JDK installed on your computer, you’ll have to download and install it before installing the Android SDK.

After you’ve installed both the JDK and Android SDK, launch the SDK Manager from your Start menu.

The ADB utility isn’t installed by default. It’s included in the Android SDK Platform-tools package – select this package and click the Install button to download and install it.

After the process completes, connect your Android device to your computer with its included USB cable. Windows should locate the device and install the appropriate drivers automatically. If it doesn’t, you may have to download and install the appropriate drivers from your Android device’s manufacturer. Do not mount the device after connecting it – just plug it in.

Using ADB

Open a Windows Explorer window and navigate to the android-sdk\platform-tools folder. On Windows, you’ll find this folder at C:\Program Files (x86)\Android\android-sdk\platform-tools by default. Check C:\Program Files\Android\android-sdk\platform-tools if you’re using a 32-bit version of Windows.

Launch a Command Prompt window in this folder by pressing and holding the Shift button, right-clicking in the folder, and selecting Open command window here.

Run the adb devices command and you should see your connected Android device.

Run the following command to set the default install location to your SD card:

adb shell pm setInstallLocation 2

If you want to revert this change later and install apps to the internal storage by default, run this command:

adb shell pm setInstallLocation 0

0 represents your device’s internal storage, and is the default. 2 represents the external storage, whether it’s an SD card or USB storage.

Moving Apps to SD Card

Apps that refused to leave your system storage can now be moved to the external storage. For instance, below you’ll see screenshots of the Slacker Radio app. Before the change was made, the Move to USB Storage button was grayed out. After the change was made, the button is enabled and the app can be moved.

To move an app to the SD card, open the Settings screen, tap Applications, and select Manage Applications. Select the app you want to move and tap the Move button on its details screen.

A Warning

Some apps shouldn’t be installed to your SD card and should remain installed on the internal storage. The external storage is unavailable when your Android device is mounted on your computer, so apps that remain running all the time should be left on your internal storage. Widgets, launchers, animated wallpapers, and anything you want to use while your Android’s SD card is mounted on your computer should be left on the internal storage.