I just couldn’t resist… I dual-booted my wife’s new G-Note 8013 with…
Description:
Boot to CWM and Nandroid backup ROM1 (internal memory).
Boot to Ubuntu and run GParted to shrink my SD card's FAT32 partition and to create three new ext3 partitions for ROM2’s /system, /cache and /data filesystems.
In hindsight, I could have made the partitions smaller, but I wanted to make sure that ROM2 would fit.
On G-Note’s ROM1, I go to Settings > Developer options, slide switch to ON and check “USB debugging”. Then I enter “adb shell mount” from an Android-SDK-powered computer to view ROM1’s mounted filesystems (can also do this from G-Note via terminal emulator).
Note carefully the device names (/dev/block/mmcblk0p{n}) for /system, /cache and /data.
Also, when I boot to CWM and enter “edify”, it shows me CWM’S filesystem table. Note the device on which /boot resides.
Now I select ROM2 to be: Collective Edition v6 By BaDaB!ng505.zip
I unzip ROM2 with 7-Zip and open: \META-INF\com\google\android\updater-script.
Then I modify two lines to redirect the /system format and mount from /dev/block/mmcblk0p9 to /dev/block/mmcblk1p2:
I also comment out the boot flash logic in updater-script (see below) to protect against soft-brick. That is because I have not yet modified ROM2’s boot image to recognize the three new SD ext3 partitions for /system, /cache and /data. Thus when I flash ROM2, my G-Note will still boot to ROM1 -- though now the SD card partition: /dev/block/mmcblk1p2 is populated with the Collective ROM system files.
I unzip the directory contents to a new ROM zip file denoted “SD”: Collective Edition v6 By BaDaB!ng505-SD.zip
Next, I extract boot.img from bing/core/8013 and modify contents of the /ramdisk directory; specifically to replace:
BEFORE
http://www.mediafire.com/view/?6to8al6lrl80dje
AFTER
http://www.mediafire.com/view/?elv981g58f0q2b6
Then I repack the (modified) boot image and flash it with the Unix dd command from ADB:
Then reboot and voila, ROM2 boots off SD.
Here’s the adb shell mount dump with ROM2 running:
To reboot to ROM1, I pull the boot.img from my CWM Nandroid backup (one-shot) and run the dd command from ADB:
Of course this method is somewhat cumbersome, and G-Note doesn’t have fastboot . So I developed a “boot-switcher” toolset that can be launched on the fly from either ROM using Terminal Emulator:
A good script manager would be even better since it would allow us to customize and store shell commands. But I have not yet found a script manager that is compatible with G-Note. I imagine someone has already ported a dual-boot spinner app from the SGN7000 or similar device.
And of course you can run a virtual Linux box underneath your ROM: https://play.google.com/store/apps/details?id=com.zpwebsites.linuxonandroid&hl=en. It's an excellent app which has been around for a long time.
Blessings.
Credits:BaDaB!ng505 (Collective Edition v6 By BaDaB!ng505.zip)
- Stock ROM: N8013UEUCMA3
- ClockWorkMod Recovery 6.0.3.1
- Ubuntu GParted (I did everything else from an Android-SDK-powered Windows machine)
- Collective Edition v6 By BaDaB!ng505
Description:
Boot to CWM and Nandroid backup ROM1 (internal memory).
Boot to Ubuntu and run GParted to shrink my SD card's FAT32 partition and to create three new ext3 partitions for ROM2’s /system, /cache and /data filesystems.
In hindsight, I could have made the partitions smaller, but I wanted to make sure that ROM2 would fit.
On G-Note’s ROM1, I go to Settings > Developer options, slide switch to ON and check “USB debugging”. Then I enter “adb shell mount” from an Android-SDK-powered computer to view ROM1’s mounted filesystems (can also do this from G-Note via terminal emulator).
C:\Program Files\Android\android-sdk\platform-tools>adb shell mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p3 /efs ext4 rw,nosuid,nodev,noatime,barrier=1,journal_async_commit,data=ordered 0 0
/dev/block/mmcblk0p9 /system ext4 ro,noatime,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p8 /cache ext4 rw,nosuid,nodev,noatime,errors=panic,barrier=1,journal_async_commit,data=ordered 0 0
/dev/block/mmcblk0p10 /preload ext4 ro,nosuid,nodev,noatime,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p12 /data ext4 rw,nosuid,nodev,noatime,barrier=1,journal_async_commit,data=ordered,noauto_da_alloc,discard 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0
/dev/fuse /storage/sdcard0 fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/block/vold/179:17 /storage/extSdCard vfat rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1000,gid=1023,fmask=0002,dmask=0002,all
ow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
Note carefully the device names (/dev/block/mmcblk0p{n}) for /system, /cache and /data.
Also, when I boot to CWM and enter “edify”, it shows me CWM’S filesystem table. Note the device on which /boot resides.
C:\Program Files\Android\android-sdk\platform-tools>adb shell
~ # edify
recovery filesystem table
=========================
0 /tmp ramdisk (null) (null) 0
1 /efs ext4 /dev/block/mmcblk0p3 (null) 0
2 /boot emmc /dev/block/mmcblk0p5 (null) 0
3 /recovery emmc /dev/block/mmcblk0p6 (null) 0
4 /cache ext4 /dev/block/mmcblk0p8 (null) 0
5 /system ext4 /dev/block/mmcblk0p9 (null) 0
6 /data ext4 /dev/block/mmcblk0p12 (null) -16384
7 /preload ext4 /dev/block/mmcblk0p10 (null) 0
8 /modem emmc /dev/block/mmcblk0p7 (null) 0
9 /sdcard datamedia /dev/null (null) 0
10 /external_sd vfat /dev/block/mmcblk1p1 (null) 0
Now I select ROM2 to be: Collective Edition v6 By BaDaB!ng505.zip
I unzip ROM2 with 7-Zip and open: \META-INF\com\google\android\updater-script.
Then I modify two lines to redirect the /system format and mount from /dev/block/mmcblk0p9 to /dev/block/mmcblk1p2:
if file_getprop("/tmp/aroma-data/option.prop","selected") == "1" then
ui_print("Collective Edition for Samsung Galaxy Note 10.1...");
run_program("/sbin/mount", "/cache");
unmount("/system");
delete("/data/local");
package_extract_dir("data", "/data");
set_perm(2000, 2000, 0771, "/data/local");
format("ext4", "EMMC", "/dev/block/mmcblk1p2", "0");
mount("ext4", "EMMC", "/dev/block/mmcblk1p2", "/system");
package_extract_dir("theme/vrtheme", "/sdcard/vrtheme");
set_perm(0, 0, 0755, "/sdcard/vrtheme/installtheme.sh");
set_perm(0, 0, 0755, "/sdcard/vrtheme/zip");
set_perm(0, 0, 0755, "/sdcard/vrtheme/cleanup.sh");
set_perm(0, 0, 0755, "/sdcard/vrtheme/zipalign");
delete_recursive("/cache");
delete_recursive("/data/dalvik-cache");
show_progress(0.6,1380);
I also comment out the boot flash logic in updater-script (see below) to protect against soft-brick. That is because I have not yet modified ROM2’s boot image to recognize the three new SD ext3 partitions for /system, /cache and /data. Thus when I flash ROM2, my G-Note will still boot to ROM1 -- though now the SD card partition: /dev/block/mmcblk1p2 is populated with the Collective ROM system files.
##########################################################################################
# Collective Editon Aroma Script #
# Boot Option #
##########################################################################################
##### VAriant N8000 ###
#if file_getprop("/tmp/aroma-data/variant.prop","selected.0") == "1" then
#ui_print("Flashing Boot img for GN-8000 ...");
#assert(package_extract_file("bing/core/8000/boot.img", "/tmp/boot.img"),
#write_raw_image("/tmp/boot.img", "/dev/block/mmcblk0p5"),
#delete("/tmp/boot.img"));
#ui_print("Flashing modem ...");
#package_extract_file("bing/core/8000/flash_image", "/tmp/flash_image");
#set_perm(0, 0, 0777, "/tmp/flash_image");
#assert(package_extract_file("bing/core/8000/modem.bin", "/tmp/modem.bin"),
#run_program("/tmp/flash_image", "/dev/block/mmcblk0p7", "/tmp/modem.bin"),
#delete("/tmp/modem.bin"));
#delete("/tmp/flash_image");
#endif;
##### VAriant N8010 ###
#if file_getprop("/tmp/aroma-data/variant.prop","selected.0") == "2" then
#ui_print("Flashing boot img for GN-8010 ...");
#assert(package_extract_file("bing/core/8010/boot.img", "/tmp/boot.img"),
#write_raw_image("/tmp/boot.img", "/dev/block/mmcblk0p5"),
#delete("/tmp/boot.img"));
#endif;
##### VAriant N8013 ###
#if file_getprop("/tmp/aroma-data/variant.prop","selected.0") == "3" then
#ui_print("Flashing boot img for GN-8013 ...");
#assert(package_extract_file("bing/core/8013/boot.img", "/tmp/boot.img"),
#write_raw_image("/tmp/boot.img", "/dev/block/mmcblk0p5"),
#delete("/tmp/boot.img"));
#endif;
I unzip the directory contents to a new ROM zip file denoted “SD”: Collective Edition v6 By BaDaB!ng505-SD.zip
Next, I extract boot.img from bing/core/8013 and modify contents of the /ramdisk directory; specifically to replace:
/dev/block/mmcblk0p9 with /dev/block/mmcblk1p2 (for /system)
/dev/block/mmcblk0p8 with /dev/block/mmcblk1p3 (for /cache)
/dev/block/mmcblk0p12 with /dev/block/mmcblk1p4 (for /data)
BEFORE
http://www.mediafire.com/view/?6to8al6lrl80dje
AFTER
http://www.mediafire.com/view/?elv981g58f0q2b6
Then I repack the (modified) boot image and flash it with the Unix dd command from ADB:
Then reboot and voila, ROM2 boots off SD.
Here’s the adb shell mount dump with ROM2 running:
C:\Program Files\Android\android-sdk\platform-tools>adb shell mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p3 /efs ext4 rw,nosuid,nodev,noatime,barrier=1,journal_async_commit,data=ordered 0 0
/dev/block/mmcblk1p2 /system ext4 ro,noatime,barrier=1,data=ordered 0 0
/dev/block/mmcblk1p3 /cache ext4 rw,nosuid,nodev,noatime,errors=panic,barrier=1,journal_async_commit,data=ordered 0 0
/dev/block/mmcblk0p10 /preload ext4 ro,nosuid,nodev,noatime,barrier=1,data=ordered 0 0
/dev/block/mmcblk1p4 /data ext4 rw,nosuid,nodev,noatime,errors=panic,barrier=1,journal_async_commit,data=ordered,noauto_da_alloc,discard 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0
/dev/fuse /storage/sdcard0 fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/block/dm-0 /mnt/asec/com.speedsoftware.rootexplorer-1 ext4 ro,dirsync,nosuid,nodev,noatime,barrier=1 0 0
/dev/block/vold/179:17 /storage/extSdCard vfat rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1000,gid=1023,fmask=0002,dmask=0002,all
ow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
To reboot to ROM1, I pull the boot.img from my CWM Nandroid backup (one-shot) and run the dd command from ADB:
Of course this method is somewhat cumbersome, and G-Note doesn’t have fastboot . So I developed a “boot-switcher” toolset that can be launched on the fly from either ROM using Terminal Emulator:
A good script manager would be even better since it would allow us to customize and store shell commands. But I have not yet found a script manager that is compatible with G-Note. I imagine someone has already ported a dual-boot spinner app from the SGN7000 or similar device.
And of course you can run a virtual Linux box underneath your ROM: https://play.google.com/store/apps/details?id=com.zpwebsites.linuxonandroid&hl=en. It's an excellent app which has been around for a long time.
Blessings.
Credits:BaDaB!ng505 (Collective Edition v6 By BaDaB!ng505.zip)
Last edited: