Android Simplicity

How-To #6: How to Partition your SDcard

Like a PC hard-drive, sdcards can be partition into other drives. There are two common uses of a partitioned sdcard: 1) To run applications off the sdcard, 2) to create linux swaps, a method to extend your memory on your device, making it faster.

Here we will use the a script provided by 51dusty
1. download sdparted.txt to your sdcard(do not place in any folders)
2. boot into cm-recovery, goto console/terminal(usually alt + x keystrokes depending on recovery version)
3. at # prompt type:
mount /sdcard
mv /sdcard/sdparted.txt /sbin/sdparted
chmod 755 /sbin/sdparted.
sdparted -efs ext4

Congratulations! You now have a Partitioned SDcard with fat32,ext4, and linux swap.
**Continue below if you want to revert ext3(required by certain roms, i.e HTC Hero).
8. boot into cm-recovery and press for console(usually alt + x)
9. type:
parted /dev/block/mmcblk0
print
10. Here you should have 3 File system in this order: Fat32, Ext3, and Linxus swap

Example:
Number - Start, End, Size, Type, File system, Flags
- 512B, 7437M, 7437MB, primary, fat32, lba
- 7437MB, 7937MB, 500MB, primary, ext2,
3 - 7937MB, 7969MB, 32.2MB, primary, linux-swap(v1),

11. for "Number 2": memorize(write it down on a piece of paper) the Start and End numbers that are ending in MB. (here we have 7437MB 7937MB)
12. Then type - 
rm
13. when it ask Number? type - 2
14. now type:
mkpartfs primary ext2 start end ---- example above would be: mkpartfs primary ext2 7437 7937
***Optional: type print to check your progress, you should now have ext2 instead of ext4***
15. type - 
quit
upgrade_fs
reboot - 
To reboot if you want

You are done!

11 comments:

Anonymous said... Best Blogger TipsBest Blogger Templates

Link is gone.

Tony Le said... Best Blogger TipsBest Blogger Templates

k fixed

Anonymous said... Best Blogger TipsBest Blogger Templates

hello there...need your help here..i dloded the sdparted.txt to the device..and i booted to cm recovery..but there is only home+back,Alt+S, and Alt+w options available....there is also an error says
E:Can't open /cache/recovery/command

what does it means?help please... thankss..

Tony Le said... Best Blogger TipsBest Blogger Templates

I never seen that error. did you install the recovery correctly? you should have alot more available options. look at http://android-simplicity.blogspot.com/2009/08/how-to-7-how-to-update-your-recovery.html for recovery flashing

Unknown said... Best Blogger TipsBest Blogger Templates

I've been reading up partitioning the sd card. Does it require a rooted phone for it to be of any use?

Tony Le said... Best Blogger TipsBest Blogger Templates

you can install apps to sd without root but other then that you would need root.

force install app to sd by doing below: you would need usb driver and adb knowledge.
cd\
cd AndroidSDK\tools\
adb devices
adb shell
pm setInstallLocation 2

Unknown said... Best Blogger TipsBest Blogger Templates

Thanks but I had already done that. I read about the partitioning and I know a bit about linux swap and what not so I was wondering if it would improve the performance on an unrooted phone.

Also, even after the adb, though the application can be moved to the sd card, it doesn't move it completely. Can that be possibly changed?

Tony Le said... Best Blogger TipsBest Blogger Templates

The performance increase is questionable and depends on how much memory your phone have. Linux swaps is the virtual memory and is only used when youve run out of it, which I doubt you will for newer phones.

It doesn't move completely but moves the larger portion.

Unknown said... Best Blogger TipsBest Blogger Templates

I find the RAM to be less than half in use most of the time so I guess the a swap wouldn't make much difference. Thanks for your help. Just one last question if you don't mind ;)

Supposing I do decide to take the plunge and root my phone (I checked the one click root apps, not compatible with my phone) and then perform this mod, will it move the apps completely to the sd or will there be some remnant part left as is now. Most apps move a lot of the data but some like swype still leave over 3mb left on the phone (The original was 10mb).

enthalpie said... Best Blogger TipsBest Blogger Templates

Please

your are talking about sdcard (internal) but never about external sd card which is onlu usuable with fat32. when we can use external sd card with ext4 partition ?

Tony Le said... Best Blogger TipsBest Blogger Templates

@enthalpie

Its external sdcard only... You wouldn't want to mess around with the internal memory setup anyways, unless if you know what your doing.

Post a Comment

Popular Posts
AndroidSim Mobile App
What are you using?