Skip to content

Commit 084cab2

Browse files
committed
Updates to script and readme
1 parent 6a3e383 commit 084cab2

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ To boot this in the emulator, build your recoveryimage. With the Android emulato
1414

1515
After the first boot, wait for ADB to start up, then: adb shell /sbin/create_partitions.sh
1616

17-
This script will partition the sdcard with a boot, recovery, system, cache, data, and removable sdcard partition. It's designed to work with a 1500MiB sdcard. If you want a different sdcard size then you will need to modify the script in the cm_folder/device/emulator/twrp/recovery/root/sbin/create_partitions.sh location to suit your needs. The script will also copy the existing system files from the MTD system partition to the new emmc-based partition.
17+
This script will partition the sdcard with a boot, recovery, system, cache, data, and removable sdcard partition. It's designed to work with a 1500MiB sdcard. If you want a different sdcard size then you will need to modify the script in the cm_folder/device/emulator/twrp/recovery/root/sbin/create_partitions.sh location to suit your needs. The script will also mount the old MTD system device to /system so that you can make a backup of the system image to restore to your new mmc-based system.
1818

1919
If you want to make the emulator boot up using the emmc partitions, you will need to modify the ramdisk.img. Locate the ramdisk.img in your android-sdk/system-images/android##/armeabi-v7a/ folder. To unpack it:
2020

recovery/root/sbin/create_partitions.sh

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@
44
# This partitioning scheme is based on a 1500MiB
55
# sdcard.
66

7-
umount /sdcard
7+
umount /external_sd
88

99
echo "Creating partition table..."
1010
# Wipe all partitions and give you a gpt partition table
1111
parted -s /dev/block/mmcblk0 mklabel gpt
1212
# 8MB boot partition
13-
parted /dev/block/mmcblk0 mkpart boot ext2 0 8MB
13+
parted -s /dev/block/mmcblk0 mkpart boot ext2 0 8MB
1414
# 8MB recovery partition
15-
parted /dev/block/mmcblk0 mkpart recovery ext2 8MB 16MB
16-
# 200MB system partition
17-
parted /dev/block/mmcblk0 mkpart system ext4 16MB 216MB
15+
parted -s /dev/block/mmcblk0 mkpart recovery ext2 8MB 16MB
16+
# 250MB system partition
17+
parted -s /dev/block/mmcblk0 mkpart system ext4 16MB 266MB
1818
# 64MB cache partition
19-
parted /dev/block/mmcblk0 mkpart cache ext4 216MB 280MB
20-
# 720MB data partition
21-
parted /dev/block/mmcblk0 mkpart data ext4 280MB 1000MB
19+
parted -s /dev/block/mmcblk0 mkpart cache ext4 266MB 330MB
20+
# 670MB data partition
21+
parted -s /dev/block/mmcblk0 mkpart data ext4 330MB 1000MB
2222
# 573MB external_sd partition
23-
parted /dev/block/mmcblk0 mkpart external_sd ext4 1000MB 1573MB
23+
parted -s /dev/block/mmcblk0 mkpart external_sd ext4 1000MB 1573MB
2424

2525
echo "Formatting system, data, and cache..."
2626
# Format system, cache, and data as ext4
@@ -33,10 +33,12 @@ echo "Formatting external_sd..."
3333
mkdosfs /dev/block/mmcblk0p6
3434

3535
echo "Mounting new system and sdcard and make a copy of system..."
36-
mount -t vfat /dev/block/mmcblk0p6 /sdcard
37-
mkdir /systemmtd
38-
mount -t ext4 /dev/block/mmcblk0p3 /system
39-
mount -t yaffs2 /dev/block/mtdblock0 /systemmtd
40-
cd /system2 && cp -R * /system
41-
echo "DONE!"
36+
mount -t vfat /dev/block/mmcblk0p6 /external_sd
37+
mount -t yaffs2 /dev/block/mtdblock0 /system
38+
echo " *** IMPORTANT ***"
39+
echo "To properly copy your system from the old MTD device to the new mmc"
40+
echo "device you need to make a backup of system right now. Currently the"
41+
echo "MTD device is mounted to /system so you can back it up right now."
42+
echo "After making the backup, unmount system on the mount page, then"
43+
echo "restore the backup using the restore page."
4244

0 commit comments

Comments
 (0)