yashsingh1/xdaforums huggingface dataset:
[Sony Cross-Device General] AdrianDC:
No problem.

Normally the full port of Sony ELF partitions I made inside libbootimg for MultiROM

is compatible with all bootimages structures from these series of Sony devices.

I invite you to have your ROM's boot.img flashed into boot directly,

then flash my Boot Bridge as it is, even without a rooting zip, like in my screenshot,

and let it run to see the bridge creation then restore perform.

If anything goes wrong and the bootimage is not readable,

the process will stop and nothing will be done.

In the very worst case, the rebuilt boot image doesn't start

and you simply fastboot the image you came from.

Also recently I worked with Diewi (Alexander) to extend ELF support

to the newer version of Sony's last ELF devices, the 8974 (Z2) boot

that had ELF Stock images but also support for Android normal ones.

Once fully tested and confirmed, the update will be done on this project too.

On a side note, about root, SuperSU works fine on my devices on 6.0 & less,

for 7.1 the installation is fine too but the root features failed (with sepolicies totally fixed),

this is apparently common / randomly affecting some devices,

Chainfire is aware of it, so do not be surprised if that happens on yours,

and give phhSuperUser a go too as it is the fully working method on my AOSP 7.1 now.

Bye !
[Sony Cross-Device General] Scarecrow.:
Amazing! Worked like a charm..no issues at all..thanks a lot!!@ Adrian DC :D:D
[Sony Cross-Device General] AdrianDC:
Boot Bridge updated to support newer Sony ELF devices,

including the Stock Sony ROMs, allowing an easy SuperSU root process.
[Sony Cross-Device General] Miggystar:
Hi Adrian, Sorry if is a noob question but im facing ERROR: 7 after instaling the BootBridge-SonyELF.zip, i've already replace the install.zip, it says in TWRP ------> Found bootimg @ /dev/block/platform/msm_sdcc.1/by-name/kernel ----> assert failed: run_program(''/tmp/boot_bridge/flash_zip.sh'', ''/tmp/boot_ brdge'', ''install.zip'') == 0 .... what i'm doing wrong? .. Im on AOSP 25/11 . Thanks for your time
[Sony Cross-Device General] MichaBit:
I've got the same error, did everything exactly according to instructions.

Where could the error be?
[Sony Cross-Device General] AdrianDC:
Thanks for reporting the issue.

It was introduced with the new update to support Z2 devices, and affected only phhSuperuser.

The issue is now fully fixed, please download the new version and try again.
[Sony Cross-Device General] MichaBit:
Installation completed! :)

#root successfully :good:

Many thanks and greetings Adrian :highfive:
[Sony Cross-Device General] a.hamameh96:
does it work with locked bootloader?

I have Xperia Z2 MM deodexed rooted with xposed
[Sony Cross-Device General] filjusz:
This mod intervenes in boot image (kernel) so most probably it wont work. But I am not 100% sure
[Sony Cross-Device General] vandiaz_sairavinz:
Work for lbl???
[Sony Cross-Device General] nhicko95:
dont try on lbl it will brick ur phone
[Sony Cross-Device General] vandiaz_sairavinz:
Ok, thank you
[Sony Cross-Device General] Miggystar:
This is happening to me when I move App to system in link2Sd...
[Sony Cross-Device General] myxomop25:
Greetings Adrian,

So nice that you still support our old Sony devices, particularly Xperia V. :good:

The thing is I used your Elf Bridge and succeeded to install Magisk 11.6. But then a new version of it came, 12.0. And I did all the same way as with 11.6 but failed. It was written that the boot image was so small.:( However, I flashed Magisk 12.0 with no Elf Bridge. And the weird thing that that time there was enough space. I knew that flashing without the Bridge would cause soft-brick, but I knew what to do next in that case, I flashed the proper boot image after all and the device started working again. :D

The question is following: is it possible to flash Magisk 12.0?:confused: I also forget to tell that the size of these two versions are almost similar. The log is attached here.

Thanks!:)
[Sony Cross-Device General] flipside101:
magisk 11.6 and above have elf support

Speed of a Puma, Brain of a Chicken
[Sony Cross-Device General] AdrianDC:
Thanks.

Yes I got reports on that, but I think the faulty half-ELF support causes the issues you are having.

Better stick to the working version for the time being.

Not really, it's faulty and breaks ELF bootimages (tunrs them back to regular bootimages,

which is where BootBridge plays a role to have proper read and write of the ELF bootimages

structures (32bits 8960 or newer 64 bits like 8996 Stock) without ELF support in the tools.
[Sony Cross-Device General] Zasnizas:
Yes.... Finally i successfully flash magisk v12 with Boot Bridge latest version. Thank you very much AdrianDC
[Sony Cross-Device General] Aditya7_st:
I successfully flashed magisk v12. It shows device rooted properly. But i could not acquired root access for apps like titanium backup and adaway.
[Sony Cross-Device General] wojtekll:
I have exactly the same problem, during installation BootBridge-SonyELF (with new .zip file) everything is ok, but if I run an application that needs root, pops up message that I do not have.

xperia SP AOSP 7.1.2

correction. After the update in store magisk, root works.
[Sony Cross-Device General] Limakos:
Hi [MENTION=2233641]AdrianDC[/MENTION]

I'm having problem installing latest SuperSU - 2.81. I've downloaded your bootbridge zip, SuperSU 2.81 flashable zip, renamed it and used it to replace install.zip as per instructions. I have latest TWRP 3.1.1-0 and during installation I'm receiving info Boot image: not found, aborting. Attaching screenshot.

Thanks in advance for the help.

https://ibb.co/fP6DyF
[Sony Cross-Device General] AdrianDC:
You might want to read what's going on with SuperSU 2.80 & 2.81.

For now, I'd advise staying on 2.79 SR3 until the dust settles down and then we can look at issues you might have.
[Sony Cross-Device General] Limakos:
I was thinking to check 2.79 SR3 and just did but the result is the same. There is this message, at the end it says installation completed but no root.
[Sony Cross-Device General] AdrianDC:
Huashan / AOSP ?

Same result with the release 2.79 ?
[Sony Cross-Device General] Limakos:
Yes. Latest AOSP (aosp-7.1.2-20170512-huashan-adriandc).

I just tried with Magisk and was successful. So I got root with Magisk now.
[Sony Cross-Device General] AdrianDC:
New BootBridge release to fix support of SuperSU installation:

> Tested against SuperSU 2.79, 2.79 SR3 and 2.82 versions

> Tested against Magisk 12.0 and WiP versions
[Sony Cross-Device General] :
hey OP, does boot_bridge work with custom kernel ie helium for xperia sp..I tried this before but my xperia lose the custom kernel ??
[Sony Cross-Device General] AdrianDC:
Yes there's no restriction on the kernel being used.

In fact helium uses my kernel injector to apply its changes to the bootimage, so you're safe to go ;) .
[Sony Cross-Device General] :
I will try flashing again with proper sequence, thanks for the effort you exert to support this devices..:good:
[Sony Cross-Device General] Zasnizas:
Hai, AdrianDC can I use your BootBridge to flash latest magisk V 13.1?
[Sony Cross-Device General] feromgar:
I tried Magisk 13.1 myself yesterday without any issues.
[Sony Cross-Device General] frerere:
Ressurection Remix v 5.8.3

I tried in a xperia sp with RR and the only thing that fails the cts profile of the safety net for not being a stock rom ...

Translated with google translator

-------------------------------------------------------------------------------------------------------------------------------------

Yo lo intenté en un xperia sp con RR y lo único que falla el el perfil cts del safety net por no ser una rom stock...

traducido con traductor de google
[Sony Cross-Device General] feromgar:
BootBridge no es para pasar la certificación CTS, es solo para poder montar Magisk. Hay un modulo de Magisk que cambia unos parámetros en el build.pro y soluciona eso, pero esa info se encuentra en el subforo del app. Te pondría el link pero la verdad es que no dispongo de él en el momento.
[Sony Cross-Device General] ethan3686:
So i flashed Magisk 14.0 successfully on My Xperia Z Ultra with stock rom and twrp/cwm with Super SU root.

But after flashing when i restart the phone it doesnt go into the rom and only shows Sony logo..What am i doing wrong? I did exactly like the instructions said and renamed magisk as install and put it in the bootbridge zip.
[Sony Cross-Device General] Helbelinc:
Hey,

I also have issues.

Actually everything worked so far, I installed TWRP on my stock Rom on Xperia Z2 (291 firmware) and replaced the install.zip with the latest magisk zip.

Flashed it successfully, but after that my recovery won't mount anything anymore and magisk is NOT installed.

Where's the problem? :/
[Sony Cross-Device General] nhicko95:
This bootbridge is only for xperia t/v/tx/sp
[Sony Cross-Device General] Onchigo:
Hey, i have an Xperia M5 E5603, and everytime i try to use boot bridge to install my magisk, i'm getting an error

"assert failed: run-program("/tmp/boot_bridge/boot_bridge.sh, "init") == 0"
[Sony Cross-Device General] nhicko95:
The structure being different from regular Android boot partitions,

these tools never worked to edit the content of the boot image

present on devices like the Xperia SP, T, TX, V, ...

This only for "SP/T/TX/V"!!!!
[Sony Cross-Device General] Onchigo:
then we can't use magisk on xperia m5?
[Sony Cross-Device General] Klaus N.:
No, the Boot Bridge doesn't work with your device!

Simply try to flash the Magisk zip via TWRP.
[Sony Cross-Device General] Onchigo:
https://xdaforums.com/apps/magisk/magisk-bootloop-t3713074
[Sony Cross-Device General] Stunherald:
Hello! Thanks for this amazing solution. Anyway is there any chance to get this updated so new Sony ELF64 is supported as well? I have Xperia X Performance 8132 with Nougat 7.1 which uses it.

Magisk proposes custom kernel but i'd like to stick with the stock one.

Since i am still messing with the new phone i tried to patch it anyway (with no expectations) and it nuked the boot image.

If you need me to run some dumps or provide more info just let me know.

Thank you in advance!
[Sony Cross-Device General] AdrianDC:
You should not be using this on the X Performance (or at the very least, after it's "patched" and it'll be transparent / not required).

Look at my Sony Stock Patcher for Xperia X Performance and Xperia XZ, it's what you're looking for.
[Sony Cross-Device General] Stunherald:
I was digging like hell yesterday but for some reason i've overlooked this info. Million thanks for pointing me to the right direction. I'll give it a shot.
[Sony Cross-Device General] David Guillot:
Hi [MENTION=2233641]AdrianDC[/MENTION], thank you for this amazingly smart tool, i successfully rooted my tsubasa with phhSuperUser in 2 minutes tops! Simple, powerful, open source, beautiful.
[Sony Cross-Device General] samosaara:
'Out of space' - Xperia T2 Ultra Dual (tianchi-dsds) D5322

OK, the full story is here. But quick recap, I'm not being able to install magisk, on my dual T2 Ultra, older versions don't work, the current one seems to install just fine but puts me in a very bad boot loop, but as pointed out in the original thread, there is a odd line in the logs, at first it seemed harmless, but after trying a bunch of different stuff I'm starting to think it's the source of the problem. It's line 410 of the second log:

There is more info on the original post, is this normal? Any ideas on how to further troubleshoot the problem?

EDIT: Noup, It were sony RIC, fixed it, thanks
[Sony Cross-Device General] vooR9er:
Thank you, thank you very much! Great tool, very sorry that did not work for me.

Sony Xperia S

nAOSP-8.1 alpha build
[Sony Cross-Device General] dhchris:
Hey friends,

I tried to flash the new Magisk 15.3 to my

Sony Tablet Z.

I replaced the install.zip in bootbridge with the Magisk zipfile.

Everytime I try to flash it, I become an error 7.

What did I wrong?

Kind regards, Chris
[Sony Cross-Device General] pixbuf:
I have a Z2 tablet. I tried flashing Magisk v16.0 in TWRP but I got error messages saying it couldn't handle Sony ELF, and to use BootBridge by [MENTION=2233641]AdrianDC[/MENTION]. I followed the instructions in post #1, and it reported success. However, now it won't boot at all. I push the power button and it just vibrates. No Sony logo, no nothing. I think I may have bricked my wonderful tablet! Any suggestions?
[Sony Cross-Device General] MichaBit:
What about 'Emma' to restore the original condition, than carry on?

As long as TA-partition is not deleted, its not bricked.
[Sony Cross-Device General] Shoyaibpatel786:
Hi, I have Downloaded the Magisk Manager and Stable Magisk Version 16.0. I have renamed and replaced the Magisk Zip File into the Bootbridge Sony Elf as specified. Then I flashed the Bootbridge File through TWRP Recovery and got a successful Installation message. After Rebooting the device, Root Checker shows my device isn't Rooted?? Also, Masgisk Manager shows a New Version of Magisk available 16.0, but I'm unable to Install this? Please advise further. Thank you.
[Sony Cross-Device General] JoL1hAHN:
Just to confirm that I tried it to install Magisk on my Xperia SP running LineageOS 15.1 (20180712) and everything is working fine!
[Sony Cross-Device General] analiza18:
How can i instal magisk on c5 ultra?
[Sony Cross-Device General] casouzaj:
By unlocking your bootloader. Don't forget to backup your TA partition beforehand, in order to keep your DRM keys saved.
[Sony Cross-Device General] eric.ger.01:
Tried to flash Magisk 16.7 with BootBridge but it gives error 7. I'm using the latest MultiROM. How can I fix this problem? I've attached the recovery log.
[Sony Cross-Device General] ghst7:
This happened to me too with LOS 15.1 on my xsp, don't know why, but Magisk 16 with boot Bridge worked fine so you can try that
[Sony Cross-Device General] eric.ger.01:
Tried Also with magisk 16, same result
[Sony Cross-Device General] casouzaj:
I think that error #7 is due to the TWRP version. Try a newer version for your device.
[Sony Cross-Device General] Klaus N.:
Have you already tried to resolve this problem by flashing the boot.img of the rom, followed by flashing the latest Magisk Uninstaller. If not, do that, then reboot into TWRP and finally flash the Boot Bridge (containing Magisk 16.0).
[Sony Cross-Device General] finnal123:
i cant install lastest magisk v17.1, v16 still working fine but i can't update
[Sony Cross-Device General] Klaus N.:
I can confirm both: The boot bridge works with Magisk 16, but not with the current 17.1 version. With v17.1 there's no error after flashing via TWRP, but it doesn't install. Maybe, if Adrian someday will find the time - and has got the muse - he'll look into it. But with Android 8.1, Magisk 16 still works; I guess, Android 9 will require Magisk 17. So, atm we can live with it ;)
[Sony Cross-Device General] meysam1712:
How can install lastest magisk v17.1
[Sony Cross-Device General] pcgardner:
Before I read this thread I tried to install Magisk 17.1 on my Xperia SP, which is running Xenon HD (based on Lineage 15.1), using the BootBridge method. It failed, as I now realise was to be expected, but there was an error message. From the recovery.log file:

Unmounting partitions
dd: writing '/dev/block/platform/msm_sdcc.1/by-name/Kernel': No space left on device
40961+0 records in
40960+0 records out
20971520 bytes (20.0MB) copied, 3.541797 seconds, 5.6MB/s
40960+0 records in
40960+0 records out
20971520 bytes (20.0MB) copied, 7.181566 seconds, 2.8MB/s
run_program: child exited with status 1
script aborted: assert failed: run_program("/tmp/boot_bridge/flash_zip.sh", "/tmp/boot_bridge", "install.zip") == 0
assert failed: run_program("/tmp/boot_bridge/flash_zip.sh", "/tmp/boot_bridge", "install.zip") == 0
Updater process ended with ERROR: 7

I suppose the crucial line is the one ending "No space left on device".

In case it's of any use, I'm attaching the full recovery.log.

I shall try again with Magisk 16.
[Sony Cross-Device General] Evilmonk100:
]can anyone help me to get off from this error. i was trying to uninstall magisk V 16 from my xperia sp via twrp recovery using latest uninstall zip but i get follwing error. actually am trying to uninstall old version and installing a new version but while installing magisk v17.1 through boot bridge also get follwing error i attched photos of that. note for uninstallation zip i have not used boot bridge. so due to this i have install old magisk v16 zip through boot bride and latest version of magisk manager apk. plz guide me..
[Sony Cross-Device General] Evilmonk100:
yes i have also got error during magisk v17.1 zip then i decided to go bak on previous version. you should try go on magisk version 16. it will be installed without any error.
[Sony Cross-Device General] Evilmonk100:
Bro did you tell this issue to adrian? Actually in magisk v 16 we cant access multiple modules bcz some modules required v17.1 to work like greenify4magisk, low ram config plus etc. Plz try to fix this issue. :)
[Sony Cross-Device General] Klaus N.:
He already knows that. I don't know, maybe the problem is not Adrian's BootBridge, but the new Magisk version...
[Sony Cross-Device General] dhuriajay:
I also tried patching boot image from Magisk Manager but no luck.. :(
[Sony Cross-Device General] Godecki:
Does anyone have a solution for root disappearing after updating the system? :/
[Sony Cross-Device General] alfan.y:
[MENTION=2233641]AdrianDC[/MENTION] Confirmed works on Xperia Z3 (D6603) firmware 264 with Magisk 17.1 inside the module :good:
[Sony Cross-Device General] zzenyoo:
Trying to update Magisk 16.3 ->18 on my tsubasa. Nope :|

[edit] I've tried'em all. last one that works is 16.6
[Sony Cross-Device General] martyfender:
I don't have one of these devices, but it looks like to me that the developer of Boot Bridge needs to update it to work with newer versions of Magisk. I, however, don't really know, I am just speculating here, so forgive me if I am wrong. It looks like the last time it was updated was Jan 14, 2018. That was the last commit. Magisk has changed considerably since then: v18 stable.
[Sony Cross-Device General] Klaus N.:
I can confirm: The new version works with Magisk 18.0 on my Huashan running Adrian's LineageOS 15, ofc. :svetius:

Thanks Adrian :highfive:
[Sony Cross-Device General] AdrianDC:
As pointed out by Klaus above, I released a minor update

that resolves support for Magisk v17+ installation.

The issue being that its boot partitions detection script

has evolved away from what we used to have with SuperSU and Magisk's initial derivative of it,

and the "Boot" partition we have is now being accepted by Magisk's "boot" search

as it became case insensitive instead of filtered.

Our Sony ELF bootimages are in "Kernel", and I used to create "android_boot"

through BootBridge as a standard bootimage as it met all requirements up until now.

The name "boot" is now being used to bypass the new Magisk insensitive search.
[Sony Cross-Device General] Evilmonk100:
It is possible to directly update magisk v18 on installed magisk version v 16? Also i would like to know how to uninstall magisk version on sony elf format device. Because when i tried it using uninstall zip to uninstall it shows sony elf format detected use boot bridge. Is unistallation zip also required to merge in boot bridge?
[Sony Cross-Device General] Klaus N.:
For a completely deinstallation flash the latest Magisk unstaller, and right after that flash the original boot.img of the rom currently running. For updating (e.g. from v.16), I've flashed the boot.img, followed by the BootBridge zip (containing v.18). Maybe, it also works without flashing the boot.img before; simply give it a try ;)
[Sony Cross-Device General] zzenyoo:
I updated directly from 16.6 to 18. It's not a problem for Magisk.
[Sony Cross-Device General] dlnraja:
Hello all

I have tried to install magisk on my hp touchpad and its not working .

The tab has an sony 32 elf and its on android 8.

Best regards
[Sony Cross-Device General] tennyleaz:
Not working on xperia acro s (hikari), rom nAOSP nougat, tried magisk 17.3/18.0/18.1

I get

assert failed: run_program("/tmp/boot_bridge/boot_bridge.sh", "init") == 0
[Sony Cross-Device General] Ps24u:
[MENTION=2233641]AdrianDC[/MENTION] : I could use some help. I screwed up big time and flashed although my bootloader is locked.

Now when I attempt to start my device, Xperia Z1 Compact, it gives me a black screen with the LED flashing 3 times. I don't have access to TWRP anymore either.

I'm on Android 5.1.1, it was previously rooted with SuperSU and I just wanted to switch to Magisk.

So I flashed unSU.zip, which worked fine, device rebooted and supersu was removed correctly.

Then I tried to flash magisk via TWRP, it said failed because of Sony ELF and to use your boot bridge tool, which I did.

TWRP didn't report any error and the operation was sucessful, but now the device is bricked because I'm on locked bootloader (that's gotta be it..).

Before attempting the procedure, I made a TWRP backup, but in a very dumb move I did it on the internal SD card, and I also forgot to enable USB Debugging...

Is there anything I can try to reflash my backed up "boot" to get the device back to life?

I can put it in "fast boot mode" and "flashmode" so it's not completely dead but I'm at a loss regarding what to try/how..

Any help is _very_ welcome.
[Sony Cross-Device General] Wyjek:
I think you can flash stock ROM via PC, I don't know the exact procedure because I don't have Z1C, but look it up.
[Sony Cross-Device General] Ps24u:
Yes I was able to reflash the stock kernel and the device got back to life. Then I flashed my full backup and everything's in order again.

So yeah; Boot Bridge + Magisk _only_ work with unlocked bootloaders.
[Sony Cross-Device General] lepas33:
Hi [MENTION=7487527]Ps24u[/MENTION],

I've got exactly the same result as you : brick z1c while TWRPing the myInstall.zip file containing magisk & boot bridge. That sounds normal as magisk has to modify the kernel. I had a slim hope with this boot bridge...

Flashtool to get my device back.

If anyone succeed installing magisk on stock kernel with locked bootloader and Boot Bridge, please give us a clue. Thanks !
[Sony Cross-Device General] Ps24u:
Besides the locked bootloader, could it be it's because our TWRP is just too old? I'm using v2.8.7.0 and wonder if it's even supposed to work with Boot Bridge + Magisk at all..
[Sony Cross-Device General] sieger007:
reviving this thread after quite some time but I'm in the same situation save that I haven't come to the point where I breaked my z1s . I know the bootloader is locked it's a t mobile phone and I tried to flash. m a g i s k via TWRP that I installed and it came the same message that Sony l f 32 partition detected use bootbridge.

I wanted to check with learned numbers were here what was the procedure for need to get magisk working on a bootloader locked Xperia z1
[Sony Cross-Device General] alfan.y:
Magisk cannot install on locked bootloader
[Sony Cross-Device General] ahhamado:
successfully installed magisk 18.1 on xperia Z Ultra using this tool. Thankyou.
[Sony Cross-Device General] globe79:
Dear @AdrianDC today I tried your 18.1 for Xperia SP dated Jan 25, 2021 together with your opengapas pico for Android 11 (current from their website can't fit). I have a problem rooting it with Magisk 23.0. I renamed their "hybrid" apk to zip, renamed to install.zip and moved into boot-bridge zip. I also tried unpacking of "apk" to zip it again (forecasting some different compression by @topjohnwu). Both methods failed to unpack, when tried to apply boot-bridge via your recent TWRP for Xperia SP. Can you advice something?
[Sony Cross-Device General] Ice530:
Hi, did you solve the issue? I also face the same issue with you, unable to unpack boot image.