yashsingh1/xdaforums huggingface dataset:
[Xperia Z1 Original Android Development] munjeni:
New bootmenu.img is out! I have managed to enable last_kmsg in current kernel but since cm kernels have no enabled last_kmsg we will use bootmenu kernel for kexec test. Things needed for test will be:

0. install new bootmenu.img

1. boot into bootmenu, establish adb connection by command (adb shell)

2. create directory (mkdir -p /data/media/0/bootmenu/test)

3. (cd /data/media/0/bootmenu/test)

4. extract bootmenu kernel (../bin/kernel_dump ./ /dev/block/platform/msm_sdcc.1/by-name/boot)

5. (mv boot.img-dt dt.img)

6. (mv boot.img-zImage zImage)

7. (rm -rf boot*)

Now you have zImage and dt.img dumped from bootmenu, and its stored in bootmenu test dir. Execute kexec by pointing to test folder for zImage and dt.img + use recovery from bin folder. When you notice a bootloop than simple boot into bootmenu and give me last_kmsg by command:

adb shell cat /proc/last_kmsg > last_kmsg.log

Attach here last_kmsg.log and I will see if bug is kernel related, if not than we know its cwm related! If it is cwm rrelated than I will modify recovery in order to dump log to the internal storage. :) Lets see :)
[Xperia Z1 Original Android Development] SafiXS:
Finaly got the kmsg ;D

here they are (one from 0x200 and one 0x300) LINK the first time i have boot cwm with 0x200 was boot fine.

Hope you can identify that bastard :D haha
[Xperia Z1 Original Android Development] munjeni:
Seems you misunderstood me... I no need kmsg, I need last_kmsg (til after cwm fail to boot) by procedure from previous post! :)
[Xperia Z1 Original Android Development] SafiXS:
you looked inside my link already? it is last_kmsg ;D i shortened it only ;D

and these two are from failed cwm boots
[Xperia Z1 Original Android Development] munjeni:
Is it realy after bootloop?
[Xperia Z1 Original Android Development] SafiXS:
bootloop? bootloop means device will not start anymore.

first i've flashed your new bootmenu

2. did the steps you written down (extract kernel ..... rename..)

3. kexec with 0x200... cwm was boot successfully

4. reboot and kexec with 0x300... immediate got the bootscreen of bootmenu, not recovery

5. reboot and pull this last_kmsg.txt with your command

6. reboot and kexec with 0x200... immediate got the bootscreen of bootmenu, not recovery

7. reboot and pull this last_kmsg.txt with your command

after each step i have renamed the last_kmsg.txt to categorized it
[Xperia Z1 Original Android Development] munjeni:
Thanks for detailed explanatation! Soo definitelly kernel is OK!

I have done new cwm which will write log directly to the bootmenu folder into file "bootmenu.log", hope we get "crazy problem" identified in log! :)

Try this one http://munjeni.homeunix.com/ramdisk-recovery.cpio please!
[Xperia Z1 Original Android Development] munjeni:
Please catch your log by adb shell when cwm fail to boot:

adb pull /data/media/0/bootmenu/bootmenu.log
[Xperia Z1 Original Android Development] SafiXS:
Okay, now new problem ;D

1. i replaced the old recovery file with the new one

2. kexec with "test" folder and 0x200 recovery boot fine and got one bootmenu.log

3. renamed this bootmenu.log to don't get overwritten

4. kexec with "test" folder and 0x300 recovery don't boot and dont got new bootmenu.log

5. kexec with "test" folder and 0x200 recovery don't boot and dont got new bootmenu.log

Here is the one bootmenu.log i got from the successfully recovery boot

bootmenu.log

btw. did i have to repatch anything? the cm11 rom or something else or is it enough to replace the recovery file?
[Xperia Z1 Original Android Development] munjeni:
:( ...since there is no bootmenu.log from failed cwm! I have no idea how we can debug non working recovery :( I will try to use bootrec-method recovery (start ramdisk from ramdisk)

You can not use our test recovery in your cm11 folder since every bootmenu seccond rom folder contain patched recovery (changed path to the folder of the rom)
[Xperia Z1 Original Android Development] munjeni:
Huhh, this one -> http://munjeni.homeunix.com/ramdisk-recovery.cpio is last one I will make and if these one not working than I apsolutly have no idea why! New one use "bootrec" method to enter into recovery, but you will not need to press volume button since it will blink led and enter into recovery automaticaly! Please try and let me know if these one at least blinking :)

DO not use these recovery for replacing one in bin folder, just use these recovery for test only than restore a previous one.
[Xperia Z1 Original Android Development] SafiXS:
i've renamed old recovery to restore it later ;D

I'll try the new ramdisk-recovery now and i will edit this post with the results

i have got a last_kmsg file from a stucking cwm if its help you. some crazy things there on the last line ;D

see attachment
[Xperia Z1 Original Android Development] munjeni:
Nothing special there. :)
[Xperia Z1 Original Android Development] SafiXS:
Gimme one a moment, i backup my actual stock rom and after than i make cm11 as primary and another cm11 as secondary to see if whats happend then. maybe a full cleanup brings magic ;D
[Xperia Z1 Original Android Development] munjeni:
No please! Do not use this recovery to replace these one from bin folder since our recovery ramdisk is working by diferent way! Please test using kexec only!
[Xperia Z1 Original Android Development] SafiXS:
i've did it allready.

1. kexec it with "test folder" cause instant reboot like bofore nothing changed

2. kexec it with "cm11" cause instant reboot like before nothing changed

3. kexec it with "mainrom" recovery boot with bootmenu bootscreen o.O

to late i overwritten already stock with cm11. let me try what happend when i have two cm11 on device
[Xperia Z1 Original Android Development] munjeni:
I have created new bootmenu and bootmenu_honami ...please test everything from begining (mean - delete whole bootmenu folder and replace with new one), do not use kexec, please try trought bootmenu only! I must go now and must say if these thing is not working than I will stop working on bootmenu until I get idea since I am out of ideas by now, sorry! Good night, good luck and BIG THANKS! ;)
[Xperia Z1 Original Android Development] SafiXS:
Thank you!

i'll try it and report you. this week now i dont have much time to help. i came back from work at late afternoon 10:00 pm middle European time.
[Xperia Z1 Original Android Development] munjeni:
Hey hey, I have the same new one bootmenu and bootmenu_amami, new method of the cwm ramdisk boot with stock kernel but can not boot with cm kernel, thats the same like problem you have! In the morning I will look into ramdisk to see what is missing or why it can not boot, will compare working ramdisk and new one patched!
[Xperia Z1 Original Android Development] SafiXS:
Lets start :D

flashed CM11 on clean system

delete bootmenu folder from internal memory

copy new bootmenu folder on internal memory

copy CM11 boot.img in mainrom folder

flashed new bootmenu.img

boot into bootmenu (with recovery bootscreen o.O)

patch mainrom (CM11)

boot into rom - success

boot into recovery - instant reboot (tried two times)

patch secondary rom (CM11S)

boot into rom - success

boot into recovery - instant reboot

restore my stock rom backup (Doomkernel)

clean mainrom folder except mainrom.zip

delete settings.ini

copy Doomkernel boot.img in mainrom folder

flash new bootmenu.img (overwrite Doomkernel)

boot into bootmenu

patch mainrom (Stock with Doomkernel)

boot into rom success

boot into recovery - instant reboot

patch secondary rom (CM11)

boot into recovery - instant reboot

flashed CM11.patched.zip with CM11 own CWM

boot into rom success

in one word, recoveryless :D
[Xperia Z1 Original Android Development] ntmohammad:
i have an idea , just for suggestion if it helps , u can put 2 option for patching in bootmenu . one for stock based rom , and one for cm rom . then we can use two different ramdisk for each patching .

i dont know this is possible or not .
[Xperia Z1 Original Android Development] munjeni:
I think mkbootfs tool cause isue since these tool use compatibilities... see this to understand whats happening with using mkbootfs -> https://github.com/CyanogenMod/android_system_core/commit/e9e74f3c881bd73bd86be4db8b12200a61f143e1 So mkbootfs tool automaticaly change permissins, uid, gids, etc in ramdisk creation procedure! :) ...I will try some tests later.
[Xperia Z1 Original Android Development] munjeni:
I have tried everything and nothing is working :( Old recovery (compiled using same source code) working but new one compiled is not working (now it not work on my phone too), I have no idea what cause cwm to fail to boot, probably some external dependencies is changed in new cm source code and cause these problems, I have no idea how to debug recovery :( Anyone have idea how we can debug recovery?

Edit:

I got idea! Maybe recovery binary is messed up with multiboot.sh sed commands (for example... something replaced in binary)??? :eek:
[Xperia Z1 Original Android Development] munjeni:
OMG :eek::crying::crying: I am right since recovery is modified in binary form by multiboot.sh sed command, some internal strings is replaced to /dev/block/loopX which broke recovery binary size and completely broke recovery binary, SO GUYS our crazy mistery is finaly located and will be fixed FINALY today! :p
[Xperia Z1 Original Android Development] munjeni:
New bootmenu and bootmenu_honami is out! Changelog:

- fixed stupid (but very very big bug) related to the sed commands in multiboot.sh script, all previous versions of the script had these bug in sed command which corupted recovery binary (probably and many other binaries), now stupid bug is solved and everything must work now!

Enjoy! :p
[Xperia Z1 Original Android Development] SafiXS:
I'm back :) goin to try new bootmenu-honami

Gesendet von meinem C6903 mit Tapatalk
[Xperia Z1 Original Android Development] SafiXS:
Okay,

after updated the bootmenu folder i've cleaned mainrom folder and delete CM11 folder and settings.ini

repatched mainrom (stock with doom) - nice

boot into recovery - nice

repatched CM11 Stock Kernel

boot into recovery - nice <<<<<!!!

repatched CM11 with Pimped Kernel

boot into recovery - half thing (it boot into recovery but only get dark screen, if i swipe right the phone start rebooting so recovery is here but no ui)

you have an idea for this? would be sad if i cant use Pimped Kernel anymore (i like my device pimped as much as it can!)

GREAT WORK MASTER YODA (ääähm, munjeni)

By the way the bootscreen of bootmenu shows recovery bootscreen ;D maybe this "ramdisk for ramdisk" thing?
[Xperia Z1 Original Android Development] munjeni:
No ui? Please give me dmesg and recovery log if possible! Recovery log is in tmp folder, pull them by adb shell pull /tmp/recovery.log I will chech them tommorow! And bootmenu bootscreen new tomorow :D
[Xperia Z1 Original Android Development] abbychauhan:
Hi [MENTION=3853774]guddu2011[/MENTION] this is the process u were asking to Go from one ROM to another ROM Partition, Give Commend Via Terminal Emulator.
[Xperia Z1 Original Android Development] munjeni:
New bootmenu.img is out, just changed (bug) boot logo! Enjoy! :)
[Xperia Z1 Original Android Development] abbychauhan:
Checking right now.. I was having issues with the camera and now its solved so i can again test it.. Thanks
[Xperia Z1 Original Android Development] abbychauhan:
Hi [MENTION=4120742]munjeni[/MENTION] ..

Checked everything working Superb Except -

1. Why does it takes some time to Boot or to go into CWM on Both ROMs Primary and Secondary.. Time around 1 min

2. On Booting of BootMenu its Shows Sony BootMenu Recovery and when Going to Recovery then also it shows Sony BootMenu Recovery.. It has to be Multiboot Version XX

3. I try to flash Pimped Kernal from CWM of Secondary ROM but i think it flashed Multiboot boot.img too and after Reboot All i Can See Pimped Kernal Bootlogo.. So i again fastbooted bootmenu.img and everything went to Normal.. So how to flash Custom Kernal on Secondary ROM.. Because flashing another kernal wipes the bootmenu.img

Fyi my both ROM working superb..

Primary - Monx 757 with Doomkernal

Secondary - Slimkat

Secondary ROM running without Pimped Kernel.

Thanks
[Xperia Z1 Original Android Development] SafiXS:
just copy the system folder and boot.img from pimped kernel zip into cm11 zip and overwrite the existing files. than patch the modified cm11 with included custom kernel via bootmenu

Gesendet von meinem C6903 mit Tapatalk
[Xperia Z1 Original Android Development] abbychauhan:
Just system folder and boot.img what about other Remaining items?
[Xperia Z1 Original Android Development] SafiXS:
meta_inf and this file_context file are only needed for CWM know what have to do. cm11 zip had already all information inside so no need for it. I will explain it for you later after work okay?

Gesendet von meinem C6903 mit Tapatalk
[Xperia Z1 Original Android Development] munjeni:
New bootmenu.img is out, sorry for previous one, new one will have corect boot logo.
[Xperia Z1 Original Android Development] abbychauhan:
Ok but Androguide.fr once told that flash the zip only instead of fastbooting the boot.img as few people were having Wifi problems and he said zip has to be flashed because it has necessary files like waln.ko

Any Suggestions?
[Xperia Z1 Original Android Development] Chocolatetrain:
Just extract those modules and replace it whilst online, it won't bootloop if you delete whilst online as i had to do this
[Xperia Z1 Original Android Development] abbychauhan:
U mean to say Replace files when phone is switched "ON" with the files which is in Pimped kernal zip? Also i know waln.ko and how do i know which other files are important to be replaced?
[Xperia Z1 Original Android Development] Chocolatetrain:
Yeah just extract the zip and look at the folder structure and replace the files in the zip with the ones in your system with 0644 permissions
[Xperia Z1 Original Android Development] abbychauhan:
Humm.. Good idea.. I ll try thanks
[Xperia Z1 Original Android Development] mpmaheshbabu:
patch unsuccesssful

I'm on pa, i downloaded latest files as you mentioned but still get this error <patch unsuccessful>
[Xperia Z1 Original Android Development] abbychauhan:
Main Rom patch or secondary?
[Xperia Z1 Original Android Development] mpmaheshbabu:
Mainrom.
[Xperia Z1 Original Android Development] abbychauhan:
Please Dont take this much time to reply next time..

Have u placed boot.img or kernal.elf in the mainrom folder which is inside bootmenu folder?
[Xperia Z1 Original Android Development] mpmaheshbabu:
yes I did follow the instructions as mentioned, and sorry for the delay again ( I really wasn't expecting such prompt response, thanks for your effort).

Now I flashed pimped kernel, i'll repeat the procedure and report back.

---------- Post added 12th June 2014 at 12:08 AM ---------- Previous post was 11th June 2014 at 11:45 PM ----------

Its the same. I did follow each and every instruction as mentioned but same result <patch unsuccessful>
[Xperia Z1 Original Android Development] SafiXS:
Hey Dude,

you've got already a suggestion for flashing custom rom on secondary rom, but the way i told you is much easyer.

You have to copy all files and folders (for kernel boot.img and system folder) in the desired ROM zip and overwrite the existing files.

The system folder in Kernel zip who you copied to cm11 ROM integrated all module libs (eg. wlan.ko). So no need to manually copy paste and set perm! its the absolutely easiest way to do this and it works. i can confirm it!

Inside the META-INF folder is only the update-binary and updater-script that tells cwm what they have to do. mount this, copy this to this, wipe this.... The META-INF inside Pimped Kernel zip is ONLY for the zip file of Pimped Kernel. Never copy it into another zip! Same by any other zips!

The file_context i don't know at the moment for what it is here but its the same Principe like META-INF, its only for this one zip file!

I hope you can understand it a little bit. my English knowledge are not soooo good ;D
[Xperia Z1 Original Android Development] Chocolatetrain:
I did this too but he'd already patched the rom and was booted into it so it was easier ;)
[Xperia Z1 Original Android Development] SafiXS:
Hello Sir,

sorry for the delay i have timemanagement problems ;D

here i have recovery.log and dmesg.txt for you to check out the black screen inside cwm by pimped kernel.

if you need something more, tell me.

For the moment everything work without problems for me, except black cwm see above.

EDIT:Sorry Sir, i have new problem. before i booted once the cwm of stock cm11 the cwm from "pimped"cm11 booted fine with black screen, but after i booted once the cmw from stock CM11 i dont get back into "pimped" cwm. you need last_kmesg?

Thank you Master

---------- Post added at 11:46 PM ---------- Previous post was at 11:43 PM ----------

repatch is the word you looking for? :D

if your rom is listend inside bootmenu as "CM11" or something else, rename the update zip (newer CM11 or with custom kernel integrated) also in the name as the ROMtitle you want to update and voila, It gets overwritten.

Got me?

Regards
[Xperia Z1 Original Android Development] abbychauhan:
Your primary Rom? It cannot happen.. U are clearly doing some mistake.. Please write each and every step that u did
[Xperia Z1 Original Android Development] abbychauhan:
Sent u a pm
[Xperia Z1 Original Android Development] :
I really don't understand how I should do this... Question. How do I install another kernel (Pimped kernel) as my secondary rom?
[Xperia Z1 Original Android Development] abbychauhan:
MultiBoot Totally Simplified (Noob Friendly)

Whole Multiboot Procedure for better understanding.. Check Post # 4

Also Check Common Questions

[MENTION=4120742]munjeni[/MENTION] I know you are busy so i took the liberty to update the procedure.. i ll keep it updated when u add any other feature so it will save some time of yours ;)
[Xperia Z1 Original Android Development] dolly.anupriya:
Wow thanks i waa waiting for that my most of the que. already answered.
[Xperia Z1 Original Android Development] Ashray_Vk:
[MENTION=5618877]abbychauhan[/MENTION] Amazing guide at post 4 bro! Really helpful!
[Xperia Z1 Original Android Development] abbychauhan:
Thanks Guys
[Xperia Z1 Original Android Development] SafiXS:
You made it dude! Btw, kernel not kernal ;)

Gesendet von meinem C6903 mit Tapatalk
[Xperia Z1 Original Android Development] abbychauhan:
Oops.. I ll change.. ;)
[Xperia Z1 Original Android Development] munjeni:
SafiXS you log is clean, I can not see any problem there!
[Xperia Z1 Original Android Development] abbychauhan:
I have an idea if i change the name of Pimped Kernel zip similar to the zip name of Secondary ROM and do the patching and then flash the Patched Zip via CWM of Secondary ROM ( The same procedure which was told to How to update the Secondary ROM ) then will it work??
[Xperia Z1 Original Android Development] munjeni:
Probably yes, but I am not sure if system.ext4 is deleted after than! Probably I will need to make another submenu in bootmenu for patching only update packages and remove posibility for deleting seccond rom partitions.

I found another problem using bootmenu on Z1C, for example my camera is not working corectly in main rom, I do not know if someone noticed the same bug! I have locked my bootloader and removed bootmenu just for test since I thinked my camera is broken, but after restoring TA and after deleting bootmenu, camera working perfectly! Seems kexec cause camera fail or probably my unlocking procedure was not performed lucky... I will test again later :(
[Xperia Z1 Original Android Development] abbychauhan:
That would be great

---------- Post added at 10:39 PM ---------- Previous post was at 10:22 PM ----------

[MENTION=4120742]munjeni[/MENTION] Do u remember i had the same bug Check Post # 286 Page # 29 and after you made changes it worked again check Post # 304 Page # 31

The changes you made between post # 286 to post # 304 .. Might that will solve ur problem for Z1C
[Xperia Z1 Original Android Development] munjeni:
Thats allready in latest version, but camera not worked :( Will try again when I get more free time
[Xperia Z1 Original Android Development] abbychauhan:
This procedure didnt work.. Couldn't get pass the Pimped Boot logo.. Its replacing the ext4 Partition
[Xperia Z1 Original Android Development] munjeni:
See page 2 about manual patching! Patch your zip manualy and install :)
[Xperia Z1 Original Android Development] abbychauhan:
Ya.. That i did.. Thanks

---------- Post added at 07:13 PM ---------- Previous post was at 07:12 PM ----------

Have u solved the camera problems of urs
[Xperia Z1 Original Android Development] munjeni:
I am a bit lazy to try :o
[Xperia Z1 Original Android Development] abbychauhan:
Isnt it if ur facing this problem then other z1c users must be facing this too? But no one reported
[Xperia Z1 Original Android Development] dolly.anupriya:
Hello Mr [MENTION=4120742]munjeni[/MENTION] i dont see a donation link??

Sent from my MultiBooted XZ1
[Xperia Z1 Original Android Development] SafiXS:
+1
[Xperia Z1 Original Android Development] munjeni:
All is for free, enjoy ;)
[Xperia Z1 Original Android Development] dolly.anupriya:
You went up in my eyes.. Respect

Sent from my MultiBooted XZ1
[Xperia Z1 Original Android Development] abbychauhan:
+1 Respect
[Xperia Z1 Original Android Development] :
+1
[Xperia Z1 Original Android Development] abbychauhan:
Hi man.. Just wanted to check Ru working on another project?.. Ru working on another submenu in bootmenu for patching only update packages and remove posibility for deleting second rom partitions..

Please don't think I am asking for Eta.. All of us just like ur work here.. Thats it..
[Xperia Z1 Original Android Development] dolly.anupriya:
Yes a easier way of flashing Custom Kernel and updation of secondary ROM - Easier way / Automated way

We would love to have this feature also..

Its a Suggestion / Kind Request not an ETA.. Plz dont get angry..

Sent from my MultiBooted XZ1
[Xperia Z1 Original Android Development] gregbradley:
I finally found some time to do this. It works good.

I have my own stock based rom with dual recovery kernel and vanir 4.4.2 rom (The only one I could download at work)

One thing I would suggest, in the initial bootmenu section, please can you make all the entries the same colour so it makes it easier to see which one is selected. On my first look at it, there were three entries, and they were all different colours...I had to gues the first time and then saw that it was the red one that was selected.

Either that or put a backgrpund box on the selected item
[Xperia Z1 Original Android Development] abbychauhan:
Ya only little bit of Theming of BootMenu (Font size is good now) just the background and Font Style and work on another submenu in BootMenu (for patching only update packages and Custom Kernel and remove possibility for deleting second ROM partition).. Only these things are left.. After that it will be Perfect.. No flaws.. But munjeni doesn't seems to reply.. Looks he is busy
[Xperia Z1 Original Android Development] gregbradley:
Is this still working?

Both with adb and terminal after this command

losetup /dev/block/loop1 /data/media/0/bootmenu/<<name of rom folder here>>/cache.ext4

I get an error

losetup: /dev/block/loop1: No such file or directory

For the name of the rom folder I am typing in the name of the .zip that would install my main rom. Is that correct?

EDIT

I tried the above from the second rom to try to point to my mainrom.

If I try it from my main rom I get

tmp-mksh: losetup not found

EDIT

Also, if you look in

/data/medi/0/bootmenu/mainrom

then there is no cache.ext4, there is only

cmw_initrd.gz

dt.img

initrd.gz

kernel.elf

mainrom.zip

zImage

So no use in trying any .ext4 extension.....

edit

When issuing the command in the second rom the problem is there is no bootmenu folder

root@honami:/data/media/0 #
ls
0
Alarms
Android
DCIM
Download
Movies
Music
Notifications
Pictures
Podcasts
Ringtones
clockworkmod
root@honami:/data/media/0 #