[Xperia Z5 Compact Q&A, Help & Troubleshooting] SwisSwiss:
Hey Rath,

First off im not responsibly for any damage caused to your device by the following guide....

....on to business...

Assuming your phones bootloader is unlocked, you have correctly installed ADB tools and the drivers required, allowed USB debugging and you know your build number you'll need to head over to this site...

https://kernel.andro.plus/kitakami_r2.html

scroll down....there you will see two sets of requirements one for the Xperia Z5 [E6653 / E6603] and one for the Xperia Z5 Compact [E5823 / E5803]

we are interested in the compact requirements.... you'll see that it says "32.2.A.5.11 -> v42 -" this means that for build number 32.2.A.5.11 you will need kernel version 42....

so keep scrolling down once you've figured out what version you need and click on "google drive V32 and later" for the Xperia Z5 Compact this will open a page with all the files inside (google drive)...either hover over with your mouse each file until you find "Z5C_AndroPlusKernel_v42.zip" or organize the files by clicking "last modified" in list view, this should show you the most recent file (v42) at the top of the list....

once you have found this file DL it and extract it to your desktop...copy ONLY the "boot.img" file into your platform-tools folder (android->sdk->platform-tools)....

next you'll need a recovery file or "twrp" to go with that, so head on over here...

https://www.androidfilehost.com/?fid=24459283995304864

and download that file, again copy it to your desktop (no need to extract) then copy this file as well to your platform-tools folder......copy the exact name of the file(TWRP-3.0.0.0-suzuran without the .img part...if youre on windows the .img will not show anyway..)...you'll need it later...

next open the command window by clicking on an empty space IN THE PLATFORM-TOOLS folder, then press shift+right click and select "open command window here" this will open adb tools...connect your phone via usb cable to your pc if it not already connected and type in the command window "adb devices" and hit enter....you should see your device listed...

if so type "adb reload bootloader" your phone should turn off and boot into bootloader (a blue led light should show in the top right corner of your phone)

if so type "fastboot devices" and hit enter...your device should show again on the list...

if so then type "fastboot flash boot boot.img" this will flash the kernel V.42 to your system....

you should see a couple of "OKAY"s and the time it took to flash the device....

next type "fastboot flash recovery *right click after the space and paste the exact name of the twrp file you copied earlier*.img

E.g: fastboot flash recovery TWRP-3.0.0.0-suzuran.img

and hit enter.... again you should see a couple of "OKAY"s and flashing times....

if all goes well you want to then type "fastboot reboot", your phone should then reboot...once you see a yellow light turn on on the top right corner press the down volume key several times until you enter the TWRP recovery menu.... if so, and the twrp is stable (ie it doesnt turn off on its own and reload) then the hardest part is done.....

click "reboot" on your phone and then click "system"...this will reboot your phone, this time let it run to see if it doenst get stuck in a bootloop....once your phone has loaded you'll want to install superSU....

go to the play store and DL rootchecker.... run the app and it will most likely tell you that your system isnt rooted yet (because we havent installed superSu) so head on over here...

http://www.supersu.com/download

scroll down and DL Recovery "Flashable.zip"...then take the file WITHOUT EXTRACTING IT and put it in the SD of your phone... reboot into recovery using the command window (adb reboot recovery) or turn off your phone, turn it back on and when you see the yellow light click volume down button repeatedly....

once in recovery select INSTALL click on the ZIP file you just added and the phone will install supersu, once done reboot your system and VOILA! check with the root checker app if your phone is root and have fun!....

I found this video to help me out a lot....he uses really old files and is rooting an xperia z5 but its essentially the same....

https://www.youtube.com/watch?v=dTlosea6SJE&t=709s