yashsingh1/xdaforums huggingface dataset:
[Defy Android Development] m11kkaa:
For those guys which does have a little bit linux-knowledge here is the explanation why shared battery-stats are complicated:

- The batterystats.bin is located in the folder "/data/system/"

- so I can't bind-mount the whole folder "/data/system" from NAND-system into virtual systems(like I do that with "/cache/recovery"), because there are other important things in this folder.

- symbolic links does not work, because they will be overwritten with a real file by the android-system

- hard-links are not possible(cross-device)

The only way I thought was live-patching the framework with a new location of battery-stats. But that's a little bit complicated and it's a very dirty way.
[Defy Android Development] adamo3957:
Its a round about way of doing it but one way is before the data is unmounted copy the battery stats file somewhere, when the new system has been mounted the overwrite the battery stats back?

teamwork makes the dream work
[Defy Android Development] ganesh0992:
royale's latest MBM works completely with 0.5.1 multi boot.....u can easily create images using that MBM

by specifying the size of each images...then renaming the folder according to ur rom name...
[Defy Android Development] Christiancs1969:
Thanks
[Defy Android Development] trurl3:
I found answer for my problem with booting into new installed ROM's. The name of VFS folder in /multiboot should be max 8 characters long. If it is longer then VFS doesn't want to boot - there is only red light two times and you are back in bootmenu. What intersting - first boot in new VFS after instalation could be successful even with name longer than 8 chars, but only first time. I have shortened names of my VFS's and all things works.

Could it name a bug in multiboot_v5.1
[Defy Android Development] nepotu:
I second what dlhxr and trurl3 said. If the name of the directory is too long, then the virtual system will not boot. I did many tests and found out that the maximum length is 9 chars. Also I thought that it has something to do with the full path (/fshook/mounts/imageSrc/multiboot/<virtual rom dir>) and I've tried to make it shorter, hoping I will get more chars for the virtual system, but I was wrong. If the folder length is greater than 9 chars it still does not boot.

Hence, i think the issues is elsewhere. What's even stranger is that in the error log the last line finishes with "Error: 0"(log1, log2). I've looked at the errorCheck() function in the fshook.functions.sh. The error should actually be throw out if the last command result is different than 0 (zero). Is it possible that the result contains one extra space in front of the 0 and the result is " 0"?

m11kkaa , is it possible that the folder length can be increased from the multiboot binary (I have looked at all the scripts and couldn't find anything related, that's why i assume it resides in the multiboot binary, or maybe I omitted something)? If not, maybe could add some extra checks in the directory listing function that will remove (do not display) the folders that have more than 9 chars or include spaces in the name.

PS: could you also share the multiboot binary code?
[Defy Android Development] hackergnome:
+If u press go back in Real System Recovery it gives a blank screen...
[Defy Android Development] leodfs:
Thing is, deal with char arrays in C is a b$ch if you are not used to. There must be some (for i=0;i<8;i++)

somewhere forgot by micca.

This last version rocks.
[Defy Android Development] TJKV:
Then a strlen() should do it right?
[Defy Android Development] joydeep1985:
Hmm intersting . But on the contrary "Pikachu" wont boot and now i got why "WhiteRabbit" didnt boot after successful Installation rather it went back to bootmenu. Its justified "Whiterabbit" is too long . But why after Successful installation of "Pikachu" when i tried to boot into it . My phone froze into blank screen for eternity until i pulled the battery . :rolleyes:

Update : Tried to flash Whiterabbit (Froyo kernel ofcourse) on to renamed folder "CM7WR" . This whiterabbit worked fine in v0.4 . now here i faced the same situation as trurl3 . the red light just blinks two times and does nothing just stays in blank screen . Tried wiping data/cache + wiping dalvik cache . No Joy !! its d same . I wonder why it worked in v0.4 and not in 0.5.1 bt even through the development by M1kkaa has been really extraordinary work :) to make multiboot successful :)
[Defy Android Development] douglasanpa:
Time in multiboot

Does it have to do type GRUB? after a predetermined time to start a ROM standard, real (NAND) or virtual?
[Defy Android Development] joydeep1985:
AFAIK grub resides in MBR of linux system. In bootloader . ITs a old story in defy . Since bootloader is locked We cant have grub system here . The bootmenu works after bootloader scripts have executed . not before the bootloader script
[Defy Android Development] dlhxr:
i tried several popular roms in China. Some of them fit multiboot well, but others can't boot.

Fitting well:

CM9

Miui

MokeeOSmodified (it automatically reboots at the first time and boots normal at the second time)

Can't boot:

Original MokeeOS (black screen)

Official Moto Rom(2.3.6) with bootmenu( showing real system bootimage and not booting afterwards)

Summary

2 kinds of problems.

firstly, black screen problems. i am trying to compare the modified MokeeOS with original MokeeOS, no progress.

secondly, booting into real system problem. it happens when i flash a official rom. it seems that maybe there's another mounting progress in official rom? and give us the real system partition...
[Defy Android Development] R3wt3d:
Hi

Any chance to get this ported to other system like Atrix?
[Defy Android Development] nepotu:
dlhxr, I suppose a Motorola ROM's will not boot using current version of multiboot because we are using the 2nd-init.sh to boot the virtual system, while the stock one should use other script (stock.sh iirc).

PS: for bash something like this "string_length_var=${#string_var}" can be used to get the length of a string.
[Defy Android Development] douglasanpa:
I'm not talking about porting GRUB, I'm talking about time to start a ROM!
[Defy Android Development] leodfs:
@douglasanpa I gave him this suggestion, this and automatically enter recovery when you select a option that was not installed yet (checking for absence of pds.img and stub.img).

@dlhxr if modified Mokeeos works, That is Just Fine :). But I Didnt Now that, I Had Intalled Mokee In Nand To Solve this.

@tejus.k.v and nepotu. You guys got me wrong. I was talking about this error being a distraction of micca rather then a system limitation. He probably knows how to solve it.
[Defy Android Development] shawnshine:
How does one go about *uninstalling* MBM? I've deleted my VFS images, but can't seem to find any uninstall instructions for the MBM bootmenu.
[Defy Android Development] adamo3957:
Re flash your nand system should do it

teamwork makes the dream work
[Defy Android Development] nepotu:
If you want to skip the multiboot menu when you start your Defy then you should set 2nd-init as default boot mode (in bootmenu options).

If you are referring to the Multi Boot Manager application, as far as I know it should be removable as any other application and if you have any issues you can always ask royale1223 (the dev of the app) to assist you.
[Defy Android Development] N34S:
my problem persists. multiboot 0.5.1 gets really crap, i can't boot also CM 7.2 in multiboot (my actual phone rom, but another one in sdcard). just restarts in stock recovery (keeping the 2nd-boot from default boot) and changing the default boot it reboots in multiboot menu. i don't think is a kernel issue, cause first i tried to boot cm9 with cm9-kernel-signed but the problem persists and the screen remains black and nothing happens. I also tried with flash the recovery of the last build of CM9, but didn't solve the problem... I implore you to help me, or I'll go back to 0.4 to take advantage of the feature.
[Defy Android Development] joydeep1985:
u didnt mention which is ur primary rom and which is on 2nd boot. Also you didnt mention whc version of CM9 are you using is it froyo build or defy+ build . GB kernels does have an issue with Multiboot.

My method is simple .

1. Flash CM9 Froyo build .

2. Flash Multiboot

3. Select CWM from multiboot menu (Not bootmenu CWM Latest/Stable they no longer relevant)

4. Flash CM7.2 / WIUI / any other froyo rom ( apart from Stock also whiterabbit and pikachu didnt work for me )

5. Boot into CM7.2 from Multiboot menu

Note : Before flashing please make sure you have fsimags inside that CM7.2 folder under /sdcard/multiboot/CM7.2 folder

good luck :)
[Defy Android Development] joydeep1985:
My MY ... !! the issue with me also startd :rolleyes: . It seems there are roms which has some issues with Multiboot (Froyo based only) .

I would mention only the roms which are troublesome to flash and giving visible error information or else phone becomes unresponsive

I tried to install Mookee modified , CNA 1.6 , Whiterabbit , Pikachu . As far as my tests are concerned I faced two kind of situations

1. With Whiterabbit and Pikachu :

When i was on v0.4 whiterabbit was working fine . However pikachu didnt work for either on v0.4 and o.5.1

Behavior : On v0.5.1 :

Both Pikachu and whiterabbit after wiping data/cache and dalvik cache . I tried to boot into the rom . The phone became unresponsive , no reponse or haptic feedback , the capacitive buttons went dead . the phone was frozen . No kind of reply

on v0.4: Only pikachu behaved like above mentioned .

2. With CNA 1.6 and Mookee Modified :

Didn't get to test this on v0.4

On v0.5.1 : Both roms after installing wiping data/cache and dalvik cache . I tried to boot into the rom . Both roms shows the Motorola Red logo .The Red LED lits up .Flashes twice and it keeps on blinking twice after a pause for iternity .

However on v0.4 CNA 1.5.5 worked just fine :) .

There are my Test results . If anyone finds solution to this or any modifications for bootmenu made this work You are most welcome .

M1kkaa please go through these tests so that we can find the diffrences if we are missing any point :) .Thanks again for you hard work :)
[Defy Android Development] Epsylon3:
ok, i fixed a bug present in 1.1.7 related to 2nd-system... the option was hidden

in 1.1.8, the menu will be different with a ADB toggle... and no more reboot required to continue (this was required due to a bug in camera, but its resolved now)
[Defy Android Development] N34S:
sorry if i didn't mention some things, I wanted to be less discursive :p. i have Defy Red Lens running cm72-20120321-NIGHTLY-Defy+ on gb kernel.

i've flashed CM9-NIGHTLY-120330-Defy+ on fsimages, and the problem is the one i've mentioned above.

I took all the precautions. the images are in their directory (sdcard/multiboot/system1; system2 ecc.....) and i flashed the zip of CM9 (i tried also with cm9-kernel-signed, same problem, only black screen) and also tried to run CM7.2 (always in multiboot, the same procedure done with CM9 on fsimages) and it reboots on multiboot menu.

The phone rom (cm7.2) works with actual kernel (4.5.3-109) but same rom in 2nd-boot wont work. I think this problem is due to incompatibility with the gb kernel, imho is not properly supported :cool:.
[Defy Android Development] Epsylon3:
ive just tested with 2 CM7.2 here, really good work, even the SDCard usb share is working :)

I will upload today a new CM7.2 nightly with bootmenu 1.1.8 and a new backup system which support multiboot 0.5.1... (no need to reinstall the zip, your host rom will keep the multiboot scripts)
[Defy Android Development] pabloltg:
fsimages "lite"..

Download
[Defy Android Development] Epsylon3:
Its maybe possible to compare the file dates on the different data.img to get the last one and extract the bin file from it...
[Defy Android Development] joydeep1985:
Yes it was told earlier :) only froyo build are supported now :) no GB kernel please for multiboot :)

---------- Post added at 05:13 AM ---------- Previous post was at 05:12 AM ----------

So then our CM7.2 would be the host right ? Can you do the same with CM9 nightly ? cause i would like to have CM9 nightly as my primary rom rather thn flashing it to multiboot :)
[Defy Android Development] hackergnome:
Weird coz I use gb kernel and multi boot!

I use cm9 as main and argen2stone as 2nd...and defy plus cm7 too sometimes....
[Defy Android Development] joydeep1985:
Wow!! perhaps you post your method of flashing like video or smthng if possible .So that we also can learn it :) . That would be nice if we can run GB and froyo kernels simultaneously :) . Cause i personally didnt succeed in running GB roms , infact M1kkaa also told gb wasnt properly supported . If it does it would be great :)
[Defy Android Development] hackergnome:
3 days ago I made a video of multiboot tut about 5-6 min at 640*480... Saw the size was 250MBish... and deleted the video!!! My upload speeds sucks!!(30kBps)

bdw... I don't use froyo kernel with multi boot... used only once when I wanted to try wiui...
[Defy Android Development] hackergnome:
The main os doesnt boot anymore

sd os cm7 boots fine

i replaced devtree from stable recovery now it wont boot

no sndinit...

will flash back wen i get time¿?
[Defy Android Development] m11kkaa:
Yes, stable recovery is for your real system.

You have to use Lastest/Custom Recovery to configure your virtual system.
[Defy Android Development] douglasanpa:
Wipe data/cache works almost perfect, except it delete the folder .android_secure real system!

would like to have a virtual system. android_secure him alone?
[Defy Android Development] Borowik13:
I have a problem with restoring backup on 2nd recovery. It have an error while restoring data and it is not restored finally. Backup works normally on 1st boot recovery.
[Defy Android Development] m11kkaa:
I will look at this problem but isn't the android_secure-file on the sdcard?

Are there any error-messages?
[Defy Android Development] douglasanpa:
that's right ...

when I do a wipe in custom recovery it deletes the folder .android_secure, making programs on the sdcard real system are excluded
[Defy Android Development] m11kkaa:
That's because the sdard isn't virtualized.

The question is how we can solve this?

If you want to use App2SD in the virtual system you really need a virtual sdcard.

But so you can not use the sdcard for all systems(maybe for the nandroid-backups).
[Defy Android Development] douglasanpa:
I did not want to use app2sd the virtual system, this would wipe that when the virtual system do not delete the folder .android_secure
[Defy Android Development] Borowik13:
Just error while restoring data, but this error is good. I have just tried to restore backup from first boot, and restore for second. If i had done it, i wouldn't have acces to any rom. Becouse bootmenu is also stored inside backup. You should write this warning in first post. I have messed 1st boot in bootmenu and got bootloop (even restore of backup hadn't helped).

It looks like recursion.
[Defy Android Development] m11kkaa:
Do you mean that installing a ROM in the real system removes the multiboot-mod?

If so, that's right and I'll add a warning.
[Defy Android Development] Borowik13:
It is complicated like recursion, if you install 1st boot backup on 2nd system this will remove 2nd boot, becouse it will thing "i am the first". Edit: It is only for 0.31 version, now for 0.4 it is working

But how i managed to bootloop 1st boot?

I will make more tests in a few days, i have made it unbootable twice.

Or someone there can check it, you will probably need reflashing after it.

Another edit:

Restoring backup which was made on 1st recovery don't work on 2nd recovery, error while restoring data, so finally all data is not restored.
[Defy Android Development] m11kkaa:
Your explanation of the first part of your problem isn't plausible to me,

because The 2ndBoot-script does never look or execute for 2ndBoot-scripts in the virtual system.

It really does ignore completely the bootmenu and manually copys the 2ndInit files of the virtual system into the ramdisk.

But I will test what will happen if I do that.

The second problem sounds much more worse :confused:
[Defy Android Development] Borowik13:
First works on 0.4 (no problems with booting, but restore of data don't work), but i found another, backup in 2nd recovery doesn't backup data. "Error while making backup image of /data!"
[Defy Android Development] m11kkaa:
Updated first post with a little warning regarding "RealSystem"-updates :)

Tomorrow I will analyse the bugs mentioned in several posts :cool:
[Defy Android Development] geecko:
I updated to CM7.2 and I lost the "latest recovery" option (I have a custom recovery option though), how can I get it back ? :)

Thanks
[Defy Android Development] iammodo:
Custom recovery is your new latest. re apply the mod and all is good.
[Defy Android Development] crazy4tricks:
Thanx

Thank you....

Its working perfectly with CM 7.1.11, tested with CM9 ICS mod :D
[Defy Android Development] cardozclive:
Works perfect:)
[Defy Android Development] Sidz4u:
I installed cm7 as virtual rom over my wiui as real rom. Now i want to install ICS as virtual system over the presently installed cm7. Shall i wipe cache or data/cache or what ?

Tia
[Defy Android Development] zencoran:
do not wipe data! It deletes android secure so you're apps on main ROM wont work
[Defy Android Development] joydeep1985:
Hmm... Wasn't in knowledge with that . Could you confirm one thing which combination of below are you using ?

1. Primary : Froyo Sdcard : ( system 1 : Froyo / system 2 : Froyo ..... etc)

2. Primary : GB Sdcard ( system 1 : GB / System 2 : GB ....etc)

3. Primary : Froyo Sdcard : ( system 1 : Froyo / system 2 : GB .....etc)

4. Primary : GB Sdcard: ( System 1 : Froyo / System 2 : GB ......etc)
[Defy Android Development] hackergnome:
its all gb... (2)

and used wiui for a while(had to flash froyo kernel) then deleted
[Defy Android Development] joydeep1985:
Thanks for the confirmation . I have updated my tutorial , and have confirmed gb support for Multiboot.
[Defy Android Development] N34S:
brake brake brake brake...if nogoodusername can run GB Kernel, why I am stuck with him? :(

i was able in multiboot 0.4 to execute defy+ CM9 only replacing the 2nd-boot.sh from CM9 like prescribed from walter79.

in changelog mikkaa has added the support of gb kernel in the rom

why i can't execute CM9 Defy+ in this new release?

the problem also involved a different user

so I'm not the only one, is an unusual problem. why it's caused? what version of bootmenu you use? (asking to all, of course).
[Defy Android Development] trurl3:
If you ask me, I'm on Bootmenu v1.1.5

My greatest achievement till today was flashing CM7.2 over my Defy. It is above my head how to change Bootmenu for newer one :).

Would be very thankful for some advice...
[Defy Android Development] leodfs:
I would recommend you to make a backup of your /system/bin/bootmenu and replace it by new one inside the zip of the rom you want, wich is located in the same path, when you extract the zip. It work for me on mokeeos
[Defy Android Development] ganesh0992:
combination 3 and 4 i.e multiple kernels isnt possible yet...
[Defy Android Development] trurl3:
Is it really so simple? As I understand ROM's installed on virtual do not affect nand bootmenu?

Correct me if I'm wrong - if you flash new ROM in stable recovery then you change nand system and bootmenu will change to version which given ROM contains.

If you flash the same ROM on virtual bootmenu doesn't change. But you can extract bootmenu from given ROM and replace it in your nand system, right?

Will it be worked with old ROM? Actually I do not want to change nand ROM, I am only playing with ROM's on virtuals...
[Defy Android Development] Epsylon3:
yes you can replace the bootmenu binary, just check the permissions are correct after with "ls -al" in adb shell or a terminal...

CM9 backup support will be in my next builds, but remember to tell me if new files (scripts) are required to backup on upgrade :

https://github.com/tpruvot/android_..._mb525/releasetools/multiboot_backup_list.txt

---------- Post added at 09:01 PM ---------- Previous post was at 08:56 PM ----------

http://atrix.tk

Ive made builds with bootmenu, but 2nd-init need fixes and require my kernel variant (atrix moto kernel forbid to use the framebuffer outside recovery !)
[Defy Android Development] dlhxr:
hi, @Epsylon3. could you figure out why we have so much trouble using the multiboot?

such as some rom appears black screen like original mokee and some rom appears real rom boot animation like official moto rom?
[Defy Android Development] hackergnome:
maybe img size...

like cna1.6 only boots with 300MB system 250+mb data and 150+mb cache...
[Defy Android Development] joydeep1985:
Yes !! I noticed that too after you guided me . But it makes no sense since . the img files are just partitions after all . What booting a rom has to do it anyway with partition size ? And even if its so how we are supposed to find the perfect combination for each of them ?
[Defy Android Development] dlhxr:
i think the first black screen is caused by some boot sequence because a simply modified mokee rom can boot.

and the second one may not be caused by the size of the partition. because it shows the real system's boot animation. maybe one of official rom boot sequence is to mount the real system partition...
[Defy Android Development] hackergnome:
true img size shouldn't be a problem...

check logs with 2nd boot+adb post it here...