[Xperia Z5 Premium Android Development] YasuHamed:
UPDATE 01-APRIL2017

32.3.A.2.33 HAS BEEN RELEASED

ROOTED MODIFIED STOCK KERNELS CAN BE FOUND AT

https://xdaforums.com/z5-premium/general/rooted-stock-modified-kernels-32-3-0-t3556874

IF YOU WANT TO ROOT YOUR NEWLY PURCHASED DEVICE PLEASE READ THE PROCESS BELOW THOROUGHLY

UPDATE 21-FEB2017

modified kernel added for 32.3.A.0.378 (E6853) (NOBA) ONLY

https://mega.nz/#F!3FYhTbSC!9MraM-zYNRNMPzmTkSSs9g

ref : https://xdaforums.com/z5-premium/general/rooted-stock-modified-kernels-32-3-0-t3556874

---------------------------------------

UPDATE 16-FEB2017

REPOSITORY OF ROOTED KERNELS BY [MENTION=627287]tobias.[/MENTION]WALDVOGL SCRIP https://mega.nz/#F!3FYhTbSC!9MraM-zYNRNMPzmTkSSs9g

----------

UPDATE 9FEB2017

32.3.A.0.376 IS OUT

ROOTKERNEL 5.20 BY [MENTION=357342]tobias.waldvogel[/MENTION] SUPPORTS ALSO SUPERUSER https://superuser.phh.me/

-install superuser apk from playstore after flashing the zip file

-to give write permissions to system folder install busybox and via terminal type

su
mount -o rw,remount /system

-remove apps by system app remover

https://xdaforums.com/showpost.php?p=70945409&postcount=21 / thanks [MENTION=5813612]sceryavuz[/MENTION]

UPDATE 31JAN2017

ROOTKERNEL for N is out / for unlocked boot loaders, extract kernel.sin to kernel.elf from 32.3.A.0.372.ftf and just repack it as boot.img and flash it.

https://xdaforums.com/xperia-z5/development/root-automatic-repack-stock-kernel-dm-t3301605

thank so sir [MENTION=357342]tobias.waldvogel[/MENTION]

in order to make system directory WRITABLE, install busybox, and terminal,

type these lines and enter one by one in terminal

su
mount -o rw,remount /system

-----------

UPDATE 27JAN2017

UPDATED WORKAROUND FOR DRM FIX, AND SONY RIC OFF ( 32.3.A.0.372 )

https://xdaforums.com/showpost.php?p=70595975&postcount=1702

WHERE SONY RIC SWITCH-OFF CHECK POSTED HERE (if you get system mount error while removing bloatware

https://xdaforums.com/showpost.php?p=70677335&postcount=92

...

UPDATE 17JAN2017

VERSION 32.3.A.0.372 - android N is out!

preparation

place in sd card SR5 2.78 superSU .

there is NO KNOWN DIRECT METHOD TO MODIFY KERNEL of 32.3.A.0.372 (YET) so the work around is posted by

https://xdaforums.com/showpost.php?p=70595975&postcount=1702 ( by [MENTION=3989065]serajr[/MENTION] )

extract kernel as elf (by flashtool) from ftf file of .372 and use the same root kernel to build your custom kernel and put inside the following zip file at

https://xdaforums.com/attachment.php?attachmentid=4006777&d=1484669198

there is no known direct way to edit kernel (yet) so the there is work around

Flash nougat with flashtools ( I erased everything so back up your photos videos etc)

2.After initial boot complete startup wizard.

3. Put attached file into root of sdcard

4. using classic adb ~ boot into fastboot and type fastboot boot boot.img image that has TWRP ( of MM Kernel) I used the one from latest MM

5. Boot into TWRP

6. Flash Zip and you're in.

https://xdaforums.com/attachment.php?attachmentid=4006777&d=1484669198

thanks to [MENTION=3989065]serajr[/MENTION]

i will keep you posted

-----------------

UPDATE 7-DEC-2016

VERSION 32.2.A.5.11 IS OUT

download kernel for E6833

https://drive.google.com/open?id=0BwsQ_NLVjA_QMXNvRFNhOU1fYkE

flash SR3-SuperSU-v2.78-SR3-20161103171345 via twrp

reboot into system

u have ROOTED z5p e6833

[MENTION=5410058]KbaB.BroS[/MENTION]

plz help for rest of the kernels

UPDATE 5-NOV-2016

- SuperSU SR2 2.78 (flashable zip) working PERFECTLY on 32.2.A.0.305 on Kernel by [MENTION=5410058]KbaB.BroS[/MENTION]

https://mega.nz/#F!7gRDBIJY!af8WZfXMno2Pm_OgEMSqNQ (IMG FILES)

just flash superSU over previous one via recovery!

--------------------------------------------------

UPDATE 11-10-2016

NEW UPDATE 6.01 - 32.2.A.0.305 - OCT2016 has been pushed

THANKS TO [MENTION=5410058]KbaB.BroS[/MENTION] for updating E6XXX (all varients , kernels)

https://mega.nz/#F!KwZhjLIK!uNbDzR6lCXMaaW7jKFS1WQ!6hZj1DyK (depository of kernels)

i have tested my device, did NOT BRICK.

twrp working

flashed RC1 supersu2.78 ZIP

ROOTED

_______________________________________________________________________

This post is inspired/ result of work by following respected users

[MENTION=5410058]KbaB.BroS[/MENTION] , [MENTION=357342]tobias.waldvogel[/MENTION] [MENTION=641881]Shadowboy[/MENTION]23 [MENTION=6800595]Fragmentation[/MENTION]

Similar post (guide)

http://xdaforums.com/z5-premium/development/stock-root-xperia-z5-premium-sony-stock-t3335974

GLOBAL thanks to following respected members for their valuable work

[MENTION=2807379]Androxyde[/MENTION] — Flashtool

[MENTION=1879618]IgorEisberg[/MENTION] — XperiFirm (integrated into Flashtool)

[MENTION=912474]Dees_Troy[/MENTION] et al. — TWRP

[MENTION=631273]Chainfire[/MENTION] — SuperSU

[MENTION=3975929]zxz0O0[/MENTION] — iovyroot

MY VERSION ~ (HOW I DID IT)​

focusing on z5p (all variants) however the process is same for Z5 variants and z3+ / Z3 / Z3 compact and all variants too​

SUMMARY

1. downgrading your 5.1.1

2. rooting

3. extracting DRM KEYS (ORIGINAL)

4. unlocking bootloader

5. FLASHING STOCK MODIFIED kernel (having recovery installed)

6. going in to recovery and flashing superSU.​

Before you begin

must do/have following

Download SU and put it in your SD CARD - CLICK HERE

TAKE FULL BACKUP, CONTACTS, GALLERY, VIDEOS, EVERYTHING. Keep usb debugging ON ( I used Titanium backup )

Driver installed (sony pc companion will do that) ( http://support.sonymobile.com/global-en/tools/xperia-companion/ )

Install FlashTOOL ( http://www.flashtool.net/downloads_windows.php ). and after installing flashtool, install

motherboard drivers (of your device) C:\Flashtool\drivers

NOW, goto http://developer.sonymobile.com/unlockbootloader/unlock-yourboot-loader/ , select your device xperia z5 premium from dropdown list and follow the instructions

To be able to unlock your Xperia Z5 Premium Dual, prepare it by following these steps:

Go into Settings > About phone and tap seven times on Build number to enable developer options.

From Settings, go into Developer options and enable OEM unlocking.

Warning: Device protection features will not work on this device while this setting is turned on.Please note! It will only be possible to unlock the boot loader for certain releases. You can check if it is possible to unlock the boot loader of your device in the service menu by following the steps below:

In your device, open the dialler and enter *#*#7378423#*#* to access the service menu.

Tap Service info > Configuration > Rooting Status. If Bootloader unlock allowed says Yes, then you can continue with the next step. If it says No, or if the status is missing, your device cannot be unlocked. Continue to http://developer.sonymobile.com/unlockbootloader/email-verification/ , give your email ID and they will send you link asking you your device's IMEI Number. once you give that sony will email you YOUR BOOTUNLOCK KEYS within minutes. (keep them aside for now)

NOW IF YOU ARE RUNNING Z5P ON LATEST FIRMWARE "32.2.A.0.253" AND "DONOT WANT TO RESTORE YOUR DRM KEYS" --- SKIP TO NO.5

4. --DOWNGRADING XPERIA Z5 TO LOLLIPOP 5.1.1 - IN ORDER TO RESTORE DRM KEYS

a. run FLASHTOOL, and click XPERIFIRM BUTTON, it will launch XPERIFIRM, select your device (eg. xperia z5p "satsuki" , E6833) here you will see CDA 1299-7506 build number "32.0.A.6.115 R2B". this is the base version of z5p at which your device left sony Factory (LP kernel)

b. download this version (1.9gb)

c. now FLASH (downgrade) your z5p with .115 using FLASHTOOL. tutorial can be found here ( http://xdaforums.com/xperia-z/general/tutorial-how-to-flash-stock-roms-t2240614 )

d . restart device, gothru the setup, enable wifi etc, download KINGROOT and root your android 5.x.x ( OR YOU CAN USE IVORYROOT ) ~ AS SOME MEMBERS SAY KINGROOT STORES DEVICE DETAILS ON THEIR CHINESE SERVER etc )

f. you are ready now to extract your DRM-KEYS / TA BACKUPS (FIDO KEYS) . use this simple TOOL given with tutorial at https://github.com/DevShaft/Backup-TA/releases // it will save your keys from ROOTED z5p , (allow root access to this application on your mobile screen)

g. WHY HAVING TA BACKUPS ? frankly I if you don't restore it, keeping your one time SONY given unique valuable keys of your device and having backup for future is logical.

unlocking bootloader.

5. while device is switch-off, click "BLU" button on FLASHTOOL, follow the instructions. when FLASHTOOL ASK KEY, paste the KEY sent to you by SONY ( read NO.3 ). the device will be unlocked and should boot. the first boot will take a while and everything will be wiped from your z5p (TA partitions, DRM KEYS, USER APPS, USER DATA.

6. again using xperifirm in FLASHTOOL download 32.2.A.0.253 for your Device and by using FLASHTOOL, Flash your Z5P. the TUTORIAL of flashing any xperia phone can be found HERE

7. [MENTION=5410058]KbaB.BroS[/MENTION] has build repository of modified STOCK KERNAL for z5p (all variants) running on .253 at HERE. download the .img file and FLASH your KERNEL it via flashtool.

while your device is charged and switch off after UNLOCKING BOOT LOADER (having .253 buildnumber)

click the THUNDER icon on flashtool

select FASTBOOT MODE

click "select kernal to flash"

connect device by toggling volume up/down keys as per instructions by FLASHTOOL.

FlashTool then, will ask .img file location. point it to the .img file. and your kernel will be flashed in 1 second

BOOT your device, on SONY LOGO press volume up, the led will turn AMBER, and you will TWRP recovery.

select install from zip, and flash the SUPERUSER .zip which you placed in your SD CARD in the VERY BEGINNING.

REBOOT YOUR DEVICE.

CONGRATULATIONS on ROOTED z5p ​

WHAT TO DO if your device is NOT z5p ?

using FLASHTOOL you can create your OWN modified kernel by

Downloading your device' latest build by SONY using XPERIFIRM (some 2.x GB of ftf file) , once done ..

EXTRACT the TFT file using 7zip

in flashtool click TOOLS>> SIN EDITOR >> in the extracted data, find kernel.sin and dump it as kernel.elf

DOWNLOAD TOOL "rootkernel_v5.0_rc4_Windows_Linux" mention at http://xdaforums.com/xperia-z5/development/root-automatic-repack-stock-kernel-dm-t3301605, extract it,

Place the KERNEL.ELF file in this folder and open command prompt in that folder (right click menu while pressing shift key

type "roodkernel kernel.elf boot.img " it will ask four important questions, disabling dm-varity (yes), disabling sonyRIC (yes), installing busybox (no), installing recovery (YES) and later it will creat boot.img file of your device's variant.

FLASH YOUR CREATED .img file as explain in point no.7