Tag Archives: sdcard

Android: Partitioning your 16GB card

MAJOR WARNING: The instructions below will wipe your SD-card for good. So make sure that you want to do this. (Follow my backup instructions just in case)

If you are running Cyanogen or a similar firmware which requires 3 partitions (FAT32, EXT3/4 and Swap), then execute the following commands which in short does the following: repartition your SD-card with a FAT32, EXT3 and swap partition and then convert EXT3 to EXT4:

parted /dev/block/mmcblk0
print
rm 1
rm 2 (if you have a 2nd partition)
rm 3 (if you have a 3rd partition)

Then run this for a 16GB SD-card:
mkpartfs primary fat32 0 15416
mkpartfs primary ext2 15416 15916
mkpartfs primary linux-swap 15916 15948

Then run this for a 8GB SD-card:
mkpartfs primary fat32 0 7425
mkpartfs primary ext2 7425 7937
mkpartfs primary linux-swap 7937 7969

Complete the partitioning and convert to EXT4:
upgrade_fs
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p2
e2fsck -fpDC0 /dev/block/mmcblk0p2

The above should be done from the recovery-console (turn off phone and then Home + Power-button). If you use App2SD all your apps will be gone and some of the widgets will fail. The above is the perfect way of starting out fresh. I would recommend doing a Wipe as well as install of the latest firmware afterwards.



VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)

Android: Backup your SD card

Provided that you have rooted your cool Google phone and preferably run a class-6 microSD card, you should once in a while backup your SD-card:

BACKUP:
mount -t vfat /dev/block/mmcblk0p1 /sdcard
mount -t ext3 /dev/block/mmcblk0p2 /system/sd
cd /system/sd
tar cvf /sdcard/ext3.tar *

RESTORE:
mount -t vfat /dev/block/mmcblk0p1 /sdcard
mount -t ext3 /dev/block/mmcblk0p2 /system/sd
cd /system/sd
tar xvpf /sdcard/ext3.tar

VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)

Android: The microSD card

There seems to be so much confusion going on about SD cards, and I thought it would be worthwhile to properly explain the use of SD-cards.

The microSD is a format for removable flash memory cards which are commonly used in cellular phones, but also in handheld GPS devices, portable media players, digital audio players, expandable USB flash memory drives, and for Nintendo DS flashcards, along with digital cameras.

It is the smallest memory card available commercially; at 15 mm × 11 mm × 1 mm (about the size of a fingernail). A point of confusion can come from the difference in the microSD and the newer microSDHC format. The SD and SDHC share a similar form factor, but not all devices are compatible with the newer high capacity format.

When you shop for a new microSD-card, you need to be aware, that those cards come in different speed-ratings. A closer look on the packaging will reveal: Class 2 / 4 / 6 as well as 133x / 66x.

The class defines the minimum write speed for a completely empty SD card. That means if you were writing to a new SD card that has never had any data on it how fast would it write.

Class 2 = 2 megabytes/second
Class 4 = 4 megabytes/second
Class 6 = 6 megabytes/second

So in short Class 6 is what you should be buying for fast write speeds. On top of this there is also the speed rating of the card itself. This is based on how fast the microSD card can READ the data off the card. You will see this usually described as 32x, or 66x, or 133x, or something with an x and the end.

These measurements are based on the original CD-ROM drives which could write 150kb/second. So 32x means 32 multiplied by 150kb/second or 4.8MB/second. The following table (sourced from Wikipedia) provides you the detail:

I strongly recommend the Transcend, 16GB, class 6 card which I have been using for a few weeks in my HTC (G1) Dream.

VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)