[Multiboot][Recovery] Boot Multiple Roms v2.2 - (twrp2.8.3.0)

Search This thread

Phil_Suz

Senior Member
Dec 6, 2013
101
341
Montreal
[updated 20150104]
version v2.2
  • migration to twrp2.8.3.0
  • quickfix for lzma initrd roms
  • fix baseband not recognized on some tw roms
  • added f2fs feature to multiboot kernel for future versions..
  • moved qemu tools to sdcard to free space

[updated 20150101]
version v2.13
  • lollipop support

Hi all,

This dev thread is to continue the multiboot thread that I starded few months ago in general section.
To read history of the project you can take a look here http://xdaforums.com/showthread.php?t=2577211

With Multiboot, you can launch any ROM from your internal card or your external sdcard. It is a TWRP recovery ROM modified to add this feature.
This feature is possible thank's to kexec-hardboot method created by mkasic (http://xdaforums.com/showthread.php?t=1266827).

I adapted this method to be able to apply it quite easily on any android device.

This method includes few pieces of software ( sources will be published) :
  • kexec-hardboot : kernel patch from mkasic
  • hardboot-reserve : new kernel patch
  • kload-hardboot : new userspace program
Next part of the method is an on the fly modification of initrd ramdisk before injecting new kernel/initrd. Early versions of multiboot (before v1.2) were simply modify [on fs] section of init.rc to replace original block devices ( mmcblk0p14, mmcblk0p15 etc ) by loop devices pointing to img files.
Since Multiboot v1.2, a new method is used to replace original filesystems : a script replace original init binary, his goal is to prepare all the filesytems before launching original init.
All this method is done by shell scripts that you can check in /sbin and /multiboot directories when booted into recovery.


Creating img files (raw) is very efficient on internal sdcard as this card is formatted ext4 and img files can be thin provisiionnig ( sparse files ).
Unfortunaltely, external sdcard are offently fat32 or exfat formated. Those filesystems do not support thin provisionning ( note also that multiboot supprot only vfat for the moment ).
Creating img files on vfat filesystems is very long process and consume lot of space.

Version Multiboot V2.1 add support for ubuntu touch 14.04 support ( only img files )

Version .Multiboot V20 introduced a new feature : qcow2 support for external sdcard.
With qcow2 image files, we can create small images which grows only when needed.

You can check some video demonstrating features of multiboot on youtube channel : http://www.youtube.com/channel/UCefO8F4YX6qMQsqpBHTqTqQ

Main advantages of using qcow2 :

  • thin provisionning
  • snapshots
  • compression
  • liveboot ( livefull if small rom, "livedvd-like" if bigger roms )

Some problem (and solutions) of qcow2 :

  • need target kernel with nbd support - nbd is very easy to activate when compiling kernels but not already activated on kernels. Decimalman kernels already are compiled with it. http://xdaforums.com/showthread.php?t=2226889
  • Slow speed on standard : speed on qcow2 especially when first installation is not good. To reduce this, livesnap booting mode gives very good speed.
  • suspend/resume : on tw43 kernels, deepsleep can hang the system. To correct it, their are 2 methods : adding a wakelock or apply a small patch to nbd.c sources.

Some details about qcow2 booting mode :

  1. - standard : qcow2 images are acceded read/write directly on sdcard ( not recommended especially in firsts boot )
  2. - livesnap : qcow2 images are acceded read, writes are done in zram snapshots. commit are done at reboot time : this is the recommended mod. If you install apps, you'd better to reboot first to commit qcow2. Note that if modifications are big, reboot can be long ( few minutes ), be patient. Note also that in this mode, I added a wakelock to fix suspend/reboot of tw roms.
  3. - liveboot : same that livesnap but without commit - Same than a LiveCD in linux world. reboot speed is regular
  4. - fulllive : only for small roms ( say ~500M ). All qcow2 are copied to zram at boot and mounted from memory. No internal/external card needed. very good speed.
  5. - livesnap2 : same than livesnap but without wakelock. Best for speed and battery. Working except tw43. Download my modified dkp kernel to use this option on tw43 roms.

Important recommendations :

- when choosing qcow2, always choose the right nbd kernel as the last zip to install ( and don't reboot after Aroma installer )
- please follow videos on youtube

Here are last video I did to demonstrate qcow2 features. Some parts of video are boring ( during compression or commit ) but I wanted to let it go live to give an idea of processing times.



Downloads : http://www.androidfilehost.com/?w=files&flid=12801

References / Credits :
mkasic : kexec-hardboot creator - http://xdaforums.com/showthread.php?t=1266827
Tassadar : MultiROM creator - best project - http://xdaforums.com/showthread.php?t=2011403 - bbootimg used
TWRP Team : http://www.teamw.in/project/twrp2
 
Last edited:

FeelLikeThis

Senior Member
Oct 15, 2011
85
43
Wahiawa
Love your work Philippe. This has been amazing to use for testing out multiple roms and still maintaining my daily driver. I'm a crack flasher so its nice having the options to constantly change.

Sent from my SCH-I535 using Tapatalk
 

melo_mx

Senior Member
Oct 22, 2012
73
19
this is awesome ! i been looking for muilt-boot since i got an S3 !

it's working great!
 

Walknmemfs

Senior Member
Sep 4, 2012
57
9
Shawnee
i want to try this... but the bandwidth Nazi's at work wont let me download and watch YouTube videos. would the main ROM need to be on the internal memory? or would it matter? just wondering.

Do these videos have audio? kinda hard to follow... or it just my laptop?
 
Last edited:

stanguay

Senior Member
Aug 23, 2009
270
90
Magog, Quebec
Restore

Hello,

Since I install the V2.0 I can't restore my new backup. I can restore the backup make before V2.0 installation but the one made with V2.0 multiboot.
Restore Failed

I try with different TWRP 2.6.3.1 and 2.7.0

Do you have and idea how to fix that.

Thanks
 

Phil_Suz

Senior Member
Dec 6, 2013
101
341
Montreal
Totally forgot about this, I'll have NBD included in my next kernel so this can work :)

I will add a link to your kernel in first message when it becomes compatible with qcow2 support.

Now does it matter what bootloader you're on for this?

There is no prerequisite about bootloaders versions. Just be sure that your bootloader is unlocked ( I mean that you can install custom recovery images - for example, verizon 4.3 ota update locked the bootloader )

Hello,

Since I install the V2.0 I can't restore my new backup. I can restore the backup make before V2.0 installation but the one made with V2.0 multiboot.
Restore Failed

I try with different TWRP 2.6.3.1 and 2.7.0

Do you have and idea how to fix that.

Thanks

As multiboot feature does not have relation with this part of twrp, not sure if it is linked with multiboot.
Do you have same behavour with original twr2.7.0 ?


Philippe,
 
  • Like
Reactions: stanguay

Phil_Suz

Senior Member
Dec 6, 2013
101
341
Montreal
ubuntu touch trusty in progress

Hi all,

Just to give a small news.
I started try to port latest ubuntu touch release (trusty) and to integrate it to multiboot.

Now, at least, I can boot on it, get the GUI, touchscreen, wifi, rotation, battery level and on/off button working.
( everything else not working : no sound, no phone, no gps etc... )

But at least, it is "usable" to play with it... Also, I integrated it to multiboot.

Don't know if you want to try that at this stage ( not sure than I can go further and get other things to work....)
Just tell me, I will package this week-end a multiboot v2.01 and ubuntu_touch_trusty_d2att.zip.

Here is a small video : http://youtu.be/y1G9hZI3deg


Philippe,

Philippe,
 

codemonkey98

Senior Member
Nov 5, 2013
316
60
26
Pensacola, FL
Hi all,

Just to give a small news.
I started try to port latest ubuntu touch release (trusty) and to integrate it to multiboot.

Now, at least, I can boot on it, get the GUI, touchscreen, wifi, rotation, battery level and on/off button working.
( everything else not working : no sound, no phone, no gps etc... )

But at least, it is "usable" to play with it... Also, I integrated it to multiboot.

Don't know if you want to try that at this stage ( not sure than I can go further and get other things to work....)
Just tell me, I will package this week-end a multiboot v2.01 and ubuntu_touch_trusty_d2att.zip.

Here is a small video : http://youtu.be/y1G9hZI3deg


Philippe,

Philippe,

I remember the last time someone built Ubuntu Touch to the d2att S3, but we ran into the same issues as you previously mentioned. Will there ever be a way to get the data to work?
 

Phil_Suz

Senior Member
Dec 6, 2013
101
341
Montreal
Will there ever be a way to get the data to work?

Hi codemonkey98, the answer is possibly yes. :eek:
In fact, I succeeded to make cellular data work under my ubuntu touch port ( Bell carrier) .
Just have to confirm this first experimental results - I can surf internet with cell data ( without wifi ).
However, phone line is still not working.

[edit] Also sent and received SMS, so this is working also.


Philippe,
 
Last edited:

codemonkey98

Senior Member
Nov 5, 2013
316
60
26
Pensacola, FL
Hi codemonkey98, the answer is possibly yes. :eek:
In fact, I succeeded to make cellular data work under my ubuntu touch port ( Bell carrier) .
Just have to confirm this first experimental results - I can surf internet with cell data ( without wifi ).
However, phone line is still not working.

[edit] Also sent and received SMS, so this is working also.


Philippe,

I'd be very interested in testing the very alpha versions of this, as long as they're d2att or d2lte. best of luck man, i'm looking out for great stuff from you.
 
  • Like
Reactions: Phil_Suz

Phil_Suz

Senior Member
Dec 6, 2013
101
341
Montreal
https://www.youtube.com/watch?v=j6GdvUfNppE In this video I see that you booted in the ROM w/o flashing gapps along w/ flashing the ROM ... is that necessary for this to work?

Hi shekinahsmoke, no it is not necessary at all. It's better to install all zip in one shot, but I did this demo to show that you can come back to multiboot, select an already created rom and apply another zip ( gapps in this example ) even after first installation.

I'd be very interested in testing the very alpha versions of this, as long as they're d2att or d2lte. best of luck man, i'm looking out for great stuff from you.

If you need a tester for anything, I'm always available.
Sent from my SAMSUNG-SGH-I747 using Tapatalk

Hi codemonkey98 and rani9990, thank's for your future help on testing. I am now able to call and be called :eek:. I fixed partially audio too. Calling ring and microphone during call are now ok, only incoming audio is problematic ( because exit from speaker and not earphone ).
Fall-back temporarly solution is to plug headset, in this case everything is fine during phone calls.

Now, I will start to prepare version 2.1 of multiboot to support this ubuntu touch and I will probalby open a dev thread dedicated to this ubuntu touch 14.04 when I finish first package ( this we or start of next week ).

Philippe,
 

codemonkey98

Senior Member
Nov 5, 2013
316
60
26
Pensacola, FL
Hi codemonkey98 and rani9990, thank's for your future help on testing. I am now able to call and be called :eek:. I fixed partially audio too. Calling ring and microphone during call are now ok, only incoming audio is problematic ( because exit from speaker and not earphone ).
Fall-back temporarly solution is to plug headset, in this case everything is fine during phone calls.

Now, I will start to prepare version 2.1 of multiboot to support this ubuntu touch and I will probalby open a dev thread dedicated to this ubuntu touch 14.04 when I finish first package ( this we or start of next week ).

Philippe,

I'm glad to hear. I appreciate you shedding some light towards us with Ubuntu Touch and your support for multiboot. :good:
 

kalel420

Senior Member
Jul 29, 2013
160
33
CORPUS CHRISTI
Hi all,

Just to give a small news.
I started try to port latest ubuntu touch release (trusty) and to integrate it to multiboot.

Now, at least, I can boot on it, get the GUI, touchscreen, wifi, rotation, battery level and on/off button working.
( everything else not working : no sound, no phone, no gps etc... )

But at least, it is "usable" to play with it... Also, I integrated it to multiboot.

Don't know if you want to try that at this stage ( not sure than I can go further and get other things to work....)
Just tell me, I will package this week-end a multiboot v2.01 and ubuntu_touch_trusty_d2att.zip.

Here is a small video : http://youtu.be/y1G9hZI3deg


Philippe,

Philippe,

I would love to try your touch port I have been using your recoveries for a few weeks now and just flash the touch wip Rom that is on the site but to have a simi-working port to play with would be awesome. :)

Sent from my SAMSUNG-SGH-I747 using xda app-developers app
 

Top Liked Posts

  • There are no posts matching your filters.
  • 26
    [updated 20150104]
    version v2.2
    • migration to twrp2.8.3.0
    • quickfix for lzma initrd roms
    • fix baseband not recognized on some tw roms
    • added f2fs feature to multiboot kernel for future versions..
    • moved qemu tools to sdcard to free space

    [updated 20150101]
    version v2.13
    • lollipop support

    Hi all,

    This dev thread is to continue the multiboot thread that I starded few months ago in general section.
    To read history of the project you can take a look here http://xdaforums.com/showthread.php?t=2577211

    With Multiboot, you can launch any ROM from your internal card or your external sdcard. It is a TWRP recovery ROM modified to add this feature.
    This feature is possible thank's to kexec-hardboot method created by mkasic (http://xdaforums.com/showthread.php?t=1266827).

    I adapted this method to be able to apply it quite easily on any android device.

    This method includes few pieces of software ( sources will be published) :
    • kexec-hardboot : kernel patch from mkasic
    • hardboot-reserve : new kernel patch
    • kload-hardboot : new userspace program
    Next part of the method is an on the fly modification of initrd ramdisk before injecting new kernel/initrd. Early versions of multiboot (before v1.2) were simply modify [on fs] section of init.rc to replace original block devices ( mmcblk0p14, mmcblk0p15 etc ) by loop devices pointing to img files.
    Since Multiboot v1.2, a new method is used to replace original filesystems : a script replace original init binary, his goal is to prepare all the filesytems before launching original init.
    All this method is done by shell scripts that you can check in /sbin and /multiboot directories when booted into recovery.


    Creating img files (raw) is very efficient on internal sdcard as this card is formatted ext4 and img files can be thin provisiionnig ( sparse files ).
    Unfortunaltely, external sdcard are offently fat32 or exfat formated. Those filesystems do not support thin provisionning ( note also that multiboot supprot only vfat for the moment ).
    Creating img files on vfat filesystems is very long process and consume lot of space.

    Version Multiboot V2.1 add support for ubuntu touch 14.04 support ( only img files )

    Version .Multiboot V20 introduced a new feature : qcow2 support for external sdcard.
    With qcow2 image files, we can create small images which grows only when needed.

    You can check some video demonstrating features of multiboot on youtube channel : http://www.youtube.com/channel/UCefO8F4YX6qMQsqpBHTqTqQ

    Main advantages of using qcow2 :

    • thin provisionning
    • snapshots
    • compression
    • liveboot ( livefull if small rom, "livedvd-like" if bigger roms )

    Some problem (and solutions) of qcow2 :

    • need target kernel with nbd support - nbd is very easy to activate when compiling kernels but not already activated on kernels. Decimalman kernels already are compiled with it. http://xdaforums.com/showthread.php?t=2226889
    • Slow speed on standard : speed on qcow2 especially when first installation is not good. To reduce this, livesnap booting mode gives very good speed.
    • suspend/resume : on tw43 kernels, deepsleep can hang the system. To correct it, their are 2 methods : adding a wakelock or apply a small patch to nbd.c sources.

    Some details about qcow2 booting mode :

    1. - standard : qcow2 images are acceded read/write directly on sdcard ( not recommended especially in firsts boot )
    2. - livesnap : qcow2 images are acceded read, writes are done in zram snapshots. commit are done at reboot time : this is the recommended mod. If you install apps, you'd better to reboot first to commit qcow2. Note that if modifications are big, reboot can be long ( few minutes ), be patient. Note also that in this mode, I added a wakelock to fix suspend/reboot of tw roms.
    3. - liveboot : same that livesnap but without commit - Same than a LiveCD in linux world. reboot speed is regular
    4. - fulllive : only for small roms ( say ~500M ). All qcow2 are copied to zram at boot and mounted from memory. No internal/external card needed. very good speed.
    5. - livesnap2 : same than livesnap but without wakelock. Best for speed and battery. Working except tw43. Download my modified dkp kernel to use this option on tw43 roms.

    Important recommendations :

    - when choosing qcow2, always choose the right nbd kernel as the last zip to install ( and don't reboot after Aroma installer )
    - please follow videos on youtube

    Here are last video I did to demonstrate qcow2 features. Some parts of video are boring ( during compression or commit ) but I wanted to let it go live to give an idea of processing times.



    Downloads : http://www.androidfilehost.com/?w=files&flid=12801

    References / Credits :
    mkasic : kexec-hardboot creator - http://xdaforums.com/showthread.php?t=1266827
    Tassadar : MultiROM creator - best project - http://xdaforums.com/showthread.php?t=2011403 - bbootimg used
    TWRP Team : http://www.teamw.in/project/twrp2
    7
    Totally forgot about this, I'll have NBD included in my next kernel so this can work :)
    7
    https://www.youtube.com/watch?v=j6GdvUfNppE In this video I see that you booted in the ROM w/o flashing gapps along w/ flashing the ROM ... is that necessary for this to work?

    Hi shekinahsmoke, no it is not necessary at all. It's better to install all zip in one shot, but I did this demo to show that you can come back to multiboot, select an already created rom and apply another zip ( gapps in this example ) even after first installation.

    I'd be very interested in testing the very alpha versions of this, as long as they're d2att or d2lte. best of luck man, i'm looking out for great stuff from you.

    If you need a tester for anything, I'm always available.
    Sent from my SAMSUNG-SGH-I747 using Tapatalk

    Hi codemonkey98 and rani9990, thank's for your future help on testing. I am now able to call and be called :eek:. I fixed partially audio too. Calling ring and microphone during call are now ok, only incoming audio is problematic ( because exit from speaker and not earphone ).
    Fall-back temporarly solution is to plug headset, in this case everything is fine during phone calls.

    Now, I will start to prepare version 2.1 of multiboot to support this ubuntu touch and I will probalby open a dev thread dedicated to this ubuntu touch 14.04 when I finish first package ( this we or start of next week ).

    Philippe,
    6
    Hi,
    Multiboot updated to v2.13 to support lollipop ( img roms )

    Philippe,
    6
    Will there ever be a way to get the data to work?

    Hi codemonkey98, the answer is possibly yes. :eek:
    In fact, I succeeded to make cellular data work under my ubuntu touch port ( Bell carrier) .
    Just have to confirm this first experimental results - I can surf internet with cell data ( without wifi ).
    However, phone line is still not working.

    [edit] Also sent and received SMS, so this is working also.


    Philippe,