[Samsung Galaxy Nexus] strumcat:
Re: [kernel] Dual-Boot Support Kernel(Base Leankernel)

twistedumbrella,

i don't think you have to manually create the folders. i only modified the two updater-scripts in the second rom and gapps as instructed, and flashed. the folders were created automagically and everything worked.

seaskyways,

did you have to do anything special to get cm10 working as rom 2? the updater-script has all that extra stuff about saving and restoring the host file, so i hesitated to modify it.

Jijonhyuni,

Great work and thank you! I tried to write a simplified installation guide. If it contains errors please let me know and I will correct them.

...............

Dual-Boot Kernel for Galaxy Nexus (GSM)

Developer: Jijonhyuni

with thanks to: imoseyon (Original LeanKernel)

Description:

Dual-Boot kernel allows you to install a second ROM on your phone, and to choose which ROM to use when you boot.

The process is reversible. You can remove the second ROM and replace Dual-Boot Kernel, leaving your original ROM and data intact and unchanged.

Requirements:

In addition to a Galaxy Nexus (maguro) and Dual-Boot Kernel, this requires ROMs (and Gapps) based on Jellybean 4.2.1 or 4.2.2.

Ubuntu Preview ROM (quantal-preinstalled-armel+maguro.zip) also works.

Installation:

You can use your existing installation as the first ROM, or install any suitable ROM and Gapps normally.

If your existing kernel uses its own ramdisk (eg Franco, AK) it must first be replaced with a normal kernel (eg stock, Trinity, unmodified LeanKernel).

The second ROM and Gapps require some simple editing to prepare them for use, as instructed below.

Steps:

1. Download Dual-Boot Kernel and put it on your phone's sdcard:

http://www.4shared.com/zip/dE6mqokX/lk_gnex_Hyuni_Dual_jb42_v.html?

2. Download a second ROM, unzip it, and edit the file "updater-script" with a text editor:

Open:

/META-INF/com/google/android/updater-script

Delete the line:

format("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.0/by-name/system", "/system");

Change the line:

mount("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.0/by-name/system", "/system");

To:

mount("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.0/by-name/cache", "/system");

Save it. Rezip the ROM and put it on your phone's sdcard.

3. Download a suitable Gapps for your second ROM, unzip it, and edit the file "updater-script" with a text editor:

Open:

/META-INF/com/google/android/updater-script

Change:

run_program("/sbin/busybox", "mount", "/system");

To:

mount("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.0/by-name/cache", "/system");

Save it. Rezip the Gapps and put it on your phone's sdcard.

4. Boot into recovery mode.

WIPE CACHE. (ONLY. Don't wipe anything else.)

Install the second ROM.

Install the second Gapps

Install Dual-Boot Kernel.

Reboot system.

5. Enjoy your dualboot phone:

You will boot into a ROM selection menu. Use the volume-up and volume-down buttons to navigate, and the power button to select.

...

How to remove the second ROM:

1. Boot into your first ROM.

2. Delete the two folders "/data/cache/2nd" and "/data/2nd" with Root Explorer or equivalent.

3. Boot into recovery mode.

4. Wipe cache.

5. (Optional) Install any kernel.

6. Reboot. Everything is back to normal.

...

Dual-Boot Kernel forum thread:

http://xdaforums.com/showthread.php?p=38957481

...

First ROM path info:

system: /system

data: /data

cache: /data/cache/1st

Second ROM path info:

system: /data/cache

data: /data/2nd

cache: /data/cache/2nd

...

Additional download

my_kernel setting

http://www.4shared.com/zip/V6WAbdz9/GnexDual.html?