Remove All Ads from XDA

[DualBoot][Tools][Guide]Essentials v2.1 for Berni's method

1,314 posts
Thanks Meter: 1,025
By dreccon, Senior Member on 3rd March 2013, 01:43 PM
Post Reply Email Thread
As of 28/12/2013, I no longer have this phone. My threads will stay open for all who want to assist others. I've had a great time being a member of the O3D community, so thank you all!
For questions, requests or any other remarks, please don't send me PM, I will not answer. Instead, please post properly in the thread, so that anybody can read and benefit or even assist.

02/07/2013:New version 2.1 (fixed compatibility issues with Gingerbread present in v2.0). Switch_ROM in v2 is now a single script. All other scripts integrated into a "Recovery" equivalent. Fixed bug in wipes. Renamed "bin" folder to "img" (seemed more appropriate). Old v1.0 users must delete their existing DualBoot folder. Don't forget to backup your boot1.img and boot2.img from the old "bin" folder.

Our top developer, Berni987654321, developed a method to dual-boot our phones (follow the link to his page and press his "Thanks" button, he deserves it)! Thanks to him we can preserve our stock ROM with full 3D support and at the same time try out modern Jellybean ROMs like CM10, PACman, perhaps even KitKat some day!

However, dual booters were facing two problems:
1. Switching ROMs was cumbersome and time consuming since it required to reboot into recovery, flash a kernel and reboot again to the other ROM.
2. Recovery only backs up and restores the primary ROM. If someone wanted to try out different secondary ROMs, he would have to set them up from scratch every time.
3. Factory Reset and wipes don't work for secondary ROM in Recovery
This is where I've come in. I have written scripts that fill in these gaps.

Download and unzip the file attached and copy the DualBoot folder anywhere in your phone. It is necessary that all files are kept inside the folder and that the path (all directory names) to this folder contains no spaces.

Usage instructions are on the second post.

In order to keep SMS and Call Logs synchronized between the two ROMs, I use SMS Backup +. Naturally, it needs to be installed in both, primary and secondary ROMs.

You can't install just any kernel for your secondary ROM. You can only use one from Berni's page. Still, you can overclock using CM10 modules by Iodak.

Ilie321 and Defcomg have made a working FM radio app for ICS and JB. Attached at the end of this post there is a modified flashable zip that installs the radio straight into a secondary CM10 ROM. Use it after every Nightly upgrade.

For a long time I've wanted to integrate a "Fix Permissions" option into the Dual Boot Tools script but never found the time. Here you can find a wonderful script and run it with Script Manager after your secondary ROM has booted.

!! 3D support for CM10 !!
We may not be able to view in 3D, but we can shoot!
Defcomg has successfully ported ArcCamera to CM10 / 10.1 based ROMs, fixing at the same time orientation problems for all 3rd party cameras (e.g. Instagram). Attached you will find which is modified to flash directly to the secondary ROM. You need to flash it after every Nightly upgrade.
Hit Defcomg's "Thanks" button (Original thread)!

Stock ICS v30a Kernel:
If you have already updated your primary ROM to P920 ICS v28b or v30a, you will need the attached "". Download and copy it to your phone. Follow instructions in 2nd post.
IMPORTANT: Official P920 ICS has locked bootloaders, so before you can boot into CM10 you also have to flash Wkpark's v1.25a bootloaders. OS_Hacking's Tool is an easy way to do that.

New CM10.1 Kernel
With the old CM10.1 Kernel, Bluetooth doesn't work. Attached you will find a new BT-fixed 10.1 kernel modified for Dual-Boot!

ADB driver not installing when in recovery!
It has been reported that after installing ICS on the phone, the computer cannot install the ADB driver when phone is in recovery mode, although ADB works normally when in USB Debugging mode.
1. Open Device Manager and connect phone in recovery.
2. Right-click on LGE COSMO USB Device (in Other Devices) and select "Update driver software"
3. Select "Browse my computer for driver software"
4. Select "Let me pick from a list..."
5. Select "ADB Interface"
6. Select "Android Platform Sooner Single ADB Interface" and hit "Next"
7. Say "Yes" to the warning and wait for the driver to install
8. You may have to reboot the computer
The Following 32 Users Say Thank You to dreccon For This Useful Post: [ View ] Gift dreccon Ad-Free
3rd March 2013, 01:45 PM |#2  
Instructions on setting up the ROMs:

In this guide, I will concentrate on how to setup your EXTERNAL SD, because the latest CM10 and CM10.1 kernels modified by Berni expect to find partitions there!

First of all, you need to have ADB installed on your PC and CWM (or other recovery) on your phone. You also need to have unlocked bootloader if you are running ICS. There are other threads that explain how to do all that.

2. Download the primary and secondary ROMs of your choice
3. Do the necessary modifications to the secondary ROM as instructed by Berni (Do NOT use Windows Notepad for this. It corrupts the script. Download and use Notepad++ instead).
4. Download the kernels that match your ROMs (as described in Berni's guide).
5. Copy all to your INTERNAL SD (as I said, the external sd will be erased).
6. Boot into recovery, connect to PC via ADB and prepare partitions as instructed by Berni (this is when your card loses all data).
... Detailed Setup Instructions:
Some people reported trouble when trying to partition external SD cards larger than 8GB. So, I rewrote Berni's guide and added a little trick to help.
Follow this guide to partition your EXTERNAL SD card:
1. Turn off your phone. Keep Vol- 3D and Power keys until the LG logo shows. Release all keys. Wait a few sec.
2. You are now in Recovery. Connect your phone to PC with a USB cable, press Windows Start Menu, type:


and hit enter.
3. In the new window that has opened type:

adb shell
cd /dev/block
parted mmcblk1

For a 32 GB card, you'll get something like this:
Model: SD 00000 (sd/mmc)
Disk /dev/block/mmcblk1: 31.4GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start    End       Size      Type      File system   Flags
 1      1049kB   31.4GB    31.4GB    primary   fat32         lba
Write down the Start and End numbers
For cards larger than 8GB, the End Number is shown in GB. Multiply it by 1000 to cnvert it to MB (31400MB in our example). Make sure you use values in MB and NOT in GB in the commands below.
4. Type

rm 1
mkpartfs primary fat32 1049kB 29400MB ///!!! Instead of 1049kB, type the Start number you wrote down. Instead of 29400, type your End number minus 2000MB !!!
mkpartfs primary ext2 29400MB 30100MB ///!!! Instead of 29400, type the end of your 1st partition. Instead of 30100, type the end of 1st partition plus 700MB !!!
mkpartfs primary ext2 30100MB 31300MB ///!!! Instead of 30100, type the end of your 2nd partition. Instead of 31300, type the end of 2nd partition plus 1200MB !!!

At this point, because not all cards have exactly the same capacity, you need to know exactly how much space you have left. Type:

print free

You get somehing like:
Model: SD 00000 (sd/mmc)
Disk /dev/block/mmcblk1: 31.4GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start    End       Size      Type       File system  Flags
        32.3kB   1049kB    1016kB    Free Space
 1      1049kB   29.4GB    29.4GB    primary    fat32        lba
 2      29.4GB   30.1GB    700MB     primary    ext2
 3      30.1GB   31.3GB    1200MB    primary    ext2
        31.3GB   31.4GB    87.7MB    Free Space
Note the size of your last free space (87.7MB here). Anything larger than 67.1MB will be sufficient.

mkpartfs primary ext2 31300MB 31387.7MB ///!!! 31300MB is the end of 3rd partition. 31387.7MB is the end of 3rd partition plus the remaining free space !!!

this time you get:
Model: SD 00000 (sd/mmc)
Disk /dev/block/mmcblk1: 31.4GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start    End       Size      Type       File system  Flags
 1      1049kB   29.4GB    29.4GB    primary    fat32        lba
 2      29.4GB   30.1GB    700MB     primary    ext2
 3      30.1GB   31.3GB    1200MB    primary    ext2
 4      31.3GB   31.4GB    90MB      primary    ext2
5. Turn off your phone and boot again into recovery.

adb shell
cd /dev/block
mke2fs -T ext3 mmcblk1p2
mke2fs -T ext3 mmcblk1p3
mke2fs -T ext3 mmcblk1p4

Your new partitions are now ready!

7. Flash the ROMs (you may want to keep your original ROM and flash only the secondary one)
8. Flash your primary kernel and reboot to system.

Rebooting will now load your primary ROM.

Partitioning the easy way!
Instead of step 6, you may put your microSD card to your PC using a Card-Reader. Then you may use MiniTool, EaseUS or other freeware partitioning tool to create your partitions. Shrink your main partition and make three new PRIMARY EXT3 partitions AFTER your main one. The 1st (system2) must be 700MB. The second (data2) at least 1GB (you can make it larger if you like to install lots of apps)! The 3rd one (cache2) should be around 100MB. So, do the math and make sure you have shrunk your fat32 partition according to your needs first. After you're done, eject your card from the PC, put it in your phone and continue to step 7.
Important: If for your own reasons you need to create more than the 4 primary partitions mentioned above, then you must convert your card to GPT (GNU Partitioning Table). Minitool has that option. This is because the default MBR (Master Boot Record) partitioning does not support more than 4 primary partitions on the same medium. This is also how the internal memory of our phones is divided into a large number of partitions (P920: 15, SU760: 17) and they are all primary.

New: Easiest partitioning ever!
A new app, AParted, has appeared on PlayStore. You can use it to create both MBR type (up to 4 primary) and GPT type (up to 128 primary) partitions.

Instructions on ROM switching:

1. Go to Play Store and install SManager
2. Download the attachment from 1st post, unzip it and place the DualBoot folder on your phone (anywhere you like)
3. Unzip your primary kernel, place boot.img into your DualBoot/img folder and rename it to boot1.img
4. Do the same for your secondary kernel, but rename it to boot2.img
5. Run SManager, browse to your DualBoot folder and select "Switch_ROM".
6. Mark favourite and su options and run the script.

Your phone will now reboot to your secondary ROM. Use the same script to go back to your primary ROM.

7 (optional). SManager has a homescreen widget system. It lets you add buttons in your homescreens that will directly run the linked script (it has to be put in favourites first).

Alternatively, you may download Flashify from Play Store and flash your desired Kernel.img from there. The advantage is that you may keep and test different kernels for the same ROM without having to rename them or put them in the IMG folder (less initial setup). The disadvantage is that it requires more clicks to switch every time.

Instructions on Backup/Recovery/Wipe:
These scripts work for EXTERNAL SD ROM installations!

1. For full functionality, you must be on PRIMARY ROM (you can't expect to wipe or restore a running system)!
2. Make sure you have at least 2GB free space on your external SD if you want to make a backup.
3. Inside your DualBoot folder there is a script: "Recovery_Tools". Run the script with SManager (make sure you have the SU and Wlck buttons pressed). For Wlck to work, you must first enable it from SManager settings.
4. You will now enter the Dual Boot Recovery Tools. There are several options. Type the number you want and press enter. All functions are pretty self-explanatory.

It's very important to know that every backup overwrites the previous! The backup is kept in /sdcard/_ExternalSD/ROMs/rom2_backup. If you want to keep more than one backups, you can always rename the folder, but remember to change the name back if you want to restore your ROM.

The "Advanced" option takes you to the "Wipes" menu. For a Factory Reset, you must wipe Data2 and Cache2. For a Full Format, in order to clean-install a new ROM, you may also wipe System2.

Remove Dual Boot - Regain card space:
This is pretty simple:

1. Backup the contents of your SD card.
2. Boot to your primary ROM
3. Go to System Settings/Storage and select Erase SD card.

Case scenario / Easy migration to dual boot:

Say you have already installed CM10 in a single boot setup but you miss the 3D features and you want to restore your good old gingerbread backup or flash the new P920 ICS, but keep your CM10 setup as a secondary ROM in dual boot.
1. Make sure you have at least 4GB free in your external SD.
2. While still in CM10, use SManager to browse to your DualBoot folder, run the "Recovery_Tools" script and select option to "Backup/Migrate ROM1".
(Go fry some bananas cause this will take around 6-7min!)
3. Now backup your external SD to your PC and reboot to recovery.
4. Follow the guide to partition your external SD.
5. Restore your Gingerbread or P920-ICS backup or flash your favorite ROM and reboot into it.
6. Restore your external SD backup from PC.
7. Run the "Recovery_Tools" again and use the "Restore ROM2" option.
(Eat your fried bananas cause this will take another 6-7 min!)

Your original CM10 installation is now relocated to external SD as your secondary ROM. Use my instructions on ROM switching to boot into it.
The Following 14 Users Say Thank You to dreccon For This Useful Post: [ View ] Gift dreccon Ad-Free
3rd March 2013, 03:10 PM |#3  
jocazmaj's Avatar
Senior Member
Flag Nis
Thanks Meter: 84
Wow man, this is awesome!
I'm bussy right now but I'll try it out as soon as i can.
Thanx thanx thanx thanx......
The Following User Says Thank You to jocazmaj For This Useful Post: [ View ] Gift jocazmaj Ad-Free
3rd March 2013, 06:52 PM |#4  
Evil Slayer's Avatar
Senior Member
Flag Amman
Thanks Meter: 47
this is awesome!!thank you so much for of the reasons i don't use dual booting is that the switching process is not efficient
and now its much thank you again
The Following User Says Thank You to Evil Slayer For This Useful Post: [ View ] Gift Evil Slayer Ad-Free
4th March 2013, 07:34 PM |#5  
Flag Wellingborough
Thanks Meter: 61
Re: [DualBoot][Tools]Essential tools for Berni's method
Great job mate, you just made my life a lot easyer.

Sent from my LG-P920 using xda app-developers app
The Following User Says Thank You to CarDGee For This Useful Post: [ View ] Gift CarDGee Ad-Free
9th March 2013, 12:16 PM |#6  
Re: [DualBoot][Tools][Guide]Essentials for Berni's method
Some people experienced trouble partitioning external cards larger than 8GB. Specifically, the 4th partition (cache) wouldn't fit. So, I rewrote Berni's guide on partitioning, adding one extra trick to do the job without problems!

Sent from my 3D phone
10th March 2013, 08:22 PM |#7  
Re: [DualBoot][Tools][Guide]Essentials for Berni's method
Added a way to migrate your single boot CM10 installation to dual boot without losing your settings!

Sent from my 3D phone
10th March 2013, 10:50 PM |#8  
Senior Member
Flag Monor
Thanks Meter: 23
Originally Posted by dreccon

Added a way to migrate your single boot CM10 installation to dual boot without losing your settings!

Sent from my 3D phone

Thank you. You are awesome
11th March 2013, 09:46 AM |#9  
brajesh.sharma87's Avatar
Senior Member
Flag Kolkata
Thanks Meter: 2,831
Very good bro, just find a way to put script shortcut in powermenu, that would be real cool. I think it can be done by editing android.policy.jar
11th March 2013, 11:34 PM |#10  
Re: [DualBoot][Tools][Guide]Essentials for Berni's method
Added support for the new P920 ICS v28b.

Sent from my 3D phone
The Following 2 Users Say Thank You to dreccon For This Useful Post: [ View ] Gift dreccon Ad-Free
25th March 2013, 12:42 AM |#11  
It just occured to me that there is yet another way to easily switch ROMs without using my scripts! Whoever is interested may try it.
This method is ideal for those who use Xbsall's prerooted v28b. That rom comes with milaq' 2nd init recovery which lives in the system partition. The recovery partition remains with stock recovery which is practically useless. So, 1st of all make sure you have wkpark's v1.25a bootloader (a prerequisite to boot into both ICS and CM10). Then flash the secondary boot.img into the recovery partition. This way every "normal reboot" will take you to your primary ROM and every "reboot to recovery" (or pressing vol-down at bootup) will take you to the secondary ROM. To go to milaq's recovery you would press vol-down at normal bootup while keys are flashing or run the dedicated app from android. So, there you have it: a fully functional dual-boot android. Ofcourse, this can apply to any ROM that can be fitted with 2nd init recovery.

Any questions?
The Following User Says Thank You to dreccon For This Useful Post: [ View ] Gift dreccon Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes