yashsingh1/xdaforums huggingface dataset:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Probably you flashed a ROM update or the boot partition again.

For the OTA update problem the TWRP works on it, but if you flash the stock firmware via newflasher or a boot.img by yourself, TWRP won't survive due to the missing recovery partition. (Google's decision)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Redlun3:
Sorry 4 long answear. yes. i push bottom "fix recovery bootloop" and get error.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
You probably flashed magisk already, the kernel patch part of this fix is already applied.

Are you now able to boot into the system?

If now, does "cat /dev/block/by-name/misc" gives you something?

(And I hope you didn't "fastboot flash boot twrp.img)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Bad news about an universal TWRP build.

It seems the current android 9 base is unable to produce a working TWRP with a bundled DTBO (without a DTBO it just stay in fastboot mode).

So after the TWRP based on AOSP 10 is ready for productive using, I will rebase my TWRP and try it again (and should be successful)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Redlun3:
No, system not starting and i go to twrp after logo sony.

Yes, something i see (in attachment).

"And I hope you didn't "fastboot flash boot twrp.img" -

of course not :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] stafaganza:
deleted
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Redlun3:
[MENTION=6031898]MartinX3[/MENTION] Martin, a u here? I still hope to solve the problem)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
deleted answer

Aaaand I am back from the german 40°C heat wave period (yep 2 weeks....) and a reinstallation and restoring of my computer after 2 years. :)

I assume you'd wipe in twrp.

Did you try

fastboot -w

This should create a working state to generate the policy by wiping your phone properly.

(There is a bug in the actual TWRP version)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] grusglo:
Hi!

I have an Xperia XZ3 H9436 (Dual sim) and unlocked the bootloader today. I then flashed Android 10 (Customized NOBA 1316-4789 (Firmware: 52.1.A.3.49/RC5)) from an image I downloaded with Xperifirm. My issue is that when following the instructions in this thread, I get to the step "Advanced menu -> "Install recovery ramdisk" -> Choose twrp.img", but all the folder names are scrambled and I cannot find the image file in the sdcard folder.

I tried disabling pass code lock without luck. I also attempted to press the encryption setting in the settings app, but nothing happens when I press it.

I'm also not really sure which package of twrp I should select. I downloaded Xperia XZ3 > android_10 > twrp > stock 2020-06-14_21-07-39_twrp_akatsuki.tar.gz. Would that be the correct one?

Has this occurred to anyone else?

Thanks!
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Please put the twrp.img on a sdcard or try "adb push" to put it in the ramdisk

The persistent installed TWRP should be able to decrypt your internal data.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Bork Bork:
Are there any plans of making a TWRP build that works with the DTB layout of official LOS now that SODP has reached EOL?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
https://xdaforums.com/showpost.php?p=83172223&postcount=345

But if it became ready before my exams, I still need to focus on them first until October. :P
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] ssdnvv:
Taking that into account - can I flash (the then compatible version of) TWRP after flashing after having already flashed official LOS?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Yes

Just the LOS ota may remove the twrp.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] ssdnvv:
Is this always the case or only if I flash TWRP after having flashed LOS?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
On my Nexus 7 2013 WiFi it survives, but it has a dedicated recovery partition.

Maybe it will survive in the xz2 los as well if the twrp 10 base has well addon.d-v2 support.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] shirik:
Hello, i am about to try this stuff on my XZ2P! Are there any requirements for the firmware (i didn't update for a few months and still have 52.1.A.2.1 on). Also will my camera still be working after flash?

Thanks for your hard work tho already
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Thank you :)

A firmware upgrade to the newest version is always recommended.

And if you unlock on the newest available stock firmware, you won't loose your camera.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] JDCV:
[MENTION=6031898]MartinX3[/MENTION] my xz3 H8416 52.1.A.3.92 unlocked BL, with your TWRP, rooted magisk 20.4 runs ok, except the internal data encryption. Any fix for that? Thanks in advance
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Nice

Did you install the twrp or just boot it?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] JDCV:
[MENTION=6031898]MartinX3[/MENTION] First Boot into TWRP, then install it advanced menu -> "Install recovery ramdisk". But internal sd is encrypted, so format or wipe is not a good option because erase all userdata . Do you know any fix ? The idea is make a full nandroid backup. Thanks in advance. Sorry for my English
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
You could push the file on your sdcard or use "adb push" to put it in your ramdisk root

After my exams I will rebase the twrp on a newer technology which hopefully resolved things
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] JDCV:
[MENTION=6031898]MartinX3[/MENTION], yes I used my ext sd to install your TWRP.img , and from that location, installed magisk.zip. Then reboot and make my changes with root permissions. The only issue is the data encryption . So not possible a full nandroid backup.

If you can fix that, Will be perfect. I will be pending. Thanks again
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Ah ****

Yeah, it's hard for me to maintain devices I don't own xD

So I hope it will be fixed by my AOSP10/11 TWRP which also should fix the need for different TWRP for stock/sodp.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] JDCV:
[MENTION=6031898]MartinX3[/MENTION] , I'll take a look of AOSP10/11 TWRP thread. Thanks.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] JDCV:
[MENTION=6031898]MartinX3[/MENTION] One last question... About rooting. I have noticed that If I make changes in system /vendor /etc /mixer paths ( for increase volume), they disappear after a reboot. This issue is related with magisk or about systemless or something? Any ideas? Thanks again.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Did you deactivate vbmeta before modifiying the vendor partition?

And if you do it in TWRP, did you mount it before?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] JDCV:
[MENTION=6031898]MartinX3[/MENTION] Followed your steps..

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

fastboot boot twrp.img

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

And then flash magisk 20.4. Using MiXplore I erase a lot of bloatware in System app or System priv app sucesfully .

So the question is, to modify System /Vendor /etc.. Its something adittional To do in fastboot commands? Or Another process in TWRP I missed? Thanks
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Yes, that's good to deactivate vbmeta.

Please look in the mount menu that you mounted the vendor partition.

And that you not switch the boot slot manually before booting android.

Otherwise you could modify it in the android system by remounting /vendor as RW, instead of RO
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] toto4c19:
XZ2P dual H8166 root

Hi, [MENTION=6031898]MartinX3[/MENTION], thanks for your hard work. Since I am new to rooting, please forgive me if I asked any silly questions but I still want to confirm with you in order to not making any mistakes.

I noticed you said upgrade to the latest firmware before unlocking. I have my H8166 firmware in 52.1.A.3.20 but the twrp you posted is for 52.1.A.2.1. May I know is it still compatible?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Just use the newest one without a firmware version. [emoji14]
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] &(*):
Known Bugs: DTBO modified, black screen and reset on boot;

I am having trouble booting and have followed the instructions. How do you correct or align DTBO for TWRP to properly boot?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
In a sodp based Rom or stock you already have a matching twrp
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] &(*):
Tried Stock (6-14) with firmware for 10 (.49) and it would not boot.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Maybe a installation step got wrongly executed.

It works for the XZ2/XZ2C/XZ3 for the users in the last months.

Btw a new TWRP is in the works (4.0.0) which maybe fixes your problem, if it is a bug.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] &(*):
Will try a variety of configuratons to see if I can get it running; if not, and TWRP 4 is not far off, I'll wait for that. Thanks for the heads up and replies.

---------- Post added at 09:31 PM ---------- Previous post was at 08:45 PM ----------

Figured it out I had SODP and Stock mixed up in my platform-tools folder. Now I have it installed and when it boots does not respond to touch. Is there a fix?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
The newest stock twrp should work with the newest stock firmware.

You could try to execute the /sbin/preptouch.sh in the (adb) terminal.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Bork Bork:
If anyone is having issues booting TWRP from adb then it's due to the fastboot bug (see first post) which will never be fixed. You just have to flash an existing bootable ROM (and reboot to fastboot mode from there) in order to boot/flash TWRP which is a pita, but it is what it is.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
This one is probably fixed with the newest bootloader update.

I don't remember anymore the bug happening.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] nikkdib:
if the touch does not work, temporarily, you can use a USB otg and plug a mouse and then use the recovery with the mouse.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Klaus N.:
Thanks for trying to help me! I simply wanted to let Martin know.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] shajk-00:
So if I understand correctly there'is no way at this moment to boot into twrp without fastboot in android 10 right?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] shoey63:
For me, touch works intermittently, about every third boot. H8266.

Clearpad info in screenshot
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] shoey63:
That's correctamundo buddy.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] serajr:
Strange twrp behavior on some devices (including mine).

Is /system mountable on yours?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] shajk-00:
thx buddy
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Klaus N.:
Same here: /system can't be mounted in TWRP.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] shoey63:
It is now:cowboy:

Q comes with a read only ext4 file system to prevent /system being modified.

Sooo. . . . .

- Boot into Twrp

- Backup System Image

- Enter Wipe > Advanced Wipe & Select System > Repair or Change File System > Change File System > Select EXT4 > Swipe to Change. This will format /system to good old standard , writable EXT4 file system.

- Restore System Image

- Reboot

Next time you boot twrp you can mount (and modify) /system:highfive:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] shoey63:
Screenshot
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] serajr:
Oh cool! :good:

Another way (advanced users) is to edit twrp.fstab and remove the ;mounttodecrypt flag from /system (and /vendor - just in case). It also works!
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] slsamg7112:
touch screen works on my xz3.

can't backup data partition with error 255,but i'm not using multiple user.no problem with other partitions

but after that i reboot my device and it says "cannot load android system. your data may be corrupt"

now i have to reflash my device
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Klaus N.:
[MENTION=6031898]MartinX3[/MENTION]

Just wanted to let you know that there's a new fw (52.1.A.0.672) for both XZ2 and XZ3 available... :p

Take your time :D
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Beetle84:
Any chance you could share the modified installable twrp privately please? :fingers-crossed:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] serajr:
I sent you a pm regarding this.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] uzairali98:
Noob here...

my story -> updated my xz2 to "52.1.A.0.618_R5C" after that i unlocked the boot loader....

# i went into fastboot mode by holding vol up and inserted the cable... blue light it and i was in fastboot mode from there i (twrp stock)

"fastboot boot twrp-xz2.img" i booted into twrp now from here i flashed the pixel experience rom but after successful installation of the rom i rebooted my device but it now stuck at sony logo i tried this many times... even flashed the stock rom using flashtool and retried everything but no luck please can anyone tell me what im doing wrong....

i came from z2 force (motorola) which was quite easy to handle but cant handle this xz2

thankyou and stay safe.......

cheers
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Beetle84:
You need to flash sony's oem.img via fastboot. There would have been mention of this in the PE thread.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] uzairali98:
THANKYOU brother... learning things :)... ROM successfully BOOTED
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] thanasis12.:
[MENTION=6031898]MartinX3[/MENTION] , my phone is XZ2 premium H8166, Dual (!!!), two IMEI.

I can flash your twrp?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Yes

Thank you for the bug reports , a new build for the newest firmware with hopefully fixed touch aaaaaand with RW mounted system partition is on the way :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Bork Bork:
Wow! I can confirm it actually works! Too bad it only took the devices entire lifespan more or less lol.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] &(*):
ADB before booting into it? That is not the problem as I can fastboot into it fine, it's after patching ramdisk and entering it normaly where I am experiecing the lack of touch response. I will just wait until you release version 4 and it is a bit more universal. Also, one of the partitions was missing from wipe when I fastbooted into it - cache. Is that normal?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
adb in twrp, maybe that fixes it

https://source.android.com/devices/tech/ota/ab/ab_implement
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] shortek:
question about dual sim variant (H9436)

MartinX3 can you describe the additional steps you need to take in xperia H9436 (dual)? Because I plan to unlock bl-> twrp-> magisk, I'm just hesitating whether the phone will retain full functionality...
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
The steps are on the first page

Just boot the newest stock before and flash it on both slots before
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] shortek:
Thank you for the quick reply. :D

Both slots of...? You mean step 4 or 5?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
I just used xperifirm and newflasher

Then everything should be fine

If you don't remove the userdata.sin it will also wipe your userdata
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Rosepeter:
Hi, thanks for your quick reply!

Before my first post, I apparently did not read the newflasher output carefully enough (maybe I simply was too tired), it always crashed when flashing system_X-FLASH-ALL-B6B5.sin. As suggested, I downloaded the firmware using xperifirm again and flashed it with newflasher. This time everyhting really worked fine and my phone boots again :)

Have a nice weekend!

Ciao

Fabian
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] twistedddx:
What is the newest bootloader update?

I couldn't get TWRP to reliably work on my H8296 device so just stuck with LineageOS Recovery which was working.

I forget my exact steps but I could get the device to fastboot boot twrp.img but ramdisk install after that didn't lead to a bootable TWRP.

I would get stuck at TWRP or Sony logo.

TWRP could install Lineage 17.1 (Official) successfully but then failed to install Gapps which would complain no compatible OS installed.

Finally I stuck with Lineage Recovery which accepted the gapps via adb sideloading.

Emma says my device has:

App-Sw: 1311-7920 52.1.A.3.49

Boot: 1310-7079 X_Boot_SDM845_LA2.0.1_Q_207

LineageOS 17.1 (Official) says the Vendor security patch level is 1 May 2020.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
The official twrp isn't compatible

Maybe it will be with my next twrp release

And it will stay on a months old security patch release in vendor due to technical problems in the stock base.

The eol sodp based lineageOS is compatible and has a newer vendor security patch level
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Dajo robb:
is it work for SO-05K?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
I don't know

The special Japanese models are only in japan
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] mielletseed:
Hello,

I tried to install TWRP to my XZ2C.

In the flash command I "forgot" the "--disable-verity --disable-verification".

Now my device is in a bootloop "Your device software can't be checked for corruption. Please lock the bootloader."

How can I reenter the fastboot mode to do that disable commands? Power up or Power down while plugging in doesn't work... Is there a way to reset teh device?

Thank you!
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
You did flash it by accident instead of just booting it?

Please UnSin.exe your boot.sin from the firmware folder

Or just put newflasher and your boot.sin in a folder

Xperifirm and newflasher are in XDA
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] mielletseed:
I tried following these instructions.

I managed to get in the fasboot mode again and typed the right commands but still the TWRP is not booting after "fastboot boot twrp-akrai.img"

do I have to use TWRP stock since I'm still on stock rom? My goal ist to install Android 11 from TWRP.

I'm only used Samsung until now ...
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Yes, until I release the new twrp (which hopefully fixed that) you need to boot the twrp matching your installed ROM
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] mielletseed:
Thank you very much! :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Have fun :)
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] ssdnvv:
[MENTION=6031898]MartinX3[/MENTION] any news on your further development?

---------- Post added at 03:37 PM ---------- Previous post was at 03:37 PM ----------

[/COLOR [MENTION=6031898]MartinX3[/MENTION] any news on your further development?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
The semester holidays ended and sadly studies + work + life eating my free time
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Pentoel:
I experienced a failure during step 6, twrp.img failed to install.

then I force flash twrp.img via adb fastboot, twrp is successfully installed, but the touchscreen can't respond, I boot back into twrp via adb, when I reboot into the system, booting stops on the Xperia logo. any solutions?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Did you flsah my accident the wrong twrp file from your sdcard?

It need to be the one which is bootable

If as example you install the stock twrp on a sodp rom or the sodp twrp on a stock rom things like this can happen
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Mumiby2:
Hello everyone,

I need help concerning twrp recovery flashing, I didn't know anything about the "recovery in boot". Now I do. Last time I flashed rom or recovery was with my Nexus 5 back in 2016.

I just unlocked the bootloader on my Xperia XZ3 (H8416) and succeeded booting on TWRP but trying to install the recovery ramdisk I found that all my files are encrypted including the TWRP.img...

Any advice ?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Use a sdcard or push the file via adb push in the temp folder
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Mumiby2:
No sdcard at the moment, I'll try the adb push method...

By the way:

- Can I install another recovery from the booted Twrp using the install recovery ramdisk option?

- Does this twrp recovery allows me to install custom rom ?

- I asked about my issues on other forums and someone told me this : "Commit to decrypt android 11 was just pushed this week. Reach out to him and tell him to repo sync with android 9 or 10 branch from team win github"
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
TWRP (based) recoveries should work, but I never tested anything else than twrp

Of course

Yes, It's on my todo list :)

And thank you, but for now the fastest solution would be to push the file via "adb push" on the phone
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Mumiby2:
After installing Pixel experience rom, I wish to flash Twrp:

- Which TWRP should I flash SODP or STOCK?

- I have now a Pixel Experience recovery do I install from this recovery via adb sideload or fastboot flash recovery twrp.img

I have a Xperia XZ3 (H8416)

Thanks in advance
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Is the used PE Rom based on stock vor SODP? :)

Sodp Roms need the OEM.img until the device got mainlined.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Mumiby2:
They say in the description that it's AOSP based 🤷

I flashed the rom (on slot b) with stock twrp (on slot a). But I ended up with their recovery on slot b ... I'll try the fastboot method with stock twrp img
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] CHEIb00:
Whats the correct version when Official LineageOS17.1 + LineageOS Recovery is installed and I like to flash my own build?

I followed los wiki installation guide and already used the copy-partitions-20200903_1329.zip to move the contents of slot a to slot b

edit: I tried both files but I can't boot into twrp with sodp 'fastboot boot twrp.img' gives no error but it doesn't boot twrp but and resets to los recovery

with stock twrp (~30mb) ''fastboot boot twrp.img' fails with error
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Mumiby2:
I tried fastboot flash recovery twrp.img -> no such directory. Is there a way to install it via adb sideload ? Or should I root first and then install from an app ?

Thanks in advance
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
Please follow the instructions carefully :)