[GUIDE] Sony Xperia Z5 - UNLOCK / ROOT / TWEAKS - OS 5.1.1 / 6.0 - Xperia Z5 General

[GUIDE] Sony Xperia Z5
DISCONTINUED - SEE NEWS !
Last update: 20.06.2016​
This guide will help you to root your phone, install new firmwares, unlock your bootloader and much more. Its splitted into 3 sections: StockRom, CustomROM and Tweaks so you should find things easily. I think if you understood this guide you can easily flash different firmwares, kernels and so on. And now - have fun
NEWS
I have to much work to do at the moment to continue this guide. But, the main work is done, now its all about updating the links. If there is something remarkable new, I will add it to my guide.
20.06.2016
- updated links
- minor changes
23.04.2016
- updated download links
- added custom rom (CyanogenMod13)
- some small changes
09.04.2016
- I'm very busy at the moment (exams and hard work). So I cant help you guys that much and cant try new kernels and that kind of stuff Plese ask @gm007 or @zacharias.maladroit if you have problems. I will come back as fast as I can
- updated download links
28.03.2016
- updated download links
12.03.2016
- Android 6.0 compatibility check
- updated download links
- graphical revision
14.02.2016
- updated guide to make it more understandable
QUESTION & ANSWER
Which devices are supported by this guide?
- Sony Xperia Z5
- Model number: E6653 / E6603 (for other models use different kernel)
- OS version: Stock Xperia Android 5.1.1 / 6.0
Whats important to know before I start?
- I´m NOT responsible for any damage.
- Keep in mind that unlocking the bootloader can void your warrenty.
- Save your data, all settings and files will be deleted during this process.
- READ THE ENTIRE GUIDE FIRST!
[GUIDE] GENERAL
FASTBOOT
1) POWER OFF phone
2) Hold VOLUME UP
3) Connect to PC via USB
4) LED turns blue
FLASHMODE
1) POWER OFF phone.
2) Hold VOLUME DOWN
3) Connect to PC via USB
4) LED turns green
RECOVERY
a) You can enter TWRP while booting. If the LED turns yellow, hold VOLUME DOWN till it gets orange.
b) Use this command in Minimalistic ADB and FASTBOOT to reboot to recovery:
Code:
adb reboot recovery
BOOTLOOP / EMERGENCY POWER OFF
1) Hold POWER OFF and VOLUME UP
2) Device vibrates 3 times
DEVELOPER MODE AND UNNOWN SOURCES]
1) settings -> about phone -> touch build number several times
2) settings -> developer options -> enable USB debugging
3) settings -> security -> enable Unknown sources
PC PERMISSIONS
1) Run Minimalistic ADB and FASTBOOT and FLASHTOOL with admin permissions.
2) Use USB 2.0 ports, sometimes 3.0 ports doesnt work.
[GUIDE] StockROM
# BUGS / ISSUES
E6653_32.1.A.1.163
- camera apps (AR Effect,...) do force close
- filesystem (external SD card) does not refresh automatically, so you cant transfer files you copied to sd card via MTP to PC. Solved via restart. --> also on STOCK ROM
# DIRECT DOWNLOAD LINKS
E6653
Kernel
Z5_AndroPlusKernel_Permissive_v30 (for firmware .163 and .185)
Z5_AndroPlusKernel_Permissive_v31 (for firmware .224)
Recovery
twrp-3.0.2-0-E6653-20160417.img
SuperSu
SuperSU (beta but stable)
# DOWNLOAD LINKS
Windows programs
Sony PC Companion
Minimal ADB and Fastboot
Flashtool + patch file
µTorrent (for downloading Flashtool)
Android
AndoPlusKernel
TWRP
# GUIDE
BOOTLOADER STATUS
The bootloader loads the kernel. If unlock isnt allowed, the bootloader will prevent loading a custom kernel.
1) type *#*#7378423#*#* into dialer / phone app
2) service info --> configuration --> rooting status
3) if bootloader unlock allowed says YES, you can continue. If bootloader unlock isnt allowed you CAN NOT root your phone.
INSTALLING PROGRAMS
Flashtool
1) install µTorrent
2) download torrent file from Flashtool website
3) run downloaded torrent file via µTorrent
4) download Flashtool via µTorrent
! You can close and or delete µTorrent now, you will not need it anymore
5) install Flastool
6) open install directory from flashtool and replace x10flasher.jar with new patch
OTHER
1) install all other programs
INSTALL / CHECK DRIVERS
Windows 7 and lower
1) open Flashtool install directory
2) open driver folder
3) run Flashtool-drivers.exe
4) install Flashmode and Fastboot drivers
Windows 8 and higher
1) restart computer with digital driver signature disabled (you have to do this every time you restart your pc)
http://www.howtogeek.com/167723/how...8.1-so-that-you-can-install-unsigned-drivers/
2) open Flashtool install directory
2) open driver folder
3) run Flashtool-drivers.exe
4) install Flashmode and Fastboot drivers
! There are no Z5 drivers yet, that’s why you need Sonys PC Companion!
! Flashtool drivers were updated, try the new Z5 drivers before installing Sony PC Companion.
Sony PC Companion
1) run Sony PC Companion
2) connect your Xperia Smartphone
3) wait till it has been detected
4) close Sony PC Companion, you dont need it anymore
ADB driver check
1) enable Developer options and Unknown sources
2) run Minimal ADB and Fastboot
3) type
Code:
adb devices
4) allow dialog on your phone
5) check if your device is shown in command window
fastboot driver check
1) run Minimal ADB and Fastboot
2 put device in FASTBOOT mode
3) type
Code:
fastboot devices
in Minimal ADB and Fastboot
4) check if your device is shown in command window
! When connecting phone in flashmode or fastboot additional drivers will be installed automatically.
! Installing drivers twice can solve problems.
UNLOCK BOOTLOADER
1) open Flashtool
2) click on BLU (Bootloader Unlock)
3) follow the instructions shown by Flashtool
4) you will be forwarded to a Sony website
5) follow the instructions there
6) at the end you will receive a key
7) save this key carefully!
8) enable Enable OEM unlock in developer options
9) copy KEY into Flashtool prompt and click unlock
! You can try to use Flashtool for unlocking first, or continue with step 10.
10) open Minimal ADB and Fastboot
11) your phone has to be in Fastboot mode
12) check if your phone is shown by
Code:
fastboot devices
13) enter the following code:
Code:
fastboot –i 0x0fce oem unlock 0xKEY_FROM_SONY
14) reboot (that can take a long time, so dont worry)
DOWNLOAD XPERIA FIRMWARE - OPTIONAL
If you want to update, upgrade or reset your ROM.
1) open Flashtool
2) click on XperiFirm
3) downloading…..
4) in XperiFirm select your device then choose your preferred firmware (e.g. Z5 --> E6653 ---> Customized DE --> 32.0.A.6.200 R12B)
5) in the right column double click the latest firmware and start download
6) Unpack automatically has to be checked
7) after downloading close download window and XperiFirm
8) now Flashtool should start doing things
! You can identify your phone model by: Settings -->About phone--> Diagnostics
FLASH NEW FIRMWARE - OPTIONAL
If you want to update, upgrade or reset your ROM.
1) in Flashtool click on Flash device and choose your firmware
2) under "Wipe", check all (APPS_LOG, DIAG, SSD, USERDATA)
3) click flash and follow the instructions
4) after successful installation reboot phone (that can take a long time, so dont worry)
! You can flash a new ROM without unlocking your bootloader.
FLASH KERNEL
The kernel has direct control of the hardware.
1) download latest Kernel from download section (AndroPlusKernel is only for E6653 models)
2) extract ZIP
3) put boot.img from zip into your root directory from Minimal ADB and Fastboot
4) put phone into fastboot mode
5) run Minimal ADB and Fastboot and check with
Code:
fastboot devices
6) type in:
Code:
fastboot flash boot boot.img
7) restart phone and look if its working
! If you end up in a bootloop with the LED flashing 3-4 times try to flash Kernel and Recovery again. If this doesnt help, reflash firmware, kernel and recovery.
FLASH RECOVERY
The recovery is something like the boot menu you may know from windows. Its mainly used to install programs and apps.
1) download latest TWRP from download section
2) put twrp.img into your root directory from Minimal ADB and Fastboot
4) put phone into fastboot mode
5) run Minimal ADB and Fastboot and check with
Code:
fastboot devices
6) type in:
Code:
fastboot flash recovery twrp.img
! You can rename twrp image to twrp.img or something shorter if you want.
7) after the first boot - do a reboot into recovery. Otherwise the partitions won't be mounted correctly & flashing will run into trouble. It takes several seconds (or a few minutes) to reboot into recovery - but then you're good to go.
ROOT
Some apps need more permissions than normal. You can compare root with administrator rights on windows.
1) download UPDATE-SuperSU-v2.67.zip
2) copy UPDATE-SuperSU-v2.67.zip to your internal memory
3) enter TWRP
4) click Install
5) navigate through folder structure
6) tap UPDATE-SuperSU-v2.67.zip
7) "Swipe to confirm flash"
8) reboot
RESTORE DRM KEYS
Unlocking the bootloader disables a partition on your phone where software keys are saved. Without this keys xReality, BIONZ, audio processing arent available. This program will restore this features.
! Take a look if xReality is already working before installing DRM keys.
1) download DRM RESTORE (drmrestore.zip) from download section
2) copy drmrestore.zip to your external sd card
3) enter TWRP
4) click Install
5) navigate through folder structure
6) tap drmrestore.zip
7) "Swipe to confirm flash"
8) reboot
! Unfortunately, there is no way to save the original TA partition at the moment.
[GUIDE] CustomROM
# CyanogenMod 13_Alpha for E6653 and E6603
CyanogenMod is a free, community built, aftermarket firmware distribution of Android 6.0 (Marshmallow), which is designed to increase
performance and reliability over stock Android for your device.
### XDA Z5_CyanogenMod 13 Link ###
# AromaROM with Installer for Z5 E6853 / E6883 / E6653
AROMA is a custom ROM with nice tweaks, but it has some serious bugs. I used it for 2 month and there are several issues: random reboot, screen turn off during calling and does not turn on again, problems with notification bar, ... .
### XDA ROMAur Link ###
1) install stock lollipop rom
3) for E68xx models install recovery and kernel for your device
4) For E66xx models install twrp-2.8.7.0-E6653-20151130_material.img and kernel for your device
5) copy ROMAur to your external sd card
6) enter recovery
7) make a full wipe (Wipe --> Factory reset)
8) install ROMAur
9) Reboot
[TWEAKS]
XPOSED
ONLY FOR 5.1.1: When you want to install Xposed you have to deodex your system or install an already deodexes ROM. Without this procedure the camera and other apps wont work. Use this guide to solve this: http://forum.xda-developers.com/crossdevice-dev/sony/z4-z5-z5c-fix-camera-fc-installing-t3246962
XDA Thread: http://forum.xda-developers.com/showthread.php?t=3034811
1) download xposed-v85-sdk23-arm64.zip and XposedInstaller_3.0_alpha4.apk [Android 6.0 versions]
2) copy xposed-v79-sdk23-arm64.zip and XposedInstaller_3.0_alpha4.apk to your internal memory
3) enter TWRP
4) click Install
5) navigate through folder structure
6) tap xposed-v79-sdk23-arm64.zip
7) "Swipe to confirm flash"
8) reboot
9) install XposedInstaller_3.0_alpha4.apk
10) reboot
useful Xposed Moduless
APM+
Xperia / AOSP NavBar Buttons
OGYoutube + OGYoutube Xposed Login Fix
Flat Style Colored Bars
DISABLE SmallApps
SmallApps is that little bar in the overview screen.
1) power on phone
2) unlock your phone (open homescreen)
3) open Minimal ADB and Fastboot
4) type:
Code:
adb shell
pm hide com.sony.smallapp.launcher
pm hide com.sony.smallapp.app.widget
exit
5) after this, type:
Code:
adb reboot
! If you know what youre doing, you can simply delete all the SmallApp stuff via ROOT Uninstaller.

Thanks for quite a nice guide.
I have done rooting on various devices but this seems to be most complicated ever. [emoji14]
Sent from my E6683 using Tapatalk

It has been before this guide. Basically what I did was unlocking the bootloader, booting recovery, flashing kernel, flashing root, wipe, restore DRM fake, done.
Firmware wasn't necessary for me and I've made bad experiences with alternate firmwares / radios and so on in the past.

Hi. Do I have to backup my TA partition ?

there no way to backup your TA partition hopefully for now.

How to increase volume of both speakers
I have rooted z5 but don't know how to edit mixer path.xml

Siudzix said:
Hi. Do I have to backup my TA partition ?
Click to expand...
Click to collapse
Actually there is no need for it, imho. The fake DRM keys are doing a really good job. X-reality back, after picture processing back. It's also currently not possible to backup them afaik.

DeathStroke said:
Thanks for quite a nice guide.
I have done rooting on various devices but this seems to be most complicated ever. [emoji14]
Sent from my E6683 using Tapatalk
Click to expand...
Click to collapse
Mate I see you have Z5 E6683 which is dual sim. Were you able to get your phone rooted using this guide?
Many thanks.

I have XPERIA Z5 Dual Sim (E6633) - will this guide work ?

Siudzix said:
I have XPERIA Z5 Dual Sim (E6633) - will this guide work ?
Click to expand...
Click to collapse
Yes and no. You need a different kernel and mybe recovery. Everything else is the same. I will include a link in my guide if I find a working kernel.

Rooting Z5
Hi all,
Shall i root the phone without unlocking the Bootloader.I dont want to Unlock the bootloader.So please advise me is this root method is work on Locked Bootloader.
Thanks in advance

ramprasaathks said:
Hi all,
Shall i root the phone without unlocking the Bootloader.I dont want to Unlock the bootloader.So please advise me is this root method is work on Locked Bootloader.
Thanks in advance
Click to expand...
Click to collapse
For now, you have to unlock your bootloader to gain root access. There is no other method at the moment. So in conclusion: locked bootloader = no root.

how i root z5 dual 6683

parteek.dandyan said:
how i root z5 dual 6683
Click to expand...
Click to collapse
Follow the guide and do it. Its written there.
Sent from my E6683 using Tapatalk

DeathStroke said:
Follow the guide and do it. Its written there.
Sent from my E6683 using Tapatalk
Click to expand...
Click to collapse
Dont blame him. I added this guide for E6683 today. I cant try it myself because I have no E6683, but I hope it will work

alphatact1cs said:
Dont blame him. I added this guide for E6683 today. I cant try it myself because I have no E6683, but I hope it will work
Click to expand...
Click to collapse
I was not blaming, I didn't know that you updated today. Would be great in future if you do any update, add the date and following update.
Thank you.
One thing I noticed while reading your guide was TWRP is not for E6683. Will there be any problem? I haven't yet tried your guide because I was in doubt.
Sent from my E6683 using Tapatalk

DeathStroke said:
One thing I noticed while reading your guide was TWRP is not for E6683. Will there be any problem? I haven't yet tried your guide because I was in doubt.
Click to expand...
Click to collapse
The new Kernel from monx includes TWRP, so you dont need to flash Recovery...normally. I know that my guide works, but only for E6653. I included a link for E6683, but I also wrote that I cant try it because I havent a Z5 E6683. Anyway, TWRP for E6653 should work for E6683 devices. The main difference is the Kernel.

Guys, what about E6633 ? Is it really bad ?

Siudzix said:
Guys, what about E6633 ? Is it really bad ?
Click to expand...
Click to collapse
You can try it at your own risk. Someone said that it will work, but I would be careful.
pesonic said:
Should this be working on E6633 too?
Click to expand...
Click to collapse
arismelachrinos said:
+1
Click to expand...
Click to collapse

@alphatact1cs are you open to suggestions??
we are currently trying to unify devices index here at xda..
would you like to follow what our fellow brother @kuzibri and @sd_shadow has implemented?
http://forum.xda-developers.com/general/about-xda/public-index-program-project-t3147245

Related

{all-in-1 guide} root - recovery - custom rom - kernel- xposed

Well, in this guide I will try to concentrate all the process from a Stock Z3 (D6603) to a fully rooted, unlocked bootloader, custom rom and recovery, modded kernel and xposed firmware.
AS ALWAYS I WONT BE RESPONSIBLE FOR ANY DAMAGE, WAR, OR DEAD UNICORNS. PROCEED ON YOUR OWN RESPONSABILITY
Pre-process drivers:
Get fastboot drivers from here: https://mega.co.nz/#!upQkWCpA!BCvvsQR6Ee1gfmzAAGCeIMmFek2AaM0r_9HGWVNw8tM
Get adb+drivers from here: https://mega.co.nz/#!upQkWCpA!BCvvsQR6Ee1gfmzAAGCeIMmFek2AaM0r_9HGWVNw8tM
Z3 Official Drivers from here: https://mega.co.nz/#!v8JkkZAQ!w9ERWMs0L1UmWf_N3oCT4JgFdfU9NUFT7Wjv7D_bBh0
First of all you need to gain root privileges:
Download stock firmware (FTP format) https://mega.co.nz/#!D5ZXmJKZ!XWD6dae-NwKECGctrFsetFlODcf6EQMMYf22fCPHo2g​Download FlashTool (To flash FTF format) https://mega.co.nz/#!D5ZXmJKZ!XWD6dae-NwKECGctrFsetFlODcf6EQMMYf22fCPHo2g​Download GiefRoot and unpack it https://mega.co.nz/#!yxQFQbzK!KeA0u1i6KwKetj1aAaSLUZ_qiih1N0uox0GGes700J8​Flash the stock firmware using flashtool, click on the bolt, select the FTF file downloaded previously and follow instructions​Note: The screen says press back+plug USB. It is not back button but VOL+ Button​
Now skip configuration process, you will loose it all so it is not necessary but nothing happens if you want to waste your time.​Once skipped go to Settings > About Phone and tap 7 times on Build number to enable developer options.​Under developer options enable Usb Debugging and Mock Locations​Now, in settings enable unknown sources and disable verify apps ​Put your phone in Airplane Mode​Connect your phone to the computer and open the install.bat inside the folder of GiefRoot​Note: Probably a pop-up will show in your phone asking to allow USB debug, check the "Always allow..." and press OK​Now follow instructions on the CMD screen​Note: It will probably fail the first time, just start again from install.bat point​
Now let's install a recovery (it wont be the final recovery because this is changed by installing roms, we will stick on FOTA one. A few steps below.
Download ES File Explorer: https://mega.co.nz/#!j0xxESqT!k1VHSKi86lBgdh8NPbxmb3Q9FKFWDup7gAt-_uWkWCU​Download ZU Recovery: https://mega.co.nz/#!Ll4UVLTS!A8w4NeleaxjXBLQdUbZLtzGZRpPefX71rp27aCNV_mk​Enable root and mount system r/w.​Extract the ZU Recovery and open install.bat​Choose option 1 and follow instructions.​Note: You will have a new App named NDR Utils, use it to reboot the phone.​
Let's backup DRM keys:
Download TA-Backup: https://mega.co.nz/#!v0wgDCRR!xJBrmo1FfdvQQcFzK6ZO4dEfUi1YLaNGEl8XMaKu18s​Extract TA Backup​Run Backup.bat​Keep the file generated well saved.​
Now, we will unlock bootloader:
I won't explain this point, I will recommed you follow this guide from the Official Sony's web: http://developer.sonymobile.com/unlockbootloader/unlock-yourboot-loader/ it is very clear and includes all checks needed.
Now let's install a custom ROM to proceed to FOTA recovery:
Download PacMan custom ROM from here: http://forum.xda-developers.com/z3/development/rom-pac-rom-lp-mr1-beta-1-t3099454​Flash it as usual​Let it boot and proceed to next step​
Now let's install the FOTA recovery:
Download FOTA recovery image: https://mega.co.nz/#!38xxBZZJ!2jwbChc-XFlilltodA7R0VQzQTnbf8EPbUokR38C4Yg​Once the ROM has booted put your phone in fastboot mode:​
Code:
adb reboot fastboot
Or turn it down, hold vol+ and plug the USB.​Then flash the FOTA recovery:​
Code:
fastboot flash recovery <downloaded.img>
Then reboot your phone:​
Code:
fastboot reboot
Now we can proceed to install PacMan ROM again (in case you lost it while flashing FOTA):
Download PacMan custom ROM from here: http://forum.xda-developers.com/z3/development/rom-pac-rom-lp-mr1-beta-1-t3099454
You can use this kernel along this ROM too:
http://forum.xda-developers.com/z3/orig-development/kernel-m5-kernel-t3045319
Get the permissive version in order to allow xposed to run.
xposed: I am testing it right now, I will explain it as soon as I see it is stable.
In your guide you use 'TFT' instead if the correct term of 'FTF'
They are FlashTool Files, hence the FTF
gregbradley said:
In your guide you use 'TFT' instead if the correct term of 'FTF'
They are FlashTool Files, hence the FTF
Click to expand...
Click to collapse
Thank you for the correction. Appreciate it.
im on D6653 and i tried using the root method.... after rebooting, my phone has alot of errors and the home screen is not working. there is nothing on the screen apart from the wallpaper and the 3 soft buttons at the bottom. i can't go to setting. what should i do?
togcbu said:
im on D6653 and i tried using the root method.... after rebooting, my phone has alot of errors and the home screen is not working. there is nothing on the screen apart from the wallpaper and the 3 soft buttons at the bottom. i can't go to setting. what should i do?
Click to expand...
Click to collapse
Flash the stock again and be carefull not not to flash D6603 firmware to D6653.

[Guide] Safe bootloader unlock, restore DRM, custom recovery, root, bootloader relock

** DISCLAIMER: I AM NOT A DEV AND THIS IS MY HOBBY. I ASSUME NO RESPONSIBILITY IF THIS BREAKS YOUR DEVICE **​
The following is tested on model E6553. This may work for the dual sim model too but I have not verified it. Do not flash the ftf and kernel files intended for one model onto another.​
I am not taking credit for any of the tools and kernels here. They are all developed by others. I am only telling you how to use them.
Credits: @zxz0O0, @tobias.waldvogel
0- Prerequisites
You need to have a functioning installation of adb and fastboot tools. You need to have proper Sony drivers installed on your PC to detect your phone when it is connected to the PC. You should be able to flash an ftf file using flashtool. If any of these sound unfamiliar to you, stop reading, go learn about them, and then come back.
1- How to unlock your bootloader without losing the DRM keys
Sony has designed this phone such that if you unlock your bootloader you lose your TA partition PERMANENTLY which includes some of the Xperia features and licenses that have to do with image processing etc. forever. You will also no longer receive OTAs. So in theory, without a copy of this TA partition (which is unique to each device and cannot be copied over from another) unlocking the bootloader results in an irreversible loss of some of your phone's features. Relocking the bootloader will not bring them back.
A hack exists that allows you to backup the TA partition before you unlock the bootloader. This backup will make the process completely reversible so if you ever need to send the tablet to Sony for repair or just want to return it to its original state you have a way. Follow these instructions carefully:
1.0- Before you begin keep in mind that this procedure, especially the unlocking step, completely erases your tablet. Disable myXperia and remove your google account before proceeding. The following will likely not work well with encryption.
1.1- Start by clean flashing any 28.0.A.8.266 firmware, For this tutorial I used the Customized NL ftf that you can get from here.
1.2- Enter service Mode by dialing *#*#7378423#*#* -> Service info -> configuration, and make sure the device is unlockable.
Also check -> Service Tests -> Security and you will see a bunch of "active" and "OK" attributes. You can take screenshots for your reference.
1.3- Turn on usb debugging mode on your phone.
1.4- Download iovyroot zip v0.4 or higher from here.
1.5- Unzip this zip file into a folder of your choice and open a command terminal there.
1.6- Connect the phone which is now in USB debugging mode to your PC and answer yes when the phone asks to authorize the PC to access it in USB debugging mode. You can check that the PC indeed sees the phone by running this command
Code:
adb devices
1.7- Run the following command:
Code:
tabackup
1.8- VERY IMPORTANT: Make sure the command completes with no errors. If all goes well you will have a file with a name like TA-05052016.img (the name may be different for you) with a size of 2MB in your folder.
1.9- Save this file in a very safe place. Save it on your hard disk, AND email it to yourself, AND put it on your google drive. If you lose this file you can never reverse the bootloader unlocking process.
1.10- Reboot the device.
1.11- Now you can unlock the bootloader. Follow the instructions at Sony's official website at http://developer.sonymobile.com/unlockbootloader Also save your unlock code that you obtain in this step somewhere. You may need it some day.
1.12- Reboot the device and it will briefly enter recovery and then start the phone initial setup.
1.13- (Optional) you can easily verify that your bootloader is unlocked by entering the fastboot mode, obtaining any boot image, and running the following command to boot your tablet with that image:
Code:
fastboot boot boot.img
1.14- (Optional) you can see that the DRM keys are erased from your tablet by repeating step 1.2 but this time you will see a bunch of errors under Service Tests -> Security.
1.15- As a side effect of unlocking the bootloader you lose the ability to receive OTA updates. Clean flash a Marshmallow ftf to continue. For this tutorial I used Marshmallow 6.0 E6553_Customized HK_1294-9654_32.1.A.1.185_R7C (the latest firmware at the time of this writing.)
2- How to emulate DRM keys and/or root and/or add recovery after unlocking the bootloader.
A hack exists that can emulate the DRM keys:
2.1- Extract the boot image from the 32.1.A.1.185 marshmallow ftf that you installed in step 1.15. Here are the steps to take:Open the ftf file with 7-zip or any zip program that you have at your disposal
Look for a file called kernel.sin and extract it.
Start flashtool and from Tools menu choose Sin Editor.
Select the kernel.sin that you extracted in the previous step and hit Extract data.
Flashtool will create a file called kernel.elf which you will use in the next step.​2.2- Download rootkernel_v4.42_Windows_Linux.zip (or a higher version) from http://forum.xda-developers.com/xperia-z5/development/root-automatic-repack-stock-kernel-dm-t3301605 and unzip it in a folder of your choice.
2.3- Copy the kernel.elf that you got in step 2.1 to this folder. If you want root, follow this guide through to section 5 place SuperSU 2.71 (or higher) in this folder as well. Make sure the name of the SuperSU zip starts with letters "SuperSU". The latest SuperSU can be obtained from: http://forum.xda-developers.com/apps/supersu/2014-09-02-supersu-v2-05-t2868133 (The rootkernel tool has a bug in its built-in SuperSU integration. See: http://forum.xda-developers.com/showpost.php?p=67485478&postcount=838)
2.4- Open a command terminal in this folder and run the rootkernel script. Your command should look similar to this:
Code:
rootkernel.cmd kernel.elf boot-patched.img
When prompted, answer as follows:- Sony RIC is enabled. Disable? [Y/n] Y (if you want root plus write access)
- Install TWRP recovery? [Y/n] Y (if you want to have recovery)
- Install busybox? [Y/n] Y (if you want busybox. It is very useful)
- Found SuperSU-v2.71-20160331103524.zip. Install? [Y/n] Y (if you want root)
- Install DRM fix? [Y/n] Y (if you want DRM emulation)​This will create a new kernel image called boot-patched.img which you will now flash on your phone.
2.5- Boot the phone in the fastboot mode and flash your patched image using the following fastboot command:
Code:
fastboot flash boot boot-patched.img
2.6- (Optional) You can reboot the phone and see that the DRM keys are indeed retrieved by repeating step 1.2. You can also open settings -> display, and look under Image Enhancement. If the DRM emulation is successful you will see this.
3- How to flash a custom or stock kernel
3.0- If you have already flashed the patched kernel in part 2 you will skip this part.
3.1- Whether you want to use a custom kernel or stock, and whether you have done the DRM patch described above or not, to flash a boot image (i.e. kernel) on your phone you need to restart the tablet in fastboot mode.
3.2- To flash the kernel use this command:
Code:
fastboot flash boot [I]name_of_your_kernel[/I]
You will replace name_of_your_kernel with whatever your kernel is called (e.g. boot.img, kernel.elf, etc.)
4- How to add and use recovery
4.1- Recovery is added to your kernel in step 2.4.
4.2- To enter recovery reboot the phone and touch the volume up key when the LED turns yellow during the boot splash screen.
5- How to root
5.1- Place SuperSU 2.71 zip (or higher) on the phone's sdcard. The latest SuperSU can be obtained from: http://forum.xda-developers.com/apps/supersu/2014-09-02-supersu-v2-05-t2868133
5.2- Reboot to recovery and flash the zip file.
6- How to relock bootloader and return it to original factory state
6.0- To relock the bootloader along with restoring the DRM keys the phone must have unmodified stock firmware.
6.1- Repeat step 1.1
6.2- Repeat steps 1.3, 1.4, and 1.5
6.3- Copy the TA backup image that you had obtained in section 1 in the iovyroot folder and use the tarestore command to flash the TA partition back onto the phone. The command will look similar to this:
Code:
tarestore TA-05052016.img
Make sure the command completes with no error. If it fails the first time try again. Reboot the phone. Your bootloader is now locked and your DRM keys restored.
6.4- (Optional) You can verify that you are back to the original locked state by repeating step 1.2.
Whoa Great
---------- Post added at 01:32 AM ---------- Previous post was at 12:50 AM ----------
najoor said:
** DISCLAIMER: I AM NOT A DEV AND THIS IS MY HOBBY. I ASSUME NO RESPONSIBILITY IF THIS BREAKS YOUR DEVICE **​The following is tested on model E6553. This may work for the dual sim model too but I have not verified it. Do not flash the ftf and kernel files intended for one model onto another.​I am not taking credit for any of the tools and kernels here. They are all developed by others. I am only telling you how to use them.
Credits: @zxz0O0, @tobias.waldvogel
0- Prerequisites
You need to have a functioning installation of adb and fastboot tools. You need to have proper Sony drivers installed on your PC to detect your phone when it is connected to the PC. You should be able to flash an ftf file using flashtool. If any of these sound unfamiliar to you, stop reading, go learn about them, and then come back.
1- How to unlock your bootloader without losing the DRM keys
Sony has designed this phone such that if you unlock your bootloader you lose your TA partition PERMANENTLY which includes some of the Xperia features and licenses that have to do with image processing etc. forever. You will also no longer receive OTAs. So in theory, without a copy of this TA partition (which is unique to each device and cannot be copied over from another) unlocking the bootloader results in an irreversible loss of some of your phone's features. Relocking the bootloader will not bring them back.
A hack exists that allows you to backup the TA partition before you unlock the bootloader. This backup will make the process completely reversible so if you ever need to send the tablet to Sony for repair or just want to return it to its original state you have a way. Follow these instructions carefully:
1.0- Before you begin keep in mind that this procedure, especially the unlocking step, completely erases your tablet. Disable myXperia and remove your google account before proceeding. The following will likely not work well with encryption.
1.1- Start by clean flashing any 28.0.A.8.266 firmware, For this tutorial I used the UK Generic ftf that you can get from here.
1.2- Enter service Mode by dialing *#*#7378423#*#* -> Service info -> configuration, and make sure the device is unlockable.
Also check -> Service Tests -> Security and you will see a bunch of "active" and "OK" attributes. You can take screenshots for your reference.
1.3- Turn on usb debugging mode on your phone.
1.4- Download iovyroot zip v0.4 or higher from here.
1.5- Unzip this zip file into a folder of your choice and open a command terminal there.
1.6- Connect the phone which is now in USB debugging mode to your PC and answer yes when the phone asks to authorize the PC to access it in USB debugging mode. You can check that the PC indeed sees the phone by running this command
Code:
adb devices
1.7- Run the following command:
Code:
tabackup
1.8- VERY IMPORTANT: Make sure the command completes with no errors. If all goes well you will have a file with a name like TA-05052016.img (the name may be different for you) with a size of 2MB in your folder.
1.9- Save this file in a very safe place. Save it on your hard disk, AND email it to yourself, AND put it on your google drive. If you lose this file you can never reverse the bootloader unlocking process.
1.10- Reboot the device.
1.11- Now you can unlock the bootloader. Follow the instructions at Sony's official website at http://developer.sonymobile.com/unlockbootloader Also save your unlock code that you obtain in this step somewhere. You may need it some day.
1.12- Reboot the device and it will briefly enter recovery and then start the phone initial setup.
1.13- (Optional) you can easily verify that your bootloader is unlocked by entering the fastboot mode, obtaining any boot image, and running the following command to boot your tablet with that image:
Code:
fastboot boot boot.img
1.14- (Optional) you can see that the DRM keys are erased from your tablet by repeating step 1.2 but this time you will see a bunch of errors under Service Tests -> Security.
1.15- As a side effect of unlocking the bootloader you lose the ability to receive OTA updates. Clean flash a Marshmallow ftf to continue. For this tutorial I used Marshmallow 6.0 E6553_Customized HK_1294-9654_32.1.A.1.185_R7C (the latest firmware at the time of this writing.)
2- How to emulate DRM keys and/or root and/or add recovery after unlocking the bootloader.
A hack exists that can emulate the DRM keys:
2.1- Extract the boot image from the 32.1.A.1.185 marshmallow ftf that you installed in step 1.15. Here are the steps to take:
Open the ftf file with 7-zip or any zip program that you have at your disposal
Look for a file called kernel.sin and extract it.
Start flashtool and from Tools menu choose Sin Editor.
Select the kernel.sin that you extracted in the previous step and hit Extract data.
Flashtool will create a file called kernel.elf which you will use in the next step.​2.2- Download rootkernel_v4.42_Windows_Linux.zip (or a higher version) from http://forum.xda-developers.com/xperia-z5/development/root-automatic-repack-stock-kernel-dm-t3301605 and unzip it in a folder of your choice.
2.3- Copy the kernel.elf that you got in step 2.1 to this folder. If you want root, place SuperSU 2.71 (or higher) in this folder as well. Make sure the name of the SuperSU zip starts with letters "SuperSU". The latest SuperSU can be obtained from: http://forum.xda-developers.com/apps/supersu/2014-09-02-supersu-v2-05-t2868133
2.4- Open a command terminal in this folder and run the rootkernel script. Your command should look similar to this:
Code:
rootkernel.cmd kernel.elf boot-patched.img
When prompted, answer as follows:
- Sony RIC is enabled. Disable? [Y/n] Y (if you want root plus write access)
- Install TWRP recovery? [Y/n] Y (if you want to have recovery)
- Install busybox? [Y/n] Y (if you want busybox. It is very useful)
- Found SuperSU-v2.71-20160331103524.zip. Install? [Y/n] Y (if you want root)
- Install DRM fix? [Y/n] Y (if you want DRM emulation)​This will create a new kernel image called boot-patched.img which you will now flash on your phone.
2.5- Boot the phone in the fastboot mode and flash your patched image using the following fastboot command:
Code:
fastboot flash boot boot-patched.img
2.6- (Optional) You can reboot the phone and see that the DRM keys are indeed retrieved by repeating step 1.2. You can also open settings -> display, and look under Image Enhancement. If the DRM emulation is successful you will see this.
3- How to flash a custom or stock kernel
3.0- If you have already flashed the patched kernel in part 2 you will skip this part.
3.1- Whether you want to use a custom kernel or stock, and whether you have done the DRM patch described above or not, to flash a boot image (i.e. kernel) on your phone you need to restart the tablet in fastboot mode.
3.2- To flash the kernel use this command:
Code:
fastboot flash boot [I]name_of_your_kernel[/I]
You will replace name_of_your_kernel with whatever your kernel is called (e.g. boot.img, kernel.elf, etc.)
4- How to add and use recovery
4.1- Recovery is added to your kernel in step 2.4.
4.2- To enter recovery reboot the phone and touch the volume up key when the LED turns yellow during the boot splash screen.
5- How to relock bootloader and return it to original factory state
5.0- To relock the bootloader along with restoring the DRM keys the phone must have unmodified stock firmware.
5.1- Repeat step 1.1
5.2- Repeat steps 1.3, 1.4, and 1.5
5.3- Copy the TA backup image that you had obtained in section 1 in the iovyroot folder and use the tarestore command to flash the TA partition back onto the phone. The command will look similar to this:
Code:
tarestore TA-05052016.img
Make sure the command completes with no error. If it fails the first time try again. Reboot the phone. Your bootloader is now locked and your DRM keys restored.
5.4- (Optional) You can verify that you are back to the original locked state by repeating step 1.2.
Click to expand...
Click to collapse
Very usefull step by step guide.. But is there is any method to root phone without unlocking Bl? Quite curious to know from you.
arokososoo said:
Whoa Great
---------- Post added at 01:32 AM ---------- Previous post was at 12:50 AM ----------
Very usefull step by step guide.. But is there is any method to root phone without unlocking Bl? Quite curious to know from you.
Click to expand...
Click to collapse
Not yet, atleast for my Dual SIM Version.
njaya95 said:
Not yet, atleast for my Dual SIM Version.
Click to expand...
Click to collapse
So you mean there is a way to root single sim version without unlocking BL?
Thanks ú so much! this is well writen, i will try this when i get the time to do a fresh install. Cheers mate
@arokososoo
Please, in the future never quote long OP and any other long posts. This is very annoying for mobile and desktop users to scroll to the next post. Thanks.
Sent from my Sony E6553 using XDA Labs
I wonder if E6533 can use this guide
Got as far as going to the sony website, there's no mention of phones that can be unlocked there and for some reason Ive got bootloader unlock allowed no, even with a sim free phone and my xperia turned off.....bummer
Stoneybridge said:
Got as far as going to the sony website, there's no mention of phones that can be unlocked there and for some reason Ive got bootloader unlock allowed no, even with a sim free phone and my xperia turned off.....bummer
Click to expand...
Click to collapse
I also unlocked my Z3+, although it wasn't supported. I just picked Z4 Tablet since it is the "nearest" one. Worked Got MM rooted now.
How long did that take on your devices? 1.1- Start by clean flashing any 28.0.A.8.266 firmware, For this tutorial I used the UK Generic ftf that you can get from here.
I am waiting for half an hour now...
Spoiler
Trilliard said:
How long did that take on your devices? 1.1- Start by clean flashing any 28.0.A.8.266 firmware, For this tutorial I used the UK Generic ftf that you can get from here.
I am waiting for half an hour now...
Spoiler
Click to expand...
Click to collapse
I can't see your picture, but I assume you have that stucking at modem/system ?
If so, downgrade Flashtool to 0.9.19
Well i got a soft brick, but was able to restore it trough Sony Companion. Here is the picture on another hoster http://fs5.directupload.net/images/160529/gr5fpf8t.png dont know on what point it stuck.
Funfact that two germans writting in english
Edit, big thanks version 0.9.19 worked perfect. Cant understand why the newest one doesnt work
Edit 2: System boots up, but when the setup start the process com.android.phone stops instant and if i hit ok the message comes instantly again after about ten times the phone reboot, i cant do anything else... next repair through sony companion and back to stock german 6.0. I´ll stop try it for today.
Trilliard said:
Well i got a soft brick, but was able to restore it trough Sony Companion. Here is the picture on another hoster http://fs5.directupload.net/images/160529/gr5fpf8t.png dont know on what point it stuck.
Funfact that two germans writting in english
Edit, big thanks version 0.9.19 worked perfect. Cant understand why the newest one doesnt work
Edit 2: System boots up, but when the setup start the process com.android.phone stops instant and if i hit ok the message comes instantly again after about ten times the phone reboot, i cant do anything else... next repair through sony companion and back to stock german 6.0. I´ll stop try it for today.
Click to expand...
Click to collapse
Did you forget to wipe?
In a thread i opened in Q&A a user said that even though service info reported bl unlock allowed NO, he managed to unlock it anyways using standard procedure, what do you think?
it seems like Sony RIC is not fully disabled with this patch.
Finally ! Works like a charm in my E6533 (Dual sim) !!! Thanks a lot !!!
Hi thiefxhunter,
How you do this? could you explain us step by step. I like to root my dual sim model.
Thanks.
Hi.. I am stuck in 2.5
My device is unlocked, It is connected in fastboot mode (blue led).
error msg
'Fastboot is not recognised as an internal or external command, operable program or batch file'
Please help me in this.
Solved..
Thanks for this post..
Thanks for this guide, it worked like a charm on my E6553 with 32.2.A.0.224
CorzCorry said:
I also unlocked my Z3+, although it wasn't supported. I just picked Z4 Tablet since it is the "nearest" one. Worked Got MM rooted now.
Click to expand...
Click to collapse
Can you please explain how did you do that? Thanks

[GUIDE] All-In-One noob friendly guide for xperia X (Root/Bootloader/Rom)

[UPDATE]: USE THIS ONLY FOR NOUGAT 7 OR 7.1! THERE IS A DIFFERENT GUIDE FOR ANDROID OREO!
https://forum.xda-developers.com/xperia-x/how-to/root-xperia-x-f5122-android-n-34-2-2-47-t3594502 (Written by YasuHamed, not me!)
If you are not interested in android Oreo, or you want to go back to Nougat, this guide is still valid! [End of Update]
This is a guide for newbies or for people that are simply confused. If you have any questions, you can always ask me, and I will reply. but please make sure you haven't made mistakes and do not ask about things that are already stated here. Let's go!
BEFORE DOING ANYTHING, NOTES
-make sure you have installed ADB : https://forum.xda-developers.com/showthread.php?t=2588979
-make sure ADB can read your phone with the correct drivers installed. If you have trouble with that, read "DRIVERS" section
!It is absolutely necessary to install the drivers correctly!
-Backup your stuff if you have any, you will need to delete everything from the phone
-Enable USB debugging
-Note: some of these instructions apply to Windows OS only!
-Note: links to downloads have been shortcutted as much possible to make it easier for you!
-Find some stock roms here! https://forum.xda-developers.com/xperia-x/how-to/sonyx-f5121-downgrade-8-0-0-to-7-1-1-to-t3754986
(Credit: HEKER510)
-Warning: you will lose your warranty!
-I am not responsible for any damage done to your device.
BACKUP DRM KEYS (OR WORKAROUND)
You may want to unlock your bootloader. If you unlock it without backing up the DRM keys, you will lose them. I did that mistake and I regret it. If you already did, there is an alternative solution, skip to step 8.
1) If you are running android 7 nougat, you will need to downgrade to MM. If you are running MM, skip to step 7.
2) You will need to wipe everything before rolling back, so if you have any data back it up
3) Download any stock MM 6.0.1 firmware for the xperia X. You can find one here : https://mega.nz/#!1xRj2CYS Decryption key: !qBVi7yky8AL84eUF3bpTTGQ2YmN0ePCjc-eSDZGIZCI
Watch out: if you have the dual SIM model, F5122, you need to download accordingly!
For more firmwares, check "BEFORE DOING ANYTHING"
4) Download the latest flashtool: http://www.flashtool.net/downloads.php
Upon installation, tick on fastboot, flashmode drivers! If it didn't ask you, go to the installation folder and run Flashtool-drivers.exe. Please read "DRIVERS" section!
5) Flash the .tft file
How to flash?
0. Go to "C:\Users\[Your PC Name]\.flashTool\firmwares" , and put your firmware .ftf file in there!
1. Open Flashtool and click on the lightning bolt icon (first one from the left)
2. In the prompt, choose flashmode.
3. Under firmware, click on the version you put (It should probably only be one option)
4. Under wipe , tick everything. Under the others, do not make any changes.
5. Click "Flash"
6. When the popup appears, connect your device. It needs to be powered off, and connected while you are holding the
"volume down" button.
7. Wait for it to finish.
8. Done. Boot up the device, it might take some time to open so don't worry.
Click to expand...
Click to collapse
6)If your phone bootloops, try flashing again or a different firmware and make sure you followed the steps correctly.
7) Once your phone successfully boots android MM, use Dirtycow to get your DRM keys out: https://forum.xda-developers.com/crossdevice-dev/sony/universal-dirtycow-based-ta-backup-t3514236
8) If you unlocked the bootloader before backing up your keys, you can use DRM kernel fix. You can get it here: https://forum.xda-developers.com/xperia-x/development/kernel-drm-fix-nougat-t3530849 Before using it check out the custom rom that includes this fix and other things.
UNLOCK BOOTLOADER
This is relatively easy and you can follow official sony instructions to do it.
1) Go to your phone settings, developer options, and enable OEM unlock
"But there is no developer options!" -Go to the bottom of your settings, system, about phone, and tap multile times on "Build Number", also at the bottom.
Click to expand...
Click to collapse
2) If you haven't already , install ADB fastboot and configure drivers (Link on top )
3) Follow the steps on the Sony website to get your unlock code: https://developer.sonymobile.com/unlockbootloader/email-verification/
4) After unlocking, a warning message on boot is normal!
INSTALL RECOVERY
Installing TWRP on your xperia X is very important, since you can flash zips and img files so easily, plus wipe, backup and other features.
1) Download the TWRP .img file: https://androidfilehost.com/?w=files&flid=197369 (Credit: eagleeyetom )
2) Make sure you have USB debugging enabled
3) Open your downloaded twrp folder
4) Run CMD in that folder (shift + right click inside the folder, Open CMD here )
5) Connect your Xperia X to your PC
6) Type these lines:
adb reboot bootloader
fastboot flash recovery recovery.img [where recovery.img is your twrp file name]
fastboot reboot
7) If no errors, twrp is now installed. Once your phone boots , turn it off,. To access TWRP recovery hold power button and volume down button until the TWRP menu appears.
STOCK ROM, ROOT
If you just want to root and not interested in additional features and tweaks, you can simply flash SU through TWRP to get your phone rooted.
Note: Current best stock ROM available: 7.1.1 (252) - better features than older ver, and good battery life.
0) Install your desired stock firmware using the exact same previous instructions, (under DRM section) with flashtool.
1) Download SuperSu
Or magisk, using YasuHamed guide mentioned on top, but I have not tested with anything other than Oreo 8.0
Use magisk if you want more stability / root features (like hide root from apps, modules )
2) copy it anywhere on your phone
3) Run TWRP
4) Tap on install
4) Flash the file
5) Reboot, you are now rooted
6) Insert your DRM keys if you have them
Custom ROMS
After unlocking the bootloader and installing TWRP this is the best way to go in order to get full root, tweaks.
https://forum.xda-developers.com/xperia-x/development/rom-xperia-x-pexorom-v1-0-0-f5122-f5121-t3590552
^ This is a very good custom ROM made by prmk74. You can see its features in his thread.
1) Download the rom and copy it to your phone
2) Run TWRP
note: It is recommended to wipe dalvik, cache, data ( your storage partition doesn't need to be wiped)
3) Tap install, find your downloaded file and execute
note: It is recommended to wipe dalvik, cache, data ( your storage partition doesn't need to be wiped)
4) Follow on-screen instructions, do not stop the booting after finishing the installation, it will take some time
5) Insert your DRM keys if you have them
6) For those who lost their keys: Now the functions like vivid image mode are working properly.
DRIVERS
For Windows 8/8.1/10 users, how to solve driver problems:
1) Press the Windows key + R together and in the ‘Run’ box type: shutdown.exe /r /o /f /t 00
– Now make the following selections to boot into the Start Up Setting Screen: Troubleshoot > Advanced options > Start Up Settings > Restart
– Then, when the machine restarts, select number 7 i.e. “Disable driver signature enforcement”. Your machine will start with Driver signing enforcement disabled until the next reboot.
B) Now you can install the Flashtool drivers. Go to the flashtool install location and run the drivers.exe again, check fastboot and flashmode
– Windows will warn that the driver is not signed and will require you to confirm the installation.
– Once the installation is complete, reboot the machine
TO CONCLUDE:
This is what you may want to do to get the most out of your new xperia x:
1) Backup DRM
2) Unlock BL
3) Install TWRP
4) Flash Persian (or a different rom) through TWRP (And subscribe to the thread so you receive updates)
5) Restore DRM
Notes:
None of the links, tools are of my work, I'm just writing a guide for my fellow XX owners
^^ this guide is so really good :3. I post flash script for someone dont know how to find it ^^
unzip it in this position.
C:\Users\[user-name]\.flashTool\mydevices
max26292 said:
^^ this guide is so really good :3. I post flash script for someone dont know how to find it ^^
unzip it in this position.
C:\Users[user-name]\.flashTool\mydevices
Click to expand...
Click to collapse
Thanks!
Thanks for this, I need some help!
All was fine until I tried flashing the recovery, comes back "partition unknown" error. I was unable to bring the device up under an adb device only as a fastboot device.
34.0.A.1.264_R3A firmware.
Different official sony driver (Sony bootloader guide driver didn't work)
Device now hangs on the Sony logo after boot messgae warning "OEM bootloader unlocked, device not trusted," any help would be appreciated.
brianx87 said:
Thanks for this, I need some help!
All was fine until I tried flashing the recovery, comes back "partition unknown" error. I was unable to bring the device up under an adb device only as a fastboot device.
34.0.A.1.264_R3A firmware.
Different official sony driver (Sony bootloader guide driver didn't work)
Device now hangs on the Sony logo after boot messgae warning "OEM bootloader unlocked, device not trusted," any help would be appreciated.
Click to expand...
Click to collapse
These USB drivers are very annoying to work with. I got mine to finally work using a program called ADB driver installer. http://adbdriver.com/downloads/ Choose automated installation and try what I said. I believe it should fix your problem, after installing the drivers reboot and flash again.
Other than that, I have to ask are you 1000% sure you used the exact commands?
I saw another thread someone mistook
"flash recovery recovery.img" for "flash recovery.img"
"recovery" should be included before the recovery file name
brianx87 said:
Thanks for this, I need some help!
All was fine until I tried flashing the recovery, comes back "partition unknown" error. I was unable to bring the device up under an adb device only as a fastboot device.
34.0.A.1.264_R3A firmware.
Different official sony driver (Sony bootloader guide driver didn't work)
Device now hangs on the Sony logo after boot messgae warning "OEM bootloader unlocked, device not trusted," any help would be appreciated.
Click to expand...
Click to collapse
Why didn't the sony guide work? It worked for me. Just so you know, the "device cant be trusted" message is appearing on everyones' phones after unlocking the bootloader, it's not a problem or something
the part of restoring DRM is skipped,
please xplain
YasuHamed said:
the part of restoring DRM is skipped,
please xplain
Click to expand...
Click to collapse
I know, as I said there is room for improvement. The reason I did not include it is because I never did it myself, so I don't want to write something wrong or something that could lead to problems. I write something only if I am 100% sure. If anyone of you is kind to offer that piece so the guide is complete I will be glad
FoxTheLegend said:
Why didn't the sony guide work? It worked for me. Just so you know, the "device cant be trusted" message is appearing on everyones' phones after unlocking the bootloader, it's not a problem or something
Click to expand...
Click to collapse
Ok I figured out what I did wrong and was able to amend another issue I edited out of this post.
brianx87 said:
Ok I figured outwhat I did wrong (able to boot into the os and warning message no longer an issue ) and the issue I am now facing is that twrp is hanging on the boot screen. Is this version of twrp built to a specific version of android?
Click to expand...
Click to collapse
What do you mean hanging? the twrp logo frozen?
FoxTheLegend said:
What do you mean hanging? the twrp logo frozen?
Click to expand...
Click to collapse
Working now, used a previous version of twrp by mistake. Using latest build works fine now, have to wait to get home from work to proceed with the rest, annoying procedures this stuff but your guide is great.
brianx87 said:
Working now, used a previous version of twrp by mistake. Using latest build works fine now, have to wait to get home from work to proceed with the rest, annoying procedures this stuff but your guide is great.
Click to expand...
Click to collapse
Thanks, Im glad to it works now
FoxTheLegend said:
I know, as I said there is room for improvement. The reason I did not include it is because I never did it myself, so I don't want to write something wrong or something that could lead to problems. I write something only if I am 100% sure. If anyone of you is kind to offer that piece so the guide is complete I will be glad
Click to expand...
Click to collapse
thank you for the answer sir
i am unable to find any twrp that work for my F5122, it always bricks and i have to reset.
is there any twrp recovery image that works correctly with f5122?
YasuHamed said:
thank you for the answer sir
i am unable to find any twrp that work for my F5122, it always bricks and i have to reset.
is there any twrp recovery image that works correctly with f5122?
Click to expand...
Click to collapse
Hmm.. Did you try the one from the poison thread? I myself have still the old version installed (not 3 or 3.1) if I find it on my pc I will share it with you
FoxTheLegend said:
Hmm.. Did you try the one from the poison thread? I myself have still the old version installed (not 3 or 3.1) if I find it on my pc I will share it with you
Click to expand...
Click to collapse
I have to modified kernel
all i want is to boot it via fastboot command
for example i have the rooted kernel SU installed (but battery drain is high) so i what wana do is flashing kernel with all securities OFF and then with twrp image i will do
Code:
fastboot boot twrp.img
i will boot the X in to twrp and i will flash SUPERSU via twrp.
thanks all
YasuHamed said:
I have to modified kernel
all i want is to boot it via fastboot command
for example i have the rooted kernel SU installed (but battery drain is high) so i what wana do is flashing kernel with all securities OFF and then with twrp image i will do
i will boot the X in to twrp and i will flash SUPERSU via twrp.
thanks all
Click to expand...
Click to collapse
I see, but don't you want to figure out why it's not working normally? Noone has reported a similar problem
FoxTheLegend said:
I see, but don't you want to figure out why it's not working normally? Noone has reported a similar problem
Click to expand...
Click to collapse
since there is no offcial twrp for X out yes and only DORA (XA) is available) even XA don't work for X
so either twrp 2.8, 3.0 or 3.1 any should just boot in order to let us flash superSU.
YasuHamed said:
since there is no offcial twrp for X out yes and only DORA (XA) is available) even XA don't work for X
so either twrp 2.8, 3.0 or 3.1 any should just boot in order to let us flash superSU.
Click to expand...
Click to collapse
=-= try to use this command fastboot flash recovery [your_recovery_name].img
I use f5122 and flash successfull twrp 3.0.2 and 3.1. with this, i flash some kernel and rom without any problem.
Everything is working good for me now, the only issue now is restoring the DRM keys, has anyone found a credible source for doing this on this device?
How can I be sure I have a full root? I can't seem to be able to uninstall some of the bloatware only disable it!
brianx87 said:
Everything is working good for me now, the only issue now is restoring the DRM keys, has anyone found a credible source for doing this on this device?
How can I be sure I have a full root? I can't seem to be able to uninstall some of the bloatware only disable it!
Click to expand...
Click to collapse
Well titanium backup can assure you but I don't see why you wouldn't have full root... You need an app uninstaller to uninstall bloatware, it can't be done through the settings you know that right

[ROOT] [Xperia X] [STOCK KERNELS] - [LATEST] 34.4.A.2.118 -25-SEPT-2018

DEVICE XPERIA X - PROJECT NAME SUZU - VARIANTS F5121 & F5122 (DUAL)​
WhatsApp Group[PLEASE PM ME] for Xperia X (ENGLISH ONLY) by@hhjadeja007
A BIG THANKS TO @serajr & @sToRm// and ofcourse @tobias.waldvogel
#DETAILED KNOWLEDGE BASE GUIDE FOR XPERIA 2018 MODELS / THANKS TO @DHGE
Similar Noob Version / DrmKeys, TA, unLock & Lock Bootloader (XPERIA XZ) thanks @nathan30
MAGISK GUIDE THANKS TO @Didgeridoohan
and FINALLY @Chippa_a for TWRP 3.2.2
____________________________________________________________
IF YOU KNOW THE BASICS THEN PROCEED BELOW , OTHERWISE R E A D - H E R E
-OREO KERNELS
ROOT DIRECTORY XPERIA X SUZU
"Xperia X UPDATE" ON -25-SEPTEMBER-2018 -- 34.4.A.2.118 F5121 & F5122 NEW
"Xperia X UPDATE" ON -22-AUGUST-2018 -- 34.4.A.2.107 F5121 & F5122
"Xperia X UPDATE" ON -18-JULY-2018 -- 34.4.A.2.97 F5121 & F5122
"Xperia X UPDATE" ON -14-JUNE-2018 -- 34.4.A.2.85 F5121 & F5122
"Xperia X UPDATE" ON -09-MAY-2018 -- 34.4.A.2.70 F5121 & F5122
"Xperia X UPDATE" ON -10-APRIL-2018 -- 34.4.A.2.50 F5121 & F5122
"Xperia X UPDATE" ON -15-MARCH-2018 -- 34.4.A.2.32 F5121 & F5122
"Xperia X UPDATE" ON -26-FEB-2018 --34.4.A.2.19 F5121 & F5122
"Xperia X UPDATE" ON -06-FEB2018 -- 34.4.A.0.364 F5121 & F5122 - thanks to @Gray47Maxx
-------------------> INSTRUCTIONS <-----------------
1. Paste the following on your sd OR USB OTG AND KEEP IT ASIDE
-DRM-Fix_System_Mode.zip
-Magisk.zip
-FCS_thermal_Xperia_X_V.1.8.zip (optional)
2. FLASH THE LATEST ROM VIA FLASHTOOL , if DURING FLASHING you get script error then
2B. Paste 34.4.fsc from folder1 to [C:\Users\<username>\.flashTool\devices\F51XX] and try TRY flashing again.
3. boot you device in to OREO , enable USB DEBUGGING and Switchoff you device
4. Flash KERNEL " F512X_34.4.A.X.X_CLEAN.img" using FLASHTOOL (fastboot MODE) and unplug device.
5. Paste the " twrp-3.1.1-suzu-2017.08.22.img " (Recovery image) at C:\Program Files (x86)\Minimal ADB and Fastboot & name it something simple such as boot.img. CONNECT DEVICE IN FASTBOOT MODE AGAIN & FLASH Recovery via following FASTBOOT command ("fastboot flash recovery twrp.img" & enter. Once Done; remove cable and after few seconds ......
6. press POWER and VOLUME DOWN keys and HOLD until you are taken to TWRP.
6B. TWRP 3.x.x will ask decryption password, click back and DO - THIS - STEP - THANKS TO @Jomoteck
7A. NOW from SDCARD OR USBOTG flash the items in the same sequence given ABOVE ( DRM-Fix_System_Mode.zip / then Magisk.zip)
7B. FLASH - FCS_thermal_Xperia_X_V.1.3.zip (optional) and
8. clear cache / delvik cache and and switch-off device (DO NOT PROMPT INSTALL TWRP)
9. after a while switch on device. first reboot may take a while and you may face bootloop (atleast once)
10. install magisk_5.X.apk (magisk manager withing android)
11. install rootcheck_615.apk and check the Root access. (optional)
ADDITIONAL STEPS I DO
12. INCREASE VOLUME--replace "mixer_paths_wcd9335.xml" file from /system/etc for HIGH VOLUME AND RINGTONE (TAKE BACKUP OF THE ORIGINAL ONE) (I USE FX EXPLORER
13. ENABLE NIGHTLIGHT FILTER
---- first flash given Night_Light.zip via TWRP and reboot, check if the control appears or not, if NOT then
-- Install Given "android-res-night.apk"; then connect device to pc (via usb cable) and ran the following command on "Minimal Adb & Fastboot Window"
Code:
"adb shell cmd overlay enable --user 0 android.res.night"
nightlight will work after you next reboot PREVIEW NIGHTLIGHT
14. SOME MODULES IN MAGISK --- > "UPDATE" -GOOGLE PLAY SERVICES --> OPEN MAGISK--> FLASH MODULES
15 "UPDATE" Magisk manager 5.6x & then "Xperia X UPDATE" ON -Magisk module to 16.x (direct install) --- N O W. R.E.B.O.O.T. ---
-------- REMOVING BLOATWARE-------
----(A)------------SCRIPT METHOD -------------
16A. make sure usb debugging is ON, connect your device via cable to pc and UNZIP GIVEN "v1.8_Xperia_X_Debloat_By_Serajr_Combined.zip" AND RUN THE BAT FILE- ( read the instructions CAREFULLY ( -----READ HERE-------- ) ) ---- it will prompt permission & then superUser Permission. Grant BOTH ----- the device will reboot and ALL THE BLOATWARE WILL BE VOIDED
16B. after reboot you may get app crashing prompt. SWITCH-OFF device
16C. reboot to twrp and again clean cache and Delvik cache and SWITCH-OFF device
16D. reboot and delete "_debloat_backup" folder (size 1.7gb) from /system by using any GOOD ROOT EXPLORER APP ( I use FX Explorer)
16E. Mr @venomxob has cofirmed that by updating SOFTWARE "Xperia X UPDATE" ON -APP in OREO, fixes the annoying App Crash Popups DOWNLOAD HERE
16E. FROM "Developer Options" disable animation affects for speedy performance
----(B)----------MANUAL METHOD--------------
MAKING SYSTEM WRITABLE to REMOVE BLOATWARE / SYSTEM APP
In order to to remove system App and Bloatware you must make /system partition writable
17A .install busybox (run it and install it in system) and then
17B.install terminal, later type these lines ( no CAPS) and enter one by one in #terminal
Code:
su (grant su access)
busybox mount -o rw,remount,rw /system
17C. FOR OREO THIS BUSYBOX WORKED FOR ME - CLICK HERE
17D. SYSTEM APP UNINSTALLER WORKED FOR ME ON BOTH NOUGAT & OREO CLICK HERE
17E. I PREFER FREEZING SOME CORE SONY APPS WITH THIS APP CLICK HERE
SOME VALUE ADDING APPS I USE
1. YMUSIC ( MP3 Player/downloader for YOUTUBE) CLICK HERE
2. BROMITE (PowerFul Fast Chrome Browser without Tracking ) CLICK HERE
3. LATEST XPERIA HOME APP (3D TOUCH) CLICK HERE
4. OGYOUTUBE (modded Youtube player) CLICK HERE
5. ADBLOCKER (Adaway) CLICK HERE
<_______________________________________________________________________________________________________>
-NOUGAT KERNELS
"Xperia X UPDATE" ON -06DEC2017--34.3.A.0.252 - F5121 & F5122Best Build
"Xperia X UPDATE" ON -09NOV2017--34.3.A.0.244 - F5121 & F5122
"Xperia X UPDATE" ON -04OCT2017 -- 34.3.A.0.238 - F5121 & F5122
"Xperia X UPDATE" ON -08SEP2017-- 34.3.A.0.228 - F5121 & F5122
"Xperia X UPDATE" ON -08AUG2017- 34.3.A.0.217 - F5121 & F5122
"Xperia X UPDATE" ON -12JULY2017 -- 34.3.A.0.206 - F5121 & F5122
"Xperia X UPDATE" ON -23JUNE2017 -- 34.3.A.0.194 - F5121 & F5122
"Xperia X UPDATE" ON -11MAY2017 -- 34.2.A.2.69 - F5121 & F5122
"Xperia X UPDATE" ON -22APR2017 -- 34.2.A.2.27 - F5121 & F5122
GENERAL METHOD (NOUGAT KERNELS)
34.2.A.2.27 / 34.2.A.2.69 / 34.3.A.0.194 / 34.3.A.0.206
34.3.A.0.217 / 34.3.A.0.228 / 34.3.A.0.244/ 34.3.A.0.238
& 34.3.A.0.252
The Process of Flashing these Nougat Kernels and Obtaining Root Access for is SAME as Described ABOVE (for Oreo Kernels) EXCEPT FOLLOWING TWO THINGS
1. DO NOT FLASH "DRM-Fix_System_Mode.zip"
2. FLASH THE bloatware removal script, [v1.8_Xperia_X_Debloat_By_Serajr_Combined.zip], IT works just fine on Nougat.
--------------------------------------------------------------------------------------------------------------------------------------------------
- MARSHMALLOW KERNELS
"Xperia X UPDATE" ON -29APR2016 -- 34.0.A.1.264 (GENERIC & NORDIC) - F5121 & F5122
METHOD ( MARSHMALLOW KERNELS) 34.0.A.1.264
The Process of Flashing MARSHMALLOW Kernel and Obtaining Root Access for is SAME as Described ABOVE (for Oreo Kernels) EXCEPT FOLLOWING TWO THINGS
1. DO NOT FLASH "DRM-Fix_System_Mode.zip"
2. FLASH THE bloatware removal script, [v1.8_Xperia_X_Debloat_By_Serajr_Combined.zip], IT works just fine on Nougat.
​
<<<<---------------------------------------------------------------------------------------------------------------->>>
​HASTAGS : #F5122 #F5121 #ROOT #XPERIAX #STOCK #MODIFIED #KERNELS #STOCKKERNES #
所以 这是一个好消息。
LuxferreX said:
所以 这是一个好消息。
Click to expand...
Click to collapse
I don't know your language sir, but as per google I believe you typed " So it's good news."
so the answer is YES
however this forum is in English, please try to communicate in English because most of the knowledge-base is in English on XDA
I joined this forum to thank you very much. This not only works but restored my camera app which was crashing to launcher last time I attempted to root in MM. It caused the camera app to freeze and crash out even after with software repair and Sony said to send it back then said they didn't want to fix it because I unlocked the bootloader. (Camera worked in other apps etc.)
So not only do I now have root on Nougat but my camera app works too. You're brilliant!
YasuHamed said:
[*]type command
Code:
fastboot flash twrp3.1.img
( assuming you put twrp3.1.img in the minimal adb folder)
Click to expand...
Click to collapse
Actually not quite:
Code:
fastboot flash recovery twrp3.1.img
That should do it. =)
evilicious_evil said:
I joined this forum to thank you very much. This not only works but restored my camera app which was crashing to launcher last time I attempted to root in MM. It caused the camera app to freeze and crash out even after with software repair and Sony said to send it back then said they didn't want to fix it because I unlocked the bootloader. (Camera worked in other apps etc.)
So not only do I now have root on Nougat but my camera app works too. You're brilliant!
Actually not quite:
Code:
fastboot flash recovery twrp3.1.img
That should do it. =)
Click to expand...
Click to collapse
Thank you @evilicious_evil for
1. correcting the code , i have fixed it
2. liking the post and
3. most important for the AdsFree
I know you will enjoy your device because I just couldn't love it more!
im stuck with downgrade step. im new to xperia and really want to root my device but im nougat now due to system update. kindly give steps on how to downgrade. so i can backup my drm keys.
BASICS
1. SONY XPERIAS are SHIPPED with LOCKED BOOTLOADERS with PASSWORD / (UNLOCK KEY)
2. First check your device whether SONY will ever allow you to unlock your bootloader or not? DIAL *#*#7378423#*#* / SERVICE INFO > / Configuration > / and check for "ROOTING STATUS: Bootloader unlocked allowed: " ... if it says NO then you better return your device back to sony. your phone can never be bootunlocked and you can never have root access. Better give the mobile to young sibling...
Hoever if "ROOTING STATUS: Bootloader unlocked allowed: " says YES then we can do the magic (see attached image)
BEFORE YOU UNLOCK BOOTLOADER DOWNGRADING TO 6.01 is MUST - this step will WIPE everything in your device
- GUIDE TO USE FLASHTOOL TO FLASH ANY FIRMWARE (DOWNGRADING TO ANDROID 6)
MAKE SURE ALL DRIVERS ARE INSTALLED
INSTALL SONY PC COMPANION / XPERIA COMPANION and Make FIRST CONNECTION to WINDOWS PC to XPERIA X while running sony pc companion or xperia companion and it will install necessary drivers.
-switch-off xperia X and plug usb in while holding the volume UP key (BLUE LED / FASTMODE) and let your windows install fastboot drivers.
- remove usb, and afte few seconds connect usb again while pressing VOLUME DOWN Key (Green LED / FLASHMODE) and let your windows install flashmode drivers
Click to expand...
Click to collapse
Install FLASHTOOL from http://www.flashtool.net/downloads_windows.php and install it / after installation
1. upgrade the version from 0.9.23.1 to 0.9.23.X by replacing x10flasher.jar files (given in that page) at C:\Flashtool
2. goto C:\Flashtool\drivers and install the setup! there will be many check boxes for you to see according to your sony devices. select common fastboot/flashmode drivers and sony Xperia X motherboard drivers (sa0107)
3. run flastool. run xperifirm (last button at right) (see image)
4. once xperifirm is run select your device SUZU >F5122 (see image)
5. now you will all the countries listed and the latest android versions they have pushed. if you see at the bottom the StoreFront/Service Exchange Unit and Commercial journalist will have the FIRST EVER version on which F5122 was created. the 34.0.A.1.264 is your version. you may install commercial journalist version (see image)
6. download it and once completed close the xperifirm and IMMEDIATELY flashtool will start creating FTF file. if it asks you anything about INCLUDING FSC SCRIPT / click YES
7. click the THUNDER BUTTON and select FLASHMODE (see image)
8. point out on the ftf firmare folder (in your case since you just downloaded it will be already be at right place) (see image) and
9. make a CLEAN FLASH (SEE IMAGE CAREFULLY)
10. click flash / it will take 10 mins to prepare flashfiles and
11. will prompt you to connect your device in FLASHMODE
12. makesure your xperia is switch OFF and now make a connection of your device in flashmode (plugin usb + vol down key (hold) (green led)
13. it will read you device and will start FLASHING / DONOT MOVE SHAKE device incase if usb connection looses your device may be bricked.
14 flashing takes 20-30 mins.
15. at 99% the flashtool seems to hang (while closing headers) and may take upto 15 mins. don't panic.
16. keep reading the screen / once flashing done/ flashtool will indicate.
17. boot your device, first boot may take several mins
congratulations your f5122 is successfully downgraded to ANDROID MM
Enable usb debugging from developer options and EXTACT DRM keys via DIRTYCOW script.
SAVING DRM KEYS
1. DOWNLOAD THE Universal (Dirtycow-based) TA Backup v2 FROM THIS POST
2. EXTRACT the zip on desktop and connect your xperia X running on android 6 / boot LOCKED
3. enable usb debugging under developeroptions
4. run the .BAT file and look at the device.
5. when prompt permission, grant it
6. the script will extract .img file in that same folder having name something like "TA_F512X_<code>_<ddmmyy><timestamp>.img" , you may run the script more than once to extract same copy of TA image. the script will keep saving it in the same folder with current time stamp as part of the file name ,
I ran the script thrice
7. once done SAVE THE .IMG FILES ON SAFE PLACE, CLOUD STORAGE, EMAIL, ETC , use xperifirm again to download the LATEST BUILD and FLASH it via FLASHTOOL as described ABOVE in the flashtool section.
8. once you are on OREO or Nougat, its time to UNLOCK your BOOTLOADER,
UNLOCKING BOOTLOADER SONY XPERIA (DRM KEYS) TA.IMG
PLEASE SEE THE COMPLETE @DHGE #GUIDE FOR XPERIA 2018 MODELS AT https://forum.xda-developers.com/showpost.php?p=70504721 / THANKS TO @DHGE
you may also consider viewing NOOB version for XZ by @nathan30 https://forum.xda-developers.com/xperia-xz/how-to/how-to-unlock-bl-kernel-twrp-root-t3541648
IN SHORT----
To be able to unlock your Xperia X, 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/unlo...-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)
-using FlashTool "BLU" key you can unlock your bootloader
- your TA partitions / internal storage will be WIPED and device will rebooted.
Thanks alot sir!!
honestly im so excited to root thats why i never even bother to read carefully..
to make story short.. i manage to unblocked BT (w/o downgrading and backing up DRM keys) so lesson learned..
then tried flashing your ( image boot_su_34.2.A.2.47.IMG ) to have root and drmfix as well so everything is okay until i tried to play my favorite game MObile legends and try to use PS3 controller using six axis. ( this is the main reason why i unlook and root) but i failed. so i started thinking maybe i made it all wrong. so i tried to go back unroot and relock using videos and guides online and ending up with a dead xperia x ten i managed to solved it by relocking first and software repair via sony companion and every thing is okay except the camera..
---------- Post added at 12:16 PM ---------- Previous post was at 12:11 PM ----------
now i want MM and drm fix.. question is can i flash your ( image boot_su_34.2.A.2.47.IMG) on MM??
the reason i want MM is that i think its compatible with the game and for me to use ps3 controller
---------- Post added at 12:54 PM ---------- Previous post was at 12:16 PM ----------
or if not can you make a kernel for MM with DRM fix? please
sorry sir i have alot of questions i really wanted to fix my phone. so i will follow all the steps you said but upon installing flashtool and drivers i cant seem to find this (sony Xperia X motherboard drivers (sa0107) ) in the list. i dont want to skip this since i don want to encounter any problems again the way i did last time. Will it be okay to skip this?
jhendsantos said:
honestly im so excited to root thats why i never even bother to read carefully..
to make story short.. i manage to unblocked BT (w/o downgrading and backing up DRM keys) so lesson learned..
then tried flashing your ( image boot_su_34.2.A.2.47.IMG ) to have root and drmfix as well so everything is okay until i tried to play my favorite game MObile legends and try to use PS3 controller using six axis. ( this is the main reason why i unlook and root) but i failed. so i started thinking maybe i made it all wrong. so i tried to go back unroot and relock using videos and guides online and ending up with a dead xperia x ten i managed to solved it by relocking first and software repair via sony companion and every thing is okay except the camera..
---------- Post added at 12:16 PM ---------- Previous post was at 12:11 PM ----------
now i want MM and drm fix.. question is can i flash your ( image boot_su_34.2.A.2.47.IMG) on MM??
the reason i want MM is that i think its compatible with the game and for me to use ps3 controller
---------- Post added at 12:54 PM ---------- Previous post was at 12:16 PM ----------
or if not can you make a kernel for MM with DRM fix? please
Click to expand...
Click to collapse
Good day sir
since I proof read and fixed grammatical errors , your thank is void, plz thanks again
https://forum.xda-developers.com/showpost.php?p=72141176&postcount=7
...................................
Seems like you have a Full Plate of Experiences with your Xperia X
1. once unlocked, i highly recommend not to re lock the boot loader unless you are selling your device
2. If at any point xperia X is bricked, holding POWER+VOLUME UP key for
-----(a) five seconds will REBOOT the device after 1 JERK
------(b) Fifteen secons will JERK your device THRICE and on second jerk, YOU MUST remove your fingers from power+volumeUP keys and it will make your device SHUTDOWN so that you can reconnect it in FLASHMODE and do the magic again
3. I don't have knowledge about connecting PS3 to XPERIAS but SONY cannot release Android N without checking compatibility of already sold SP3.... so what i can suggest is to find approperiate app on playstore to connect with Ps3 and/or google more on this subject
4. keep your TA IMAGE INTACT / saved / email yourself / back it up on cloud for future use.
5. for you i have created SIMILAR KERNAL for android 6.01 BUILD 34.0.A.1.264 , having superSU
6. using flashtool perform CLEAN flash and send the kernel to your device.
7. I am giving you original STOCK KERNEL SIN file "original_stock_kernel_F5122_34.0.A.1.264.sin" if the modified kernel gives you bootloops OR you have bricked F5122 atleast you dont have to reflash everything. just flash the kernel in fastbootmode and you device will wakeup
https://mega.nz/#F!7UZBiYDI!t7ieYMwHUNsAC5T9iHpyQQ
jhendsantos said:
sorry sir i have alot of questions i really wanted to fix my phone. so i will follow all the steps you said but upon installing flashtool and drivers i cant seem to find this (sony Xperia X motherboard drivers (sa0107) ) in the list. i dont want to skip this since i don want to encounter any problems again the way i did last time. Will it be okay to skip this?
Click to expand...
Click to collapse
yes seems like all drivers are installed
kindly skip
YasuHamed said:
Good day sir
since I proof read and fixed grammatical errors , your thank is void, plz thanks again
https://forum.xda-developers.com/showpost.php?p=72141176&postcount=7
...................................
Seems like you have a Full Plate of Experiences with your Xperia X
1. once unlocked, i highly recommend not to re lock the boot loader unless you are selling your device
2. If at any point xperia X is bricked, holding POWER+VOLUME UP key for
-----(a) five seconds will REBOOT the device after 1 JERK
------(b) Fifteen secons will JERK your device THRICE and on second jerk, YOU MUST remove your fingers from power+volumeUP keys and it will make your device SHUTDOWN so that you can reconnect it in FLASHMODE and do the magic again
3. I don't have knowledge about connecting PS3 to XPERIAS but SONY cannot release Android N without checking compatibility of already sold SP3.... so what i can suggest is to find approperiate app on playstore to connect with Ps3 and/or google more on this subject
4. keep your TA IMAGE INTACT / saved / email yourself / back it up on cloud for future use.
5. for you i have created SIMILAR KERNAL for android 6.01 BUILD 34.0.A.1.264 , having superSU
6. using flashtool perform CLEAN flash and send the kernel to your device.
7. I am giving you original STOCK KERNEL SIN file "original_stock_kernel_F5122_34.0.A.1.264.sin" if the modified kernel gives you bootloops OR you have bricked F5122 atleast you dont have to reflash everything. just flash the kernel in fastbootmode and you device will wakeup
https://mega.nz/#F!7UZBiYDI!t7ieYMwHUNsAC5T9iHpyQQ
Click to expand...
Click to collapse
----
WOW!! many thanks sir!! will keep this kernel for sure!!
about TA IMAGE -- its DRM keys right i think i lost it already since i unlock BL w/o downgrading to MM and backing it up.:laugh:
----
i unlocked BL again via official way= camera works
flash twrp via minimal adb (to root and flash rom) first boot is as far as i remember it went well, tried to boot to twrp again and was prompted to install TWRP APPS (since i dont understand that) i install and reboot but this time my device wont boot it shows sony logo twice and then this warning : YOUR DEVICE IS CORRUPTED AND CANNOT BE TRUSTED. AND MAY NOT FUNCTION PROPERLY... PRESS POWER TO BOOT but upon pressing power device wont boot
--what seems to be the problem??
--tried to boot to twrp again and wipe dalvik/cache/ = same error
--tried to reflash recovery.img via minimal adb = same error
by the way im a MISS
jhendsantos said:
----
WOW!! many thanks sir!! will keep this kernel for sure!!
about TA IMAGE -- its DRM keys right i think i lost it already since i unlock BL w/o downgrading to MM and backing it up.:laugh:
----
i unlocked BL again via official way= camera works
flash twrp via minimal adb (to root and flash rom) first boot is as far as i remember it went well, tried to boot to twrp again and was prompted to install TWRP APPS (since i dont understand that) i install and reboot but this time my device wont boot it shows sony logo twice and then this warning : YOUR DEVICE IS CORRUPTED AND CANNOT BE TRUSTED. AND MAY NOT FUNCTION PROPERLY... PRESS POWER TO BOOT but upon pressing power device wont boot
--what seems to be the problem??
--tried to boot to twrp again and wipe dalvik/cache/ = same error
--tried to reflash recovery.img via minimal adb = same error
by the way im a MISS
Click to expand...
Click to collapse
1. you need recovery only when you want to flash superSU ,
2. since the kernel i have given in previous post and in the OT have SuperSU flashed, then you don''t need recovery.
please tell me when you flashed twrp,
1. why? for what purpose
2. did you flash the modified kernel also? (before flashing twrp)
3. if you did not flash modified kernel and have flashed twrp and via twrp you have flashed supersu... this means you put recovery on stock kernel and modified /SYSTEM
4. such action will always give you bootloops or "your device is corrupt... error" becuase DM VARITY is active in the stock kernel
simply flash the kernel i provided (having supersu) and wake you device up ROOTED.
YasuHamed said:
1. you need recovery only when you want to flash superSU ,
2. since the kernel i have given in previous post and in the OT have SuperSU flashed, then you don''t need recovery.
please tell me when you flashed twrp,
1. why? for what purpose
2. did you flash the modified kernel also? (before flashing twrp)
3. if you did not flash modified kernel and have flashed twrp and via twrp you have flashed supersu... this means you put recovery on stock kernel and modified /SYSTEM
4. such action will always give you bootloops or "your device is corrupt... error" becuase DM VARITY is active in the stock kernel
simply flash the kernel i provided (having supersu) and wake you device up ROOTED.
Click to expand...
Click to collapse
.
----
thanks sir problem solved i just flashed Poison v2.1 since twrp seems to be working.. tried my luck and its a success.
Im new user of Xperia X, can anyone please explain me what are drm keys for, and what will go wrong in case i dont back them up before rooting my device? Thank you in advance
sleeper994 said:
Im new user of Xperia X, can anyone please explain me what are drm keys for, and what will go wrong in case i dont back them up before rooting my device? Thank you in advance
Click to expand...
Click to collapse
DRM keys are unique to your device and stored on your TA partition. If you unlock your bootloader, they are wiped and they will not be restored if you relock. As a result, some camera functions will be impaired (e.g. photos taken in darkish conditions will be noisy) as well as X-reality (image enhancement). You can backup your own TA by making use of the dirty cow vulnerability in marshmallow. This​ allows you to restore your phone to its original state if you want to go back to stock. In addition you can use your TA to modify your kernel to make your unlocked phone think its drm keys are still intact.
Hi, Does it apply the F5121?
M1chiel said:
DRM keys are unique to your device and stored on your TA partition. If you unlock your bootloader, they are wiped and they will not be restored if you relock. As a result, some camera functions will be impaired (e.g. photos taken in darkish conditions will be noisy) as well as X-reality (image enhancement). You can backup your own TA by making use of the dirty cow vulnerability in marshmallow. This​ allows you to restore your phone to its original state if you want to go back to stock. In addition you can use your TA to modify your kernel to make your unlocked phone think its drm keys are still intact.
Click to expand...
Click to collapse
So, basically I can backup drm keys, root my phone, restore keys, and all functions would be stock-like while phone is still rooted?
Nope, restoring your TA will lock your bootloader and therefore unroot. But you can modify your kernel to make your phone think the DRM keys are still there. Check e.g. https://forum.xda-developers.com/crossdevice-dev/sony/poc-real-trim-instead-drm-fix-t3552893
Edit: It actually will not allow booting since the system or the boot partition were modified.
sangbb said:
Hi, Does it apply the F5121?
Click to expand...
Click to collapse
no it does not! send me your kernel.sin file
i will modify for you

[BEGINNERS GUIDE][Lollipop 5.1.1 .236] Root,Backup TA, UBL, Install Recovery

NOTE: DON'T HOLD ANYONE RESPONSIBLE IF SOMETHING GOES WRONG DURING THE PROCESS!
This thread contains full information you might need for rooting, backing up TA partition, unlocking bootloader, installing custom recovery, installing custom rom etc.
Some notes below, read them
-I try to keep this thread clean so people have easier time navigating. @derjango has ALOT of info and fixes on his THREAD which is related to this one, give it a read
-Read comments if you have problems. You may find answer and fix there by other users. I wrote this thread few months after I did these steps to my phone so I likely made mistakes (e.g. I forgot or got some steps wrong). If you do see those mistakes or have problems that nobody else has, feel free to ask in comments.
-We will use legit rooting methods and not those sketchy one click root apps
-These instructions may apply for other z line devices but you will have to find ftf files for your own device
-Written for 14.6.A.1.236 firmware but it will work on any version that you have currently.
0. PREPARATIONS
Backup all your data (photos, videos, contacts etc.)
Fully charge your battery
Enable USB debugging
Download the following:
Latest XperiaCompanion from HERE (for drivers mainly)
Sony flashtool from HERE
Follow THIS thread to install adb drivers
Navigate to your C:\Flashtool\drivers and run Flashtool-drivers
Select Flashmode drivers, Fastboot drivers and Xperia Z1 Compact drivers and click install
Now download THIS and THIS and put it in C:\Users\username\.flashTool\firmwares
(Windows 8/8.1/10 users can try - THIS fix if you can't install flashtool drivers)
1. FLASHING .108 FIRMWARE
1.1. Run Flashtool and click on lightning button, make sure flashmode is selected and hit Ok
1.2. In left window click on + symbol until you find 14.4.A.0.108
1.3. Under wipe check both options
1.4. Click Flash
1.5. Wait
1.6. Follow the on screen instructions
(You can release vol- when you see activity in flashtool window)
(If you get device disconnected just unplug phone and repeat all from step 1.1)
1.7. Don't touch anything until blue progress bar disappears. You should see Device disconnected> Device connected in flash mode.
(Don't worry if bar gets stuck near end just let it do it's thing)
1.8. Disconnect phone and reboot
1.9. Done!!!
(Do only basic setup, we won't be staying on this rom for long)
2. ROOTING .108 FIRMWARE
2.1. Make sure USB debugging is enabled
2.2. Download THIS Easy Root Tool by zxz0O0
2.3. Unzip and run install.bat
2.4. Download SuperSu apk form HERE put it in internal storage and install it.
2.5. Update binary normally.
2.6. Done!!! You should have root now.
(Download Root Checker to make sure you do)
3. TA PARTITION BACKUP
(NOTE: This is absolutely not necessary and is only needed if you plan to go back to stock firmware AND use BionZ, X-Reality and Music ID/Gracenote. TA partition and DRM keys stored inside get erased when you unlock bootloader.
3.1 Download THIS Backup TA v9.11 by DevShaft
3.2. Extract and run Backup-TA.bat. You should see backup>TA backup.zip in main folder where you extracted
3.3. Backup whole folder to cloud since you can't flash someone's else backup if you loose yours
3.4. Done!!!
(Read linked thread for useful information and FAQ)
4. UNLOCKING BOOTLOADER
4.1. Dial *#06# on your device. You will see your IMEI code
4.2. Go HERE and scroll to bottom
4.3. Under select device select Z1 Compact and enter your IMEI code
4.4. Check the 2 boxes and click on submit. You will get your unlock code. Copy it to clipboard
4.5. Run Flashtool again and click on "BLU" button
4.6. Connect phone in flashmode.
4.7. When prompted, enter your unlocking code that you copied form SONY website
4.8. Click unlock.
(Follow any instructions that flashtool gives you. I don't remember if there are any after this)
4.9. Done!!! Your bootloader is unlocked!
5. FLASHING RECOVERY
This is how I did it. You can try to skip step 5.2. If it doesn't work try again following all steps
5.1. Download THIS TWRP by 115ek and extract recovery image in new folder
5.2. Run Flashtool and flash 14.6.A.1.236 just like you did with .108 in first step (If you have problems here see THIS comment)
5.3. Now without rebooting or disconnecting your phone flash THIS open bootloader with flashtool just like you flashed system ftf-s.
5.4. Disconnect your phone and press volume up and connect your data cable. You should see blue led.
5.5. Now enter that folder where you extracted recovery image and press shift and right click in empty window area and select Open Command window here (Powershell for windows 10 users should work fine I think. Never used it)
5.6. Type "fastboot flash recovery recovery.img" and hit enter.
5.6 Done!!! You should have your recovery now.
To reboot to recovery first disconnect your phone and hold volume down and power button. Release power button when phone vibrates but keep holding volume down until you see twrp logo.
AND THAT IS IT
Now that you have your recovery and unlocked bootloader you can flash whatever roms, kernels, mods that you want for your phone.
Thanks to:
derjango for his thread mentioned above
munjeni For supplying open bootloader ftf and for giving me support with my problems
Androxyde For Flashtool
Snoop05 For ADB driver tool
zxz0O0 For Root tool And PRF Creator tool
DevShaft For Backup TA tool
115ek For TWRP
[NUT] For XZDualRecovery
kulvertti For SuperSu Dummy
Placeholder
I'm really struggling to get past unlocking the bootloader and starting to get quite confused.
Sony Companion is up to date.
Flashtool installed and used to flash .108 firmware.
Device is rooted using Easyroot tool.
Supersu installed and binary updated.
When I go to run BLU in Flashtool it prompts me to connect my device whilst holding the volume-down button (so flash mode). A couple of seconds after doing that it prompts me to re-connect the device whilst holding the volume-up button (so fastboot mode), but nothing happens. Blue LED is on the device, but Flashtool does absolutely nothing.
When I check Flashtool-driver it does fail to install the AndroidUsbDeviceClass driver, but when I run the 15-second ADB Installer it completes successfully - plus I was able to flash the firmware earlier so I don't see why I'd now have a driver issue.
Any ideas? It's starting to drive me crazy.
Here is what you can try.
Connect your phone to pc and in command prompt type adb reboot bootloader or hold vol+ and connect your phone
Your phone will be booted to fastboot now
Now type fastboot devices
You should see
XXXXXXXXXblabla fastboot
If you see this that means that your phone is recognized in fastboot by your pc.
If you see <waiting for device> or something else go to your device manager while still in fastboot
IIRC you should see under other devices something like saXXXX or something
You can tell me what exactly it says or you can fix it yourself by googling that number and adding fastboot driver and update it manually through device manager
If you decide to do it yourself make sure you link me website where you link me thread where you found driver and write down instructions so other people can see it
If you have any other problems feel free to reply
Also i just noticed that i didn't include that you lose ta partition when ubl and since you don't have ta backup make sure you make one. You never know when you might need it
Ok, thanks for that I definitely had a problem with driver installation so followed the steps in this video - https://www.youtube.com/watch?v=fcz4o6fpDGc
Now I am a bit stuck on flashing recovery.
5.2. Run Flashtool and flash 14.6.A.1.236 just like you did with .108 in first step --- do I also check both options under Wipe? will this not remove root?
5.3. Now without rebooting or disconnecting your phone flash THIS just like you did with system ftf-s. --- not sure what I'm meant to do here
Glad you fixed that problem
Flash that file through flashtool just like you flashed system ftf
Also yes that will remove root but we had that root only to backup ta and unlock bootloader. Since you unlocked bootloader and you install twrp you can easily root any rom
I get the "'fastboot' is not a recognised ..." error when trying to flash recovery - using Windows PowerShell as I'm on Win10.
EDIT: running CMD then moving to the location of where ADB was installed and contains Fastoot.exe worked.
Thanks for the guide!
scanz said:
I get the "'fastboot' is not a recognised ..." error when trying to flash recovery - using Windows PowerShell as I'm on Win10.
Click to expand...
Click to collapse
That means you don't have fastboot drivers installed. Here is temporary fix that got me out of frustrating situations when i can't install drivers systemwise
https://mega.nz/#F!aBoUXI5Q!RmxLAO638aHNJKLwo00Hew
If it downloads as zip first unzip it and run command prompt/powershell in that folder or in powershell type cd and drag that folder, that should do the same.
fastboot will now be recognised as command
this also includes adb drivers
Just wondering, I'm trying to get Magisk running after finishing the steps in your guide, but it does not pass any of the SafetyNet checks - even basicIntegrity check comes back false. Have you any ideas or experience with this? If so perhaps you could include it as part of the guide
If you get cts fasle that means you flashed rom that comes with supersu preinstalled. You could try installing rom without magisk and removing su then flashing mahgisk.
Not sure about integrity tho. I heard that xposed can cause problems with that.
colaigor said:
5.3. Now without rebooting or disconnecting your phone flash THIS with flashtool just like you flashed system ftf-s.
Click to expand...
Click to collapse
I get this:
23/015/2018 22:15:07 - INFO - Selected Bundle for Sony Xperia Z1 Compact(D5503). FW release : 1. Customization : openbootloader
23/015/2018 22:15:07 - INFO - Preparing files for flashing
23/015/2018 22:15:07 - INFO - Please connect your device into flashmode.
23/015/2018 22:15:08 - INFO - Opening device for R/W
23/015/2018 22:15:08 - INFO - Device ready for R/W.
23/015/2018 22:15:08 - INFO - Reading device information
23/015/2018 22:15:08 - INFO - Unable to read from phone after having opened it.
23/015/2018 22:15:08 - INFO - trying to continue anyway
23/015/2018 22:15:08 - INFO - Phone ready for flashmode operations.
23/015/2018 22:15:08 - INFO - Opening TA partition 2
23/015/2018 22:15:08 - INFO - Start Flashing
23/015/2018 22:15:08 - INFO - No loader in the bundle. Searching for one
23/015/2018 22:15:13 - INFO - Processing loader.sin
23/015/2018 22:15:13 - INFO - Checking header
23/015/2018 22:15:13 - ERROR - Processing of loader.sin finished with errors.
23/015/2018 22:15:13 - INFO - Ending flash session
23/015/2018 22:15:13 - ERROR - null
23/015/2018 22:15:13 - ERROR - Error flashing. Aborted
23/015/2018 22:15:14 - INFO - Device connected in flash mode
Click to expand...
Click to collapse
Are you sure you installed flashtool and other drivers? I can't think of any other cause for this problem right now
I flash 14.6.A.1.236 without problems using flashtool, so drivers should be ok; maybe why I'm using a Mac istead Windows?
_Pano_ said:
I flash 14.6.A.1.236 without problems using flashtool, so drivers should be ok; maybe why I'm using a Mac istead Windows?
Click to expand...
Click to collapse
Found this boot bridge for mac users. you may try it and see if it works. Can't really tell you anything about drivers on mac since i never touched one.
Also mega file may be corrupted. You can try downloading from this comment where i downloaded openbl from
Do you have windows machine to try flashing ?
yes, I try tomorrow using Windows 10, thanks
colaigor said:
Found this boot bridge for mac users. you may try it and see if it works. Can't really tell you anything about drivers on mac since i never touched one.
Also mega file may be corrupted. You can try downloading from this comment where i downloaded openbl from
Do you have windows machine to try flashing ?
Click to expand...
Click to collapse
ok, I flash .236 linked in your first post and then without rebooting or disconnecting the device I flash openbootloader and I see:
24/020/2018 09:20:14 - INFO - Closing TA partition
24/020/2018 09:20:14 - INFO - Ending flash session
24/020/2018 09:20:14 - INFO - Flashing finished.
24/020/2018 09:20:14 - INFO - Please unplug and start your phone
24/020/2018 09:20:14 - INFO - For flashtool, Unknown Sources and Debugging must be checked in phone settings
24/020/2018 09:20:16 - INFO - Device connected in flash mode
24/022/2018 09:22:15 - INFO - Selected Bundle for Sony Xperia Z1 Compact(D5503). FW release : 1. Customization : openbootloader
24/022/2018 09:22:15 - INFO - Preparing files for flashing
24/022/2018 09:22:15 - INFO - Please connect your device into flashmode.
24/022/2018 09:22:15 - INFO - Device connected in flash mode
24/022/2018 09:22:16 - INFO - Using Gordon gate drivers version 3.1.0.0
24/022/2018 09:22:16 - INFO - Opening device for R/W
24/022/2018 09:22:16 - INFO - Device connected in flash mode
Click to expand...
Click to collapse
that's all? 1 second flash?
_Pano_ said:
that's all? 1 second flash?
Click to expand...
Click to collapse
Sorry for late answer.
Does it work? I don't remember how much it took to flash tbh
colaigor said:
Sorry for late answer.
Does it work? I don't remember how much it took to flash tbh
Click to expand...
Click to collapse
yes, after various attempts: after flashing .236 I had to disconect and reconnect the phone in order to flash openbootloader; otherwise it doens't flash
thank you for these tutorials..I now have a rooted z1compact lollipop 5.11 locked bootloaders..My question is how can I debloat my phone..I want to uninstall other system apps that I don't need and I want to install xposed on my own..sorry I am newbie
xjhayar09 said:
thank you for these tutorials..I now have a rooted z1compact lollipop 5.11 locked bootloaders..My question is how can I debloat my phone..I want to uninstall other system apps that I don't need and I want to install xposed on my own..sorry I am newbie
Click to expand...
Click to collapse
You can download Titanium backup from playstore and delete all that you dont need and keep what you nees. Also you can find twrp flashable script that deletes all bloatware. Just sreach xperia lolipop debloat script on xda.

Categories

Resources