I have ported the
Z5 Compact root method to Z5.
Please note that both recovery.img and kernel img are different from the Z5 Compact thread. Do not use recovery or kernel for Z5 Compact on your regular Z5 phone.
Disclaimer
I am well aware that this is not the nicest method of rooting, but I got the phone a few hours ago and haven't got the time to put together a better way.
Credits
@Tommy-Geenexus for
Zombie kernel
@AndroPlus for
Z5 recovery and guidance :good:
@Chainfire for
SuperSU
Guide
First, you need to unlock you bootloader (I know, I know, now stop weeping :crying::crying::crying
A rooted device does not boot using default kernel, so you need to install an insecure kernel.
I have repacked stock Z5 (32.0.A.4.11) kernel to disable Sony RIC, dm verity, make it insecure, etc.
Flash using:
Code:
fastboot flash boot z5_stock_fixed.img
Reboot your phone using:
And verify that it works as expected.
Now, reboot your phone to bootloader again (see info how to at the end of post).
Then issue:
Code:
fastboot boot recovery.img
This recovery is partly broken, but it works well enough to install root.
Thanks to
@AndroPlus for TWRP.
The phone will boot to a black screen, but you can connect to it using ADB.
You need to manually mount the system and userdata partition by issuing:
Code:
adb shell mount /dev/block/platform/soc.0/by-name/system /system
adb shell mount /dev/block/platform/soc.0/by-name/userdata /data
If you get this error:
mount: mounting /dev/block/platform/soc.0/by-name/system on /system failed: No such file or directory
You probably just need to wait a while and try again. You usually have to wait
~120 sec for the mount to work. Be patient.
If you got /system and /data to mount, you can now push SuperSU to the phone and install it:
Code:
adb push UPDATE-SuperSU-v2.46.zip /data/media/0/
adb shell twrp install /data/media/0/UPDATE-SuperSU-v2.46.zip
adb shell rm /data/media/0/UPDATE-SuperSU-v2.46.zip
If it all works, just reboot and enjoy root:
Files
z5_stock_fixed.img
recovery.img (for Z5)
Extra info
Boot to bootloader by adb command:
or by turning off the phone, and then hold down VOL UP while plugging in the USB cable.