Bootloop at startup logo due to XZrecovery getting trashed - Xperia Z2 Q&A, Help & Troubleshooting

Long story - Tried to apply the latest Marshmallow rooted package for D6503 on my 6502 that was already rooted with XZ dual recovery. It installed successfully, was rooted too...but I forgot to add the patch that would fix the radio not working. So I try to reboot to recovery...and that doesn't work anymore. I tried installing TWRP recovery from the manager app, but it wouldn't reboot. Then I ran the XZ recovery installer externally, and now my phone is ****ed. Stuck at an infinite boot loop.
At this stage the only thing I can access is flashtool and fastboot, and since my bootloader is locked I can't flash a recovery that way (nor do I want to permanently lose DRM keys/camera quality as I've heard happens with unlocking the bootloader). I have a memory card and I used the option to disable loading the recovery specified on the XZ thread by adding a 'donotload' file on the sd card.
Still no use - I get a Sony logo for about 5 seconds, the screen goes dark and back to the same. At this point probably my recovery is screwed up or non existent and a bad situation has gone worse with the bootloop.
What can I try now?

@KaiserSnorezay
XZDR is still not compatible with MM, that's why you got a bootloop...
Also you can't install the "regular" TWRP with twrp manager on a LB as there is no recovery partition... it won't work and probably will mess your phone in the process.
The solution is to flash any KK / LP .ftf with flashtool (i would wipe everything when flashing as i have backups of my data/apps) , root it with kingroot or any other method you like, install xzdr for KK/LP and finally reboot to recovery and install the latest MM prerooted rom from niaboc which already has root&recovery (not xzdr btw) included. Since you have D6502 don't forget to install the baseband patch after the rom again
http://forum.xda-developers.com/xperia-z2/development/rom-official-6-0-1-23-5-0-486-beta-t3336770
Just did it exactly this way yesterday on my friends d6503 (minus the d6502 patch obviously) had 0 troubles MM, root and recovery working perfectly.

Thanks, will try this today. Is wiping data required or can i get by by just flashing the older one?

ptmaniac said:
The solution is to flash any KK / LP .ftf with flashtool (i would wipe everything when flashing as i have backups of my data/apps) , root it with kingroot or any other method you like, install xzdr for KK/LP and finally reboot to recovery and install the latest MM prerooted rom from niaboc which already has root&recovery (not xzdr btw) included. Since you have D6502 don't forget to install the baseband patch after the rom again
Click to expand...
Click to collapse
I managed to flash and root 17.1.2.A.0.314, but once again I'm unable to get any damn recovery to work. Installed XZDR, after that TWRP, in both cases it refuses to boot into recovery mode. What am I missing?

KaiserSnorezay said:
I managed to flash and root 17.1.2.A.0.314, but once again I'm unable to get any damn recovery to work. Installed XZDR, after that TWRP, in both cases it refuses to boot into recovery mode. What am I missing?
Click to expand...
Click to collapse
Weird, after you have your phone rooted it should be simple to install xzdr... just enable usb debugging in the phone and make sure you have the adb drivers correctly installed in your pc.
Download the latest xzdr from nut's thread ( http://forum.xda-developers.com/showthread.php?t=2261606 ) unzip it and run install.bat . After a successful install the phone should reboot to twrp automatically and it's done.

Okay, I fixed it..using Flashfire! No idea why the recovery didn't work earlier, but now finally I'm on Marshmallow. Thanks for the help!

KaiserSnorezay said:
Okay, I fixed it..using ! No idea why the recovery didn't work earlier, but now finally I'm on Marshmallow. Thanks for the help!
Click to expand...
Click to collapse
hey bro, just read your post. Yesterday i got an update msg in my software update menu of my Xperia Z2 D6502. After i updated i went into bootloop. i have very important stuff in my phone. i updated earlier too all the updates that sony servers inform about. so then i thought to flash with the stock file. Although i didnt knew the firmware number , i just flashed with 5.1.1 , 1st with Customized IN & later with of US. Both of them didn't work as well. Please help me out. I'm not much aware about this root stuff & all. hope to get reply soon from you or anyone in this forum.
-also i don't know the exact firmware number-

dodge911 said:
hey bro, just read your post. Yesterday i got an update msg in my software update menu of my Xperia Z2 D6502. After i updated i went into bootloop. i have very important stuff in my phone. i updated earlier too all the updates that sony servers inform about. so then i thought to flash with the stock file. Although i didnt knew the firmware number , i just flashed with 5.1.1 , 1st with Customized IN & later with of US. Both of them didn't work as well. Please help me out. I'm not much aware about this root stuff & all. hope to get reply soon from you or anyone in this forum.
-also i don't know the exact firmware number-
Click to expand...
Click to collapse
Try what ptmaniac suggested - flash an older FTF that can be rooted (more recent ones can't), root it, install recovery and then flash the newest build.
You'll have to improve your Google-fu to find a suitable firmware and a root technique for it.

KaiserSnorezay said:
Try what ptmaniac suggested - flash an older FTF that can be rooted (more recent ones can't), root it, install recovery and then flash the newest build.
You'll have to improve your Google-fu to find a suitable firmware and a root technique for it.
Click to expand...
Click to collapse
okay. you mean flashing any old firmware ( which i did and still in bootloop ) & root it. Then installing recovery for the same firmware ?
with "recovery" will i be able to get back my whole data ?

KaiserSnorezay said:
Long story - Tried to apply the latest Marshmallow rooted package for D6503 on my 6502 that was already rooted with XZ dual recovery. It installed successfully, was rooted too...but I forgot to add the patch that would fix the radio not working. So I try to reboot to recovery...and that doesn't work anymore. I tried installing TWRP recovery from the manager app, but it wouldn't reboot. Then I ran the XZ recovery installer externally, and now my phone is ****ed. Stuck at an infinite boot loop.
At this stage the only thing I can access is flashtool and fastboot, and since my bootloader is locked I can't flash a recovery that way (nor do I want to permanently lose DRM keys/camera quality as I've heard happens with unlocking the bootloader). I have a memory card and I used the option to disable loading the recovery specified on the XZ thread by adding a 'donotload' file on the sd card.
Still no use - I get a Sony logo for about 5 seconds, the screen goes dark and back to the same. At this point probably my recovery is screwed up or non existent and a bad situation has gone worse with the bootloop.
What can I try now?
Click to expand...
Click to collapse
hey i am having same problem with my xperia Z2 , it stucked in bootloop ,i have already tried to flash new firmware from xperifirm using flash tool,but i think my usb debugging is off, what can i do ,i cant start my phone so there are no chances for turning USB debugging on,what can i do, any solution,, just want my phone back,it will be okay if I loose my all data..please

DedSec_35 said:
hey i am having same problem with my xperia Z2 , it stucked in bootloop ,i have already tried to flash new firmware from xperifirm using flash tool,but i think my usb debugging is off, what can i do ,i cant start my phone so there are no chances for turning USB debugging on,what can i do, any solution,, just want my phone back,it will be okay if I loose my all data..please
Click to expand...
Click to collapse
Sorry, I ditched my Z2 for a Oneplus 3 in August 2016. Learnt my lesson, only going to use phones with easily unlockable bootloaders.

Related

[GUIDE] (C6833) (Maybe Others?) New Bootloader + Recovery

Installing the new Sony Bootloader and Recovery
THIS IS FOR ALREADY UNLOCKED DEVICES!
DO NOT TRY THIS ON A GPE!​Since a lot of people seem to have problems keeping their recovery when flashing Lollipop-ROMs i decided to put up this little guide...
You can also Skip this whole guide, by just flashing the newest stock-FW at least once!
First off, as already said, this is for already unlocked devices. You can use this Guide until "Install Custom ROM", except the rooting part, for rooting use this, if you haven't already!
Don't do it if you don't atleast somewhat know what you are doing.
I am not responsible for bricked devices, or whatever you might end up with.
So, lets get started.
1. Download Sonys FlashTool "EMMA" and install it: http://developer.sonymobile.com/downloads/tool/flash-tool-for-xperia-devices/
In the .zip file from the FlashTool you'll find a File "customization.ini"
Copy this file to the installation directory of EMMA, usually "C:\Program Files (x86)\Sony Mobile\Emma"
If you don't copy that file, Emma will ask you for a login, don't create an account there, you will NEVER get any activation-email!
2. Open EMMA and boot your Phone into FlashMode (Power off your device -> Press and hold volume DOWN -> while pressing volume DOWN insert USB-Cable)
3. Emma should now recognize your device, but you have to select it manually tough. Select your EXACT model number. Again, I am not responsible for any bricked devices or whatever you end up with!
Now select the "(Open Devices) TA update" and click "Apply Service"
It should take a few seconds and should then display SUCCESS.
You can now close Emma
4. If you haven't already download FastBoot and Drivers: http://forum.xda-developers.com/showthread.php?p=48915118#post48915118
(Run as Administrator!)
5. Download the newest version of twrp and put it somewhere:
New Inoffcial twrp-3.0.0 build by me: http://forum.xda-developers.com/xperia-z-ultra/development/togari-twrp-recovery-3-0-0-t3314440
Old official versions: https://twrp.me/devices/sonyxperiazultra.html
6. Finally boot up you Phone in FastBoot-mode (Power off -> press and hold volume UP -> while pressing wolume UP insert USB-Cable
Your LED should now light up blue
Shift+Rightklick in the Folder where you have put TWRP recovery, and select "Open Commandprompt here"
Now write "fastboot flash recovery FILENAME_OF_TWRP_FILE"
You can now unplug your USB-Cable and boot into recovery and continue from there.
Your recovery will be permanent, meaning you won't loose it or replace with any other recovery that might come with your ROM.
I hope this was somewhat helpfull
Any one can flash this to C6806?
jacklau2000 said:
Any one can flash this to C6806?
Click to expand...
Click to collapse
You can try, just select your modelnumber in emma
If the "Open Devices (TA Update)" show up, you're fine. If not just don't do anything.
But do not try this on a GPE!
alia5 said:
You can try, just select your modelnumber in emma
If the "Open Devices (TA Update)" show up, you're fine. If not just don't do anything.
But do not try this on a GPE!
Click to expand...
Click to collapse
tried, but no luck. thanks.
It's really weird, I used emma, and installed their latest ta update. Now I can get into fastboot mode, all commands execute successfully, but the recovery never takes. The vol down + Power doesn't work, nor does 'adb reboot recovery'. Am I missing a step somewhere? This isn't my first android device, but from where I sit, it seems like something is up with my xzu.
If I try and install the 14.4* update through emma, it goes through the whole process, completes "successfully", then boots into 14.5. Something is clearly not working here.
The TA update only unlocks the ability to boot to recovery, it doesn't install one. And no, flashing official TWRP to recovery partition doesn't work, it must be compiled again to work on normal recovery partition and not in FOTAKernel, where it must be flashed to work.
Regards
teddy74eva said:
The TA update only unlocks the ability to boot to recovery, it doesn't install one. And no, flashing official TWRP to recovery partition doesn't work, it must be compiled again to work on normal recovery partition and not in FOTAKernel, where it must be flashed to work.
Regards
Click to expand...
Click to collapse
I´m on CM 11 M12 (looking forward to 12) + the new sony bootloader without any custom Kernel stuff.
Sadly, you are right. It´s not done with downloading twrp-2.8.5.0-togari.img and fastboot flash recovery yourfile.img.
The last offical TWRP release for Xperia Z Ultra is from february 2015, any chance they release an updated version for the new Sony bootloader?
Hermann1222 said:
I´m on CM 11 M12 (looking forward to 12) + the new sony bootloader without any custom Kernel stuff.
Sadly, you are right. It´s not done with downloading twrp-2.8.5.0-togari.img and fastboot flash recovery yourfile.img.
The last offical TWRP release for Xperia Z Ultra is from february 2015, any chance they release an updated version for the new Sony bootloader?
Click to expand...
Click to collapse
I will try to compile one because, you know, summer holidays and no school however I don't know if I will make it.
Regards
Is there any (wish for TWRP) recovery for togari, which use the new bootoader?
FYI:
My device is a brazilian c6843.
Emma recognizes the device automatically and indicates with an exclamation point that there is no services available to the unit.
In the case someone doesn't know, it's basically the c6833 with DTV 1seg. It's totally compatible with c6833 firmware, losing TV, of course.
You sir are the real hero! Thank you!
I have a xzu running cm12.1, and I have 2 quick questions for those with more knowledge than me
Is it possible to flash the new bootloder using the open source FlashTool?
If I have to use emma, is it possible to just apply the open device ta update *without* installing stock firmware first?
pbgapski said:
If I have to use emma, is it possible to just apply the open device ta update *without* installing stock firmware first?
Click to expand...
Click to collapse
You can totally do that, BUT, the newest stock firmware also has some firmware updates regarding nfc, also having the newest stock rom flashed at least once will be kind of a requirement to get everything properly working on marshmallow roms.
So I would say flash the newest stock rom at least once!
missing clues on new recovery partition
alia5 said:
You can totally do that, BUT, the newest stock firmware also has some firmware updates regarding nfc, also having the newest stock rom flashed at least once will be kind of a requirement to get everything properly working on marshmallow roms.
So I would say flash the newest stock rom at least once!
Click to expand...
Click to collapse
I followed your advice, but it seems I am missing a few clues.
My sirius was on cm12.1. I backedup and flashed D6543_23.4.A.1.232_1281-5466_R6C.ftf with flashtool on linux. I tried to use emma (several times) afterwards to check for any TA updates, but all I got was "no services matched this device" or something like that. Google tells me I am not the only one with this issue with emma
Then I used fastboot to install twrp 3 from twrp.me to recovery partition, but I could not access twrp.
I fastbooted recovery again with twrp 2.8.7, and this time I could enter twrp and reflashed CM.
Now I can access twrp using the button combinations while booting, but rebooting to recovery from CM leads to a bootloop. Has anyone experienced this as well?
So it seems I am still missing a few clues to using the recovery partition. Is any build of twrp supposed to work on both FOTAkernel and recovery partitions?
Is there a TWRP 3 build that works from 'coldboot to recovery' and 'cm reboot to recovery' with the new bootloader? Any pointers?
pbgapski said:
Now I can access twrp using the button combinations while booting, but rebooting to recovery from CM leads to a bootloop. Has anyone experienced this as well?
So it seems I am still missing a few clues to using the recovery partition. Is any build of twrp supposed to work on both FOTAkernel and recovery partitions?
Is there a TWRP 3 build that works from 'coldboot to recovery' and 'cm reboot to recovery' with the new bootloader? Any pointers?
Click to expand...
Click to collapse
Well, booting to recovery on separate partition from os, requires the rom to have a patch... the "new" mm-roms (when they finally hit aka. are ready to be shared in public) will have that, so no worry, just wait.
why it said my phone have no available service, i am on c6833
alia5 said:
Well, booting to recovery on separate partition from os, requires the rom to have a patch... the "new" mm-roms (when they finally hit aka. are ready to be shared in public) will have that, so no worry, just wait.
Click to expand...
Click to collapse
I have the same problem but not bootloop just stuck at starting apps screen,BTW did you have a TWRP scripts for flashing TWRP 3.0 into FOTAkernel
hi .. after this update can i relock my phone and restore drm functions?! or phone go to unlocked forever?!
pls help i need answer
erfanzz said:
pls help i need answer
Click to expand...
Click to collapse
Search the forums on how to backup TA partitions. I have mine but never tried to restore them

Upgrade and root 5.1.1 Lollipop 14.6.A.0.368 locked or unlocked bootloader

** DISCLAIMER: I AM NOT A DEVELOPER. I DO THIS AS A HOBBY AND SHARE MY FINDINGS IN CASE SOMEONE ELSE FINDS THEM USEFUL. **
** THIS WORKED ON MY DEVICE BUT IT MAY NOT WORK ON YOURS. APPLY AT YOUR OWN RISK **​
This post shows you how to upgrade your system to lollipop 5.1.1 and optionally have root privileges. This is tested on C6833 model. For other models see the troubleshooting section near the end of the post.
Requirements:
Flashtool 0.9.18.6. or 0.9.19.6 or higher Important: Do not use Flashtool 0.9.19.0.
If you want to root the phone: Rooted XZU on Android version 5.0.2 or Kitkat with custom recovery installed.
This works on locked or unlocked bootloaders and any customization.
Download link for upgrade only:
C6833_14.6.A.0.368_1275-8026_R2D.ftf (unmodified Customized DE):
https://mega.nz/#!khF1nILD!C5D70e-BjCKVBCuOurjFOLcIMZDcldYVeIDnFiR-PGM
Download link for upgrade and root:
5.1.1-system.zip:
https://mega.nz/#!YoFgCSjA!Zh8t_4jeXcAEWhOYePA40uQLI7vw4-CnxohjBdMbpz0
C6833_14.6.A.0.368_No_System.ftf
https://mega.nz/#!l4dllSTT!R393EG4W3CwOZp1OLOzfUzpHF0IlvsmfW04BrGOggXc
Instructions for upgrading without root:
1- Back up your internal SDCARD and your apps.
2- Download C6833_14.6.A.0.368_1275-8026_R2D.ftf
3- Open Flashtool and click on the flash icon. Choose flash mode.
4- Navigate to where you saved C6833_14.6.A.0.368_1275-8026_R2D.ftf and flash this ftf with your phone in flash mode. I recommend wiping apps and cache and data (Note that wiping data will erase your internal SDcard too). To put your phone in flash mode, hold the volume down button when it is off and connect with the USB cable to the PC.
5- Reboot.
Instructions for upgrading with root:
0- If your existing system is rooted using Kingroot read the troubleshooting section below before continuing.
1- Back up your internal SDCARD and your apps.
2- Download C6833_14.6.A.0.368_No_System.ftf and 5.1.1_system.zip.
3- Copy 5.1.1-system.zip to your phone's internal SDcard.
4- Reboot to recovery and install 5.1.1-system.zip.
5- If you are coming from Kitkat just Turn the phone off. If you are coming from 5.0.2, reboot the phone and let it work through the boot animation which will take a while. Then it will show force closing messages and possibly reboots itself. At this point turn it off by holding down the power and volume-up keys for a few seconds. The phone will vibrate 3 times and turns off.
6- Open Flashtool and click on the flash icon. Choose flash mode.
7- Navigate to where you saved C6833_14.6.A.0.368_No_System.ftf and flash this ftf with your phone in flash mode. I recommend wiping apps and cache and data (Note that wiping data will erase your internal SDcard too). To put your phone in flash mode, hold the volume down button when it is off and connect with the USB cable to the PC.
8- Reboot.
Troubleshooting, etc.
This procedure works only if you follow every step carefully. When you are done you can easily test your root status in a terminal emulator or via adb. Please see the attached image.
If you have used Kingroot to root your existing system flashing this ROM may not work and it may leave your system with a partially updated file system that may be broken. The reason is that Kingroot (which in my opinion is malware) makes some of your system files immutable which means they cannot be removed during a software upgrade. To proceed, you should either find a way to replace this horrendous piece of code with SuperSU or downgrade to Kitkat and root with XZDualRecovery before trying this guide. Read the second part of http://forum.xda-developers.com/showpost.php?p=62936808&postcount=22.
If during the procedure for root the flashing of the ftf in step 7 fails, repeat step 7 with C6833_14.6.A.0.368_1275-8026_R2D.ftf or any other 14.6.A.0.368 ftf but exclude the system partition in the flashtool dialog window. If you don't exclude the system partition you will not get root.
If you have root after the procedure but something else doesn't work, try a factory reset.
Note that flashtool 0.9.19.0 was specifically released to support the new sin format on new devices and some of its features don't work with older devices. So to avoid taking any chances I used version 18.
I don't know if this works for C6802 or C6806. Some users reported success on 6806, like this one and this. For that model you follow this guide and use the zip file posted here. The only difference is that instead of flashing the ftf posted here in the next step, use the stock 14.6.A.0.368 ftf for your phone and exclude system.
Will this C6833 FTF work on a C6806 USA phone?, because I can't find a C6806 FTF anywhere...
Can this system zip be used with other customized versions of c6833 ftf.
usagi111 said:
Will this C6833 FTF work on a C6806 USA phone?, because I can't find a C6806 FTF anywhere...
Click to expand...
Click to collapse
I just uploaded a C6806 US version in Development thread yesterday.
Sent from my A0001 using Tapatalk
could you share flashtool 0.9.18.0 cos I can't find that version only higher.
will this work on c6802 just wondering?
I did as you said but. I see no super-su
jaime4272 said:
I did as you said but. I see no super-su
Click to expand...
Click to collapse
You probably didn't exclude the system partition in this step:
7- Navigate to where you saved C6833_Customized+DE_14.6.A.0.368.ftf.*Exclude system partition*and flash this ftf.
Out of curiosity, what is wrong with the latest flashtool?
---------- Post added at 10:11 PM ---------- Previous post was at 10:00 PM ----------
jaime4272 said:
could you share flashtool 0.9.18.0 cos I can't find that version only higher.
will this work on c6802 just wondering?
Click to expand...
Click to collapse
I've uploaded 0.9.18.6
https://drive.google.com/file/d/0B2L0y84PJ2rteVNGVnlJWjFlOGs/view?usp=sharing
Never mind, i already found out, also flashtool published a new version wich is compatible with our device
http://www.flashtool.net/downloads.php
thanks mate, everything worked fine
I was able to flash android 5.1.1 but could not get root and I did every step as posted and I did exclude system partition. and without root could not install dual recovery there for could not flash SuperSU
I am sorry for my noobie question...but what is customised DE?
ALso if i run this, I am still at locked bootloader...will i lose the partition that enable me to have all Sony's special goodies (i didn't mean the bloatware of course)?
Also i am running stock 5.1.1 already after OTA but interested to have root...shall i go with the 2nd steps with root?
im4u2nv said:
I am sorry for my noobie question...but what is customised DE?
ALso if i run this, I am still at locked bootloader...will i lose the partition that enable me to have all Sony's special goodies (i didn't mean the bloatware of course)?
Also i am running stock 5.1.1 already after OTA but interested to have root...shall i go with the 2nd steps with root?
Click to expand...
Click to collapse
Customized DE just means it is the German version of the ROM. I used that because I bought the phone in Germany. But the menus and keyboard and everything is in English so you would not even notice the difference.
This method will not touch your bootloader status so if you are locked you remain locked.
If you are already on 5.1.1 through OTA this will not work for you. You need to start from rooted 5.0.2 with recovery installed.
najoor said:
Customized DE just means it is the German version of the ROM. I used that because I bought the phone in Germany. But the menus and keyboard and everything is in English so you would not even notice the difference.
This method will not touch your bootloader status so if you are locked you remain locked.
If you are already on 5.1.1 through OTA this will not work for you. You need to start from rooted 5.0.2 with recovery installed.
Click to expand...
Click to collapse
Thank you Najoor...in that case, i will wait for some guide to root 5.1.1 then...
I am using stock kitkat custom rom will I have to update to Lollipop 5.0 first or can i directly flash 5.1
terminator1983 said:
I am using stock kitkat custom rom will I have to update to Lollipop 5.0 first or can i directly flash 5.1
Click to expand...
Click to collapse
I think you can still do it straight from kitkat but if you are following the instructions with root in step 5 instead of rebooting just turn the phone off.
Let me know if that works.
so my ZU used to be rooted with Lollipop 5.0.2, but i removed Kinguser/chinese root app and no longer have root access. I've also previously installed recovery but don't know if it will still work ? i forgot how to boot into recovery to see if it even works.. any helpers?
Power on the phone and when u see the led notification start pressing either the Volume UP or Volume Down key a couple of times to make your phone boot into recovery mode
corrado85 said:
so my ZU used to be rooted with Lollipop 5.0.2, but i removed Kinguser/chinese root app and no longer have root access. I've also previously installed recovery but don't know if it will still work ? i forgot how to boot into recovery to see if it even works.. any helpers?
Click to expand...
Click to collapse
najoor said:
I think you can still do it straight from kitkat but if you are following the instructions with root in step 5 instead of rebooting just turn the phone off.
Let me know if that works.
Click to expand...
Click to collapse
Thanks najoor it worked now i am using a rooted stock 5.1.1
jaime4272 said:
I was able to flash android 5.1.1 but could not get root and I did every step as posted and I did exclude system partition. and without root could not install dual recovery there for could not flash SuperSU
Click to expand...
Click to collapse
I am not able to instal 5.1.1-system.zip on rooted Sony Xperia Z Ultra c6833 with Android 5.0.2. The instalation is aborted
Had 5.1.1 lollipop installed, downgraded to 4.4.4 kitkat and rooted with kingroot successfully- installed xzu dual recovery and rebooted into recovery mode.
Flashed 5.1.1 zip and turned off. Flashed 5.1.1 Saudi Arabia ftf with flashtool (wipe everything - ticking to exclude system partition) with phone off and connected z ultra in flash mode and flashed successfully. Disconnected and booted.. took a while on wave animation and started fresh but no supersu and not rooted in 5.1.1?? any help thanks

[Z2,Z3] Root and recovery stock 5.1.1 264 ROM no data loss - proper easy way

Rooting and romming Sony devices is a little harder than most android devices, some things work a little different. The scattered info doesn't make this any easier either. I had to find this out the hard way, softbricked my Xperia in the process, but I finally did it. I see that there still are people that wish to root stock 5.1.1 and that there are no unified proper instructions to do this so here is my process and guide. Good luck.
There are many ways to do this, but it includes flashing your Xperia to earlier firmware then rooting and installing the recovery and then flashing back the newest firmware, so I made this little guide to make things easier for Sony newcomers. This process should be compatible with Z1, Z2 and Z3(c) - but ofcourse its made for Z2, for Z1 and Z3 download recovery files for your model respectively.
You won't loose any of your data on your stock ROM if you do this correctly.
You'll need a Windows PC, 7, 8.1, 10. (Mac and Linux are also supported)
1. Root your Z with Kingroot.apk v4.6 and v4.8 work flawlessly. Just download and install as normal apk and hit the big blue button. You have to have internet connection for this to work. It will root your Z automatically after cca. 2m.
Kingroot app is basically a super su app from a different developer. Congrats, you now have root.
2. To install a recovery do not use any flashing apps by TWRP or similar, it wont work. We will use XDZR.
XZDR is Xperia Z Dual Recovery, its basically Philz recovery and TWRP recovery flashed together. You enter Philz holding vol up and TWRP holding vol down when powering up your xperia. * Search for NUT's dual recovery for more info.
Download the recovery from here:
http://nut.xperia-files.com/path/XZDualRecovery
(Download the correct .zip for your Xperia model).
3. Download the. zip to your PC.
4. Connect your phone via USB after you have enabled USB debugging on your xperia. If you have correct Sony drivers installed your PC will recognize your device and a dialog will pop up on your phone (about allowing USB debugging from this PC). Allow the access.
5. Unpack the zip you downloaded to a random folder on your PC. Here run the install.bat if you're on a Win PC. Bat will run and here you just choose the first option, type 1 and follow the on screen instructions, keep an eye on your phone, it will pop up a couple of yes - no dialogs. Allow the access and ADB access and wait, it will be fast.
When you reboot you will see a green LED light up while SONY splash is shown, this is when you hold up or down for one of the two recoveries.
Down is for TWRP and up is for Philz.
6. Download superSU from here:
https://download.chainfire.eu/696/SuperSU/
Boot to system again and now you can unroot your phone trough Kingroot app (general settings) and then reboot to recovery again and flash the file from this link, you will get the super su app and super su binaries and this way you're fully rooted and will have dual recovery for your full flashing pleasure.
* Remember that you first need to unroot and uninstall Kingroot app and then flash Super su, otherwise you risk a bootloop or just not functional root access.
* Do not flash newer TWRP or any recovery or youll loose your recovery.
* I am not responsible if something goes wrong with your device.
And thats it, you have your data intact, stock 5.1.1 ROM, fully functional root access with super su and two recoveries, intact BL and DRM keys and you can flash almost anything that supports LB (locked bootloader).
Hey.
I have a few questions.
Does installing recovery void the warranty? Can the XZDualRecovery be uninstalled easily? Can I still update to Marshmallow via official update when it comes out when I have recovery installed on my phone?
Thanks!
cha0zine said:
Hey.
I have a few questions.
Does installing recovery void the warranty? Can the XZDualRecovery be uninstalled easily? Can I still update to Marshmallow via official update when it comes out when I have recovery installed on my phone?
Thanks!
Click to expand...
Click to collapse
I think that Sony does void warranty if you do an "unauthorized software changes" and changing software in any other way than trough OTA is unauthorized by Sony, so yes. But you can completely restore your device to factory state by flashing an official FTF image trough flashtool and restore Sonys recovery and basically get your warranty back.
If you follow the above steps installation of XZDR is quite easy and fast.
You will be able to update to official MM by flashing MM FTF image trough flashtool and restore your phone to "official" software state. But with XZD recovery you will be able to flash leaked MM from beta program even sooner and easier.
This guide does not unlock your BL and does nothing irreversible to your phone * providing you do everything correctly.
Thanks for answering! Much appreciated!
can you back up the drm keys through this method?
jeebarbas said:
can you back up the drm keys through this method?
Click to expand...
Click to collapse
Rooting with this method wont unlock your boot loader so there is no need for that, your DRM keys wont be touched.
5ageman said:
Rooting with this method wont unlock your boot loader so there is no need for that, your DRM keys wont be touched.
Click to expand...
Click to collapse
Thank you for replying. sorry, im such a noob but after flashing su and subinaries do i need to update the su binaries or i could jsut leave it as it is?
jeebarbas said:
Thank you for replying. sorry, im such a noob but after flashing su and subinaries do i need to update the su binaries or i could jsut leave it as it is?
Click to expand...
Click to collapse
You can leave it as is, you will have full root functionality. Of course you can also update binaries to have up to date bug fixes and security patches, update trough normal method works fine.
@5ageman Hi. Thanks for the tutorial. I m a noob in this rooting stuff. Last night i rooted my phone Xperia Z2 5.1.1 using kingroot bcos i was scared of rooting with some other steps and bricking my phone. But then i realized that xposed wont install unless i have custom recovery. But i m quiet confused with few things related to root even after reading so many posts. So just need to know what exactly recovery is. Like when i restart my phone and then press vol up or down key what will exactly happen? Is this something like safe mode and some other mode in laptops??
talkativetaurus said:
@5ageman Hi. Thanks for the tutorial. I m a noob in this rooting stuff. Last night i rooted my phone Xperia Z2 5.1.1 using kingroot bcos i was scared of rooting with some other steps and bricking my phone. But then i realized that xposed wont install unless i have custom recovery. But i m quiet confused with few things related to root even after reading so many posts. So just need to know what exactly recovery is. Like when i restart my phone and then press vol up or down key what will exactly happen? Is this something like safe mode and some other mode in laptops??
Click to expand...
Click to collapse
Recovery is actually closest to BIOS in PC terms although its much more. Xperia Z2 has no recovery by default, you'll need to flash it manually. See step 2. And only then you can eter recovery. By pressing vol down when the green LED lights up you will enter TWRP a custom recovery made by Team Win Recovery Project. Nothing will happen if you do nothig, you wont accidentaly wipe or brick your Z2. If unsure what to do next just tap the reboot button and then system to reboot to system as nothing happened. Go step by step, no hurry.
@5ageman thanks alot for ur answer. Now my doubt is clear.
But i have few more questions related to ur tut.
1- i have already rebooted my phone a number of times after rooting it. Like for some other purpose and not for recovery or super su. So will the tut work for me as i read somewhere that one need not restart the phone after rooting using kingroot and install recovery directly. Or if it was for some other device i dont remember.
2 - According to the end of step 5 and step 6, does that mean that i have to download super su from chainfire while i m still in recovery mode? And once agn in the system after uninstalling kingroot and rebooting in recovery do i have to install SuperSU in the recovery mode? If yes then how?
3- last question. Entering recovery is just vol down button or power + vol down both.
Once again sorry for such basic questions but i m completely new in the world of rooting plus i want to make sure i know what i m doing.
Thanks for ur patience. Appreciate.
talkativetaurus said:
@5ageman thanks alot for ur answer. Now my doubt is clear.
But i have few more questions related to ur tut.
1- i have already rebooted my phone a number of times after rooting it. Like for some other purpose and not for recovery or super su. So will the tut work for me as i read somewhere that one need not restart the phone after rooting using kingroot and install recovery directly. Or if it was for some other device i dont remember.
2 - According to the end of step 5 and step 6, does that mean that i have to download super su from chainfire while i m still in recovery mode? And once agn in the system after uninstalling kingroot and rebooting in recovery do i have to install SuperSU in the recovery mode? If yes then how?
3- last question. Entering recovery is just vol down button or power + vol down both.
Once again sorry for such basic questions but i m completely new in the world of rooting plus i want to make sure i know what i m doing.
Thanks for ur patience. Appreciate.
Click to expand...
Click to collapse
1. You cannot install recovery directly from the system on Z2 like on other phones, Z2 has no recovery partition. This can only be done with unlocked bootloader. Just make sure you have a working root access with Kingroot and USB debugging enabled when you connect your Z2 to a PC.
2. Download superSU from chainfire while still in system, then reboot to recovery and flash it trough recovery. It's a flashable zip. Before booting to recovery unroot your phone trough Kingroot app. SuperSU zip will flash su binaries and the app to system partition automatically and will root your phone again. Rooting trough Kingroot is done only to flash the recovery, then its deleted.
3. After you successfully install tge recovery when you power on your Z2 it will vibrate and flash green LED on sony bios logo. Then you hold down vol down key until led flashes purple. Afterward it will boot to recovery.
5ageman said:
1. You cannot install recovery directly from the system on Z2 like on other phones, Z2 has no recovery partition. This can only be done with unlocked bootloader. Just make sure you have a working root access with Kingroot and USB debugging enabled when you connect your Z2 to a PC.
2. Download superSU from chainfire while still in system, then reboot to recovery and flash it trough recovery. It's a flashable zip. Before booting to recovery unroot your phone trough Kingroot app. SuperSU zip will flash su binaries and the app to system partition automatically and will root your phone again. Rooting trough Kingroot is done only to flash the recovery, then its deleted.
3. After you successfully install tge recovery when you power on your Z2 it will vibrate and flash green LED on sony bios logo. Then you hold down vol down key until led flashes purple. Afterward it will boot to recovery.
Click to expand...
Click to collapse
@5ageman Thanks for ur reply. but i have few more things to say..
1- no i didnt mean in the system. What i read was that when u root with kingroot u r nt suppose to reboot until u install recovery. Otherwise it might cos prbs and nt install SuperSU.
2- What does flashable exactly mean. Is it nt just installing? I dload the superSU from chainfire while in the system and install in the recovery, right? Where will i find the zip to install it? (sorry... Had to ask)
3- i think i got that...i ll knw that exactly when i try it...lol
talkativetaurus said:
@5ageman Thanks for ur reply. but i have few more things to say..
1- no i didnt mean in the system. What i read was that when u root with kingroot u r nt suppose to reboot until u install recovery. Otherwise it might cos prbs and nt install SuperSU.
2- What does flashable exactly mean. Is it nt just installing? I dload the superSU from chainfire while in the system and install in the recovery, right? Where will i find the zip to install it? (sorry... Had to ask)
3- i think i got that...i ll knw that exactly when i try it...lol
Click to expand...
Click to collapse
1. You wont face any issues if you reboot, but you dont have to. Just plug your phone to PC while your phone is in android. Yes you download in system and then install - flash in recovery by tapping "install" and then you navigate to supersu.zip and select it and then swipe to flash it. The supersu.zip will be there where you download it, most likely on internal storage in download folder.
2. Flashable means its installed trough recovery - its flashed as opposed to being installed normally in android system.
So is it safe to root my Z2 with this? I have 15.1.1 264 stock rom, is this safe?
nemanja899 said:
So is it safe to root my Z2 with this? I have 15.1.1 264 stock rom, is this safe?
Click to expand...
Click to collapse
If you follow the guide correctly and know basic android rooting and romming then yes its safe, I rooted my Z2 the same exact way. 5.1.1 264

Any recovery we can use for Marshmallow?

XZ Dual Recovery is not yet compatible with Marshmallow and because of this I was forced to unlock the BL. Are there any recovery that we can use as of this moment? It seems that the development section for this is not so active.
infinitylook said:
XZ Dual Recovery is not yet compatible with Marshmallow and because of this I was forced to unlock the BL. Are there any recovery that we can use as of this moment? It seems that the development section for this is not so active.
Click to expand...
Click to collapse
I saw that there is a prerooted 6.0.1 with only TWRP recovery installed, not dualrecovery. Can you guide me on steps to get from official 6.0.1 to root status on an unlocked bootloader? I can't do anything to go back to previous firmwares and it seems I have to unlock as the only way to get anywhere.
GigaSPX said:
I saw that there is a prerooted 6.0.1 with only TWRP recovery installed, not dualrecovery. Can you guide me on steps to get from official 6.0.1 to root status on an unlocked bootloader? I can't do anything to go back to previous firmwares and it seems I have to unlock as the only way to get anywhere.
Click to expand...
Click to collapse
I tried flashing the TWRP from the site of TWRP but it results in blank screen. Also XZDR is not compatible with Marshmallow.
Did you already backup your TA? You can only do this by obtaining root so it is a must to flash previous FW (KK or LP) then root and backup your TA partion unless you don't care for your DRM keys.
1. Go to http://developer.sonymobile.com/unlockbootloader/unlock-yourboot-loader/ and follow instructions to unlock your bootloader. Alternatively you can use flashtool (just search here in the forums).
2. Download a TWRP image of Scorpion Windy (Z3 Tablet Wifi) https://twrp.me/devices/sonyxperiaz3tabetcompact.html
3. Download older versions of SuperSU. Systemless root doesn't seem to work with Xperia Stock so you go the system way, older versions are preferred. Will attach the zip I used.
3. Flash MM FW by Flashtool, do initial setup.
4. Boot into fastboot, fastboot the TWRP image you downloaded. Reboot and you should be in recovery
5. Flash the SuperSU. Flash also the RIC defeat zip. Reboot and you'll notice your just in TWRP.
6. Force shutdown.
7. Open flashtool flash the mM FW but only kernel and the FotaKernel, dont wipe anything. Reboot. It should start.
That worked for me.
After you, need to install busybox from playstore and the SELinux Changer app
P.s I can't attach any file however you can find everything i mentioned (Zips) here at XDA and TWRP. I still need to enable init.d but I guess that's difficult with stock rom stock kernel. Oh, and you can install flashfire in substitute of your recovery. Be careful with flashing Zips after you have a stable system since you don't have recovery and therefore no Nandroid backup
infinitylook said:
I tried flashing the TWRP from the site of TWRP but it results in blank screen. Also XZDR is not compatible with Marshmallow.
Did you already backup your TA? You can only do this by obtaining root so it is a must to flash previous FW (KK or LP) then root and backup your TA partion unless you don't care for your DRM keys.
1. Go to http://developer.sonymobile.com/unlockbootloader/unlock-yourboot-loader/ and follow instructions to unlock your bootloader. Alternatively you can use flashtool (just search here in the forums).
2. Download a TWRP image of Scorpion Windy (Z3 Tablet Wifi) https://twrp.me/devices/sonyxperiaz3tabetcompact.html
3. Download older versions of SuperSU. Systemless root doesn't seem to work with Xperia Stock so you go the system way, older versions are preferred. Will attach the zip I used.
3. Flash MM FW by Flashtool, do initial setup.
4. Boot into fastboot, fastboot the TWRP image you downloaded. Reboot and you should be in recovery
5. Flash the SuperSU. Flash also the RIC defeat zip. Reboot and you'll notice your just in TWRP.
6. Force shutdown.
7. Open flashtool flash the mM FW but only kernel and the FotaKernel, dont wipe anything. Reboot. It should start.
That worked for me.
After you, need to install busybox from playstore and the SELinux Changer app
P.s I can't attach any file however you can find everything i mentioned (Zips) here at XDA and TWRP. I still need to enable init.d but I guess that's difficult with stock rom stock kernel. Oh, and you can install flashfire in substitute of your recovery. Be careful with flashing Zips after you have a stable system since you don't have recovery and therefore no Nandroid backup
Click to expand...
Click to collapse
Well then, I knew what I should have done before I lost root. In any case, what certain DRM keys would I be losing on the tablet? I know the biggest commotion on the phones were the camera algorithms.
GigaSPX said:
Well then, I knew what I should have done before I lost root. In any case, what certain DRM keys would I be losing on the tablet? I know the biggest commotion on the phones were the camera algorithms.
Click to expand...
Click to collapse
You would lose camera algorithm (I don't care for that, it's a tablet and its pictures are bad from the start).
X-reality and display enhancements, sound and noise cancellation (This is i don't want to lose since i use mine mainly for graphic projects) and remote play. That's only what I remember, i don't know if I missed out something.
NO NEED TO UNLOCK THE BT, flash a MM prerooted zip you can make it yourself with prf you need the FTF, recroot and superSu.
Anyway if you still want unlock the bt backup the drm keys with backupta
dnnz said:
NO NEED TO UNLOCK THE BT, flash a MM prerooted zip you can make it yourself with prf you need the FTF, recroot and superSu.
Anyway if you still want unlock the bt backup the drm keys with backupta
Click to expand...
Click to collapse
That won't work and would cause bootloop. tried the latest supersu. anyway, i found the workaround and it's been working good now.
infinitylook said:
You would lose camera algorithm (I don't care for that, it's a tablet and its pictures are bad from the start).
X-reality and display enhancements, sound and noise cancellation (This is i don't want to lose since i use mine mainly for graphic projects) and remote play. That's only what I remember, i don't know if I missed out something.
Click to expand...
Click to collapse
Wow, yeah that's too dire for me to go forward to. I should've just stayed on lollipop since it was already what was best for me.
infinitylook said:
That won't work and would cause bootloop. tried the latest supersu. anyway, i found the workaround and it's been working good now.
Click to expand...
Click to collapse
But but but if many did that without problem including me, check the th "when is mm out"
dnnz said:
But but but if many did that without problem including me, check the th "when is mm out"
Click to expand...
Click to collapse
i willread on that. last timme i checked it out mostly devices are with sgp 612 (wifi) anyway thanks for the tip.
Can you give me the link on that thread? i checked the threads here on this device forum and they are for sgp 612 and 611 (wifi versions)

Help me unbrick

Im the most stupid person alive because
I didn't unlock my bootloader
I installed xzrecovery witch is a app that installs twrp
Then in twrp i wiped every thing
Then I tried to install a rom witch didn't work
Then i trend the phone off when i tried to do so twrp said your device is not rooted do you want to install super su i said yes the phone is now stuck on sony logo
Pliz help
aliamiri70007 said:
Im the most stupid person alive because
I didn't unlock my bootloader
I installed xzrecovery witch is a app that installs twrp
Then in twrp i wiped every thing
Then I tried to install a rom witch didn't work
Then i trend the phone off when i tried to do so twrp said your device is not rooted do you want to install super su i said yes the phone is now stuck on sony logo
Pliz help
Click to expand...
Click to collapse
You wiped everything and now there is no rom installed so its not going past the sony logo. You have two options.
1. Unlock bootloader if you want to run a custom rom.
2. Flash stock rom to go back to stock.
and how to flash stock rom , you need to have the flashtool , put your phone in donwloadmode ( volumne down + plug in the usb cable ) and then flash the stock rom of sony ( you can find the method on how to do it on google ) its simple and then you decide out of 2 options above from last post
Since your bootloader isn't unlocked your can use Sony Companion Software to repair your phone. When you click update there is a repair option. Select repair and hook up the phone in flashmode. Make sure your ZU is atleast 50% charged.
thanks for replying everyone i tried the flashtool stock rom installation and i got boot loop now i tried two different ftf files but they both result in boot loop what am i doing wrong?
aliamiri70007 said:
thanks for replying everyone i tried the flashtool stock rom installation and i got boot loop now i tried two different ftf files but they both result in boot loop what am i doing wrong?
Click to expand...
Click to collapse
can you flash the stock rom again and copy paste the log here in a code quote like this one:
Code:
write here
And what is your model? C6833 etc..
What stock rom did you download?
Which drivers did you use?
And which version of flashtool did you use?
And lastly what settings did you use when flashing the stock rom? All options included so ALL partitions being flashed. And none excluded.
Screenshots is always good help .
for locked bootloader http://support.sonymobile.com/fr/xperia-companion/
for unlocked bootloader https://developer.sonymobile.com/open-devices/flash-tool/
Thanks I didn't check the wipe section wich causes bootloader thanks again to everyone who helped
aliamiri70007 said:
Thanks I didn't check the wipe section wich causes bootloader thanks again to everyone who helped
Click to expand...
Click to collapse
You're welcome

Categories

Resources