yashsingh1/xdaforums huggingface dataset:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
"adb shell dmesg > dmesg_xz2p_noTouch.log" should be fine :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Thank you [MENTION=10003868]depeche76[/MENTION] :)

Could you put it in the XDA code tags?

And does the /tmp/recovery.log something?

I think I rerelease twrp today with updated stock touch drivers. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] depeche76:
[MENTION=243864]xda[/MENTION]

---------- Post added at 04:28 PM ---------- Previous post was at 04:12 PM ----------

im tagged code xda Mr Martin :) ok What should I do now? again i need flash 107 ?:)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] slsamg7112:
yep,i just save my phone and now it works well.it took me a lot of time.

i don't want to try for now:p
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Please put everything in a file and upload it next time [MENTION=10003868]depeche76[/MENTION]

Easier to read :)

Seems that the ssw_mon touch driver missed 2 functions

I will it upgrade in 3h after work and rerelease twrp :)

Hoping it fixes this issue.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Just install omnirom and all problems are gone hihi [emoji14]
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] depeche76:
ok Mr Martin !:)

---------- Post added at 04:59 PM ---------- Previous post was at 04:38 PM ----------

Martin how can i post delete?i dont find sorry!
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
You can't Mr Depeche, but you can replace the text with --
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] depeche76:
ok thank you [MENTION=6031898]MartinX3[/MENTION]

---------- Post added at 05:15 PM ---------- Previous post was at 05:14 PM ----------

..
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] apaxtc:
Martin

what good would it be if you created a video tutorial

it would be easier for everyone

anyway thank you for the support you give :) you are a great man .
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Thank you :)

Could you make one on YouTube I can link on the first page?

So we can sure that it all has what you and maybe others need :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] depeche76:
Absolutely I agree!!!It would be great for those who are just users like us and for Nice Man Mr Martin !

---------- Post added at 09:04 PM ---------- Previous post was at 09:00 PM ----------

Did Martin get a chance to update twrp? [MENTION=6031898]MartinX3[/MENTION]
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Thank you :)

I'm on it at the moment (extracting stock touch kernel drivers) :P
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] depeche76:
Ok Mr Martin thank you i will wait ...Mr Martin I'm waiting for my salary to donate you !
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Wow, thank you Mr Depeche :victory:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] depeche76:
labor is the highest value for me Mr Martin .I know this is not a place for politics, but I'm a scientific sclist ;)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Me too [emoji14]

And social is the word you search [emoji14]
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] depeche76:
no i dont search its my censor :))))
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
At least the great firewall has enough holes to communicate with us :P :D

Here is the download link

http://www.dhsfileserver.de/ftp/Mar..._22-43-19_twrp_stock_xz2p_52.0.A.8.107.tar.gz

If you give me the okay I remove the faulty twrp, upload the new one on android file host, too, together with the other TWRP bundles for the other devices and write a news :)

The new touch drivers did raise the twrp size by 1.1 megabyte, so hopefully the problem is now fixed. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] depeche76:
martin first I with fastboot flashed img file and then im swapped twrp.img again.after im rebooted my phone .Android is working but new problem is when im power of my device i cant switch twrp mode. :(

---------- Post added at 12:59 AM ---------- Previous post was at 12:12 AM ----------

Martin youre done!:) Thank you very much!im again flashed img file and then im installed again twrp img everything is ok!:good:after twrp im installed magisk 18.1 it too ok !:good: thank you [MENTION=6031898]MartinX3[/MENTION] Youre realy god man! I wish everything to be the way you want it all your life!
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Nice to hear and thank you :)

Have fun with twrp :D
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
30.07.2019
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] ocwvarx:
XZ2P 107framework TWRP touch issue fixed:victory::victory::victory::victory:

thx:laugh:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] slsamg7112:
i prefer stock more than custom rom,unless sony ends it support:cool:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
If one reports a bug it may be coincidence or wrong installation, but two people making me scary xD
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] slsamg7112:
can we update magisk to v19.3 ? i was on v18.1 which you provided in the file

i update magisk from manager then it stuck at sony bootlogo,i gotta flash it again

holy crap
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
The sodp custom ROMs after you booted 18.1 once, yes

Or wait for 19.4 for stock and sodp xperia support
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] depeche76:
Martin hi again!i had a little problem yesterday.my memory card has been deleted.its ok.after this situation I'm trying to install twrp again via fastboot and then "Install recovery ramdisk" -> Choose twrp.img ok im choose (in here i dont know i need choose boot option? )and im swiped to install and rebooted but after then system won’t boot.Twrp mode freezes again:( whereas yesterday I did not live this problem..
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
You mean you wiped your sdcard or internal storage?

That looks like the userdata is not decryptable by twrp and the android system

Did you downgrade both?

Did you switched the boot slot from A to B or B to A?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] depeche76:
i mean im wiped internal and sdcard but after this situation im again flashed via new flasher 107 firmware.what you mean downgrade bot?but i didnt switch the boot slot from A to B .how can i this?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Please wipe data too.

If you wiped internal storage or data, one of both is still encrypted with the old, lost encryption key
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] depeche76:
ok you mean wipe data via Twrp or?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Yes, data & internal storage, since the entire /data is encrypted, and the internal storage is a subdirectory of /data sharing the same encryption key footer in the data partition
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] depeche76:
ok Martin .after then do I need to select boot when twrp img swipe?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
You swipe data and internal storage :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] depeche76:
ok :) transactions in progress now
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Nice, I hope it fixes your problem :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] depeche76:
no Martin unfortunately not fixed my problem :( The same problem continues
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
The normal system should boot since my twrp doesn't modify it.

Are you sure you didn't flashed something bad?

Like magisk 19.x ? (19.4 will be the first with flawlessly xperia support)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] depeche76:
no no im flashed only magisk 18.1 .im first flashed twrp.img via fastboot after then im swiped to install again twrp.img .(vbmta comand it doesn't work on my system, you know)system reboots after sony logo and then freezes back to recovery mode
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Please don't flash twrp in fastboot

Just boot it
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] depeche76:
sorry pls I wrote wrong Martin.i mean after then I swip installed twrp.img
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
Try it without the word 'flash' in your first command.

The instruction says 'fastboot boot twrp.img' NOT 'fastboot flash boot twrp.img'.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
You flashed the twrp image on your boot partition

You need to flash the firmware boot.sin again and then only boot it

And this weird unrecognized option error is weird

Did you wrote it by hand or paste & copy?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] depeche76:
Yes youre right friend! but after this error I tried to write again correctly..
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
You need to reflash the boot.sin with newflasher from the firmware

Because your boot partition is now polluted with a wrong twrp installation :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] depeche76:
iI wrote this as copy paste.( fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img ) I don't understand what you mean in this sentence. "You need to flash the firmware boot.sin again and then only boot it" can you explain it to me? pls sorry .

---------- Post added at 01:41 PM ---------- Previous post was at 01:24 PM ----------

im reflashed my fimware 107. again :) i will try again now
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
It should work now :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] depeche76:
unfortunately no dont fixed problem. fastboot boot twrp.img after then im selected Partition to flash image boot. im swiped to confirm flash twrp.img and rebooted system.and again back to system recovery mode :(
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Please execute the dd misc command from the first page FAQ :)

You did bootloop too often, so the system set a boot to recovery flag in the misc partition.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] depeche76:
ok Martın

---------- Post added at 06:48 PM ---------- Previous post was at 06:06 PM ----------

Martin this command nothing show the reason in twrp .after this commad terminal freezes .cat /dev/block/bootdevice/by-name/misc after then i did dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc. and i get this message No space left on device. so but nothing changed .if you want i can give you my teamwiver number for windows and for my device.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
We should restart the procedure

Flash the stock firmware (including a full wipe)

Boot it

Restart into fastboot

Boot twrp

Install twrp ramdisk

Restart into twrp

Restart into system

I mean you had a working state before you wiped your internal storage :S
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] depeche76:
Install twrp ramdisk did you mean i need select install recovery ramdisk and then swipe..?

---------- Post added at 08:12 PM ---------- Previous post was at 07:52 PM ----------

This recipe worked Martin :) you're done again:good::cool: thank you very much drug!(comrade) thank you [MENTION=6031898]MartinX3[/MENTION]
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Woohooo :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Seems you're one of the few unlucky users :(

https://github.com/sonyxperiadev/bug_tracker/issues/351

Please comment there :(
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Sputnik2a:
Oh oh, sad so I must switch back to my old phone. Not open device but run at least with AOSP and derivatives. :rolleyes:

I will try if I find the resources to build the AOSP and hopefully help via testing to fix this issue. Or I spend the phone anyone else who has more time and hardware resources as me to help the other unlucky users.

Do you know how many space on the host HD is needed for building AOSP? I have only experience with C++ based Embedded Linux. Where I need around 100 GB per project.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
https://developer.sony.com/develop/...build-instructions/build-aosp-android-p-9-0-0

:)

Sadly at the moment the team is mainly focused on porting to kernel 4.14 and android Q :S
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] apaxtc:
I have a stupid question (or not !) i can flask kernel with flashtools ? (flash vbmeta vbmeta.img and boot twrp.img) :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
With newflasher you can put a single .sin file from the firmware directory in the same folder of newflasher and only this specific file would get flashed. :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] rossxander:
Hello everybody, So finally, I will update my XZ2 to Pie and if I have understand [MENTION=6031898]MartinX3[/MENTION], this is the steps I need to follow :

FYI, my phone (H8266) is actually under Oreo 8.0.0 (51.1.A.11.51)

1 : Download the firmware with XperiFirm ( France : 52.0.A.8.83 - R7B)

2 : I put the 7 files of the "newflasher V17" folder in the folder of the firmware.

3 : I delete the "userdata_X-FLASH-CUST-B6B5.sin" in the firmware's folder

4 : I switch off my phone and connect it to the pc with the "sound down" button pushed, the green led bright (flash mode)

5 : launch newflasher => N/enter & N/enter

6 : wait for the flash...

It that ok ?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
Regarding step 2:

You need only the Newflasher.exe file. It not necessary to copy all files of the Newflasher folder into the unpacked firmware folder.

And after flashing the stock firmware you need vbmeta.img with the Parameters (see faq in the first post of this thread).

The rest is right.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] rossxander:
It's important ?

And another thing, I have the black screen back for the camera and every photo are green. Why ?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
Yes. Otherwise your phone will hang on the sony logo (stands in the faq sections as well:))
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] rossxander:
Actually, the phone booted normally and work perfectly, still, I will made the vbmeta thing, but the problem is the camera who is down.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
Ok then it seems that it isn't necessary anymore. I always made it on my phone because the instructions say it.

But when it works without...nice.

Regarding camera:

Did you unlock your phone on oreo? Then you need to flash xperiafix to get a working camera on stock rom.

Links:

https://github.com/MartinX3sAndroidDevelopment/bug_tracker/issues/7

I'm not sure whether the xperiafix fixes green pictures, too. I know that it fix the black preview. [MENTION=6031898]MartinX3[/MENTION]

Can you mayby answer this question?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] rossxander:
Yep, I unlocked my phone under Oreo and I used the "permissive.zip" to bring back the preview camera.

On Github, if I follow the indication by MartinX3, I guess I need to reinstall the good version of TWRP via the adb manipulation.

But first, I need to write this command line "fastboot flash recovery twrp-2.8.x.x-xxx.img" but the file I downloaded is a "2019-06-11_14-37-22_sony_stock_twrp_xz2_52.0.A.8.83.tar.gz" and inside, I have no trace of a twrp.img... I'm a little bit confused.

And where I find the "camerafix.zip" ?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
The vbmeta parameters aren't needed anymore for twrp since we can "fastboot boot twrp.img"

But it is needed to make the camerafix.zip usable, otherwise android would reject the modified files in the vendor partition.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
[MENTION=8584787]rossxander[/MENTION]

Please follow the first page instructions, there is nothing about "fastboot flash recovery". :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
Good to know. Thx. Then i can spare me some type work for the next update hehe:)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] rossxander:
I need to follow all this steps ?!

Ok, still, where is the twrp.img in the tar.gz ? I'm lost.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Pandemic:
Yes in the tar.gz open the kinda zip folder with 7zip on your pc and you will see the files ;)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] rossxander:
Ok, it's bcs I use Jzip and I don't know why it messed up. Problem solved for the archive folder ^^

Now, I need to understand and following slowly the steps. :p

---------- Post added 3rd August 2019 at 12:27 AM ---------- Previous post was 2nd August 2019 at 11:34 PM ----------

Thanks [MENTION=6031898]MartinX3[/MENTION], everything works perfectly.

Last question, I have just updated TWRP and installed the "Camera_fix_by_martinX3.zip", do I need to install "permissive.zip" and camera_fix_by_serajr.zip" too ?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
No, you're perfectly fine now. :)

Martinx3 -> twrp installer

Serajir -> magisk Installer

Permissive.zip -> if you need it, this twrp installer switches your selinux state from the secure enforcing mode into the unsecure permissive mode
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] amakuramio:
im going to buy this phone s9+ oled gives me nausea and depression feel sick

so i upgrade to pie latest, unlock bootloader, flash twrp, magisk, done?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Ugh, I hope you get less health issues with this regular LED panel.

Yes :)

But "boot twrp" and install it with the build in twrp menu.

And use the bundled magisk 18.1.

19.1,19.2,19.3 are not working on stock and only work on the SODP custom roms if you booted 18.1 once.

19.4 will fix it.

And the bootloader unlock will do a full wipe.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] amakuramio:
I didn't have issues with xz premium I regret selling it even till today

I thought amoled was better because it saves battery etc and less blue light

Xz3 and xperia 1 have oled..
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
It emit brighter colors and consumes more battery.

The power consumption at OLED is

blue > green >red > black (0 power usage)

The more energy needy color dies first, too, but should be fine for at least 2 years.

But I don't know if they emit less blue light.

I personally be more happy with the XZ2 LED, than the Nexus 6 OLED screen. (Realer colors and better readability in sunlight).

Hmm, yes, and if you have enough from stock, you get further updates with SODP based custom roms on the XZ premium.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] math_green20:
I finally took the plunge today and decided to root my XZ2, I am having some issues installing TWRP ramdisk after using

fastboot boot twrp.img

I get an error saying TWRP cannot open boot ctrl module. If I reboot to recovery after this the phone is stuck on TWRP splashscreen, I can boot into system fine though.

Never mind I think I figured it out
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
The error is fine if you don't want to change boot slots

The twrp splash screen indicates a not working userdata decryption

Please make sure the twrp matches your stock firmware/security patch level month
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] math_green20:
I was using recovery for stock rom with custom rom :)

Only thing left to figure out is the camera fix, i choose one or the other and install either MartinX3 one through TWRP or Serajr one through Magisk?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Magisk means you can disable it in the magisk manager whenever you want :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] moyu4096:
Hey Martin, AFAIK Tama platform has got an update 52.0.A.8.131
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] dhacke:
Nice. Sony is fast this month. I have just read yesterday that the august security patches are out.

Chapeau Sony??
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] apaxtc:
and how to flash in unlock boot ? flashtools or newxperia ?

i need to know how to flash in flashtool-0.9.25.0 !:(
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Most of the users here using newflasher, which works in windows, linux and maybe MacOS. :)

To know how to use flashtool, I recommend the XDA flashtool thread.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] math_green20:
I am having another small issue where twrp will not save my settings, If I set langage to french it will be back to english on next boot
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] apaxtc:
ok man thx
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
That's normal.

If you don't decrypt your user data, twrp can't save/load its settings from there and only cache them in the volatile RAM.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] math_green20:
Phone seems to be stuck in crypted mode. I tried formatting data/storage/cache and it still says device is encrypted in settings.

Flashing a magisk canary fixed my issues with updating binary though, so yayyy I can play Pokémon Go again :)

Keep up your great work
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] janolucero:
I know that i shouldn't ask for eta, but is the new recovery on the works? I'm facing a heavy battery drain, so want to do a clean update.

Thanks for your great work
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Evil evil ETA question

At the moment are stock twrp, sodp twrp, Sony aosp & omnirom on my to do list.

I'm refreshing the ccache of my build environment for the august changes.

That takes its time on my laptop due to the lack of a powerful dedicated build server [emoji14]

And I need to learn for exams and to work in a job to pay the studying [emoji14]

Oh, and downloading the new source code updates, the entire stock firmwares of every supported device and the Sony stock open source bundle takes its time, too.

But I think the worst case ETA to get everything released is the weekend :)

Also this merged PR needs to get reverted, before I can release the SODP part of the todo list https://github.com/sonyxperiadev/kernel/pull/2042
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
08.08.2019
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] moyu4096:
Guys please do not urge Martin. At least from my test, i had prove that xz3 can be rooted without recovery now.

1. Just use phh's aosp gsi (remember to use the gsi with su) , flash it to system, reboot your device(if it can't boot just do a wipe, it will do). Then as you have a usable su now, use it to install magisk directly.

2. Then you have to use Flashtool to flash specific files to your device. Get the newest firmware from Xperifirm. Use Flashtool to make ftf file.

3. Use the ftf file to flash your magisk-installed xz3. When you flash, remember to choose to wipe the ssd and userdata (You can't use your xz3 if you don't wipe it, mine stuck at lockscreen) , and flash only system partition (At least don't touch the boot partition)

4. After finished rebooting your Xperia, all you just need is to setup your phone as normal. After setup, you can find magisk manager in apps. It will ask you to do some additional tricks. Don't worry, just do as it asked. After it reboot automatically. You get a xz3 with magisk. Without the use of twrp.

The last time (103) I tried to boot phh's gsi without the seLinux permissive trick, it failed to boot. But you can't make selinux permissive without recovery or magisk(afaik). So when this time it booted, I'm really surprised.

I never tried to use the boot image extracted from the file downloaded with XperiFirm. Maybe someone can try to patch it with magisk app and flash it in bootloader. MAYBE it can do the same thing, too.

After all. Thanks to Martin.