yashsingh1/xdaforums huggingface dataset:
[Defy Android Development] wizwin:
@m11kkaa - I have attached a patch (hopefully) to prevent mix up of ROM's.

I have no idea if this will help coz I just added a few steps to prevent the system from proceeding with boot without a proper mount and also some force removals to dev entries.

I have tested these changes only to make sure that it will work under normal conditions.

@others trying to use this - Please try not to use this unless m11kkaa thinks it will help. I will just delete (or archive) it if m11kkaa thinks it will do nothing better or more harm than help. :D
[Defy Android Development] brajesh.sharma87:
nice, waiting for confirmation by mkk11aa before i proceed. ;)
[Defy Android Development] m11kkaa:
This should help in a way of preventing 2ndBoot on error.

I didn't know that the variabls "$?" exists :)

You can/should use it :)
[Defy Android Development] wizwin:
Thank you for the review and comments.

Multiboot is very useful for many of us who are eager to checkout CM9 builds while having a stable CM7 for normal use. :) Thanks again for making it.

It would be nice if you could give us an update.
[Defy Android Development] wizwin:
Attaching files that I currently use:

For Defy CM 7.1 + CM 9: defy_multiboot_v0.4_fix_prevent_mixup_7.1.zip

For Defy CM 7.2 + CM 9: defy_multiboot_v0.4_fix_prevent_mixup_7.2.zip

Currently booting:

Real - cm72-120226-NIGHTLY-Defy.zip

Virtual - CM9-ICS-MR1-120226-jordan.zip

Please use this at your own risk. I have not tested these changes much.
[Defy Android Development] brajesh.sharma87:
@m11kkaa: please release an update when you get time.
[Defy Android Development] antukubo:
So far I don't have any major problem with multiboot. But I'm surely interested with your patch... reserved for raining days. Can you explain more on ROM's mix up problem? What are the symptoms?
[Defy Android Development] Pekempy:
I have Android Bootmenu <v1.1.2>

In #Recovery it has

[Custom Recovery]

[Stable Recovery]

[Stock Recovery]

--Go Back.

Does this mean I can't multiboot?

Can I flash a new bootmenu and keep all the settings inside my CM7.2 (WhiteRabbit) ROM?
[Defy Android Development] syllogyking:
your real system goes in stable recovery, and your virtual system goes in custom recovery. no need to use stock recovery..
[Defy Android Development] crakeron:
@mkkaa11

Any update or work in progress for multiboot? Bugfixes? Anything to be excited about soon? ^^

Sent from my 1Ghz CM7 + CM9 Defy
[Defy Android Development] fiskenigaten:
Are you on whiterabbit? Please confirm if you're able to multiboot :) I wasn't able to do it, but I hardly tried ;)
[Defy Android Development] Pekempy:
I am! I'm finally sitting down to attempt to multiboot... need to work out how though =P haha

I'll be attempting to install WhiteRabbit as the stable CM7.2 rom, and then CM9 as the custom (AKA Virtual) rom from here: http://www.defy-cm.net/defy-cm9-nightly/
[Defy Android Development] leodfs:
I created one small application to help management of virtual system:

Steps:

1- Install the latest version of OFFICIAL NON- Edited multiboot 0.4 from this thread.

2- Create a (/mnt/sdcard/virtual) folder. < ---- IMPORTANT

3- Put all your folders with virtual images there. ex: /mnt/sdcard/virtual/wiui, /mnt/sdcard/virtual/cm9Epys. Name them as you wish.

4- Install multiBootFinal.apk and execute it. You could install it on virtual and real system for easy switch between installations.

5- Choose desired active virtual system.

6-Choose default bootmode <-- Optional.

don't forget to look this thread: http://xdaforums.com/showthread.php?t=1522329.
[Defy Android Development] antukubo:
@leodfs

i like the bootmenu, 2nd boot & 2nd init option. I'm looking for that method for a long time. A straight reboot without entering CWM. Well done mate.

But unfortunately, your app is not working. Re-flashed defy-multiboot v0.4, create virtual folder, move my fsimages to virtual folder, install your app & fire it up. I can see my virtuals on the list but nothing happen when i clicked on them. I then choose 2nd boot option and reboot. I got a bootloop on logo. Need to pull out the battery. Maybe i missed something?

By the way, i got suggestions if you don't mind

- create 'reboot' button

- better ui :D

Motorola Defy triple boot

CM7.1 + CM9 Quarx + CM9 Epsy3
[Defy Android Development] leodfs:
Hi, you have to install a virtual system in latest recovery, this app is just a switch and i need root previleges. Thnx for testing. Let me now if that worked. And you virtual folders must be inside folder virtual. Like that: /mnt/sdcard/virtual/miui, the images .img go on miui folder

I have tested and its working fine

Here
[Defy Android Development] antukubo:
Thanks for your quick reply ;)

Yup! my previous virtual system is always at latest recovery

Exactly... i copied those files from my existing fsimages folder to

- /mnt/sdcard/virtual/Epsy3 - cache/data/pds/stub/system.img

- /mnt/sdcard/virtual/Quarx - cache/data/pds/stub/system.img

Sadly still not working. Anyway, this is what i got from your app

Is Virtual false

Active Virtual fresh

What does 'false' mean?
[Defy Android Development] leodfs:
Sorry, i think i skip some things.

// Is Virtual means that you are not running a virtual system, i did this app in a way you can install it on virtual and real.

Is Virtual false

// fresh means that you just flashed multiboot0.4.zip before running, this is correct.

Active Virtual fresh

//Strange, you said that when you click in any item nothing change, but at least this line "Active Virtual fresh" should have change to "Active Virtual Epsy3(or anything)". And mostly strange of all: did it not ask you root privileges?

//If you have granted root permission when asked after click on a desired virtual, could you have a look in this file: /system/bootmenu/2nd-boot/fshook.edit_devtree.sh, and see if the string after /virtual/ is the string you selected? If there is no "/virtual/" string but a fsimage it means you didnt gave it root privileges.

"Exactly... i copied those files from my existing fsimages folder to

mnt/sdcard/virtual/Epsy3 - cache/data/pds/stub/system.img

/mnt/sdcard/virtual/Quarx - cache/data/pds/stub/system.img"

// Didn't directly understand that but I think i got it now. The virtual installation must follow the exact steps of OP. The difference is that you must extract the fsimage.zip to /mnt/sdcard/virtual/nameOfChoice.

If you have a working virtual just following the OP instructions, you just have to:

1- Copy, or move, you /mnt/sdcard/fsimage to /mnt/sdcard/virtual/fsimage(you can change fsimage name).

2- Install the multiboot.apk.

3 -Select the virtual name.

4-Grant root permissions.

5- Now the active virtual for 2nd-boot/last recovery is the one you selected.
[Defy Android Development] trurl3:
Hi leodfs

Just now on my Defy with CM72-nightly-123101 I installed multiboot v4.0 and after that CM9-nightly-120303 as virtual. Because your app looked promissing I made all this things:

1. Made on SD folder /virtual

2. Copied folder /fsimage with images of my newly virtual CM9 to folder/virtual and changed name of /fsimage to CM9 - so on SD i have /mnt/sdcard/virtual/CM9 with full images inside

3. Installed your app and runned it. In the open app I can see my ROM, but now I have some doubt:

What I should do after choosing my virtual ROM in your app? Reboot? And what should changed in your app after choosing virtual ROM? Because nothing happen ... After reboot I came back to my CM7 What goes wrong and why?
[Defy Android Development] leodfs:
Please PM me. I want to known what is happening and make proper modifications on the how-to. But for what you just write, I think you only miss to boot on 2nd-boot.
[Defy Android Development] antukubo:
Negative. When i click, nothing happen. No changes on 'Active Virtual fresh'. Not asking for root privileges. But if i change boot option to 2nd-boot, then i will get root privileges request.

Anyway, I'm running on stable CM7.1. What's yours?

** I really want your app to be working as you have extra options compared to others. Guys, let's make it working...;)

Edit : Good news leodfs. Manage to make it works :). I decided to install your previous version 'xda.multiboot.apk'. Now, the virtual list is finally selectable and gain root priviledge. But no boot option :(. I then re-install your 'multibootFinal.apk' and everything runs smoothly! hooray....:) So, i believe there's something missing in your final apk. Fix it mate and everbody can enjoy your work...
[Defy Android Development] trurl3:
Yes, that's right. Older version of multiboot.apk works fine for me.
[Defy Android Development] leodfs:
That is very strange. Could you please install only multibootFinal on your virtual and confirm this? the non working selection. Thanks
[Defy Android Development] antukubo:
some extra progress...

- boot from nandroid to virtual (and vice versa) --> success :)

- boot from 2nd to 3rd virtual (and vice versa) ---> success :)

- upgrading new CM9 nightlies (after install your app) --> success :D

Once I installed xda.multiboot.apk and select the virtual list, 'fshook.edit_devtree.sh' file will exist on virtual folder (which is not when direct installation of mutibootFinal.apk). So, I believe your final app is lack of this script.

Once on virtual, installation of multibootFinal is very straight forward because the 'fshook.edit_devtree.sh' file is already there.
[Defy Android Development] trurl3:
Actually I have only one virtual system on my SD. When I installed multiboot final on my virtual and opened it, there were such settins already set:

Is Virtual true

Active Virtual CM9

That means - settings are the same as on real system. Now I have to find e.g. MIUI for Defy to install as second virtual and then I will say something if app is working in virtual or not.
[Defy Android Development] leodfs:
@antukubo. Wonderful catch, just fixed it and now i am putting that reset button you asked. By the way anyone can give me a safe way to do it? I was testing "su reboot", but the fast way it reboots, don't think it is the best option.

EDIT: Version Updated. PLEASE DON'T USE THE REBOOT BUTTON ON YOUR REAL SYSTEM, i DON'T THINK IT IS REBOOTING IN SAFE WAY FOR NOW;
[Defy Android Development] antukubo:
Good job mate. Working great on nandroid and virtual (vice versa too). Reboot button also works, even on nandroid.

So, what's your next step? version 2.0 perhaps? :rolleyes:

Motorola Defy triple boot

CM7.1 + CM9 Quarx + CM9 Epsy3
[Defy Android Development] Epsylon3:
Bootmenu 1.1.6 will have a new boot option dedicated to the multiboot...

I need to know what files are required to keep the multiboot system upon rom nightly upgrade... (automatic backup like overclock config and baseband)

This third kind of boot is named 2nd-system and will not be included in CM roms to keep data upon upgrades...

so the principe is :

backup the script /system/bootmenu/script/2nd-system.sh

backup the folder /system/bootmenu/2nd-system (or whatever is required)

bootmenu will allow the use of 2nd-system.sh as a default choice too, if script is present...
[Defy Android Development] m11kkaa:
Hi Epsi. Thank you for the integration.

Can you make a little menu to select the multiboot-system if you have time for that?

I wanted todo that but my C-knowledge isn't good enough.

It would be great if you could place as much as possible into shell-scripts so I can make updates.(I have some great ideas).
[Defy Android Development] leodfs:
@m11kkaa could you test the app i did? it helps a lot management of multiples virtuals. If you find interesting i could give you some ideas on the new bootmenu.
[Defy Android Development] crakeron:
Hmm...seems like there's been triple brainstorming over here :D Keep on going your ideas are great!

CM7 + CM9 double boot
[Defy Android Development] hailmary:
+1 on this...

will be very useful for testers to easily isolate bugs for reports on the other ROM in virtuals.
[Defy Android Development] m11kkaa:
I will test and debug where the error is but this will take some time to download because my connection is fully stretched by CM7-source-download :)

Maybe you can debug yourself in the meantime with adb logcat :)
[Defy Android Development] TJKV:
Okay I tried installing WajkIUI and CM7.1-11 Stable as virtual with custom recovery, but didn't happen. The real ROM is 25th Nov's CM7 nightly.

Custom recovery says when I start it:

CyanogenDefy Recovery v5.0.3.3
E:Can't mount /cache/recovery/command
E:Can't mount /cache/recovery/log
E:Can't open /cache/recovery/log
E:Can't mount /cache/recovery/last_log
E:Can't open /cache/recovery/last_log

and then if i try to install a zip it starts and then says:

assert failed: write_raw_image("/tmp/logo.img"."/dev/block/mmcblkp10")
E:Error in /sdcard/"filename".zip
(Status 7)
Installation aborted

I had installed your patch from Stable recovery initially, but when the above errors came i installed it again from custom recovery and tried, but no change.
[Defy Android Development] m11kkaa:
If you install my tool via custom/lastest recovery it will patch the bootmenu inside the virtual system which will never be booted :D

It seems that there is an problem with the abstraction I added in v0.4.

If it's no problem for you that the update of virtual-system will change your logo,boot and devtree you can use v0.3.1 of multiboot.

http://www.multiupload.com/27LU9STUS6

I will try to reproduce and fix that later.
[Defy Android Development] TJKV:
Ah :P

Hmm no I think I'll wait for a bit, anyway I can't do anymore testing today, need my phone. So I might as well wait for the next one :)
[Defy Android Development] UEman:
Works well with CM7 as real system and ICS as virtual system. Speed is good. I have no problems with your multiboot v4. If you update your tool can I just flash it through the stable recovery of the real system?
[Defy Android Development] m11kkaa:
Yes you can easily flash a newer version over an older one.
[Defy Android Development] szacuken:
Multiboot v0.4 in action :)

NAND- CM7

SD Card- ICS

[YOUTUBE]_rtzTKV0gLg[/YOUTUBE]
[Defy Android Development] m11kkaa:
Thank you for the video.

I wanted to make one today but I have no camera which is good enough.

And recording the defy with itself is not possible ;)

BTW: great to see my mod in an polish forum :D
[Defy Android Development] iammodo:
worked for me with cm7 official and miui android.

[YOUTUBE]CzvUwN4h6xk[/YOUTUBE]
[Defy Android Development] UEman:
Multiboot doesn't work with galnetmiui-ics. You just get a bootloop.
[Defy Android Development] iammodo:
I found this too.
[Defy Android Development] m11kkaa:
Sorry but I really cannot reproduce this failure.

I tried CM7, CM7-nightly and Wajkl as Base and in different combination as virtual system.

Maybe reinstalling bootmenu helps?

I'm still on the problem with "galnetmiui-ics" downloading always takes so much time :mad:
[Defy Android Development] TJKV:
*facepalm*

forgot to place the image files in /fsimages folder and not root of SD. Sometimes we miss the smallest of things...

My previous post with the error can be ignored :) sorry for wasting your time...
[Defy Android Development] UEman:
The latest GalnetMIUI-ICS has the bootloop problem even if you flashed it without the multibootmod. ;)
[Defy Android Development] m11kkaa:
Yes, you're right!

So it's not a problem of multiboot :D:D:D

The CM7-source is already downloading :cool:
[Defy Android Development] danielthuy:
Just tried "ICS-Miui-DSJ multilanguage" on SD card, everything got perfect, even far smoother than my CM7 on NAND.

Thanks so much m11kkaa. Incredible work!!!!!
[Defy Android Development] hackergnome:
M on ms2ginger 2.1

Flashed ur script through stable recovery with imgs in sdcard/fsimages

When i get into the latest recovery i get a red led... Recovery opens up perfectly...

Is that normal?

Multiboot .3.1
[Defy Android Development] m11kkaa:
The LED get's red only the first time(when the images are empty)

That's because it looks for the file "/system/build.prop" which does not exists at this time.

But everything is still working even with the red led turned on :D

BTW: The red Led(instead of the green one) at boot only means "doing 2ndBoot".
[Defy Android Development] brajesh.sharma87:
So that means, i can even try original (like walter's roms) gb roms on multiboot. Is that right? And bdw can i have more than 2 roms?

Sent from my Moto Defy
[Defy Android Development] m11kkaa:
If the 2nd-init-scripts inside the are configured to work like stock this should work. Just try it :D

Theoretically you can use multiple virtual systems. But currently there is no comfortable way to choose between them. It's really hardcoded.
[Defy Android Development] nepotu:
Hi Epsylon3! Does this mean that you will include also m11kkaa's multiboot patch in the new bootmenu version?

Also I have another dumb question. Is it possible to compile only the bootmenu (android_external_bootmenu) and CWM without the entire CM repository (android_device_motorola_jordan)? Sorry if my question sounds dumb, but I haven't used github so far and hence I'm not familiar with the compiling process nor am I familiar with the data segmentation.

Once again thanks for the tremendous work and for making real the ICS dream for the Defy users!
[Defy Android Development] wyumhk:
So far, we have multiboot for Froyo kernel only. Is it possible to have multiboot for GB kernel ? Or this is limited by the kernel ?
[Defy Android Development] Epsylon3:
no, you just need to have 2 os made for the same kernel... (can be ubuntu also)

but no i cant include that in rom (too much specific yet) but i can add some entries in the things to backup upon upgrade, to be able to keep the files required in system

There is another solution also for multiple systems ... bootmenu can launch a second tool based on bootmenu/recovery interface (its called minui) which will do this job...

new build uploaded (with fully working video record, torch and new ringtones)

ps: but... maybe yes we could do that in bootmenu... i need to implement the dynamic menus for that
[Defy Android Development] leodfs:
Hi Epsylon3, some thought:

That dynamic menus is something like make contents of menu for one folder list? If it is not you could just do something like this, without dynamic menus, for your new 2nd-system menu?

configure [yes/no]

//if yes the item selected will go to a recovery menu to configure the virtual

//if no the item selected will just boot. The default would be no

// a list with folders inside a especific folder on sdcard,for easy install. //// Something like : /mnt/sdcard/virtual/cm7Epsy, /mnt/sdcard/virtual/cm7Quarks.

As selected it will copy the proper scripts on that folder to the system folder for 2nd-system(if no is marked on previous item) . That would allow that freedom m11kkaa is asking for script that may allow virtual be a image or a couple of scripts to backup/restore current system files for updates.

*cm7Epsy

*cm7Quarks

//A timer :p to boot to default system, because I forget to select things on bootmenu and put it the cellphone on my pocket. And no one is allowed to call me.
[Defy Android Development] wyumhk:
If using multiboot-v0.4 with GB Kernel, both the main and 2nd-system can boot up, but the 2nd-system has no phone signal. APN setting is empty and manually adding APN cannot be saved.
[Defy Android Development] hackergnome:
if can see even the baseband is empty! in about menu!!!
[Defy Android Development] hackergnome:
I don't find 2nd-system.sh in 05March ics!

is it only in 04March?

i dont even get the whole process!

where to put the imgs and stuff plz someone explain me...
[Defy Android Development] Epsylon3:
2nd-system.sh must be provided by the multiboot system... else it will boot an empty script...
[Defy Android Development] hackergnome:
Ohh!! Still did not get it!! Hahaa am an idiot!!
[Defy Android Development] nepotu:
Hi Epsylon3! Thanks for the updated bootmenu. I've tried it last evening and I can confirm it's working (with one minor bug).

Since I'm not using CM9 as a main system I used the latest bootmenu from your CM7.2 nightly (CM72-20120304-NIGHTLY-Defy.zip) and patched it with m11kkaa's multiboot patch modded to reflect the changes in the bootmenu. Here is what I've did:

renamed m11kkaa's 2nd-boot folder to 2nd-system

renamed m11kkaa's 2nd-boot.sh to 2nd-system.sh

replaced the existing recovery.sh from the scripts folder with m11kkaa's version

updated the path in all m11kkaa's scripts (changed 2n-boot reference to 2nd-system)

Then I've tried to boot the virtual system using the 2nd-system option from bootmenu but it did not work, nor the 2nd-system + adb option, but the virtual system can be successfully loaded if you set 2nd-system as default and reboot. Am I doing something wrong or is there something that is not properly configured in the bootmenu?

Since I had installed CM9 as a virtual system using the old patch I did not tested the installation part, but it should work.

Once again thanks for your work!
[Defy Android Development] Quarx:
I fixed the 2nd-boot.sh script.. extract from arhive to bootmenu/scripts..

Phone should work:) (for gb kernel), it is will not broke the froyo kernel.
[Defy Android Development] wyumhk:
Thanks.

I'm charging my phone, I'll try it and report the result later.
[Defy Android Development] wyumhk:
Thanks, quarx.

It's working with GB kernel now (gb kernel 2nd system has signal now).

EDIT :

m11kkaa,

Could you update your script with quarx's fix ?

This will be easier for us.

EDIT 2 :

m11kkaa's v0.4 multiboot script + quarx's fix is here. Both froyo & gb kernels can used.
[Defy Android Development] t1MzN:
hey there,

so i'm on miui (2.2.11)

gone in recovery. installed the multiboot.

rebootet, gone in "latest" an installed this one: CM9-NIGHTLY-120308-Defy(hwa).zip

rebootet. booted with 2nd boot... bootloop.

what did i wrong ?
[Defy Android Development] walter79:
New multiboot works well with gingerbread kernel. (MS2Ginger+CM7 with 4.5.2-109dht-22 kernel) Big thanks.
[Defy Android Development] wyumhk:
Is miui (2.2.11) froyo kernel ?

bootloop : red moto logo or the boot animation ?
[Defy Android Development] t1MzN:
its froyo and i see the red M logo... :(
[Defy Android Development] walter79:
fshook.init.sh

for boot fsimage from data partition (copy fsimage folder to /data of you first system)

#!/sbin/sh

######## initialize fshook-environement

export PATH=/sbin:/system/xbin:/system/bin

# copy fshook-files to ramdisk so we can access it while system is unmounted
mkdir -p /fshook/files
cp -f /system/bootmenu/2nd-boot/* /fshook/files

# mount partition which contains fs-image
mkdir -p /fshook/mounts/imageSrc
mount -o rw -t ext3 /dev/block/mmcblk1p25 /fshook/mounts/imageSrc

exit
[Defy Android Development] hackergnome:
Wow... I was thinking about this the other day... i tried but failed... thanks... now i know where i went wrong... thanks!!

Male a Script so its easier to use!
[Defy Android Development] Major0418:
Would you plz post the Original 2nd-boot.sh File? I overwrote it so I've encountered a prob: ICS 2nd boot works well but 1st boot 2.3.4 stuck at Motor Blur Log-in then my device restarted. Plz re-post it
[Defy Android Development] m11kkaa:
I created an githup-repo for this project(link in first post).

I recently restructured the whole code :)
[Defy Android Development] m11kkaa:
@epsilon: You have an error in 2nd-system boot:

You do the existence-check for the file "2nd-system.sh" too late and you break an if/elseif relation.

BTW: Why you added this check? The function "exec_script()" already does this...
[Defy Android Development] m11kkaa:
Good news!

I worked the whole day on multiboot and now I've implemented many new features.

Look at the first post for more info. I will release the new version as soon as I think it's stable enough.
[Defy Android Development] walter79:
Can you add new binary for 2nd-init and 2nd-boot (bootmenu/binary)

This fixed a problem with the default MS2Ginger kernel (4.5.3-109-dpp-11)

2nd-init. installer app. did not have this new binary files.

You can use the files from latest CM7/9 build. build-date: >= 17. march 2012
[Defy Android Development] m11kkaa:
These binaries are always taken from the virtual filesystems.

So the binaries inside the rom have to be updated.