• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[DualBoot]How-to[GB/JB/CM-10.1] now With Tool for devs

Search This thread

berni987654321

Senior Member
Feb 26, 2012
711
1,506
Erding
Hi guys,

finally I found a way to make dualboot on our beloved O3D working!!

This way isn't as much easy as on other devices like the desire HD where
you have just to install an app and everything is done by itself, so follow this
guide at your own risk!!

//Dualboot any rom and a cm10.1 based rom from external sdcard

Same as cm10 based but use the cm10.1.img


//Dualboot any and a cm10 based rom from external sdcard

Warning after following this guide your external sd card lost about 2gb!!!!


1. Make a backup of your external sdcard to your PC!! All your data on the sd card will be gone!
2. Reboot to cwm- or twrp-recovery (power+vol down+3d button)
3. connect your phone to your pc.
4, open up cmd or a terminal and type:
Code:
adb shell
(if your using twrp you can use the built in terminal)
5. type:
Code:
cd /dev/block
parted mmcblk1
print
on an 8gb sd it will show you something like this:

Model: Unknown (unknown)
Disk /dev/block/mmcblk1: 8051MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 8051MB 8051MB primary fat32 lba

6. type:
Code:
rm 1
all you data on the sdcard is now gone.
7. type:
mkpartfs primary fat32 1049kb 6000mb //instead of 1049 you have to enter the start that was told you by print and for 6000mb you have to enter your end minus 2 gb (my end is 8051mb - 2gb(=2000mb) ~ 6000mb
mkpartfs primary ext2 6000mb 6700mb //the end of your first partition (for me 6000mb) + 700mb = 6700mb
mkpartfs primary ext2 6700mb 7900mb //the end of your second partition (for me 6700mb) + 1200mb =
mkpartfs primary ext2 7900mb 8051mb //the end of your third partition and the end that parted told you after entering print before modifying anything (8051mb)
8. type:
Code:
print
you should get something like this:
Disk /dev/block/mmcblk1: 8051MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 6000MB 5999MB primary fat32 lba
2 6000MB 6700MB 700MB primary ext2
3 6700MB 7900MB 1200MB primary ext2
4 7900MB 8051MB 151MB primary ext2

9. type
Code:
quit
and turn off your phone and boot again to recovery

10. type on pc:
Code:
adb shell
mke2fs /dev/block/mmcblk1p2
tune2fs -j /dev/block/mmcblk1p2
mke2fs /dev/block/mmcblk1p3
tune2fs -j /dev/block/mmcblk1p3
mke2fs /dev/block/mmcblk1p4
tune2fs -j /dev/block/mmcblk1p4
Now you have 3 new partitions for data2 system2 and cache2.

The first part is done.
Now we have to edit the updater-script to make it install the system and maybe the data on our new partitions.

Open the updater-script of your jb based rom(for my pac man rom there is no need to cause I'll upload a versions for int and one for ext sd)

1. Open the zip you want to install as second rom with winrar or something like this.
2. Open the updater-scrip in the zip and change all the mmcblk0p7 to mmcblk1p2 and mmcblk0p8 to mmcblk1p3.

Flash your rom but stay in recovery


Now we have to change the boot.img in the zip to modivied one, just flash one of the zips that suits to your ROM

OK last step is to edit the gapps to be flashed on second ROM:
Just open the updater-script and change the line busybox mount system line to
mount("ext4", "EMMC", "/dev/block/mmcblk1p2", "/system");
And save it

//Dualboot a stock gingerbread based rom and a cm7 based rom from internal sdcard

Warning after following this guide your internal sd card is only 3545mb big!!!!


Here is a tool that makes all the work for you credits to defcomk:
http://d-h.st/hux

1. Make a backup of your internal sdcard to your PC!! All your data on the sd card will be gone!
2. Reboot to cwm- or twrp-recovery (power+vol down+3d button)
3. connect your phone to your pc.
4, open up cmd or a terminal and type:
Code:
adb shell
(if your using twrp you can use the built in terminal)
5. type:
Code:
cd /dev/block
parted mmcblk0
print
it will show you something like this:

Number Start End Size File system Name Flags
1 131kB 262kB 131kB x-loader
2 262kB 393kB 131kB nv1
3 393kB 524kB 131kB nv2
4 524kB 1049kB 524kB u-boot
5 1049kB 11.5MB 10.5MB kernel
6 11.5MB 22.0MB 10.5MB recovery
7 22.0MB 651MB 629MB ext4 system
8 651MB 1725MB 1074MB ext4 userdata
9 1725MB 1859MB 134MB fsswap
10 1859MB 1926MB 67.1MB ext3 cache
11 1926MB 1928MB 2097kB ext3 lgdrm
12 1928MB 1929MB 1049kB divxkey
13 1929MB 1950MB 21.0MB fota
14 1950MB 1955MB 4194kB ext3 misc
15 1955MB 7944MB 5987MB fat32 fat

6. type:
Code:
rm 15
all you data on the sdcard is now gone.
7. type:
Code:
mkpartfs primary fat32 1955 5500
mkpartfs primary ext2 5500 6100
mkpartfs primary ext2 6100 6200
mkpartfs primary ext2 6200 7944
8. type:
Code:
quit
9. turn off your phone and boot again to recovery
10. type on pc:
Code:
adb shell
mke2fs /dev/block/mmcblk0p16
tune2fs -j /dev/block/mmcblk0p16
mke2fs /dev/block/mmcblk0p17
tune2fs -j /dev/block/mmcblk0p17
mke2fs /dev/block/mmcblk0p18
tune2fs -j /dev/block/mmcblk0p18
Now you have 3 new partitions for data2 system2 and cache2.


The first part is done.
Now we have to edit the updater-script to make it install the system and maybe the data on our new partitions.

1. Open the zip you want to install as second rom with winrar or something like this.
2. Open the updater-scrip in the zip and change all the mmcblk0p7 to mmcblk0p16 and mmcblk0p8 to mmcblk0p18.

Now we have to change the boot.img in the zip to modivied one, just flash one of the zips that suits to your ROM

After flashing the zip you will boot into the second rom you have installed, to boot back to the first rom you will have to flash
a boot.img that suits to your rom (for stock rom something like the Promethius Kernel)

On stock roms it could happen that your sdcard isn't mounted correctly
you can try to change the vold.fstab in /system/etc to something like :
dev_mount sdcard /mnt/sdcard auto /devices/platform/mmci-omap-hs.0/mmc_host/mmc1
dev_mount extsdcard /mnt/sdcard/_ExternalSD 15 /devices/platform/mmci-omap-hs.1/mmc_host/mmc0

There are some great tools here

//For Kernel Devs Create your own DualBoot image

I wanted to see some more dualboot kernels and I don't have time to create the b myself so I made this tool.
Just extract it, put a kernel in the put_zImage_here folder and start the tool. For now there is only 4.1.2 but
4.2.2 will be added soon.
You can post the image in your kernel thread, and if you want you can send me a PM to add a link to the kernel

Please post any trouble.
 

Attachments

  • acuramiui.zip
    5.6 MB · Views: 355
  • cyan_beta.zip
    4.9 MB · Views: 235
  • original_cm.zip
    4.6 MB · Views: 403
  • original_miui.zip
    4.6 MB · Views: 282
  • titanfusion.zip
    5 MB · Views: 219
  • cm10_pac.zip
    3.8 MB · Views: 484
  • dualboot_tool.zip
    1.2 MB · Views: 777
  • cm-10.1.zip
    3.8 MB · Views: 604
Last edited:

berni987654321

Senior Member
Feb 26, 2012
711
1,506
Erding
Changelog:
-21/10/12 added acuramiui, cyan_beta, original_cm, original_miui and titanfusion kernels

-24/10/12 added tool for terminal work thanks to defcomk

-26/03/13 added 4.2.2 support

-??/??/13 aroma zip installer for all the kernels
modded recovery to backup 1st and second rom

Credits:
-Dreccon for his script
-Defcomk for his tool
-Samno for his kerne
-Acura for his kernel
-orlox for his guide on partitioning sdcard
-Ricardo Cerqueira for his awesome work on our O3D

Sent from my LG-P920 using Tapatalk
 
Last edited:

BG64

Senior Member
Feb 25, 2011
266
71
This will be great, thank you! I can't wait for the tutorial to be completed!

I love Cyanogenmod for speed, but I also like using 3D occasionally and the HDMI, so now I can do both. Thanks!
 

BigBadSheep

Senior Member
Mar 9, 2012
246
69
Turin
Xiaomi Poco X3 Pro
great stuff

But you should write the undo method also, just in case someone wants to undo all the changes. So in theory any ROM made for P920 should work in dual boot? Can you do some sort of guide, a real working one, on how to have Ubuntu or GNU/Linux on the phone? I've tried a few guides but, or I'm very dumb (it might be so) or my phone is not working right.
 

berni987654321

Senior Member
Feb 26, 2012
711
1,506
Erding
But you should write the undo method also, just in case someone wants to undo all the changes. So in theory any ROM made for P920 should work in dual boot? Can you do some sort of guide, a real working one, on how to have Ubuntu or GNU/Linux on the phone? I've tried a few guides but, or I'm very dumb (it might be so) or my phone is not working right.

theres an simple app in the play store on how to boot ubuntu.

It worked for me I can post you a link.
 

defcomg

Senior Member
Dec 10, 2006
3,852
3,299
31
@ Berni Aroma Zip Installer Could be used for users to choose Main or SUB ROM just add both boot.img into rom
 
  • Like
Reactions: berni987654321

Bdadd34

Senior Member
Jan 11, 2012
539
378
Medford, Oregon
Sweeeeet...running thrillseeker with miui...just a quick kernel flash to switch...
I had some errors running code in adb ..my internel SD was formatted a couple bytes short...I choose not to fix when prompted and also chose ignore error when it came up..
Also needed SD card mnt fix in thrillseeker...your code worked perfect now both are running fine. :D
Thank you for this great contribution to our phones.

Sent from my LG-P925 using xda premium
 
Last edited:
  • Like
Reactions: berni987654321

defcomg

Senior Member
Dec 10, 2006
3,852
3,299
31
Is it possible to boot Straight into Recovery without Key Conbo? If It is we could modd touch recovery to look something like this



Stock and CM7 would just Run package extract boot.img and last option Normal Recovery

Just a thought we would have the Ultimate Dual Boot :D
 

Bdadd34

Senior Member
Jan 11, 2012
539
378
Medford, Oregon
Is it possible to boot Straight into Recovery without Key Conbo? If It is we could modd touch recovery to look something like this



Stock and CM7 would just Run package extract boot.img and last option Normal Recovery

Just a thought we would have the Ultimate Dual Boot :D

You can from Rom manager.

Sent from my LG-P925 using xda premium
 

wayno140

Senior Member
Feb 4, 2012
485
96
40
bryan
Yea I noticed a long time ago our o3d doesn't reboot into recovery except the button combo or rom mananger kinda screwy of LG

Sent from my LG-P925 using xda app-developers app
 

defcomg

Senior Member
Dec 10, 2006
3,852
3,299
31
Code:
adb shell "echo boot-recovery|dd of=/dev/block/mmcblk0p6 bs=1 seek=0; reboot"
found that for the asus tf101 reboot recovery also does not work on stock rom
 

berni987654321

Senior Member
Feb 26, 2012
711
1,506
Erding
Code:
adb shell "echo boot-recovery|dd of=/dev/block/mmcblk0p6 bs=1 seek=0; reboot"
found that for the asus tf101 reboot recovery also does not work on stock rom

I think iBlueMind made a file you had to put in system/bin and the if you type in shell reboot-recovery you get strightly into recovery.
We could also put the boot.img of the second rom on the recovery partition so we could faster acces to the second rom
 

lzzar

Senior Member
Feb 10, 2012
449
194
Vimmerby
I made a .bat file for the first part. I don't know if it works 'cause i don't want to dualboot my phone yet.
u just extract it and put it in your adb directory and run it.
Please let me know if it works then i will write the second part.
I didn't "@echo off" because i wanted u to see what i have writed
 
  • Like
Reactions: seven1367

Chris189

Senior Member
Aug 16, 2006
206
23
Monor
Hi! Thanks for the great tutorial!

I have a problem.. I do the dual boot , i have new partitions , everything fine but on my first rom ( Acura Team 3D Max 3.1) , i can't mount the SD card's.
I tried to modify the vold.fstab file in the system but it wont work.

Please help! Thanks
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 57
    Hi guys,

    finally I found a way to make dualboot on our beloved O3D working!!

    This way isn't as much easy as on other devices like the desire HD where
    you have just to install an app and everything is done by itself, so follow this
    guide at your own risk!!

    //Dualboot any rom and a cm10.1 based rom from external sdcard

    Same as cm10 based but use the cm10.1.img


    //Dualboot any and a cm10 based rom from external sdcard

    Warning after following this guide your external sd card lost about 2gb!!!!


    1. Make a backup of your external sdcard to your PC!! All your data on the sd card will be gone!
    2. Reboot to cwm- or twrp-recovery (power+vol down+3d button)
    3. connect your phone to your pc.
    4, open up cmd or a terminal and type:
    Code:
    adb shell
    (if your using twrp you can use the built in terminal)
    5. type:
    Code:
    cd /dev/block
    parted mmcblk1
    print
    on an 8gb sd it will show you something like this:

    Model: Unknown (unknown)
    Disk /dev/block/mmcblk1: 8051MB
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos

    Number Start End Size Type File system Flags
    1 1049kB 8051MB 8051MB primary fat32 lba

    6. type:
    Code:
    rm 1
    all you data on the sdcard is now gone.
    7. type:
    mkpartfs primary fat32 1049kb 6000mb //instead of 1049 you have to enter the start that was told you by print and for 6000mb you have to enter your end minus 2 gb (my end is 8051mb - 2gb(=2000mb) ~ 6000mb
    mkpartfs primary ext2 6000mb 6700mb //the end of your first partition (for me 6000mb) + 700mb = 6700mb
    mkpartfs primary ext2 6700mb 7900mb //the end of your second partition (for me 6700mb) + 1200mb =
    mkpartfs primary ext2 7900mb 8051mb //the end of your third partition and the end that parted told you after entering print before modifying anything (8051mb)
    8. type:
    Code:
    print
    you should get something like this:
    Disk /dev/block/mmcblk1: 8051MB
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos

    Number Start End Size Type File system Flags
    1 1049kB 6000MB 5999MB primary fat32 lba
    2 6000MB 6700MB 700MB primary ext2
    3 6700MB 7900MB 1200MB primary ext2
    4 7900MB 8051MB 151MB primary ext2

    9. type
    Code:
    quit
    and turn off your phone and boot again to recovery

    10. type on pc:
    Code:
    adb shell
    mke2fs /dev/block/mmcblk1p2
    tune2fs -j /dev/block/mmcblk1p2
    mke2fs /dev/block/mmcblk1p3
    tune2fs -j /dev/block/mmcblk1p3
    mke2fs /dev/block/mmcblk1p4
    tune2fs -j /dev/block/mmcblk1p4
    Now you have 3 new partitions for data2 system2 and cache2.

    The first part is done.
    Now we have to edit the updater-script to make it install the system and maybe the data on our new partitions.

    Open the updater-script of your jb based rom(for my pac man rom there is no need to cause I'll upload a versions for int and one for ext sd)

    1. Open the zip you want to install as second rom with winrar or something like this.
    2. Open the updater-scrip in the zip and change all the mmcblk0p7 to mmcblk1p2 and mmcblk0p8 to mmcblk1p3.

    Flash your rom but stay in recovery


    Now we have to change the boot.img in the zip to modivied one, just flash one of the zips that suits to your ROM

    OK last step is to edit the gapps to be flashed on second ROM:
    Just open the updater-script and change the line busybox mount system line to
    mount("ext4", "EMMC", "/dev/block/mmcblk1p2", "/system");
    And save it

    //Dualboot a stock gingerbread based rom and a cm7 based rom from internal sdcard

    Warning after following this guide your internal sd card is only 3545mb big!!!!


    Here is a tool that makes all the work for you credits to defcomk:
    http://d-h.st/hux

    1. Make a backup of your internal sdcard to your PC!! All your data on the sd card will be gone!
    2. Reboot to cwm- or twrp-recovery (power+vol down+3d button)
    3. connect your phone to your pc.
    4, open up cmd or a terminal and type:
    Code:
    adb shell
    (if your using twrp you can use the built in terminal)
    5. type:
    Code:
    cd /dev/block
    parted mmcblk0
    print
    it will show you something like this:

    Number Start End Size File system Name Flags
    1 131kB 262kB 131kB x-loader
    2 262kB 393kB 131kB nv1
    3 393kB 524kB 131kB nv2
    4 524kB 1049kB 524kB u-boot
    5 1049kB 11.5MB 10.5MB kernel
    6 11.5MB 22.0MB 10.5MB recovery
    7 22.0MB 651MB 629MB ext4 system
    8 651MB 1725MB 1074MB ext4 userdata
    9 1725MB 1859MB 134MB fsswap
    10 1859MB 1926MB 67.1MB ext3 cache
    11 1926MB 1928MB 2097kB ext3 lgdrm
    12 1928MB 1929MB 1049kB divxkey
    13 1929MB 1950MB 21.0MB fota
    14 1950MB 1955MB 4194kB ext3 misc
    15 1955MB 7944MB 5987MB fat32 fat

    6. type:
    Code:
    rm 15
    all you data on the sdcard is now gone.
    7. type:
    Code:
    mkpartfs primary fat32 1955 5500
    mkpartfs primary ext2 5500 6100
    mkpartfs primary ext2 6100 6200
    mkpartfs primary ext2 6200 7944
    8. type:
    Code:
    quit
    9. turn off your phone and boot again to recovery
    10. type on pc:
    Code:
    adb shell
    mke2fs /dev/block/mmcblk0p16
    tune2fs -j /dev/block/mmcblk0p16
    mke2fs /dev/block/mmcblk0p17
    tune2fs -j /dev/block/mmcblk0p17
    mke2fs /dev/block/mmcblk0p18
    tune2fs -j /dev/block/mmcblk0p18
    Now you have 3 new partitions for data2 system2 and cache2.


    The first part is done.
    Now we have to edit the updater-script to make it install the system and maybe the data on our new partitions.

    1. Open the zip you want to install as second rom with winrar or something like this.
    2. Open the updater-scrip in the zip and change all the mmcblk0p7 to mmcblk0p16 and mmcblk0p8 to mmcblk0p18.

    Now we have to change the boot.img in the zip to modivied one, just flash one of the zips that suits to your ROM

    After flashing the zip you will boot into the second rom you have installed, to boot back to the first rom you will have to flash
    a boot.img that suits to your rom (for stock rom something like the Promethius Kernel)

    On stock roms it could happen that your sdcard isn't mounted correctly
    you can try to change the vold.fstab in /system/etc to something like :
    dev_mount sdcard /mnt/sdcard auto /devices/platform/mmci-omap-hs.0/mmc_host/mmc1
    dev_mount extsdcard /mnt/sdcard/_ExternalSD 15 /devices/platform/mmci-omap-hs.1/mmc_host/mmc0

    There are some great tools here

    //For Kernel Devs Create your own DualBoot image

    I wanted to see some more dualboot kernels and I don't have time to create the b myself so I made this tool.
    Just extract it, put a kernel in the put_zImage_here folder and start the tool. For now there is only 4.1.2 but
    4.2.2 will be added soon.
    You can post the image in your kernel thread, and if you want you can send me a PM to add a link to the kernel

    Please post any trouble.
    15
    Changelog:
    -21/10/12 added acuramiui, cyan_beta, original_cm, original_miui and titanfusion kernels

    -24/10/12 added tool for terminal work thanks to defcomk

    -26/03/13 added 4.2.2 support

    -??/??/13 aroma zip installer for all the kernels
    modded recovery to backup 1st and second rom

    Credits:
    -Dreccon for his script
    -Defcomk for his tool
    -Samno for his kerne
    -Acura for his kernel
    -orlox for his guide on partitioning sdcard
    -Ricardo Cerqueira for his awesome work on our O3D

    Sent from my LG-P920 using Tapatalk
    7
    have some nice work started,
    you can follow me here : https://github.com/berni987654321/u-boot-omap4-optimus/commits/master

    not ready for release and the menu isn't ready yet but should work in some weeks.

    For those of who can't read code very good,
    this is a menu which is loaded every time you start your phone and give you the selection
    to boot normal, fastboot, recover or a 2nd rom
    6
    Guys, Dual Boot Essentials v2.0 is up. Check it out!

    Sent from my dual-booting ICS/JB O3D!
    5
    This is a way to easily switch ROMs

    I have created a new thread with instructions on how to make ROM switching work with a click of a button (you do all the work once)! This way I hope to attract more people into using one or the other form of CM10 and speed development!

    Update: Some people reported difficulty in creating the last partition in the external SD, if the card is larger than 8GB. So, I have added a detailed guide for that too.

    Do not forget: It was Berni who made this possible in the first place! Show the guy the respect he deserves! :good: