[LG Optimus 2x] bihariel:
DUAL BOOT for LG O2X v2

​

This is a guide to get Real Dual boot on O2X, please be careful because this may brick your phone if you don´t know what you are doing. The method is based on a method i found on a Chinese forum but i moded it to have more space on system and data partition and fixed some bugs i found on it.

V2 Changelog:

Increased System partition size, now we have around 370 MB for each ROM, so we don´t need to reduce the size of the ROMs

No need to download ROM for nvflash by Homero, instead i made a NVFlash Partition resizer with a smaller size ( 14 MB)

Better fix for Internal SD corruption

Included Touch CWM Recovery ( important for Internal SD)

Reduced several steps in this guide to make the process shorter and easier

To update to V2 from V1, make a nand backup and backup your internalSD, then do the resizing process and use the new DUAL-ROM... process.

What is this usefull for?

Devs: you can have one ROM configured and ready for use in one partition and a second partition to test your ROMs without touching your daily ROM, so you won´t need to wipe or backup any thing.

Users: you can have a stable ROM, lets say a stock ROM with everything working and configured and you can have a second partition to test ROMs ( for example a new miui v4 or a CM10 beta..) so you won´t need to do backups and wipes.

How Dual boot works?

There are three important file:

Dual-Enabler.zip: this file enables Dual boot by splitting system partition into two.

Dual-ROM-1-to-XX.zip: this file have to be flashed after flashing ROM 1, after flashing it and boot the phone, you will find an app called system changer, by launching this app and selecting change, the phone will reboot and start the ROM 2.

Dual-ROM-2-to-XX.zip: this file have to be flashed after flashing ROM 2, after flashing it and boot the phone, you will find an app called system changer, by launching this app and selecting change, the phone will reboot and start the ROM 1.

Note: It may look long and complex but when you understand the process it is very easy.
​

Installation

Video tutorial that shows how to install and how it works, please first read the steps below to understand the process

The video is made by Ajsh big thanks to him

Click here if you are not able to watch the video

[YOUTUBE]9Wn8GE1Fq0Y[/YOUTUBE]

​

--> Resizing partitions:

First we need to resize the system partition to have enough space for any ROM and more space in data partition ( only can have 2GB on data due to CWM limitation, so we have 2GB for two ROMs , data partition won´t be split, that is to say both roms will save their data in the same partition ). This will reduce your internal SD available space.
​

Before continue, it is recommended to have an external SD just in case( the size does not mind).
​

ATTENTION: The resize operation will format all memory, including the Internal SD, so backup your Internal SD. The external SD is not affected.​

Download the NVFlash_Partition-resizer.zip - 14.23 MB and extract it with winrar or similar, it includes the APX driver (folder driver).

Download Dual boot O2x - v2.zip - 5.31 MB and unzip it to any folder

Power off and remove the battery of your phone.

While holding volume up and down, connect the USB cable to the device - screen will stay black but Windows will add a new 'APX' device, go to Control panel on your PC->System-> Devices manager you will see a device with yellow exclamation, right click->update driver->search in this system then browse to ..\NVFlash_Partition-resizer\Drivers which is the folder you extracted in step 1, now click next and it will install the device Nvidia boot.....

Now go the the folder NVFlash_Partition-resizer and click on flash.bat and wait until it finish the process.

Now unplug the USB cable, put the battery back.

Power on the phone and by pressing power button + vol down you will enter the recovery

Go to mounts and storage -> mount USB storage, your PC will ask you to format the InternalSD, so select yes.

Let the phone on this state and continue reading....

--> Preparing the ROMs:

We need the two roms you want to use, lets call them ROM1 and ROM2 in this guide.
​

Open the ROM1 with winrar o similar and drag the boot.img from the zip to a folder and rename it to boot1.img , then open Dual-ROM-2-to-XX.zip and add the boot1.img to \system\boot, overwrite the existing one.

Open the ROM2 with winrar o similar and drag the boot.img from the zip to a folder and rename it to boot2.img , then open Dual-ROM-1-to-XX.zip and add the boot2.img to \system\boot, overwrite the existing one.

Now return to your phone which is on recovery mode, go to mount and storage and select mount usb storage.

Now copy ROM1, ROM2, Dual-Enabler.zip, Dual-ROM-1-to-XX.zip, and Dual-ROM-2-to-XX.zip to your SD

Flash Dual-Enabler.zip, the phone will reboot, so when you see black screen, quickly press and hold Power button + vol down to enter recovery again, if the phone doesn't go to recovery, remove the battery, plug it again and enter recovery.

Make a full wipe to avoid boot-loops.

Now flash ROM1 and without rebooting flash Dual-ROM-1-to-XX.zip and reboot.

When the phone completely boots, you will find an app called SystemChanger, launch it and click Switching, i will asks you for root rights, click yes, the phone will reboot so quickly press and hold Power button + vol down to enter recovery, if the phone doesn't go to recovery, remove the battery, plug it again and enter recovery.

Now flash ROM2 and without rebooting flash Dual-ROM-2-to-XX.zip and reboot.

And that is all, if you want to switch to ROM1, as before, run SystemChanger and click Switching.

Note: Only if the internal SD is not available or still corrupt when you finish the process, you can fix it by doing the following: flash any stock Gb ROM and when it completely booted, you will have the option to format the InternalSD.

​

Tips and advices:

What ROMs can i use?

You can use any combination of ROMs for dual booting ( CM roms, MIUI roms, non wipe stock ROMs...), the only ROMs you should not use are Auto-wipe ROMs because they will delete your data partition and with it ROM1 and ROM2 save files, of course if you are an advanced user, you can open the wipe rom and modify the updater-script to remove the auto wipe lines.
​

What about ROMs size?

The system folder of any ROM should not be bigger than 370MB extracted, so if it is bigger you should reduce it by deleting apps you do no use from system/app.
​

I want to change ROM1 or ROM2 with a new ROM, what sould i do?

Lets suppose you want to change ROM2. Open the new ROM with winrar o similar and drag the boot.img from the zip to a folder and rename it to boot2.img , then open Dual-ROM-1-to-XX.zip and add the boot2.img to \system\boot, overwrite the existing one. Then transfer the new ROM and Dual-ROM-1-to-XX.zip to your SD.

Then you have to be on the ROM you don´t want to change, for example if i want to change ROM2, then i have to be in ROM1. The reason of doing this is because we need to delete some files on data partition used by ROM2 because those files may wont be compatible with your new ROM, of course you won´t need to do this if ROM2 and the new ROM are compatible and do not need a wipe to flash new rom.

While we are on ROM1, we need an explorer with root rights like root explorer or solid explorer.then we go to /data/ and delete these folders: dalvik-cache-2, app-2, data-2, lgdrm-2, misc-2 and system-2 , basically are the folder with a -2 (or -1 if you are changing ROM1) in the name. This is equivalent to a full wipe because we delete all folder where ROM2 saves its data. Alternative Only for advanced users: There is a easier way, you can be on ROM2, enter recovery (mount DATA) and with a PC software like Android commander you can delete those folders or via ADB shell.

Now we run Systemchanger and click Switching, the phone will reboot so quickly press and hold Power button + vol down to enter recovery and flash the new ROM and without rebooting flash Dual-ROM-2-to-XX.zip and reboot, if the phone doesn't go to recovery, remove the battery, plug it again and enter recovery.

When the phone boots it is recommended to switch to ROM1 and flash Dual-ROM-1-to-XX.zip to have the kernel of the new ROM so when we switch again to ROM2(the new ROM), it will boot correctly.

I want to update ROM1 or ROM2, what should i do?

You have to be on the ROM you want to update

Enter Recovery

Flash the ROM update and flash Dual-ROM-1-to-XX.zip if you are updating ROM1 or flash Dual-ROM-2-to-XX.zip if you are updating ROM2.

What about backups?

If you do a nand backup, it will backup the system partition of the ROM you are in( ROM1 or ROM2) and all data partion with the data of both ROMs, so if you restore that backup, you will be able to boot correctly the ROM you were on when you made the backup, to boot the other ROM, you have to run Systemchanger and swithc to the other ROM, but quicly enter to recovery and flash again the other rom and its Dual-ROM-x-to-XX.zip.

Easy, first make a nand backup of your current ROM, then follow my guide to get dual boot, when finished, just restore that nand backup while on ROM1 for example. of course make sure your system partion size is smaller than 370MB.

Whats the way to rollback to one ROM system and original partition sizes?

Flashing a nvflash rom or any stock rom via smartflasher will do the trick .

Some notes:

As i said before, both roms share the 2GB of space, so you should use that space smartly, for example do no install a lot of apps on the test ROM, instead use is your main rom to install all the apps you need, for big apps, move them to SD.

As i said, you have to take the kernel (boot.img) from ROMx to put it in Dual-Rom-xxx, this is true if you are going to use the default kernel that comes with ROMx, if you flashed another kernel independent from ROMx, you should take the boot.img from that kernel and put it on Dual-Rom-xxx. if there is no boot.img on kernel.zip installer, you can use terminal emulator from play store or adb shell to extract a boot.img from the rom with the independent kernel already installed by this code:

Example: If the kernel is in boot.img format, simply put it on dual-rom as i say on 1st post, if not, then first install cm7 +kernel+gapps and when it boots use terminal emulator to extract boot.img from your phone.

For better ROM changing: i have several Dual-ROM-x-to-XX.zip, for example: Dual-ROM-1-to-CM7.zip, Dual-ROM-2-to-CM9.zip Dual-ROM-1-to-stock.zip.... so that way i change ROMs easily. Of course this is valid if you always use ROM default kernels, if not, you should put the right bootX.img into the right Dual-ROM-x-to-XX.zip

Thanks to:

The creator of the scripts and System changer ChinaGB.

Homero for its nvflash ROM.

Modaco for Nvflash method

Owain for the partition resize guide

Ajsh for the great video tutorial

If you like my work, please hit the Thanks button.