[Guide] Flashing Any Firmware for Any Xperia Phones - Sony Xperia XZ Guides, News, & Discussion

Hello everyone. This is my quick guide to flash the firmwares available to your phone WITHOUT UNLOCKING BOOTLOADER (this is important especially to change the region). Before doing this, you should get the drivers of your phone, i did it with connecting the phone with Xperia Companion and it installed automatically.
You need 2 apps to do these operations:
1- XperiFirm from Igor Eisberg
2- Flashtool from Androxyde
Downloading Firmware Using XperiFirm
-Select your device from left row.
-Select the firmware you want and download it.
-When the download finished, the folder will appear where you selected as download directory. We need to convert the firmware to FTF file.
Converting Firmware to FTF File
-We'll use Flashtool to doing this.
-Open Flashtool, select Tools --> Bundles --> Create
-Select source folder as your firmware folder, select your device by double-clicking the blank (because of here is XZ forum, select F833X but i think this will not interrupt anything). Write your region to Branding and your version to Version
-When you select source folder, in folder list which is on the left there are some .sin files should appear, if it does not then check if you select the source correctly. Then select all .sin files and move to right, then press CREATE.
*Please check notes if you see FSC script found.
Flashing the Firmware
-Press Flash Device (the flash icon on the left side), select Flashmode, select your firmware from Firmwares.
-In Wipe, Sin section (not exclude), select all boxes, DO NOT SELECT SIM-LOCK, then press Flash. Wait for Flashmode screen should appear when the operation finish.
-Turn off your phone. Press Power and Volume Keys and Connect the Phone via USB Cable AT THE SAME TIME to put the phone to Flashmode, the LED should blink Green and Flashtool will do its work. When it says "flash completed, restart your phone.", restart your phone. Your new firmware is ready to use
NOTES:
-In creating FTF session, sometimes "A FSC script is found: xxx. Do you want to add it?" appears. Press Yes if you don't have another flash script.
-If in flashing session, "No flash script found" error occurs, then you need a flash script which comes with the firmware. Usually this script should come with firmware which you download from XperiFirm, if it didn't, try another firmware.
-If you completed your flash but the phone does not reboot and says "The software update failed." or the flash session does not complete successfully, then flash the firmware again. This occurs, i think, because of the encryption of Android (This happened to me twice when i downgraded from Oreo to Nougat).
-If you have a FTF file, skip the first 2 steps.

what's version? version of what? does it means the fw version? (for ex. 41.3.A.2.184 about italy fw)
In the branding's field, is correct to write the entire name? (for ex. "Italy" with major and minor letters)
Thanks

Sean_Droid said:
what's version? version of what? does it means the fw version? (for ex. 41.3.A.2.184 about italy fw)
In the branding's field, is correct to write the entire name? (for ex. "Italy" with major and minor letters)
Thanks
Click to expand...
Click to collapse
Version is the firmware version which named by Sony (like 41.3.A.2.184) not the Android version, and the branding is the region where the firmware is made for (like DE for Germany or TR for Turkey). You do not have to fill the blanks correctly, because it's just for remind you what the version or region of firmware is if you have multiple FTF files.

Kuarinfou said:
Version is the firmware version which named by Sony (like 41.3.A.2.184) not the Android version, and the branding is the region where the firmware is made for (like DE for Germany or TR for Turkey). You do not have to fill the blanks correctly, because it's just for remind you what the version or region of firmware is if you have multiple FTF files.
Click to expand...
Click to collapse
Ok thanks for the info?

Is it ok even if bootloader is unlocked in developer optiond?

Kuarinfou said:
Hello everyone. This is my quick guide to flash the firmwares available to your phone WITHOUT UNLOCKING BOOTLOADER (this is important especially to change the region). Before doing this, you should get the drivers of your phone, i did it with connecting the phone with Xperia Companion and it installed automatically.
You need 2 apps to do these operations:
1- XperiFirm from Igor Eisberg
2- Flashtool from Androxyde
Downloading Firmware Using XperiFirm
-Select your device from left row.
-Select the firmware you want and download it.
-When the download finished, the folder will appear where you selected as download directory. We need to convert the firmware to FTF file.
Converting Firmware to FTF File
-We'll use Flashtool to doing this.
-Open Flashtool, select Tools --> Bundles --> Create
-Select source folder as your firmware folder, select your device by double-clicking the blank (because of here is XZ forum, select F833X but i think this will not interrupt anything). Write your region to Branding and your version to Version
-When you select source folder, in folder list which is on the left there are some .sin files should appear, if it does not then check if you select the source correctly. Then select all .sin files and move to right, then press CREATE.
*Please check notes if you see FSC script found.
Flashing the Firmware
-Press Flash Device (the flash icon on the left side), select Flashmode, select your firmware from Firmwares.
-In Wipe, Sin section (not exclude), select all boxes, DO NOT SELECT SIM-LOCK, then press Flash. Wait for Flashmode screen should appear when the operation finish.
-Turn off your phone. Press Power and Volume Keys and Connect the Phone via USB Cable AT THE SAME TIME to put the phone to Flashmode, the LED should blink Green and Flashtool will do its work. When it says "flash completed, restart your phone.", restart your phone. Your new firmware is ready to use
NOTES:
-In creating FTF session, sometimes "A FSC script is found: xxx. Do you want to add it?" appears. Press Yes if you don't have another flash script.
-If in flashing session, "No flash script found" error occurs, then you need a flash script which comes with the firmware. Usually this script should come with firmware which you download from XperiFirm, if it didn't, try another firmware.
-If you completed your flash but the phone does not reboot and says "The software update failed." or the flash session does not complete successfully, then flash the firmware again. This occurs, i think, because of the encryption of Android (This happened to me twice when i downgraded from Oreo to Nougat).
-If you have a FTF file, skip the first 2 steps.
Click to expand...
Click to collapse
Hey man, I followed your steps but it says that it can't find matching loader and then it skips the flashing process. do I have to download another rom? Im stuck in a bootloop. I'd appreciate if you help me with this. I have xperia XA1 Ultra G3226 device.
---------- Post added at 05:50 PM ---------- Previous post was at 05:49 PM ----------
Kuarinfou said:
Hello everyone. This is my quick guide to flash the firmwares available to your phone WITHOUT UNLOCKING BOOTLOADER (this is important especially to change the region). Before doing this, you should get the drivers of your phone, i did it with connecting the phone with Xperia Companion and it installed automatically.
You need 2 apps to do these operations:
1- XperiFirm from Igor Eisberg
2- Flashtool from Androxyde
Downloading Firmware Using XperiFirm
-Select your device from left row.
-Select the firmware you want and download it.
-When the download finished, the folder will appear where you selected as download directory. We need to convert the firmware to FTF file.
Converting Firmware to FTF File
-We'll use Flashtool to doing this.
-Open Flashtool, select Tools --> Bundles --> Create
-Select source folder as your firmware folder, select your device by double-clicking the blank (because of here is XZ forum, select F833X but i think this will not interrupt anything). Write your region to Branding and your version to Version
-When you select source folder, in folder list which is on the left there are some .sin files should appear, if it does not then check if you select the source correctly. Then select all .sin files and move to right, then press CREATE.
*Please check notes if you see FSC script found.
Flashing the Firmware
-Press Flash Device (the flash icon on the left side), select Flashmode, select your firmware from Firmwares.
-In Wipe, Sin section (not exclude), select all boxes, DO NOT SELECT SIM-LOCK, then press Flash. Wait for Flashmode screen should appear when the operation finish.
-Turn off your phone. Press Power and Volume Keys and Connect the Phone via USB Cable AT THE SAME TIME to put the phone to Flashmode, the LED should blink Green and Flashtool will do its work. When it says "flash completed, restart your phone.", restart your phone. Your new firmware is ready to use
NOTES:
-In creating FTF session, sometimes "A FSC script is found: xxx. Do you want to add it?" appears. Press Yes if you don't have another flash script.
-If in flashing session, "No flash script found" error occurs, then you need a flash script which comes with the firmware. Usually this script should come with firmware which you download from XperiFirm, if it didn't, try another firmware.
-If you completed your flash but the phone does not reboot and says "The software update failed." or the flash session does not complete successfully, then flash the firmware again. This occurs, i think, because of the encryption of Android (This happened to me twice when i downgraded from Oreo to Nougat).
-If you have a FTF file, skip the first 2 steps.
Click to expand...
Click to collapse
Hey man, I followed your steps but it says that it can't find matching loader and then it skips the flashing process. do I have to download another rom? Im stuck in a bootloop. I'd appreciate if you help me with this even if this has been posted for years :cyclops:. I have xperia XA1 Ultra G3226 device.

Hi, I have downloaded the firmware, it is there in FTF format (1.7Gb), I am now here
-Press Flash Device (the flash icon on the left side), select Flashmode, select your firmware from Firmwares.
I select the correct folder ... but nothing is shown????????

ERROR - The bundle does not match the connected device
Hello, when I try to flash my Xperia X F5121 with Flashtool, this happens:
Code:
16/037/2020 22:37:18 - INFO - Selected Bundle for Sony Xperia X(F5121). FW release : 34.4.A.2.118-R1E. Customization : 3-AT
16/037/2020 22:37:18 - INFO - Preparing files for flashing
16/037/2020 22:37:51 - INFO - Please connect your device into flashmode.
16/037/2020 22:37:52 - INFO - Opening device for R/W
16/037/2020 22:37:52 - INFO - Device ready for R/W.
16/037/2020 22:37:52 - INFO - Reading device information
16/037/2020 22:37:52 - INFO - Phone ready for flashmode operations.
16/037/2020 22:37:52 - INFO - Opening TA partition 2
16/037/2020 22:37:52 - INFO - Current device : Unknown: Sep 6 2018/05:53:44 - CB512A07NC - Unknown: Sep 6 2018/05:53:44 - Unknown: Sep 6 2018/05:53:44 - Unknown: Sep 6 2018/05:53:44
16/037/2020 22:37:52 - INFO - Closing TA partition
16/037/2020 22:37:52 - ERROR - The bundle does not match the connected device
16/037/2020 22:37:52 - INFO - Ending flash session
Any idea what's happening here?

Related

[4.4.2] Root, Deodex, Bootloader Unlock/ Relock, Roms Kernels list, Themes, Mods

=Brief Introduction=​This thread will consist of information about Rooting, Flashtool, Bootloader, Kernel and Roms.
Xda have been helping me a lot, so I have decided to start with the most basic way to help since I have no idea on software development. Hope everything is correct, if anything is wrong please leave a comment below.
Also, I BELIEVE the ADMIN would most probably lock this thread up again. I initially did not intend to repost another thread, however @eclyptos had me convinced to repost this for the sake of newbies, since it will be locked but not deleted.
If you support me, give me more thanks, and maybe post some posts below to help to convince the admin not to lock this.
Thanks.
=Part 1 Rooting the latest KitKat 4.4.2 Firmware=
For Locked Bootloaders
Required files: ​
14.1.G.1.534 FTF file
Link: http://forum.xda-developers.com/show....php?t=2469191
(You many choose anyone you wish, for it will be overwritten after that)
Move file to C:\Flashtool\firmwares or wherever you installed flashtool to.
Root Many Android by Bin4ry
Link: http://uploaded.net/file/d2w6dl7r
Latest Flashtool
Link: http://www.flashtool.net/download.php
(Please make sure you use v9.15 and above)
Note: Please make sure fastboot and flashtool drivers are installed.
Help on installation on windows 8: http://forum.xda-developers.com/show....php?t=2095087
Dual Recovery
Link: http://forum.xda-developers.com/show....php?t=2647487
( Choose the latest version, read instructions on the site.)
14.2.A.0.290 Flashable files (C690X_14.2.A.0.290.flashable.zip and C690X_14.2.A.0.290_Stripped.ftf )
Link: http://forum.xda-developers.com/show....php?t=2572988
Note: Please transfer zip file to external sd card
Move ftf file to C:\Flashtool\firmwares or wherever you installed flashtool to.
14.3.A.0.681 Flashable files (C690X_14.3.A.0.681.flashable.zip and C690X_14.3.A.0.681_Stripped.ftf)
Link: http://forum.xda-developers.com/show....php?t=2687443
Note: Please transfer zip file to external sd card
Move ftf file to C:\Flashtool\firmwares or wherever you installed flashtool to.
Lets Get Started:​
1. Make sure phone is charged to at least 50%
2. Enable USB Debugging on your phone and switch to MSC mode
How to: Setting >About Phone>Tap Build Number a few times > Go back > Enter developer options > Enable usb debugging
Setting >Xperia Connectivity> USB Connectivity> MSC mode
3. Back up all apps or app data you wish to keep (contacts, applications, messages and photos that are in your internal storage)
How to: Use Helium from Play Store to backup app data or any other apps, make sure backup is saved to cloud or external sd card
5. Flash 14.G.1.534 Firmware.
How to: Power off device.
Hold Volume Down button
Plug in USB cable to computer and phone
Open flashtool and click lightning.
CHoose flashmode.
Choose 14.1.G.1.534
And FLASH!
6. Root it
How to: Turn device on
Enable USB Debugging
Open Root with Bin4ry file and run 'Run Me' file
Connect phone to pc
Select 0 (xperia root by .......)
7. Install dual recovery
How to: Open dual recovery file and open 'Install' file
Choose option 1
Grant Superuser permissions when requested
Phone will reboot.
8. Install 14.2.A.0.290 Flashable zip
HOw to: power off Phone
POwer on phone
When phone vibrates press volume down
It will then enter recovery mode
Wipe ( enter Wipe > Advanced WIpe > Tick Everything but external sd card and Otg)
After wipe, press back and slide factory reset
Install zip ( press install and find file)
It will take a few minutes
Do not press reboot system, press back key until first page and then click reboot key.
Select power off.
9. INstall Stripped FTF 14.2.A.0.290
How to: Hold Volume DOwn button
Plug in usb cable to computer and phone
Open flashtool and click lightning.
CHoose flashmode.
Choose 14.2.A.0.290 Generic NCB
And FLASH!
10. Power on
11. Install 14.3.A.0.681 Flashable zip
HOw to: power off Phone
POwer on phone
When phone vibrates press volume down
It will then enter recovery mode
Wipe ( enter Wipe > Advanced WIpe > Tick Everything but external sd card and Otg)
After wipe, press back and slide factory reset
Install zip ( press install and find file)
It will take a few minutes
Do not press reboot system, press back key until first page and then click reboot key.
Select power off.
12. . INstall Stripped FTF 14.3.A.0.681
How to: Hold Volume DOwn button
Plug in usb cable to computer and phone
Open flashtool and click lightning.
CHoose flashmode.
Choose 14.2.A.0.290 Generic NCB
13. Reboot and you are done!
Unlocked Boot loader​
Required Files:​
14.3.A.0.681
Link: http://forum.xda-developers.com/show....php?t=2469191
Move file to C:\Flashtool\firmwares or wherever you installed flashtool to.
DoomKernel v10 or up ( or any other 4.4 kernel)/XZDR Kernel
Link: http://forum.xda-developers.com/show....php?t=2448613
Unzip file.
SuperSu flashable zip
Link:http://forum.xda-developers.com/show....php?t=1538053
Transfer to external SD card
Latest Flashtool
Link: http://www.flashtool.net/download.php
(Please make sure you use v9.15 and above)
Note: Please make sure fastboot and flashtool drivers are installed.
Help on installation on windows 8: http://forum.xda-developers.com/show....php?t=2095087
Lets Get started:​
1. Make sure phone is charged to at least 50%
2. Enable USB Debugging on your phone and switch to MSC mode
How to: Setting >About Phone>Tap Build Number a few times > Go back > Enter developer options > Enable usb debugging
Setting >Xperia Connectivity> USB Connectivity> MSC mode
3. Back up all apps or app data you wish to keep (contacts, applications, messages and photos that are in your internal storage)
How to: Use Helium from Play Store to backup app data or any other apps, make sure backup is saved to cloud or external sd card
4. Flash 14.3.A.0.681 Firmware.
How to: Power off device.
Hold Volume Down button
Plug in USB cable to computer and phone
Open flashtool and click lightning.
Choose 14.3.A.0.681
And FLASH!
5. Power on. Test if everything is working well, camera and others.
6. Fastboot DooMKernel
How to: Power off device.
Hold Volume Up button
Plug in USB cable to computer and phone
Open flashtool and click lightning.
Choose Fastboot
Choose Boot.img that was in the unzipped file
And FLASH!
7. Reboot and let phone start
8. Install root.
How to: Power off
POwer on phone
When phone vibrates press volume down
It will then enter recovery mode.
Install SuperSu file that was downloaded.
9. Reboot and you are READY!!
=Part 2: Deodexing=
Firstly, what is deodex?​
From @philo64:
Deodexed ROMs (or APKs) have all their application packages put back together in one place, allowing for easy modification such as theming.
The advantage of .odex file is the faster load time of the app and were supposed to quickly build the dalvik cache, removing them would mean longer initial boot times.
And finally rooting need not necessarily mean your device is deodexed, rather that almost all stock ROMs are odexed to some extent, and usually most custom ROMs are deodexed for easy theming.
For a casual user, the main implication is in theming possibilities. Themes for android come in APKs too, and if you want to modify any of those, you should always choose a dedoexed custom ROM.
In summary to install custom themes, install certain mods, you would need to have a deodexed phone. To check if your phone is deodexed, you can check at system/app/Phone.apk ===>where you will find this together with it ===> system/app/Phone.odex
Locked & Unlocked Bootloader
Required files:​
FLASHABLE deodex zip
Link: http://forum.xda-developers.com/showthread.php?t=2690160
Note: Download the file which matches your phones model number. Please transfer this file to somewhere in your phone.
Requirements​
Recovery is required for flashing.
Lets get started:​
Flash the file
How to: Power off
POwer on phone
When phone vibrates press volume down
It will then enter recovery mode.
Install Deodex file that was downloaded.
Done! As simple as that!
=Part 3 :Unlocking Bootloader=​
What does unlocking the bootloader do?
Unlocking the boot loader allows you to put custom ROMs on your device. Also, it allows you to install custom kernels that could potentially improve the performance, battery life and others. However, unlocking the bootloader can potentially brick your device if you do stupid things like cross flashing and others. So be warned, I am not really clear about the warranty status, do it at your own risks. Most probably nothing will happen.
:laugh:
Before unlocking bootloader, please backup TA just for precautions.
To backup TA, please use computer application: backup TA and run it.
Details and download can be found here: http://forum.xda-developers.com/showthread.php?t=2292598
Requirements and Warnings for unlocking bootloader
​
What you need to do:​
Backup all data. All data on the phone will be deleted, whole phone will be formatted. I do not know about the external sd card as I have never tried it, you could take it out as a precaution.
Backup Ta with backup Ta
What you would need:​
IMEI Number
How to: Enter *#06# in dialer and copy the imei number out
An email
Fastboot package
Link: http://doomlord.xperia-files.com/download.php?dlid=YWRiX2Zhc3Rib290
Xperia drivers
Link: http://forum.xda-developers.com/showthread.php?t=2635830
PC and usb cable
Lets get STARTED!​
1. Go to http://unlockbootloader.sonymobile.com/unlocking-boot-loader
2. Read Everything.
3. Go through all process, there will be many prompts, just click Accept/ Proceed
4. Finally you will reach a 'Create unlock boot loader key request' Page. Enter your Name Imei Number and Email.
5.Go to your email and you would most probably recieve an email about bootloader unlocking. If you dont, patiently wait.
6. You will recieve and unlock key, KEEP THIS KEY SAFELY. ( what i do is screenshot the email and save the pic in google drive.:good: )
7.Extract fastboot_with_Android_USB_file.rar and open fastboot folder
8. Enter fastboot mode
How to:
Power down ur phone and keeping the Volume Up button pressed connect the USB cable to PC this will make the phone enter FASTBOOT mode.
9.Hold SHIFT and right click on the background of the folder
10.Select 'Open command window here'
11.Connect your phone in fastboot mode (turn phone off, hold Volume UP button and plug in USB Cable) [make sure drivers are installed as explained above)
12.In the cmd windows type in fastboot.exe -i 0x0fce getvar version
13.If a value is returned (it will return 0.5), it means the phone is correctly connected
14.Type in fastboot.exe -i 0x0fce oem unlock 0xKEY and replace KEY with the key which u received earlier.
You're device should now be bootloader unlocked
=Part 4:Roms List (Updated as of 5th of April)=​
1.RomAur v6.3 [ LB-UB ] - KK4.4.2- c690x - 14.3.A.0.681 - FAST-STABLE - AROMA - ONLINE [Last updated: 04/04 ]
Link: http://forum.xda-developers.com/showthread.php?t=2481248
2.iHackers v3.0 [Last Update: 02/04]
Link: http://forum.xda-developers.com/showthread.php?t=2539008
3.[LB&UB] C690X ★ monxDIFIED ★ Honam1Z™ (KK) FULL-ROOT on LB [v05-01][07/04] AROMA [Last updated: 07/04]
Link: http://forum.xda-developers.com/showthread.php?t=2463675
4. [UB/LB] [][][]14.3.A.0.681KitSlimV2.1[][][] [OD/DOD] [FullRoot] [Last updated: 31/03]
Link: http://forum.xda-developers.com/showthread.php?t=2693142
5. [LB&UB]CriskeloROM v4.0[AROMA][Stable][FULL ROOT] [Last updated: 28/03]
Link: http://forum.xda-developers.com/showthread.php?t=2560068
6. Pure Stock v1.1 [Xperia Z1] [Last updated: 12-21]
Link: http://forum.xda-developers.com/showthread.php?t=2579270
7. [DragonSphere Team][Unlock Bootloader]Cyanofire[AOSP][KitKat] [Last updated :24/03]
Link: http://forum.xda-developers.com/sho...m.xda-developers.com/showthread.php?t=2699803
2. DooMKernel (v11)[20140401]
Link: http://forum.xda-developers.com/showthread.php?t=2448613
3. [KERNEL][CM-based] Pimped Kernel (F2FS|SoundControl|DT2Wake|CPU & GPU OC|Color Control|Voltage|FastCharge|Intelliplug...)
Link: http://forum.xda-developers.com/showthread.php?t=2660679
Hmm, the mods will not take kindly to this
You have already had a similar thread to this locked
http://forum.xda-developers.com/showthread.php?t=2704741
I suspect they may do the same here.
EDIT
Also, although none of your instructions are dangerous you do include several unnecessary steps.
LOL....I am guilty.....
HotKillerZzz said:
I BELIEVE the ADMIN would most probably lock this thread up again.
Click to expand...
Click to collapse
As with the prior thread,
This thread is a duplicate of information already found in these forums.
We expect all members to follow the XDA rules.
Rule #1 SEARCH BEFORE POSTING
If you are able to find the information and learn how to use it, then others will also.
Having multiple thread for the same thing only makes it harder for user to search for the correct information.
If there are errors in the current information then post in that thread how to correct it.
The current sticky info thread has been updated by the OP thru February 2014.
Any further posts like this will not be taken so lightly.
Please re-read the XDA RULES
thread closed

[Guide]How to backup DRM, unlock and root(for noobs)

Hey friends! I was looking at this thread: http://forum.xda-developers.com/xperia-z5/general/guide-rooting-unlocking-bootloader-t3354307 and I decided to create my own thread about the same topic, however this thread is much more simplified and is for those people who are new to rooting Xperia smartphones.
So without further ado here are the steps
Part One: downloading prerequisites
in order to flash .ftf firmware files to downgrade your phone to lollipop for TA backup you will need.
1. Java JDK :
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
2. XperiFirm(not neccesary if you plan to stay on LP)
http://forum.xda-developers.com/cro...xperifirm-xperia-firmware-downloader-t2834142
3. Flashtool
http://www.flashtool.net/downloads.php
4. Android SDK
http://developer.android.com/sdk/index.html#downloads
5. iovyroot(not necessary if you do not want to backup DRM)
http://forum.xda-developers.com/crossdevice-dev/sony/iovyroot-temp-root-tool-t3349597
other prerequisites:
Patience
Mountain Dew or Starbucks
A small bit of knowledge on command line interfaces
Part Two: Downloading firmware
1. Open up XperiFirm
2. Select your device from the list
3. Select your model number(can be checked in Settings > about phone > Model Number
4. Pick your country and carrier(does'nt really matter, best firmware to use is UK customised and Singapore customised)
5. Click the latest release in 'available releases'
6. A dialogue should pop up, tick 'automatic unpack'
7. Wait for download to complete
Part 2.5: Creating FTF
Open up Flashtool
1. Click on tools > bundles > Create
2. Select the firmware folder
3. Double click on the Device section and select your device
4. Type in the firmware build number(at the end of the folder name) as for branding type in the country and carrier from which you downloaded the firmware from.
5. Go to file explorer and delete 'fwinfo.xml' from the firmware folder
6. IMPORTANT DO NOT TRANSFER THE FILES WITH A .TA FILE EXTENSION IT WILL BRICK YOUR DEVICE with that disclaimer out of the way go back to flashtool, transfer all the files using the arrows (except those with a .ta file extension)
7. Click create, you should be able to sit back and relax while it does its thing
Part Three: Downgrading firmware
Download the firmware here: http://www.xperiablog.net/forum/resources/xperia-z5_e6653_32-0-a-6-152_central-europe-5_generic.477/
1. Place the file in c: Users/*account name*/.flashtool/firmwares
Open up Flashtool
2. Press the lightning bolt icon
3. Choose Flashmode and click ok
4. choose the firmware you downloaded(Do not choose the one you created)
5. Tick "user data" in the box at the top right hand corner
6. Press flash and wait
Part Four: DRM backup and unlock
1.Extract iovyroot
2. make sure USB debugging and unknown sources are enabled
3. Open up backupdrm.bat and wait
4. make sure there are no errors before proceeding(this usually takes a couple of tries)
5. IMPORTANT keep a safe online backup of your DRM keys.
6. Open up flashtool
7. click on BLU
8. Go to http://developer.sonymobile.com/unlockbootloader/unlock-yourboot-loader/
9. Select your device and follow the instructions
9. after getting the unlock key, paste it inside the BLU dialogue in flashtool
10. wait, then profit!
11. now flash the .FTF that you created
12. boot your device into fastboot(plug in power cable and press vol down when your phone is switched off)
13. Download androplus kernel v23 and above from here: https://kernel.andro.plus/
14. Extract boot.img and put it in the android SDK inside of 'platform-tools'
15. Press shift+right click inside of the same folder
be sure to install xperia z5 fastboot drivers)
16. click 'open command window here'
17. run fastboot devices and make sure it detects your device
18. run this command here : fastboot flash boot boot.img
19. Reboot and DONE
Just a quick note, from my experience with downgrading in the past, you MUST wipe your user data, the phone won't boot else. This happened on multiple Sony phones with multiple different firmware versions.
gamer649 said:
Just a quick note, from my experience with downgrading in the past, you MUST wipe your user data, the phone won't boot else. This happened on multiple Sony phones with multiple different firmware versions.
Click to expand...
Click to collapse
I just corrected it, thanks for the quick note. Btw my z5 booted with minor issues when downgrading without wiping userdata
_LLJY said:
I just corrected it, thanks for the quick note. Btw my z5 booted with minor issues when downgrading without wiping userdata
Click to expand...
Click to collapse
Every other Sony phone I've owned (M, Z1 compact, Z2) refused to boot after a downgrade. The main thing to remember when downgrading is to take a backup before doing so to prevent data loss, I've experienced it myself firsthand so I know how stressful it can be.
In the TA backup part you should add a step to make sure the script actually worked and didn't stop with an error, before proceeding on to unlocking BL. I had to reboot my phone & run the script several times before successfully pulling it off.
Hello!
I'm new to the Sony family as you can see in my signature and I wouldn't call myself n00b, but the whole procedure with the extra partitions is so confusing! Thank you for trying to break it down!
the usual 3 step way (1 unlock bootloader, 2 flash recovery, 3 flash SuperSU) is still present but there are some other steps before them.
As i can understand, all the hassle is just for the backup of the TA partition.
I think that we must start with your step 3, just to avoid confusion such as the step 3.4. Please post a direct link to the firmware you suggest, I can't download it because it requires me to register there too.
Also, you should break the part 4 at the step 11. If I'm not mistaken, the order should be 1, 3, 4 (1-10), 2 , 2.5, 4 (11-19).
In the guide, restoring DRM keys also should be added. ?
Nice guide mate.
Sent from my E6683 using Tapatalk
DeathStroke said:
In the guide, restoring DRM keys also should be added. ?
Nice guide mate.
Sent from my E6683 using Tapatalk
Click to expand...
Click to collapse
Latest andro kernel have drm keys intergrated bro
working for e6633 dual ?
I had a doubt! On Part Three, can I use the given E6653 ftf for my E6683? Or I should download the .152 ftf for my exact device model i.e. E6683?
Help me bro @_LLJY
good guide
easy follow
had overheat problem i need help...!
any one please ?
updated from support ( device no pc)
after update full overheat on camera use
Can you guys please help me?
My friend got a 5803, I backed up his DRM keys and unlocked the bootloader but can't root it.
If someone could be so kind to help us it'll be great, I did it to my 6653 but for some reason I can't root this one.
Sent from my E6653 using XDA-Developers mobile app
i am trying to downgrade my z5 from 6.0.1 to a 5.1.1 ftf...but when i begin to flash it stops ERROR - processing of loader.sin finished with errors....please someone can help me?
feesta said:
i am trying to downgrade my z5 from 6.0.1 to a 5.1.1 ftf...but when i begin to flash it stops ERROR - processing of loader.sin finished with errors....please someone can help me?
Click to expand...
Click to collapse
Unpack firmware Ftf file with flashtool and see is there file called FWINFO.Delete this file and pack Ftf using Ftool and you will not have peoblems with flash.
Sent from my Sony Xperia Z5
Here is a stupid question, what now that i have don all steps? i still dont have cmw or root?
feesta said:
i am trying to downgrade my z5 from 6.0.1 to a 5.1.1 ftf...but when i begin to flash it stops ERROR - processing of loader.sin finished with errors....please someone can help me?
Click to expand...
Click to collapse
I did two things to try to fix this:
1: Use the previous version of flashtool (0.9.18.6) instead of the current one
2: Use the Software Repair function of Sony's Xperia Companion application
I don't know which of these helped (it might have been neither, actually) but in the end I was able to flash Lollipop 5.1.1 onto my Z5 and use iovyroot to back up the TA partition.
Hi, this is kind of off-topic but this is the best thread for this question I could find.
I was in a hurry to get rid of the bloated, horrible stock rom, and I did not back up my DRM keys. I did patch my current kernel with the DRM fix from another thread here at XDA. Now my question is:
What kind of functionality did I lose from this, except not being able to restore to stock and relocking bootloader?
klemen241 said:
Here is a stupid question, what now that i have don all steps? i still dont have cmw or root?
Click to expand...
Click to collapse
Hello, look at this video:
h**ps:.youtube.com/watch?v=dTlosea6SJE
But at first, i installed at my Z5 the latest Kernal v36 and then i installed the TWRP 2.8.7.0, but i think you can install the newest TWRP too.
At last you install the SuperSu with TWRP, than you have full root!
Creating FTF not possible
hej,
i have a problem creating the FTF as described in Part 2.5:
-i downloaded the latest version via xperifirm (E6653_Customized DE_1298-3675_32.2.A.0.253_R3C)
-i deleted the fwinfo.xml & all .TA files from the folder
-flashtool is hanging here now:
-05/016/2016 09:16:25 - INFO - Streaming from file : C:\Users\hek\Desktop\Sony Xperia Z5\E6653_Customized DE_1298-3675_32.2.A.0.253_R3C\boot\boot_delivery.xml
05/016/2016 09:16:25 - INFO - Adding rpm_S1_Boot_MSM8994_LA1_2_2_40_AID_1_KITAKAMI-TEST-HWID009400E1-SWID0A-OEM0-AID1-DEBUG00_S1-BOOT-TEST-B316-0001-MMC.sin to the bundle
05/016/2016 09:16:25 - INFO - Adding Sumire_S1BootConfig_MiscTA.ta to the bundle
-tried it with singapore customized and german customized (&not deleting the .TA-files & manually unselecting all TA files in flashtool)
what could be the issue here or is there another way to get the latest version on the phone after unlocking it?
or is it safe just to install the latest version as described here without deleting the .TA-files? (http://forum.xda-developers.com/xperia-z5/general/guide-sony-xperia-z5-unlock-root-tweaks-t3298224)
thanks for any input!
--
Part 2.5: Creating FTF
Open up Flashtool
1. Click on tools > bundles > Create
2. Select the firmware folder
3. Double click on the Device section and select your device
4. Type in the firmware build number(at the end of the folder name) as for branding type in the country and carrier from which you downloaded the firmware from.
5. Go to file explorer and delete 'fwinfo.xml' from the firmware folder
6. IMPORTANT DO NOT TRANSFER THE FILES WITH A .TA FILE EXTENSION IT WILL BRICK YOUR DEVICE with that disclaimer out of the way go back to flashtool, transfer all the files using the arrows (except those with a .ta file extension)
7. Click create, you should be able to sit back and relax while it does its thing
I used iovyroot and it created taxxxxxx.img that it has 2mb. I think so I read so time ago that taxxxxx.img had 500kb... Is it my ta wrong?? Or it's normal??
Thanks!
Enviado desde mi Z1 mediante Tapatalk

A Complete Noob-Friendly Guide To Personalize Your Sony Xperia Z5 Premium Dual E6883

If you are looking to flash stock firmware, custom kernel, custom recovery, root via supersu, and remove bloatware for E6883 model only, you came to the right thread, otherwise, go away. Make sure you have at least 50% battery before proceeding. I'm assuming you are running Microsoft Windows 10 Home x64 and have installed all required Google USB Drivers, Android SDK (for fastboot), and an unlocked bootloader. If you have not done this yet, install them first so that your device will be recognized. Don't forget to enable "USB debugging" and "OEM unlocking" from the "Developer options" menu on your device. Come on, you can't be that noob. If you don't even know what that means, you don't belong here and chances are, you will end up with a bricked phone.
/* YOUR WARRANTY IS NOW VOID */
Download all necessary files, preferably the latest version.
Xperia Firmware Downloader
Sony Mobile Flasher by Androxyde
Custom Kernel - Rename the file as boot.img and move it to "C:\Android\SDK\platform-tools\boot.img"
Custom Recovery - Rename the file as recovery.img and move it to "C:\Android\SDK\platform-tools\recovery.img"
SuperSU Stable - Rename the file as supersu.zip and move it to your external SD card.
[STEP 1] Using the Xperia Firmware Downloader.
1. Run "XperiFirm.exe" as Administrator.
2. Select "Xperia Z5 Premium Satsiki" > "E6883 dual" from the list.
3. Select your preferred firmware and download.
4. DONE.
[STEP 2] Using the Sony Mobile Flasher by Androxyde.
// How to prepare a flashable .ftf file?
1. Run "Sony Mobile Flasher by Androxyde.exe" as Administrator.
2. Select "Tools" > "Bundles" > "Create" from the menu.
3. "Select source folder" where your firmware folder is located.
4. Double-click "Device" editbox and select "E68XX Sony Xperia Z5 Premium" > "E6883".
5. Fill in the "Branding" editbox.
6. Fill in the "Version" editbox.
7. Select everything from the "folder list" and move them to "Firmware Content".
8. Click on the "Create" button.
9. DONE.
// How to start flashing a .ftf file?
1. Run "Sony Mobile Flasher by Androxyde.exe" as Administrator.
2. Click on the "Thunder toolbar button" and choose "Flashmode".
3. Select your "Firmware".
4. Click on the checkboxes to wipe everything and don't exclude anything except SIMLOCK (you can't touch this).
5. Click on the "Flash" button.
6. DONE.
[STEP 3] Flashing the custom kernel.
1. Run "Command Prompt" as Administrator.
2. Go to "cd C:\Android\SDK\platform-tools"
3. Turn off your device.
4. Plug in your USB cable while holding on to the "volume-up rocker" until you see a blue LED indicator on the top left of your device. You are now ready to use the fastboot function.
5. Type "fastboot flash boot boot.img"
6. DONE.
[STEP 4] Flashing the custom recovery. - Actually, there is no need for this step. The custom kernel provided above already included TWRP 3, so this is just to show you how to flash a custom recovery. Thanks, @YasuHamed
1. Run "Command Prompt" as Administrator.
2. Go to "cd C:\Android\SDK\platform-tools"
3. Turn off your device.
4. Plug in your USB cable while holding on to the "volume-up rocker" until you see a blue LED indicator on the top left of your device. You are now ready to use the fastboot function.
5. Type "fastboot flash recovery recovery.img"
6. DONE.
[STEP 5] Flashing the SuperSU, hence rooting your device.
1. Turn off your device.
2. Turn on your device.
3. As soon as your device is powering on, press on the "volume-up rocker" continuously until you load TWRP.
4. Flash SuperSU from your SD card.
5. Reboot system.
6. DONE.
Congrats! :laugh:
Now that you have root access, the next part is to remove bloatware but I will post this later on because I need to do some more research just to confirm it won't have FCs in the future. Removing bloatware is rather self-explanatory and depends on your personal preferences. Like me, I would delete all of Google and Sony apps to bare minimum but some people prefer leaving Google Maps or Sony Smart Connect on their phone. I'll see you on the next episode, to be continued...
Reserved for battery management, tips and tricks.
cglegion said:
If you are looking to flash stock firmware, custom kernel, custom recovery, root via supersu, and remove bloatware for E6883 model only, you came to the right thread, otherwise, go away. Make sure you have at least 50% battery before proceeding. I'm assuming you are running Microsoft Windows 10 Home x64 and have installed all required Google USB Drivers, Android SDK (for fastboot), and an unlocked bootloader. If you have not done this yet, install them first so that your device will be recognized. Don't forget to enable "USB debugging" and "OEM unlocking" from the "Developer options" menu on your device. Come on, you can't be that noob. If you don't even know what that means, you don't belong here and chances are, you will end up with a bricked phone.
/* YOUR WARRANTY IS NOW VOID */
Download all necessary files, preferably the latest version.
Xperia Firmware Downloader
Sony Mobile Flasher by Androxyde
Custom Kernel - Rename the file as boot.img and move it to "C:\Android\SDK\platform-tools\boot.img"
Custom Recovery - Rename the file as recovery.img and move it to "C:\Android\SDK\platform-tools\recovery.img"
SuperSU Stable - Rename the file as supersu.zip and move it to your external SD card.
[STEP 1] Using the Xperia Firmware Downloader.
1. Run "XperiFirm.exe" as Administrator.
2. Select "Xperia Z5 Premium Satsiki" > "E6883 dual" from the list.
3. Select your preferred firmware and download.
4. DONE.
[STEP 2] Using the Sony Mobile Flasher by Androxyde.
// How to prepare a flashable .ftf file?
1. Run "Sony Mobile Flasher by Androxyde.exe" as Administrator.
2. Select "Tools" > "Bundles" > "Create" from the menu.
3. "Select source folder" where your firmware folder is located.
4. Double-click "Device" editbox and select "E68XX Sony Xperia Z5 Premium" > "E6883".
5. Fill in the "Branding" editbox.
6. Fill in the "Version" editbox.
7. Select everything from the "folder list" and move them to "Firmware Content".
8. Click on the "Create" button.
9. DONE.
// How to start flashing a .ftf file?
1. Run "Sony Mobile Flasher by Androxyde.exe" as Administrator.
2. Click on the "Thunder toolbar button" and choose "Flashmode".
3. Select your "Firmware".
4. Click on the checkboxes to wipe everything and don't exclude anything except SIMLOCK (you can't touch this).
5. Click on the "Flash" button.
6. DONE.
[STEP 3] Flashing the custom kernel.
1. Run "Command Prompt" as Administrator.
2. Go to "cd C:\Android\SDK\platform-tools"
3. Turn off your device.
4. Plug in your USB cable while holding on to the "volume-up rocker" until you see a blue LED indicator on the top left of your device. You are now ready to use the fastboot function.
5. Type "fastboot flash boot boot.img"
6. DONE.
[STEP 4] Flashing the custom recovery.
1. Run "Command Prompt" as Administrator.
2. Go to "cd C:\Android\SDK\platform-tools"
3. Turn off your device.
4. Plug in your USB cable while holding on to the "volume-up rocker" until you see a blue LED indicator on the top left of your device. You are now ready to use the fastboot function.
5. Type "fastboot flash recovery recovery.img"
6. DONE.
[STEP 5] Flashing the SuperSU, hence rooting your device.
1. Turn off your device.
2. Turn on your device.
3. As soon as your device is powering on, press on the "volume-up rocker" continuously until you load TWRP.
4. Flash SuperSU from your SD card.
5. Reboot system.
6. DONE.
Congrats! :laugh:
Click to expand...
Click to collapse
the customer kernals by @khab.bros already have recovery installed,
Correct @YasuHamed, and it's newer than the one I provided. I just want new people to know the idea of flashing custom recovery on this device. Thanks for the heads up. It's a shame there is so less development going on for Z5 Premium Dual compared to other flagship devices such as Samsung... I hope we see more custom roms port in the near future.
@cglegion
Maybe minimal adb and fastboot tool would be better than installing the entire android SDK package... It's a small utility around 2 mb only , since you're doing a noob friendly guide it might be more appropriate...
cglegion said:
Correct @YasuHamed, and it's newer than the one I provided. I just want new people to know the idea of flashing custom recovery on this device. Thanks for the heads up. It's a shame there is so less development going on for Z5 Premium Dual compared to other flagship devices such as Samsung... I hope we see more custom roms port in the near future.
Click to expand...
Click to collapse
the way sony is behind in specs, I think in upcoming days the development side of xperia will suffer the most as the sales goes down!
in 2016 we have mobiles reaching specs such as 2.2ghz with 6gb ram and the NEWEST xperia X series has 1.5gb ~ 2gb RAM ONLY~
-DM- said:
@cglegion
Maybe minimal adb and fastboot tool would be better than installing the entire android SDK package... It's a small utility around 2 mb only , since you're doing a noob friendly guide it might be more appropriate...
Click to expand...
Click to collapse
You're right @-DM-, the fact that I recommend using Android SDK was the ability to install packages automatically for example the Google USB Driver though the SDK manager and not solely for fastboot functionality. Some newbies might not even have appropriate drivers installed on their machine so their device won't be recognized hence a simple problem will lead to another problem. But of course, using minimal adb and fastboot is another noob-friendly way (which is also less in size) compared to the 100mb + Android SDK. Thanks, for the heads up too and making this thread a more noob-friendly one! :laugh:
Btw, @YasuHamed do you somehow know how to create a build.prop and updater-script for a stock firmware that I've just tweaked (delete bloatware apk and add some mods and third party apks)? I need to make it flashable via twrp but lack example for this device. Thanks!
cglegion said:
Btw, @YasuHamed do you somehow know how to create a build.prop and updater-script for a stock firmware that I've just tweaked (delete bloatware apk and add some mods and third party apks)? I need to make it flashable via twrp but lack example for this device. Thanks!
Click to expand...
Click to collapse
as far as I have studied, there is no DIRECT way doing that in MM
however for sake of argument, lets say you are using your z5 at 5.x.x
the zips can be flashed if you are REPACKING your STOCK KERNAL. (the post of Khab.bros) is actually points out to
http://forum.xda-developers.com/xperia-z5/development/root-automatic-repack-stock-kernel-dm-t3301605
here if you have original FTF file of your z5, EXTRACT kernel.sin to kernal.els (using flashtool) then by running it through ROOTKERNELv5.0, you can add custom recovery and other flashable zips (after disabling dm-variety / SONYRIC)
but to remove BLOATWARE From your stockROM,
you must EXTRACT SYSTEM.sin, from FTF file, Dump it fully to location, RESAVE it using Ext2Explorer, now u will have APP folder, see which apk you want to remove, when you are done, repack everything to SYSTEM.sin and now MODIFIED STOCKROM has been created.
i remember doing id for my xperia C6603 back in 2013
http://forum.xda-developers.com/showthread.php?t=1931585
the tutorial was also very helpful https://www.youtube.com/watch?v=DpYxMRlBrR8
btw, I did all that just to learn, later i never did all this because some how i love the xperia stockroms and after rooting you can remove many bloatware and change system app to user app and remove them at your ease...
Command Prompt
Hi i successfully flashed the tft file and now im up to using the command prompt so i shift+right clicked and opened a command window in the platform tools folder where the boot.img and recovery.img are and entered the command "flashboot flash boot boot.img" and it comes up saying "error: cannot load boot.img"
I dont know what to do here. please help.
shaxta said:
Hi i successfully flashed the tft file and now im up to using the command prompt so i shift+right clicked and opened a command window in the platform tools folder where the boot.img and recovery.img are and entered the command "flashboot flash boot boot.img" and it comes up saying "error: cannot load boot.img"
I dont know what to do here. please help.
Click to expand...
Click to collapse
Make sure you have unlocked your bootloader before following this guide and just to inform you again this guide is for E6883.
Yeah I figured it out, the only problem was the fastboot drives weren't installed correctly for some reason windows 10 didn't allow it, also it was having trouble finding the boot.img so I just dragged the fastboot.exe and the boot.img into the command instead and it worked.
All in all great guide, thanks.
YasuHamed said:
as far as I have studied, there is no DIRECT way doing that in MM
however for sake of argument, lets say you are using your z5 at 5.x.x
the zips can be flashed if you are REPACKING your STOCK KERNAL. (the post of Khab.bros) is actually points out to
http://forum.xda-developers.com/xperia-z5/development/root-automatic-repack-stock-kernel-dm-t3301605
here if you have original FTF file of your z5, EXTRACT kernel.sin to kernal.els (using flashtool) then by running it through ROOTKERNELv5.0, you can add custom recovery and other flashable zips (after disabling dm-variety / SONYRIC)
but to remove BLOATWARE From your stockROM,
you must EXTRACT SYSTEM.sin, from FTF file, Dump it fully to location, RESAVE it using Ext2Explorer, now u will have APP folder, see which apk you want to remove, when you are done, repack everything to SYSTEM.sin and now MODIFIED STOCKROM has been created.
i remember doing id for my xperia C6603 back in 2013
http://forum.xda-developers.com/showthread.php?t=1931585
the tutorial was also very helpful https://www.youtube.com/watch?v=DpYxMRlBrR8
btw, I did all that just to learn, later i never did all this because some how i love the xperia stockroms and after rooting you can remove many bloatware and change system app to user app and remove them at your ease...
Click to expand...
Click to collapse
Hey, bro @YasuHamed managed to make an Aroma installer for myself (learned this from scratch) but now I'm having problem making the updater-script file because I'm not sure how to mount and extract the system files also the command to patch (a repacked) boot.img kernel. From my research, dev block for E6883 are as follow:
1. /cache /data / sdcard = mmcblk0p42
2. /external_sd = mmcblk1p1
3. /system = mmcblk0p43
Can you help me? I'm very close to releasing a custom ROM based on stock firmware without bloatware. Where do I go about... I've been searching all over Google and XDA and has not found answers for E6883 specific problems.
shaxta said:
Hi i successfully flashed the tft file and now im up to using the command prompt so i shift+right clicked and opened a command window in the platform tools folder where the boot.img and recovery.img are and entered the command "flashboot flash boot boot.img" and it comes up saying "error: cannot load boot.img"
I dont know what to do here. please help.
Click to expand...
Click to collapse
use flahstool
---------- Post added at 11:15 AM ---------- Previous post was at 11:13 AM ----------
use flashtool
---------- Post added at 11:34 AM ---------- Previous post was at 11:15 AM ----------
cglegion said:
Hey, bro @YasuHamed managed to make an Aroma installer for myself (learned this from scratch) but now I'm having problem making the updater-script file because I'm not sure how to mount and extract the system files also the command to patch (a repacked) boot.img kernel. From my research, dev block for E6883 are as follow:
1. /cache /data / sdcard = mmcblk0p42
2. /external_sd = mmcblk1p1
3. /system = mmcblk0p43
Can you help me? I'm very close to releasing a custom ROM based on stock firmware without bloatware. Where do I go about... I've been searching all over Google and XDA and has not found answers for E6883 specific problems.
Click to expand...
Click to collapse
although i never liked aroma and i won't usually recommend custom roms specially for xperia... but since you have came this far,
lets say under APK foler you removed many bloatware and also updated
you must repack you SYSTEM folder (only) back to ROOM.zip (originally extracted from ftf file using ext2explorer)
then you need to apply mods,
https://www.youtube.com/watch?v=FdhUK_Ds4Fo (part 2, deleting bloatware) / finding MODS and repacking
http://forum.xda-developers.com/showthread.php?t=1363460 (tutorial about updater script modification by notepad++ )
however just remember what ever studies i did, for android 6.0.1 the prf creator wont work,
but you can try (PRF creator)
http://forum.xda-developers.com/showthread.php?t=1363460
convert your boot.img to kernel.sin and recreate your PRF creator (as mentioned above)
OR keep the custom rom ftf and BOOT.img SAPERATE as many custom roms does that
1. cynogenmod 12+
3. Miui 5 onwards
have boot+recovery file saperate and Rom saperate to flash.
the only reason i could understand is because they flash their system via recovery. if your aroma stock has xd recovery you can keep the flashable zip to install as system ORRRR keep it as FTF file to be flash and then kernal to be flashed saperate
Thanks for this guide I just wish to have root on locked BL...

[Guide] How to root Z5C - the new, less painful way (using dirtycow exploit)

Why yet another guide? Why should you follow this guide?
This is more of a future reference for myself, but might be beneficial to some other people, hence why I decided to post it.
Thanks to the "dirty cow" exploit (CVE-2016-5195), we now have a more simple way of backing up the TA partition compared to existing guides, which all relied on another exploit that involved downgrading the firmware, thus making the whole process a bit more complicated.
Unfortunately, as you can probably tell, it's still not a painless ordeal, just "less" painful. But hey, at least you have a choice.
To keep this step-by-step walkthrough guide simple and straightforward, I am focusing on just the steps and skipping the explanations.
Let's get started!
Prerequisites
Important: Your phone must be vulnerable to the "dirty cow" exploit, any firmware version with security patch level 2016-12-01 or earlier should work, such as 32.2.A.5.11. Basically, any MM or LP firmware.
Currently there is no way of backing up the TA partition on Android 7.0 Nougat firmware, you will need to downgrade to MM or earlier firmware first.
Remember to backup all your data before you downgrade, since a downgrade is akin to a factory reset. Downgrade instructions:
Follow Step 0, skip Step 1 and 2
In Step 3, download a MM or LP version firmware. For the sake of simplicity, I suggest you download the one labeled Storefront.
Follow Step 4 and 5
Done, your phone is now downgraded, skip the remaining steps. Continue with the guide as usual from Step 1
Note: If the DRM keys are irrelevant to you (TA partition already backed up/restored/lost) and would just like to root, then you can root using this guide on all firmware versions including Android 7.0 Nougat without downgrading. In this case, you can skip Step 1 and Step 7. Depending on your situation, you can also skip other parts of this guide, such as Step 2 if your bootloader is already unlocked, or in Step 5 don't wipe anything (leave all boxes unchecked) to retain your apps and data for a firmware upgrade.
Computer setup with correct drivers and adb/fastboot connection ability.
Enable USB debugging on the phone:
Settings > About phone > Tap multiple times on Build number until Developer options is enabled
Settings > Developer options > USB debugging > Toggle ON
XperiFirm for downloading official Sony firmware directly from Sony's servers
Flashtool for flashing firmware
Battery preferably more than 80% remaining, loss of power while flashing can brick your phone
Step 0 - Backup your phone (optional)
Move all your data to your SD card using the native tool: Settings > Storage > Transfer data to SD card
Use Sony's Backup & restore app to make a backup: Settings > Backup & reset > Xperia Backup & restore > More > Manual backup > Select SD card > Select content to backup
Personally, I choose everything except apps, they can be re-downloaded from the Play Store at any time, plus they take a long time to backup and restore not to mention eats up free space
Step 1 - Backup the TA partition
Download this wonderful TA Backup tool, unzip to desired location
With the phone powered on, connect the USB cable to the computer, then plug the micro USB end to the phone
Open command prompt (Start > Run > cmd), navigate to the directory where you unzipped the TA Backup tool
Run the following command:
Code:
backupTA
The tool will run and if successful, you should see at the bottom the words "TA Successfully pulled to TA_E5823.img".
TA_E5823.img is the TA partition image file, actual filename will be longer and differ for everyone so to keep it simple we'll just refer to it as TA_E5823.img in this guide.
Please check that the file is 2,097,152 bytes. If not or file is missing, then the backup has failed.
If it fails, just run the tool again a few times, or try rebooting your phone then rerun the tool. If you just can't get it to work, seek help from the tool thread.
Step 2 - Unlock the boot loader
Visit Sony's website and follow the instructions carefully
Important: Pay attention to the warnings. No, really, unlocking the boot loader will wipe your DRM keys (hence the need to back them up in Step 1) and trigger a factory reset, erasing everything on your phone.
After you've successfully unlocked the boot loader, unplug your phone and leave it powered off
Step 3 - Download stock firmware
Run XperiFirm, locate the correct Xperia Z5 Compact version of your phone (E5803/E5823) and download the firmware of your choice.
General recommendation is to download the "Customized" version that's available for your country.
Step 4 - Create a FTF file from the firmware
Open Flashtool
Tools > Bundle > Create
Select source file > Locate the folder where you saved the firmware from XperiFirm in step 3 > You should see your device name appear automatically in Device and the folder list below populated
Branding > The same as Operator in XperiFirm, e.g. Customized AU
Version > The version you downloaded, e.g. 32.2.A.5.11
Hint: Both Branding and Version information is in the folder name
In folder list, select the first item, hold SHIFT and select the last item so that all items are highlighted, then click the "- >" button > The folder list should now be empty, and the Firmware content field populated
Click Create, if successful you will see "Bundle creation finished"
Note: The FTF file is saved to %userprofile%\.flashTool\firmwares by default
Step 5 - Flash the FTF file
Click the lightning symbol in Flashtool > Flashmode
Source folder should be pre-selected to the default location mentioned above and "Sony Xperia Z5 Compact" listed in Firmwares
Expand all the arrows and select the version number
Under Wipe/Sin check all options (APPS_LOG, DIAG, SSD, USERDATA), leave all other options unchecked
Click Flash, wait for an instruction prompt to pop up
Plug the USB cable to your computer if it isn't already plugged
Turn off your phone if it isn't powered off, hold the VOLUME DOWN button while connecting the micro USB end to your phone. Keep the VOL DOWN button held until the prompt disappears, which indicates that Flashtool has detected it and is correctly in flashmode.
Flashtool will begin flashing the firmware automatically. It can take a long time, 10~15 minutes is normal, wait until completed
Unplug your phone and do not power it on yet
Step 6 - Patch the kernel
Download this awesome rootkernel tool, unzip to desired location.
Extract the kernel image file kernel.sin from the FTF file using any file compression program such as 7zip, WinZip, WinRAR, etc.
Open Flashtool > Tools > Sin Editor > Sin file > Locate the kernel you just extracted > Click Extract data. You should now have a file named kernel.elf in the same folder
Copy kernel.elf to the rootkernel folder
Download the latest stable version of the SuperSU ZIP file and copy the entire ZIP file to the rootkernel folder. Do NOT unzip it!
Rename the SuperSU ZIP file name so that it starts with SuperSU (case sensitive) instead of UPDATE-SuperSU, e.g. SuperSU-v2.79-20161211114519.zip
Note: if you're patching Nougat firmware, you may want to use phh's superuser instead of SuperSU due to potential battery drain. See rootkernel thread for more info. If you use phh's superuser, you will need to install the apk from the Play store after Step 8.
(optional) Download the latest Xposed framework ZIP file and copy it to the rootkernel folder. Do NOT unzip it!
Note: this only works with rootkernel v5.0 or later, if you're using an earlier version of the rootkernel tool, skip this and skip Step 9
At time of this edit (2017/2/22), Xposed does not support Android 7.0 (Nougat), so if you're trying to patch a Nougat kernel, do not include xposed. You can check the official Xposed thread for latest announcements to see if it's supported
Open command prompt and navigate to the rootkernel directory
Enter the following command:
Code:
rootkernel kernel.elf boot.img
You will be prompted to make a series of choices, including whether you want to install SuperSU and Xposed. Type Y for all of them.
If you didn't see the prompt for SuperSU (required) or Xposed (optional), check the filename of the ZIP files. Remember they're case sensitive.
You should now have a boot.img file in the rootkernel folder, that is your rooted kernel
Step 7 - Flash the DRM keys (one-time procedure)
tobias.waldvogel (rootkernel developer) said:
Flashing this file with flashtool will write your device key to an alternative unit, from where the drmfix library will pick it up.
This is a one-time task. It will survive a complete reset of the phone or Android system upgrade.
Click to expand...
Click to collapse
Copy the TA backup file TA_E5823.img from Step 1 to the rootkernel folder, then enter the following command in command prompt:
Code:
flash_dk TA_E5823.img DK.ftf
This will create a DK.ftf file in the rootkernel folder
Open Flashtool > Click the lightning symbol > Flashmode > Source folder > Locate the rootkernel folder
"Sony Xperia Z5 Compact" should appear under Firmwares, expand the arrows until you see DeviceKey and 1.0. Select 1.0, click Flash and wait for an instruction prompt to pop up
Hold the VOLUME DOWN button while connecting the micro USB end to your phone. Keep the VOL DOWN button held until the prompt disappears, which indicates that Flashtool has detected it and is correctly in flashmode.
Wait until operation is completed, then unplug the cable from your phone. Do not power on yet
Step 8 - Flash the kernel
Hold the VOLUME UP button and plug in the micro USB cable. Wait until the LED indicator turns blue, then release the VOL UP button.
Enter the following command in command prompt to flash the rooted kernel:
Code:
fastboot flash boot boot.img
After completion, congratulations, you've successfully rooted your phone!
Now you can turn on your phone, the first boot will take a very long time to initialize, don't worry.
If you see the boot animation for more than 30 minutes, then it's time to worry. First try again from Step 6, and if you still can't complete boot, go up a step starting from Step 5. If that still fails, start over from Step 3.
Step 9 - Finish installation of Xposed (optional)
In Step 6, if you chose to include the Xposed ZIP file, which means you want to install Xposed, then there's one more step to complete the installation.
Download the unofficial Material Design Xposed Installer.
Currently, this is the only Xposed Installer that works with the systemless Xposed integration method used by the rootkernel tool. Using the official Xposed Installer will not work.
Go to Settings > Security > Unknown sources > Toggle ON
Copy the Xposed Installer apk to your phone and install it.
Done!
Personal list of xposed modules to install for self reference. This is in no way a recommendation list, your preferences will vary.
Amplify
Android Phone Vibrator
App Locale
BootManager
Disable Low Battery Notifications
DynamicAlarmIcon 2
HideBatteryLowAlert
Keep Trash (broken at the moment)
Lockscreen Album Art Remover
MinMinGuard
NeoPowerMenu
NoHeadsetNotification
Ringer and Notification Volume Unlink
RootCloak
Use USB for Marshmallow V 1.2
XperiaFMwoHS
Xposed Torch: Physical keys
Youtube AdAway
Bonus - How to unroot/fully restore DRM/return to 100% factory state
Thank you for taking the time to write this guide!
best guide for root, thanks!
Fantastic guide, Thank you very much for that!
I had trouble getting the latest version of flashtool (09231) to work (mac and PC). It froze when I was trying to create the new bundle.
After downloading the older version (09186) it worked without problems.
However, currently I am stuck at step 6, running cmd 'rootkernel kernel.elf boot.img':
I get the message:
Code:
Rootkernel V5.11
- Unpacking kernel
error: Android boot magic not found
Unknown boot image format
Aborting
UPDATE:
I found the reason for the img file creation failure.
I was not patient enough in copying the kernel.elf file over. While the flashtool says file with size X created it was still compiling and only a minute later or so finished writing the file. In other words, I copied over the 'unfinished' kernel.elf and that's what caused the issue.
Trying to boot now
Thanks again for this nice guide!
Cheers,
Malcolm
Hey Malcolm, did you manage to complete the process successfully?
good news
thanks for your help. very good tutorial, realy made easy to understand
successfully rooted my nougat z5c with this,
you the best thanks
brokich said:
Hey Malcolm, did you manage to complete the process successfully?
Click to expand...
Click to collapse
Hi Brokich,
Unfortunately not (yet).
After finishing step 7 my device is stuck at the bootloader
I've tried now several times re-flashing (steps 5-7) but unfortunately no luck yet...Will try to repeat the whole procedure over the next days again.
I am getting problem with flashing kernel :
FAILED (remote: Command not allowed) my bootloader status was unknown at first, then I got unlock code at sony website, then it said my bootloader is unlocked, followed your tutorial and now I not able to flash kernel..
Hello guys
On step 5 i get this error
5/031/2017 13:31:03 - INFO - Device connected in flash mode
05/031/2017 13:31:28 - INFO - Selected Bundle for Sony Xperia Z5 Compact(E5823). FW release : 1298-5497_32.2.A.5.11_R13C. Customization : Customized UK
05/031/2017 13:31:28 - INFO - Preparing files for flashing
05/033/2017 13:33:12 - INFO - Please connect your device into flashmode.
05/033/2017 13:33:13 - INFO - Opening device for R/W
05/033/2017 13:33:14 - INFO - Start Flashing
05/033/2017 13:33:14 - INFO - Processing loader.sin
05/033/2017 13:33:14 - INFO - Checking header
05/033/2017 13:33:14 - ERROR - Processing of loader.sin finished with errors.
05/033/2017 13:33:14 - INFO - Ending flash session
05/033/2017 13:33:14 - ERROR - null
05/033/2017 13:33:14 - ERROR - Error flashing. Aborted
05/033/2017 13:33:14 - INFO - Device connected in flash mode
Any idea why ?
notabene said:
I am getting problem with flashing kernel :
FAILED (remote: Command not allowed) my bootloader status was unknown at first, then I got unlock code at sony website, then it said my bootloader is unlocked, followed your tutorial and now I not able to flash kernel..
Click to expand...
Click to collapse
Did you backup your TA-partition before the bootloader status was unknown?
zegovernator said:
Did you backup your TA-partition before the bootloader status was unknown?
Click to expand...
Click to collapse
Yes, why?
---------- Post added at 01:13 PM ---------- Previous post was at 12:49 PM ----------
zegovernator said:
Did you backup your TA-partition before the bootloader status was unknown?
Click to expand...
Click to collapse
I was able to flash FTF file. But not the kernel.
notabene said:
yes.
Click to expand...
Click to collapse
Okay. It sounds like you wiped your TA partition. On which firmware did you backup your TA? Lollipop using Iovy.root or Marshmallow using this guide? I experienced the same problem once. I recovered my TA partition via Iovy.root. (because back then the only possibility was to downgrade to LP and then backup/restore TA).
Check if the service menue states:
[Bootloader unlock allowed:no] and [Remote Lock State: Locked]
If so, restore TA.
zegovernator said:
Okay. It sounds like you wiped your TA partition. On which firmware did you backup your TA? Lollipop using Iovy.root or Marshmallow using this guide? I experienced the same problem once. I recovered my TA partition via Iovy.root. (because back then the only possibility was to downgrade to LP and then backup/restore TA).
Check if the service menue states:
[Bootloader unlock allowed:no] and [Remote Lock State: Locked]
If so, restore TA.
Click to expand...
Click to collapse
This guide, latest firmware 32.2.A.5.11.
Currently my phone stucked at after boot in TM logo.
Trying to repair via PC Companion
Phone booted. Will check if bootloader is really unlocked.
Bootloader unlock allowed : yes
Remote Lock state : UnLockd
Checked DRM all OK
notabene said:
This guide, latest firmware 32.2.A.5.11.
Currently my phone stucked at after boot in TM logo.
Trying to repair via PC Companion
Phone booted. Will check if bootloader is really unlocked.
Click to expand...
Click to collapse
Flash a .tft from the MM version your backed up your TA image from. When flashing, ensure to tick everything under wipe except TA Misc.
Well finally was able to do all the steps, but phone wont boot. Stucked in Sony logo, led is yellow and then power off..
Yeah, same here.
Tried now multiple times but it always gets stuck at the xperia screen with orange/yellow LED
One thing that I noticed was "ERROR - root : this bundle is not valid" when I start to create the bundle. Straight after locating the custom firmware that I dowloaded with Xperifirm the message comes up in the log. Thought that this is not an issue though, or is it?
Cheers,
Malcolm
Need to use phone tomorrow, how can i revert to stock for a while since I cannot do it throught Xperia companion?
---------- Post added at 03:37 PM ---------- Previous post was at 03:26 PM ----------
Malcolm143 said:
Yeah, same here.
Tried now multiple times but it always gets stuck at the xperia screen with orange/yellow LED
One thing that I noticed was "ERROR - root : this bundle is not valid" when I start to create the bundle. Straight after locating the custom firmware that I dowloaded with Xperifirm the message comes up in the log. Thought that this is not an issue though, or is it?
Cheers,
Malcolm
Click to expand...
Click to collapse
Did you use customized firmware? I did not, i used Tmobile CZ
Now with bootloader unlocked even PC Companion doesnt work..
So the problem is after flashing custom kernel with rootkernel+DRM fix.
So after hours of trying from step 5 with different settings for kernel, I ended up with stock rom flashed via flashtool..
tried to flash back DRM keys from Dirty cow TA Backup, using this command flash_dk TA_E5823.img DK.ftf but when rebooted in service menu drm keys are still gone..
EDIT:
Seems like there is more users with same issue with Z5C and latest rootkernel
https://forum.xda-developers.com/xp...matic-repack-stock-kernel-dm-t3301605/page200
Hmm, I never ran into the stuck at boot problem, and I just successfully flashed a new phone on the same day I posted the guide. That said, I was using v5.0 of the rootkernel tool, not the latest v5.11. The rootkernel developer mentioned that there's battery drain problems with v5.11, so I decided to use the older v5.0 that helped me root two Z5C's several times in the past. Try patching the kernel again using v5.0 and see if that fixes it.
Note that v5.0 only supports up to firmware version 32.A.0.253 out of the box, you will need to make the following modification to support up to 32.2.A.5.11:
Download and unzip rootkernel v5.11 and v5.0.
Open folder \rootkernel_v5.11_Windows_Linux\Android\twrp_common_kmodules
Copy and overwrite all 7 sub-folders (folder names look like 3.10.49-perf-g83fc9bc etc.) to \rootkernel_v5.0_Windows_Linux\Android\twrp_common_kmodules
Then patch the kernel using v5.0 tool.
mhaha said:
Hmm, I never ran into the stuck at boot problem, and I just successfully flashed a new phone on the same day I posted the guide. That said, I was using v5.0 of the rootkernel tool, not the latest v5.11. The rootkernel developer mentioned that there's battery drain problems with v5.11, so I decided to use the older v5.0 that helped me root two Z5C's several times in the past. Try patching the kernel again using v5.0 and see if that fixes it.
Note that v5.0 only supports up to firmware version 32.A.0.253 out of the box, you will need to make the following modification to support up to 32.2.A.5.11:
Download and unzip rootkernel v5.11 and v5.0.
Open folder \rootkernel_v5.11_Windows_Linux\Android\twrp_common_kmodules
Copy and overwrite all 7 sub-folders (folder names look like 3.10.49-perf-g83fc9bc etc.) to \rootkernel_v5.0_Windows_Linux\Android\twrp_common_kmodules
Then patch the kernel using v5.0 tool.
Click to expand...
Click to collapse
Thanks, will try in the evening.
Just to know, if I'm upgrading from previous firmware version, do I have to do all steps or I can start from step 4 (flashing ftf file)?

Xperia x F5121 ( 34.0.A.1.264) Android 6.0.1 (Prototype)

Greetings.. I bought Xperia x F5121 ( 34.0.A.1.264) Android 6.0.1 (Prototype) online & found its prototype.Possible for me to root & flash custom rom.If theres a way,could anyone guide me .Thks in advance.I appreciate it.
My apologies admin.If i post wrong section pls delete it.
if the BOOTUNLOCK is allowed on your PROTOTYPE DEVICE then
short answer is : YES
dial *#*#7378423#*#* goto SERVICE INFO >> CONFIGURATIONS
HERE you will see alot of info, search for BOOTLOADER UNLOCK ALLOWED text and see what shows ,,, if NO then sorry! this device is locked by SONY and only they can unlock it
if BOOTLOADER UNLOCK ALLOWED has YES then MAGIC CAN BE DONE
IF YOU ARE NEW TO SONY WORLD then you must save XPERIA X DRM KEYS
since you are already on ANDROID 6 (YAY)
just enable USB DEBUGGING from DEVELOPER OPTIONS
and
download the UNIVERSAL (DIRTYCOW-BASED) TABACKUP SCRIPT ( DOWNLOAD FROM HERE ( REFERECE MASTER POST BY RAYMAN
uzip the script on desktop and RUN the .BAT file, it will ask permission on your mobile screen, ALLOW it and after few seconds, the SCRIPT will EXTRACT TA-xxx-xxxx-xxxx-date+timeStamp.IMG file (2mb in size) IN THE SAME FOLDER
you can run .bat mulitiple times! each time it will extact the same TA.img file with different file name , i ran it thrice
now you have your DRM KEYS FILE (SOME USERS SAYS ITS NOT NECESSARY BUT TRUST ME! IT IS! ) KEEP THIS TA.img file SAVED on cloud!
------------------------
UNLOCKING BOOTLOADER
SONY official handout unlocking keys for FREE at
https://developer.sony.com/develop/open-devices/get-started/unlock-bootloader/
follow the steps! select your device model from list, provide them your email, they will send you one time link , to generate BOOT UNLOCK KEY AGAINS YOUR "IMEI" NUMBER ( dial *#06# on your F5121 to obtain IMEI number) (its even given on configuration page, where you checked the bootulock status )
- flashtool (www.flashtool.net) can ALSO unlock xperia Bootloader! (install flashtool and then install drivers also ( c:\flashtool\drivers)
- clicking BLU while device is CONNECTED IN FASTBOOT MODE ( it will prompt you) and giving SONY's generated KEY will UNLOCK your F5121's bootloader! device will JERK, ANDROID BOT WILL APPEAR and ALL PARTITIONS (accpt system) will be FORMATED and you will loose all your data, accounts, details , DRM KEYS ... (make sure you take backup of your photos/videos/music)
--------------------------------------------------
NOW IF YOU WANA STAY ON 34.0.A1.264 and DONT wana UPGRADE to ANY OTHER BUILD came after this then
you need to do this
0. put magisk16.0.zip in sdcard (if you don't have sd card then UTG drive, flashdrive, etc)
1. unlock bootloader
2. flash TWRP (via fasboot
3. FLASH modified kernel ( the MASTER TOOL of SONY WORLD www.flashtool.net) (installing Xperia COMPANION + Google Minimal ADB & Fastboot.zip is M - U - S -T )
4. BOOT in to twrp, flash MAGISK16.0 from sdcard
and reboot device
the device will boot ROOTED 34.0.A.1.264
NOW IF YOU WANT TO UPGRADE TO NOUGAT FROM 34.0.A1.264 and ROOT IT THEN
-the recommended NOUGAT Stockrom version is 34.3.A.0.252 (releasedin dec2017)
1. download the .252 ftf file from xda post
https://forum.xda-developers.com/xperia-x/how-to/sonyx-f5121-downgrade-8-0-0-to-7-1-1-to-t3754986
2. flash it via flashtool / you need to see solid tutorial for that! please do research , flashing xperia is TRICKY
3. flash twrp
4. flash modified kernel
5 boot into twrp and flash MAGISK and REBOOT.
NOW IF YOU WANT TO UPGRADE TO OREO FROM 34.0.A1.264 and ROOT IT THEN
-for OREO the RECOMMENDED STOCKROM version is 34.4.A.2.97 (released in JULY2018)
1. you must download the latest stockrom
2. flash it
3 flash modified Kernel
4. boot in to twrp and
(a) flash the DRMFIX.zip
(b) Magisk16.0.zip
5. reboot
ALL KERNELS BY YEARS/BUILD WITH DRMFIX FILES ETC ARE GIVEN IN MY POST
https://forum.xda-developers.com/xperia-x/how-to/root-xperia-x-f5122-android-n-34-2-2-47-t3594502
PLEASE READ THOROUGHLY !
I have tested all these kernels my self since I have F5122 however if anything goes wrong please note that XDA or any member is NOT responsible
try it on your own risk
Thks again for the fast reply.I'm choosing upgrading to Oreo. I download Germany o2 DE ( 34.4.A.2.97 /R2E ) & i'm using the latest flashtool v0.9.25.0 .I'm stuck at fsc script shown ( Those data are not in the FSC script and will be skipped. RESET-NON-SECURE-ADB. Do u want to continue? )i click no & close it. I download the fsc script 34.4fsc from your site & overwrite paste it on C:\Users\USERNAME\.flashTool\devices\F51XX .Once done,i reopen the flashtool & flash.Same problems occurs.i even restart my pc..No success..
jingaro said:
Thks again for the fast reply.I'm choosing upgrading to Oreo. I download Germany o2 DE ( 34.4.A.2.97 /R2E ) & i'm using the latest flashtool v0.9.25.0 .I'm stuck at fsc script shown ( Those data are not in the FSC script and will be skipped. RESET-NON-SECURE-ADB. Do u want to continue? )i click no & close it. I download the fsc script 34.4fsc from your site & overwrite paste it on C:\Users\USERNAME\.flashTool\devices\F51XX .Once done,i reopen the flashtool & flash.Same problems occurs.i even restart my pc..No success..
Click to expand...
Click to collapse
click yes and proceed
what about drmkeys extraction part?
have you done that

Categories

Resources