yashsingh1/xdaforums huggingface dataset:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Or you download the firmware you are using via xperifirm, grep the boot.sin file.

As far as I know you can copy it on your phones storage and use the magisk manager app to patch it.

The resulted boot.img can be flashed via "fastboot flash boot boot.img" and you get root :)

If magisk can't use a boot.sin, you can use the "UnSin.exe" from XDA to convert it into a boot.img first :)

Aaaand you're welcome :D

Edit:

Woops you hinted it in the last part of your message.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] moyu4096:
Ahhahaha yep I am talking about this method. I never tried, but, yes i thought it could work. So this is a more efficent way.

Btw I always couldn't get the aod and auto brightness in gsi ,idk why. Maybe a overlay is missing. I came across a thread in xda which works on this. Will try it later.

The gsi system has no xperia camera, does anybody know if the xperia camera could work in gsi system.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zezzet27:
hi i have xz2 premium and i would upgrade to 107 italy firmware....

i installed new firmware, then adb and install twrp.img.

then i'm going on twrp and flash twrp stock installer and magisk 18.1. why the phone stuck in sony logo...for pie ....25 firmware i don't have problem.

i use the old twrp stock installer ...
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Please only use the twrp matching the installed firmware

.131 is new -> August

.107 is July
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zezzet27:
i used 107 firmware and twrp 107 zip file
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] apaxtc:
;) wow greats news ! moyu4096 -Martin :highfive:

I hope our collaboration will give a simple root method :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zezzet27:
in adb i istalled twrp

then i go on twrp and flag vendor on mount and flash in advanced twrpxz2p.img

then i rebooot in twrp and installed magisk 18.1

reboot and phone continue reboot on sony logo..why? i don'h have any error...
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
You said you flashed the old twrp stock installer

That was the culprit

Please flash again the boot.sin from the stock firmware :)

The new twrp only needs "fastboot boot twrp.img" and after that the installation in the advanced menu with the install ramdisk button.

And it doesn't modify the stuff needed to boot the system, so it can't lead into bootloops :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zezzet27:
i reinstalled 107 firmware and fastboot twrp .img and in twrp install ramdisk.

i need flag vendor on mount because i have this error
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
The error doesn't make problems until you want to switch the boot slot by hand :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zezzet27:
i don't understand...when i flash 107 firmware is all good, phone boot correctly. when i put twrp image in advanced e put magisk 18.1 the phone reboot continuously
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Make sure it is the stock twrp and is the .107 version

But it doesn't get touched if you boot system.

Only magisk can cause this, if it is the only other thing you flashed

I would try without magisk first

But only magisk 19.1,19.2,19.3 should boot loop

Of course you could try the newest magisk canary, which should boot fine.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zezzet27:
if i try to install twrp in advanced without magisk and reboot the phone open in twrp only. Not load android firmware...
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
I assume it did bootloop too often

Please apply the misc terminal command from the FAQ in either your PC adb shell or in the twrp shell menu.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] sve1313:
After installing 8.131 I get an error message "Error getting bootctrl module" when I execute:

Advanced /Install Recovery Ramdisk twrp-xz2.img. When I return to 8.50 there is no problem with TWRP.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zezzet27:
i'm going crazy..i don't understand why i have bootloop...

i follow this step:

-download 131 ftf firmware and install with flashtool and all good, phone reboot correctly.

-i take martinx3 131 twrp stock file, open the zip, copy twrp-xz2p and vbmeta on adb in my computer and rename twrp-xz2p in twrp

-open command shell on adb and install twrp and disable vbmeta

reboot in twrp, go in advanced and install twrp-xz2p.img

reboot in twrp and install magisk 18.1.

what i wrong??
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] moyu4096:
How can you disable verify with vbmeta in twrp? In general it is done by flash within bootloader and with that two flag.

I don't think just flashing the image can help

Annnd magisk 19.4 (Canary) is ok no more waiting

---------- Post added at 12:16 AM ---------- Previous post was at 12:03 AM ----------

Yep it is proved by Martin that just patch the boot image extracted from boot.sin with the magisk manager and flash to boot in bootloader will do a great magic.

In fact the treble-enabled Xperia is very easy to root, after all you need to download the full firm to update. Just use Unsin v5 to extract the boot.sin and you will get a boot.img. Patch it with any phone that has magisk APK installed. Flash it. And there you go.

FYI here is the original boot.img extracted from xz3's Customized IT .131 firm and a patched img.

Just try it if you wish. If any unwanted situation occured after flash, just flash the original boot.img.

https://drive.google.com/open?id=1hGfGfQuwnajVEF-2zsKmicqTj0VppFLA
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] moyu4096:
OEM unlock is colored now!

This is amazing cuz when I came to developer options in .107 it is grayed-out but now it is tickable. Anyone noticed this?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
Trying to boot into twrp on .131 after flashing - stacked on twrp logo.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] moyu4096:
How long did you wait?

I usually wait for 10 minutes
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
Not so loooong :D

Flashed magisk over booted twrp from step 2.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] turnout96:
Received GFAN user feedback,Install recovery ramdisk>Reboot into installed TWRP Cannot be used after，He did not tell me the device model and system version, I have already asked him, but he did not give me feedback.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] maverick6664:
Hi,

I want to test it on my H8266, but mine has custom firmware installed, so the instruction doesn't work. My phone enters an endless boot loop.

So I want the official firmware 52.0.a.8.131. Since this phone has bootloader unlocked, xperia companion wouldn't install any firmware or automatic download via wifi doesn't work. Anyone knows where I can download the official firmware?

Thanks in advance!!

-Tetsuji

PS: I have posted this content to Sony's forum.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] moyu4096:
You need a XperiFirm to download it
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] maverick6664:
Thanks for your reply

I'm using xperiform downloaded by flashtool. But it downloads only customized firmwares. Or are they official firmwares?

PS: BTW this twrp testing image really doesn't work with custom firmware? Or it's my mistake?? Very weird.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
How exactly did you install twrp .107?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Can you give me a dmesg log?

While in twrp logo just write

"adb shell dmesg > dmesg.log"

And you'll get a file with the same name for me :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
Here:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zezzet27:
in the same mode that i try for 131 firmware..

open your file package, take twrp-xz2p and put in the adb window of my pc, rename in twrp.img, and put phone in fastboot mode.

on adb i write this command:

fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

fastboot boot twrp.img

reboot the phone and i have twrp 3.3.1.0

later i flash in advanced twrp-xz2p and magisk 18.1 but not work...phone reboot continuously
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Thank you, now i need

"adb shell ls -lha /sbin/ > sbin.ls.log"

:)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] maverick6664:
Hi,

I'm using customized US (H8266_52.0.A.8.131_1313-4500_R5B.ftf). But I have a strange problem. When I flash twrp-xz2.img in recovery, I see these errors. (I mean when I do 'Advanced menu -> "Install recovery ramdisk" -> Choose twrp.img')

Is it normal?

And if I reboot into recovery where twrp was flashed, I can reach twrp initial logo screen, but my phone doesn't go further and sits still for longer than 10mins. It can boot into normal mode as a phone.

The firmware doesn't seem to matter in my case..
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
And if you do the same on a working phone without magisk?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
You did firstly "fastboot boot twrp" the .131 or the .107 on a .131 firmware phone to get into twrp?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] moyu4096:
try magisk 19.4
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
There is no magisk 19.4 "release"

Not even a beta.

Just the alpha canary builds

https://xdaforums.com/apps/magisk/dev-magisk-canary-channel-bleeding-edge-t3839337
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
Okay
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] maverick6664:
Yes. Now I'm using .131 firmware. I did "fastboot boot twrp-xz2.img" and then 'Advanced menu -> "Install recovery ramdisk"' within twrp. That's strange...

twrp boots with"fastboot boot twrp-xz2.img", but not in recovery mode. I tried with "after power off, hit volume down + power on" also, but it's the same. twrp stops at the initial boot screen.

Does the file name matter? .....twrp-xz2.img and twrp.img...but it's very unlikely.

Or is it because mine is H8266?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Thank you :)

That must be something about the new security patch level

Google changed something we need to reflect

The sodp twrp hangs too.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zezzet27:
if i install twrp-xz2p.img in advanced on twrp without install magisk the phone reboot in twrp, not load the system.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Interesting that you can "fastboot boot" it

Is the user data decrypted or do you thee these encrypted words?

And can you give me a dmesg of the installed hanging twrp?

"adb shell dmesg > dmesg.log"
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
You did wipe the misc partition like I did mentioned earlier ?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zhka:
On .107 was the same errors flashing twrp, but no problems after.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zezzet27:
no , i don't know what i sould i do.. i don't wipe any misc partition. can you explain me?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] maverick6664:
My user data isn't encrypted. I use no encryption (or is it encrypted by default?...I'm new to xz2.) Anyway, I use it by default except that its bootloader is unlocked and I'm using linux (fedora 30) to launch everything. Fedora comes with android tools. And I am using flashtool for linux. No driver installation required. No fuss, no muss.

dmesg show a very long list, so attach the log file in gz. Actually it's crashed.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] maverick6664:
Thanks. Then I won't mind. :o
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Just like described in the faq in the first post on the first page in this thread :P

"dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc"
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
it is encrypted by default :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zezzet27:
but i write this code in twrp? before flash twrp-xz2p in advanced or later?

or i put this code on adb?

sorry for noob question...
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
STOCK TWRP

[ 69.618671] init: starting service 'keymaster-3.0'...
[ 69.646746] init: Service 'keymaster-3.0' (pid 659) received signal 6
[ 69.646772] init: Sending signal 9 to service 'keymaster-3.0' (pid 659) process group...
[ 69.646860] libprocessgroup: Successfully killed process cgroup uid 0 pid 659 in 0ms

SODP TWRP

[ 9.008493] init: cannot execve('/sbin/qseecomd'): Exec format error
[ 9.008937] init: Service 'qseecomd' (pid 648) exited with status 127
[ 9.009003] init: Sending signal 9 to service 'qseecomd' (pid 648) process group...
[ 9.009170] libprocessgroup: Successfully killed process cgroup uid 0 pid 648 in 0ms

That's a decryption issue since the new august security update.

I recommend to just "fastboot boot twrp" the july twrp if you need to install something (but don't install its ramdisk) and of course a solution will be found. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
But does the boot with july twrp work too when i have a installed SonyAOSP in the August 2019 version?

From my understanding twrp and sec patch must match so logically that mentioned constellation won't work, right?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
09.08.2019
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] maverick6664:
Oh.....

I had read carefully your post in the first of this thread, and I "advanced" wiped data, internal storage, and dalvik in "fast booted" twrp and reboot, and did some initial settings (just entered my email address, finger prints and some developer options things) and repeated the procedure again.

fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

fastboot boot twrp.img

Advanced menu -> "Install recovery ramdisk" -> Choose twrp.img

But twrp stalls as before. dmesg shows the same error; service 'keymaster-3.0' received signal 6 and stalled.

Fortunately I can return to the normal phone state easily with "adb reboot".

Why does twrp stalls? I'm sure I "advanced wiped" three partitions. Do I forget anything else??:confused:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Pandemic:
So issues with twrp for August bro [MENTION=6031898]MartinX3[/MENTION] on fw 131 stock ? :(
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Maybe you're able to just "fastboot boot" without installing it.

But it won't be able to decrypt your userdata. :)

In theory a not matching security patch date should raise a different error and should allow you to enter twrp.

If the security date matches it runs into a different error I think.

But lets test that first or avoid the upgrade :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
https://xdaforums.com/showpost.php?p=80040163&postcount=4161

Just wait for a new twrp release :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
Ok i will wait until the fixed august twrp release (and OmniROM update).

:)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] maverick6664:
Thanks!! It's a known issue!!:o

Then, how about installing magisk-v18.1.zip in "fastboot boot twrp.img"? Is it supposed to work?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zezzet27:
i write twrp-xz2p.img on advanced twrp and later going on terminal and write

"dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc"

reboot in system but phone reboot on twrp...what i wrong?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] moyu4096:
Martin do you know what will happened if I close OEM Unlock in system? In the past it will lead to a re-lockable boot-loader. Idk what it will do in Xperia
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
IMHO better use the Patching method over Magisk Manager.

Then you can probably avoid the current twrp problematic.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Either you flashed the twrp.img on the boot partition by "install img" in twrp by accident

or

"cat /dev/block/bootdevice/by-name/misc" reveals the reboot into recovery cause.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Xperias are not relockable.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
if "fastboot boot twrp" gives you a working twrp without decryptable userdata, you could install it there

or modify the boot.sin via magisk manager app and reflash the result via fastboot like [MENTION=9542156]dhacke[/MENTION] said
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zezzet27:
i give up...don't understand
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Just write the quoted command into the terminal :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zezzet27:
i do but nothing happend ...
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Pandemic:
When ? :silly:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
That's fine, then it's just empty :P

That means you modified the installed kernel on your phone and replaced it with my own twrp kernel

That forces the system to always reboot into recovery

It seems you flashed the twrp.img on your boot partition, instead letting the buildin magisk replacing the twrp files with your installed recovery ramdisk.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
When it's done :silly:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] FartyParty:
[MENTION=6031898]MartinX3[/MENTION] If you want me to try on my XZP2 as well just let me know :). I could just send you the boot.img.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
20.09.2018
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Thanks, but we know now, that we need a working AOSP kernel to use TWRP. :)

Sadly there is no XZ2P support in the Sony AOSP at the moment. :)

Even our aosp kernel lacks ADB support. :)

We all need to be patient for the sony brains to finish their work. :D
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
WOHOHOHO party! :victory:

Does it also works if you only "fastboot boot" it? :)

Then you don't need to flash the dtbo image with the aosp kernel informations. :)

And can you apply the drm patch?

But there is still no camera support in the AOSP kernel.

So you need to flash the stock kernel and stock dtbo again and only "fastboot boot" the twrp. to get at least green pictures. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] niaboc79:
Ahahahahah

I was sure that someone was going to notice it ?

This is my work phone, I did not choose it ?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nasko_spasko:
Something i notice is that on the AOSP recovery there's working ADB and /system and /data are mounted properly. See the images below, That's the closest thing to logs, that I can get.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
The twrp.fstab I copied from the xa2 twrp seems to need my love and attention the next day. :)

Which from my many uploaded files doesn't work?

I hope I can use the OEM 9.0 twrp file?

Aaand can you get a log for me? :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nasko_spasko:
I haven't tested the 9.0 ones. The one on the pictures is omni-8.1-aosp-8.1.

---------- Post added at 01:50 AM ---------- Previous post was at 01:48 AM ----------

Clarify, please. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Thank you. :)

I hope you could fastboot boot the twrp with the 9.0 vendor OEM libs and give me a twrp log the 9.0 or 8.1 twrp :)

I only want to keep one working device configs and not one for every oem lib :P
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nasko_spasko:
Erm.. Should I flash the binary from sony SW*.img to the oem partition beforehand? Fastboot-ing the image doesn't work. It tries to boot the ROM even with the volDown key pressed from the moment I hit enter on

fastboot boot TWRP__omni_8.1__aosp_8.1_kernel__oem_9.0_libs.img

.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Oh, I will recompile the twrp boot image as "recovery only" now.

It should only "fastboot boot" into twrp with the stock firmware on the system.

"fastboot flash" anything.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Please "fastboot boot" the new file in the

2018-09-20_01:08+2:00

folder.

And please reflash the latest stock firmware form sony if there is still something modified. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
And to repair the mounting point problem

I think you need to flash my AOSP build from the other thread and show me the "mounts", so I can adapt the TWRP fstab for the aosp kernel.

I reuploaded a second TWRP an adjusted TWRP.fstab to test now.

"TWRP_as_recovery__adjusted_FSTAB__omni_8.1__aosp_8.1_kernel__oem_9.0_libs.img.gz"

I'm going to sleep now.

We have 01:29 in the morning. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nasko_spasko:
I'm all stock. I keep the stock img-s handy. on fully stock fw the latest TWRP_as_recovery__omni_8.1__aosp_8.1_kernel__oem_9.0_libs.img is not booting in recovery, but I'm pretty sure It will boot if i flash it with the dtbo and power up with the volDown key.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Weird stuff.

Very weird.

Did I miss something?

Did my fstab adjustments work?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nasko_spasko:
Nope. The log looks exactly the same as before(on the pics I've uploaded). Give it a break. GN from me. :cowboy:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Thank you and you too :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Before I forget it

It would be nice if you flash my aosp build again and show me the mouth points. :)

But it is weird, that it doesn't work.

It wants to get the partitions "by name" but is telling us, the mount point is "not present".

I wonder if you can mount it in the terminal of the TWRP image?

Or maybe my twrp build works together with my aosp rom?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] FcukBloat:
no news? ;(
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] azyounes:
no news no recovery no drm fix no camera working but i still love this device ?

sent from XZ2
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zezzet27:
but to resolve, how can i do?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Flash again the stock boot.sin from your firmware via newflasher

Just throw both files in a folder
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Can someone with the bootctrl error give me a dmesg and a /tmp/recovery.log after the error happened?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zezzet27:
so flash twrp-xz2p.img on twrp recovery advanced, then flash magisk 18.1.

close the phone and put n flash mode

flash boot.sin on flashtool (is the same of newflasher?)

is the correct procedure?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
I only recommend newflasher

I had weird issues and bootloops in the past with flashtool
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] maverick6664:
Oh, nice idea! You are a jewel!! :good::good: I'll try that.

Thanks!!

But I want twrp in the near future :D:D
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
thank you very much :D

You're not alone with the wish :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zezzet27:
i flashed twrp-xz2p.img, then magisk 18.1

close the phone and flash boot.sin from firmware 107.

phone reopen correctly but lost twrp and magisk non installed...
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
That's the normal behavior. Magisk and twrp are installed in the ramdisk which is part of the boot image.

New stock boot.img/sin => twrp and Magisk gone. Both must be installed again.