yashsingh1/xdaforums huggingface dataset:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] charos:
Can someone give concise information hot to flash TWRP in Oreo for XZ2 compact?

After upgrading to android 10 and phone got crappy with battery and notifcations, I took the bullet to revert back to Oreo. But I somehow (blame flashtool or newflasher) I deleted also the user partition. So I need to root the phone to attempt data recovery.

I unlocked bootloader and now on 51.1.a.4.265 but I cannot flash TWRP. Instructions are pretty vague for me. On download page there is only https://androidfilehost.com/?w=files&flid=288299 available for Oreo (content of files to use are attached here as screenshot).

I assumed that "vbmeta-xz2c.img" should be renamed to "vbmeta.img" and "twrp-3.2.3-0-xz2c.img" to "twrp.img" and then run:

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

fastboot boot twrp.img

However I cannot boot into twrp (it just reboots and then it goes off to charging). What exactly am I doing wrong here? I am about to throw the mobile off the window :mad:

also https://unofficialtwrp.com/sony-xperia-xz-compact-root-twrp/ is a bundle of crap!

Flashing bricked it (corrupted the bootloader), so I had to flash rom again.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] old.splatterhand:
Twrp boot was not available on Oreo.

You need to flash twrp.img and vbmeta, then boot into twrp, flash stockkernel installer from twrp, then twrp installer and magisk.

I hope my mind remembered the steps correctly.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] charos:
Here's what I just did:

Flashed with newlflasher H8314_Customized+CE1_1316-0774_51.1.A.11.51_R1A.tar.gz (the one provided by MartinX3) , boot and enable debug on developers menu and then run fastboot reboot bootloader

to avoid the known bug, then runfastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

then renamed twrp-3.2.3-0-xz2c.img to recovery.img then fastboot flash boot recovery.img and fastboot boot recovery.img

Result: endless bootloop with Sony logo ...

---------- Post added at 12:56 AM ---------- Previous post was at 12:40 AM ----------

Stupid me...by adding the boot recovery.img at the end...I am flashing it again :(

I just had to stick to fastboot flash boot recovery.img and reboot!

---------- Post added at 01:53 AM ---------- Previous post was at 12:56 AM ----------

Jesus, this will never end...

So, I managed to boot to TWRP. I flashed stockkernel-xz2c-installer.zip, then the twrp-3.2.3-0-xz2-xz2c-xz2p-installer.zip , rebooted > Sony logo and no boot. Also cannot boot to TWRP after this. Flashed again with newflasher, repeat and same thing happens.

What can I possibly do wrongly now??

Maybe I should get an iPhone after all, or even better a Nokia 5110 and play Snake. I am too old for this ****.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] old.splatterhand:
As far as i remember, Magisk was needed to boot. That's why it is included in the download package.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Please flash the twrp IMG first on boot

Execute the vbmeta parameters

And in twrp flash first the stock kernel, then the twrp installer and then magisk.

But better use PIE over Oreo.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] charos:
Thanks guys. I somehow managed to do so. However data recovery was not fruitful so all this was for nothing. Except I did all the wrong things like unlock bootloader at Oreo, so when I flashed Pie, camera preview was black and flashable fix did not work. So the followup will be on https://github.com/MartinX3-AndroidDevelopment/bug_tracker/issues/7 :(
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] anakete:
how could i extract the boot.img? (52.1.A.0.532_R4C android 10)

and does magisk works with android 10?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MrMmmkay:
Maybe someone could upload a magisk patched boot.img for 52.1.A.0.532? Than it would be easy to flash it via fastboot if I got this correct?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Klaus N.:
Here you go:

https://www.dropbox.com/s/06jtesdmdb71aj3/52.1.A.0.532_magisk_patched_bootimage.7z?dl=0

(It was too big for uploading here ;))

Btw., it's patched with the latest Magisk Canary build.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zarbix:
any new developments? Has TWRP been fixed to be usable again? RE its inability to decrypt the storage
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
My LineageOS tree is work in progress between job, studies and free time :p
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zarbix:
from what I understood its up to the TWRP team to fix their code, no?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
https://twrp.me/site/update/2019/10/23/twrp-and-android-10.html

And for stock I need the xperia kernel source code released

And I need to finish my 10.0 build environment

And maybe the 9.0 twrp works too, who knows
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] zarbix:
ok so revisit Android 10 next xmas, got it. Hopefully we can get Android 9 working before then :)

I really just want to be able to finally start using my xz2c that I bought a year ago ^^
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] amakuramio:
Bricked my xz3
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] rossxander:
I everybody, I have a huge problem with my XZ2, I'm still on Android 9 (52.0.A.8.83), bootloader unlocked, with the fix for the camera.

On the playstore, a lot of app says my device is not compatible (like Netflix or Cozmo), even if I install the app from apk mirror, for some app, it works (but 480p only and no HD on Netflix) and some app, won't start at all like Cozmo...

Please, tell me a solution exist. ^^
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Klaus N.:
It's for the XZ2 (H8216). Simply flash the kernel for your device and it will boot again. You can provide me your kernel, and I will patch it, if you want to ;)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] slsamg7112:
how to provide the kernel to you? in which kind of formats?

is that fine to pull all the boot folder from the firmware that downloaded from Xperifirm?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
It is the boot.sin file

Just copy it into the newflasher folder and execute newflasher

(And you need to disable vbmeta again if you need any system modification, for just twrp and magisk it isn't needed)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Klaus N.:
Just give me a link (e.g. Dropbox) to your kernel (it's equal, sin or img).
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] slsamg7112:
https://app.box.com/s/npo1rcmgh1vhmnxkelyb13dbu8aro8qk

here for you;) thanks a lot

Edit:

I successfully patched the boot.img and magisk works!

But I can't modify system even using vbmeta for android 9

My device is XZ3,maybe I should wait until the new release?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Hingbong:
my xz2 is on 52.1.A.0.532, with system modification but no disable vbmeta, and it worked, is there someting wrong?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Pandemic:
Twrp works for you on android 10 [MENTION=4628922]Hingbong[/MENTION] ?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Hingbong:
are there any twrps for xz2 with stock adnroid 10?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
I can't start to work on a TWRP until sony publishes the kernel source code.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] slsamg7112:
how about the vbmeta? is that possible to do without kernel source code?

i can't modify system on my xz3 running android 10:crying:

thanks anyway
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
You're welcome

Just get the vbmeta.sin from the firmware and use UnSin.exe
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Klaus N.:
Sorry for the delay; I'm a little busy these days :p

Here you are: XZ3 Magisk patched bootimage Android 10

Simply flash it via

fastboot flash boot magisk_patched.img

(It's patched with the latest Magisk Canary build)

You'll have to install the current Magisk Manager from here, ofc ;)

If you have already patched and flashed your Magisk-patched boot.img, you may have a look into Magisk Manager > Advanded Settings. If the checkbox left of "Preserve AVB 2.0/dm-verity" is checked, remove it. Right after that, press INSTALL near "Magisk is up to date" > INSTALL > Direct install (Recommended) > Reboot.

Or simply flash the patched bootimage I've provided above via fastboot command.

Now you should be able to modify /system!
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] slsamg7112:
thanks a lot. i'll try to disable that:highfive:

https://app.box.com/s/gsq08ldl3e17od3jo2vuu2mjdu1mlr5u

here is vbmeta from android 10 on xz3.thanks in advance
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] bimmerdude:
Hello,

Thanks for the hard work. I have a XZ2P, I would like to root and want to verify what I'm about to do is correct. :fingers-crossed:

Model: H8166

Build: 51.1.A.6.83

Android Version: 8.0.0

I downloaded the following file: 2018-10-11_16.20+2.00_51.1.A.12.48.tar.gz and extracted the contents to get:

Magisk-v17.1.zip

stockkernel-xz2p-installer.zip

twrp-3.2.3-0-xz2p.img.gz

twrp-3.2.3-0-xz2-xz2c-xz2p-installer.zip

vbmeta-xz2p.img.gz

I extracted vbmeta-xz2p.img.gz to get vbmeta_X-FLASH-ALL-B6B5.img

and

I extracted twrp-3.2.3-0-xz2p.img.gz to get twrp-3.2.3-0-xz2p.img

I will run these commands from ADB

fastboot --disable-verity --disable-verification flash vbmeta vbmeta_X-FLASH-ALL-B6B5.img

fastboot flash boot twrp-3.2.3-0-xz2p.img

In TWRP

Install stockkernel-xz2p-installer.zip

Install twrp-3.2.3-0-xz2-xz2c-xz2p-installer.zip

Install Magisk-v17.1.zip

Finally Reboot into SYSTEM

Thanks for your time, is my plan correct?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] orapyt:
No. Please don't unlock the bootloader on Android 8 (it breaks a lot of things, such as camera). Upgrade to the latest stock firmware first, then unlock the bootloader. However, there is no TWRP for latest version or any custom ROM, but it is still possible to get root by manually patching the 'boot.img' and then flashing that via 'fastboot'.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Like [MENTION=10030062]orapyt[/MENTION]e said please upgrade to the newest possible firmware first (10.0 now) before unlocking.

So you don't loose features.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] bimmerdude:
Thank you guys, I appreciate the advice. I will follow orapyt's directions then. Looking forward to testing, I know there aren't too many XZ2Ps out there.

Thanks again,

bimmerdude
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] moosmutzel:
Howto make boot.img

Hi, this reads like good news. I would like to try the same for my XZ2c but don't know where to start :eek:

I have read the Magisk patching howto and should be able to unpack any sin file using sony_dump. But i dont know which sin file to extract to get a boot.img for patching.

Maybe you could elaborate a bit on the steps you took for your XZ3 patched image? Thx a lot in advance
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] orapyt:
I believe it would be the `boot_X-FLASH-ALL-{some numbers and letters}.sin` from `XperiFirm`, then extract the `*.img` however you want, patch it, and flash it.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Orihamburger:
Stuck in teamwin logo...

After installing ramdisk, i reboot my phone to recovery.

But, the phone is stuck in teamwin logo..

I have tried several times.:crying::crying:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] orapyt:
Which build are you on?

If you are on one of the newer Android 9 builds, they do not work when flashed to ramdisk because userdata cannot be decrypted (bug). In this case, just boot into it using `fastboot` and flash whatever you need, without installing TWRP into ramdisk.

If you are on latest Android 10, there is no TWRP available yet at all for Xperia XZ2/C/P or XZ3... You can manually patch Magisk into the boot.img, however.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Orihamburger:
I am using the latest pie firmware (52.0.A.11.32)...

So, do i have to downgrade to use TWRP normally?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] orapyt:
Yes, but I really, really, really don't recommend it. Staying up to date with all the latest security patches is important; downgrading just puts you at unnecessary risk. You can still use TWRP if you boot it from your PC (just don't install it into ramdisk).

If you still decide to downgrade, I believe 52.0.A.11.3 is the latest build that can use TWRP normally (not 100% sure).
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Orihamburger:
-----------------------------------------------------------------------------------------------------------------------------------------------------

Thank you so much. ;)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] moosmutzel:
Thanx, that worked perfectly. Feel free to download patched boot.img for XPeria XZ2compact (H8324) here

Just to summarize for others seeking root under Android 10, here is what i did (all under Linux, but Windows should work alike):

download xperifirm

used xperifirm to download latest firmware for my country (H8324_Customized DE_1313-6204_52.1.A.0.532_R3C)

download sonydump

use sonydump to extract boot_X-FLASH-ALL-B6B5.sin:

sony_dump out /path/to/boot_X-FLASH-ALL-B6B5.sin

got a file named "out/boot_X-FLASH-ALL-B6B5.000", renamed to "boot.img"

uploaded boot.img to phone, installed latest magiskmanager.apk from [URL="https://github.com/topjohnwu/Magisk/releases"[/URL]

open magisk, tap "install → install → Select and Patch a File"

select uploaded boot.img → got [Internal Storage]/Download/magisk_patched.img and downloaded it to my computer

put my phone in flashmode, entered

fastboot flash boot /path/to/magisk_patched.img

reboot, enjoy rooted phone
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] maricn:
Thanks for sharing. I tried following your procedure for my XZ2C (dual), but I can't find (install -> install) in magisk manager. So I went with your patched file, and it worked fine. Cheers!
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] sve1313:
Look here how to patch.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
30.01.2020
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] JohnBay:
Bloat removal

Can anyone advise whether there is any way with this phone (XZ2C) to delete pre-installed bloat/system apps (like Facebook and Kobo/Amazon)?

As has been mentioned by others, TWRP on Android 9 does not decrypt the relevant partitions. And using Titanium Backup seems to work, only to have the bloat come back on reboot. Clearly the system partition is not writable.

I know most can be disabled, but I'd still much prefer just to get rid of them altogether.

Thank you.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Use the bloat remover in this forum, but replace the removal list by there entries

https://github.com/MartinX3-Android...META-INF/com/google/android/update-binary#L62

I should be ablte to finish the twrp bloat remover with TWRP 10
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] sve1313:
When I flashed magisk_patched.img my phone stuck in Xperia logo and then reboot.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Did you deactivate the vbmeta?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] sve1313:
Which vbmeta.img shold be use?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Pandemic:
Deactivate means dont use it
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Any vbmeta is fine.

The needed terminal command is written on the first page
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] voilsb:
I physically damaged my xz2c and got a replacement. I OTA updated it to 11.32 before I unlocked the bootloader, but I still have the black camera preview. I assume I can still downgrade to oreo, xperifix, etc to get my camera back, but is there a simpler method since I unlocked on pie?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Sad that you didn't unlocked on Q. I heard you can use more Sony functions after.

Hmmm, but the black camera preview is weird.

Are you didn't flash the camerafix by accident?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] voilsb:
I flashed the camera fix after I had a black preview to see if it would fix it, and I also re- newflasher the vendor.sin. I didn't unlock on Q because it's not out for my region yet so I was on the newest firmware available without unlocking.

It shouldn't be a big deal to downgrade to oreo and fix it there I think, but I just hoping for something simpler
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Sadly it confuses me.

The black screen shouldn't happen anymore.

(Maybe for the next sony device, you can always flash different regions with xperifirm+newflasher, even on a locked xperia)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Klaus N.:
May I ask you what's your fw region? I'm asking because I know someone somewhere in South America, where Q has not been released yet. He flashed the current Android 10 of Customized CH (Switzerland), and as far as I know, it works like a charm - both data and wlan. As the camera of your device doesn't work anyway, you should give it a shot ;)

Once upgraded to Q, there's no need anymore to flash the cam fix...
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] voilsb:
I'm USA. I may flash 10 just to play with it. I've heard of battery and fingerprint issues though, but there's no loss to try.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Klaus N.:
Just give it a try; if you have problems with your baseband or/and wlan, you can switch back to Customized US anytime without any problems via Newflasher.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] voilsb:
I flashed France firmware, and camera works on android 10!
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] sve1313:
First time flashed with the new flasher exclude userdata_X-FLASH-CUST-B6B5.sin

Second time i flashed everything with the new flasher, then flash patched boot.img without vbmeta disabled and everything is OK. Camera preview is works too.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] tb_:
TWRP requires unlock right?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] mirhl:
Mhh, any more info on that?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
The rumors say that you don't loose sony features if you unlock your device on Q.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] voilsb:
I flashed Q and got camera back, so I can vouch for that

---------- Post added at 03:22 AM ---------- Previous post was at 03:18 AM ----------

I got my camera back after I flashed Q. I don't know what other Sony features to look for
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] thinhcaibe:
I just bought the XZ2 (702SO) a few days ago, it didn't unlocked yet and running newest Android 9 and if i want to get root i have to:

1. Unlock bootloader

2. Follow your instruction for Android 9

3. Flash Magisk

And also flash the camerafix ?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] mirhl:
Ye gods. Though I'm not sure what's happening here. It may be Sony is indeed on a path to improve the DRM situation, or perhaps it's just much placebo.

At least cinealta features still break for example (in addition to widevine and HDCP of course). It could be first time is never the charm though.

[MENTION=8734521]thinhcaibe[/MENTION] I would wait softbank to release Q before unlocking.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] thinhcaibe:
Can i install the H82xx firmware for my 702SO variant
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] mirhl:
Possibly, but you should be prepared to tinker with baseband and whatnot if you want everything to work.

https://xdaforums.com/xperia-xz/help/help-please-sony-xperia-xz-01j-t3580819/page3#post78396811
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] thinhcaibe:
Urghhh seem like it confusing me a little bit, but i will test
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] thinhcaibe:
Seem like i had bad news for myself, went i check the *#*#7378423#*#* one it said bootloader unlock allowed: no. According to sony this mean i'm unable to unlock the bootloader, seem like i'm going to be stuck forever with the stock rom
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] anjelz2012:
How can I solve the problem it gives me when using the command --disable-verity --disable-verification .... I always get an error ...?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Based on the informations you gave me, I sadly can't reproduce your problem.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] anjelz2012:
I already managed to resolve, just update adb version to 1.0.41 :cowboy::cowboy::cowboy::cowboy:

Although I still can't install twrp correctly, everything remains in the SONY logo, the XperiFix doesn't work for me either, so I have no choice but to use android 10 + magisk
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Anti-root:
Maybe someone should write this at the beginning, together with the other instructions. The "disable verity" command does not work, if you just copy it from here and past it in the command window. The hyphens have to be typed in manually, otherwise it gives an error.

It has been addressed here before, but has not been duly emphasized.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] mirhl:
I seem to recall people having managed to unlock their phones even with "no". A little minority perhaps, but I think some phones had status detection broken (even though this seems unlikely considering you have a carrier phone)

But there is also a story about paid tools to fix it.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] janolucero:
hey [MENTION=6031898]MartinX3[/MENTION] do you have a copy of the twrp for android 8? is not avaliable anymore :(
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
If neither on Android file host nor on the dhacke FTP server, I sadly don't have it either :(
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MrMmmkay:
[MENTION=6031898]MartinX3[/MENTION]

finaly the sources are out :)

https://developer.sony.com/file/download/open-source-archive-for-52-1-a-0-532/
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nikkdib:
finally...
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Thank you :)

Sadly at the moment it looks bad until the official TWRP 10.0 is ready.

Maybe I achieve something with 9.0 stuff instead. Hmmm. :rolleyes:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] albert205aA:
Hey Martin, I unlock my BL on 10.0, then flashed down to Pie to install TWRP, I got black camera preview. I tried camera fix by Pandemic, yours and both do not work for me. Do you have any solution?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
You deactivated VBmeta?

(But if I remember correctly, to use this hack in 9.0 you did need to use the drmfix in 8.0 first)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] 64801965:
Could provide j4nn's modification kernel link? Thanks in advance!
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Ask the user who does the modded stock kernel here, please.