[Q&A] [Tutorial] Xperia Z & ZL Bootloader Unlocking/Relocking - Xperia Z Q&A, Help & Troubleshooting

Q&A for [Tutorial] Xperia Z & ZL Bootloader Unlocking/Relocking
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer. Thanks for understanding and for helping to keep XDA neat and tidy! :smile:

4.4.4 Bootloader Unlock?
I have an Xperia Z C6616 (10.5.1.A.0.283) that I rooted using easy root via flashtool. However, in the service menu, it says I am unable to unlock the bootloader. Is this true? Will I be forced to flash back to 4.3 to unlock it?

japansam23 said:
I have an Xperia Z C6616 (10.5.1.A.0.283) that I rooted using easy root via flashtool. However, in the service menu, it says I am unable to unlock the bootloader. Is this true? Will I be forced to flash back to 4.3 to unlock it?
Click to expand...
Click to collapse
If it says you cannot unlock your bootloader, then you cannot unlock it at all, regardless of which firmware version is installed.
The C6616 bootloader is permanently locked because Bell requested it be that way and there's no way (either officially or unofficially) around it, unfortunately.
Sent from my C6603 using Tapatalk

If it says you cannot unlock your bootloader, then you cannot unlock it at all, regardless of which firmware version is installed.
The C6616 bootloader is permanently locked and there's no way (either officially or unofficially) around it, unfortunately.
Click to expand...
Click to collapse
Well thats incredibly frustrating. Is there any way then to flash new roms or install a recovery? Also, it might not matter, but before I updated to 4.4, it listed my model number as C6606.

Bootloader Issue
Hey guys, ran into a little issue. I flashed my phone with a stock ROM, C6603_10.3.A.0.423_Generic ES.ftf.
Figuring It'd be fine, I then proceeded to attempt to unlock my bootloader. However, this time after flashing this stock ROM, unlocking the bootloader would cause my phone to crash, resulting in having to reflash the stock rom again.
Any ideas?
Cheers.

Please help!
Hello, I need help with unlocking the bootloader for my Sony Xperia Z please. This is the first time I am doing this, so I am a extremely novice on these things. All I want is to flash the sony rom and install android 5 lollipop on my Xperia Z
I have done all the steps mentioned above but when I type the command fastboot.exe -I 0x0fce getvar version it just says waiting for device.
I don't know if my phone is even in fastboot mode. I have turned the developer mode on phone setting with USB debugging set to ON. When I connect my phone to the computer I press power and volume up for around 10 second before plugging in the USB. The phone vibrates 3 times and there is a sound in computer but nothing else happens. When I type the command adb devices, it shows no device attached.
I don't know if this is due to me not installing the drivers but I was tried to install Flashtool-drivers-1.5-20140318.exe file, the installation failed. So I went to advance startup setting and disable driver signing. It then installed. I also downloaded the fastboot package and clicked all the exe files. And my phone has its rooting status: Bootloader unlock allowed: Yes
Please help!

Kathmandu13 said:
I don't know if my phone is even in fastboot mode. I have turned the developer mode on phone setting with USB debugging set to ON. When I connect my phone to the computer I press power and volume up for around 10 second before plugging in the USB. The phone vibrates 3 times and there is a sound in computer but nothing else happens.
Click to expand...
Click to collapse
You're holding the wrong key combination.
Power your phone OFF first.
When the phone is off, hold volume UP only while connecting your device to your PC. Do not press the power button. The LED should light up blue when done correctly. You can then stop pressing the volume key.
Sent from my C6603

kingvortex said:
You're holding the wrong key combination.
Power your phone OFF first.
When the phone is off, hold volume UP only while connecting your device to your PC. Do not press the power button. The LED should light up blue when done correctly. You can then stop pressing the volume key.
Sent from my C6603
Click to expand...
Click to collapse
Oh Thank you so much! I think I unlocked the bootloader now
So what do I need to do now to install custom ROM?
If I understood correctly, I need to flash the current Sony ROM and install different one? Then again what is root? Is unlocking bootloader rooting? Also is the information on the forum up to date? because according to it the newest firmware is 10.3.1.A.0.244/10.3.1.A.2.67. But my firmware is 10.5.1.A.0.292. Please help, I tried finding these information but can't find them.

Kathmandu13 said:
Oh Thank you so much! I think I unlocked the bootloader now
So what do I need to do now to install custom ROM?
If I understood correctly, I need to flash the current Sony ROM and install different one? Then again what is root? Is unlocking bootloader rooting? Also is the information on the forum up to date? because according to it the newest firmware is 10.3.1.A.0.244/10.3.1.A.2.67. But my firmware is 10.5.1.A.0.292. Please help, I tried finding these information but can't find them.
Click to expand...
Click to collapse
In my own opinion, you shouldn't even unlock your bootloader without getting better known to the entire device and its ROMS/Kernels and etc.,
Anyway, I tink that you haven't made TA pratition backup even, and if I'm right, then you've erased your DRM keys forever without a way getting them back.
But if you have made TA partition backup, then we can proceed to explain next thing.
To flash a custom ROM, you don't have to flash newer nor older software version.
All you have to do is go to your favourite ROM thread and read the instructions very carefully, otherwise you're risking to brick/soft-brick your device.
But on different ROMs can be different flashing guides, for example, we can take "Validus" ROM:
VALIDUS
Flashing instructions are : (I'm going to quote them)
1. Make sure you have CWM installed and a working nandroid backup
2. Download the ROM.
3. Place the ROM on your SD-Card.
4.Extract boot.img included in zip and fastboot flash it via Flashtool or CMD
5. Reboot to recovery.
6. Wipe data-factory reset/cache partition/dalvik cache
7. Flash the ROM.
Optional- Flash GApps.
8. Reboot and Enjoy Validus!
Click to expand...
Click to collapse
So in overall, that mean at first you've to have CWM (ClockWorkMod Recovery) (but I think that it's not necessary if you would flash boot.img with it either way)
Secondly, you've to put the entire ROM in your SD Card (not in phone memory), you can include gapps as well,
Third, you need to extract the file named "boot.img" from the ROM which you've downloaded (Now i'm talking about VALIDUS and ONLY IF YOU'RE GOING TO INSTALL THIS ROM EXACTLY), but don't remove it from .rar/.zip.
After you've done everything what is written above, you can flash boot.img using the command prompt and fastboot file, which you were using to unlock your bootloader.
The command is this : fastboot flash boot boot.img
Then, write fastboot reboot and as soon as your LED will change color, push the volume up rocker and then you will be in recovery. After that, go to "Apply Update" --> "Choose from files" or sth (don't remember now), --> "Validus.zip/.rar". and optional you can flash gapps either.
And then pus the button to "Reboot now".
That's all - you've newest Validus build.
But the main point is that for example you would take Pabx rom, you'll have to do everything using CMD (fastboot)
PABX's ROM YUGA L
Look at yourself and compare everything.
Validus ROM is customized than Pabx ROM. It has more customatizations either : APPS, Control, Mods, Gesture and etc., and Pabx ROM is pure-stock L (I think).
I hope I anwered to all ur questions, if not - quote me

Thanks!
LaurynasVP said:
In my own opinion, you shouldn't even unlock your bootloader without getting better known to the entire device and its ROMS/Kernels and etc.,
Anyway, I tink that you haven't made TA pratition backup even, and if I'm right, then you've erased your DRM keys forever without a way getting them back.
But if you have made TA partition backup, then we can proceed to explain next thing.
To flash a custom ROM, you don't have to flash newer nor older software version.
All you have to do is go to your favourite ROM thread and read the instructions very carefully, otherwise you're risking to brick/soft-brick your device.
But on different ROMs can be different flashing guides, for example, we can take "Validus" ROM:
VALIDUS
Flashing instructions are : (I'm going to quote them)
So in overall, that mean at first you've to have CWM (ClockWorkMod Recovery) (but I think that it's not necessary if you would flash boot.img with it either way)
Secondly, you've to put the entire ROM in your SD Card (not in phone memory), you can include gapps as well,
Third, you need to extract the file named "boot.img" from the ROM which you've downloaded (Now i'm talking about VALIDUS and ONLY IF YOU'RE GOING TO INSTALL THIS ROM EXACTLY), but don't remove it from .rar/.zip.
After you've done everything what is written above, you can flash boot.img using the command prompt and fastboot file, which you were using to unlock your bootloader.
The command is this : fastboot flash boot boot.img
Then, write fastboot reboot and as soon as your LED will change color, push the volume up rocker and then you will be in recovery. After that, go to "Apply Update" --> "Choose from files" or sth (don't remember now), --> "Validus.zip/.rar". and optional you can flash gapps either.
And then pus the button to "Reboot now".
That's all - you've newest Validus build.
But the main point is that for example you would take Pabx rom, you'll have to do everything using CMD (fastboot)
PABX's ROM YUGA L
Look at yourself and compare everything.
Validus ROM is customized than Pabx ROM. It has more customatizations either : APPS, Control, Mods, Gesture and etc., and Pabx ROM is pure-stock L (I think).
I hope I anwered to all ur questions, if not - quote me
Click to expand...
Click to collapse
Thank you very much for your reply and yes perhaps you are right. I should not mess with my phone's software. My skill and knowledge on this is extremely limited. I think I did unlock my bootloader but I will leave it on that. My phone still runs fine for now. Unless I find some tutorial videos which I can understand, I will stay away from flashing my phone
Thanks again for help.

Kathmandu13 said:
Thank you very much for your reply and yes perhaps you are right. I should not mess with my phone's software. My skill and knowledge on this is extremely limited. I think I did unlock my bootloader but I will leave it on that. My phone still runs fine for now. Unless I find some tutorial videos which I can understand, I will stay away from flashing my phone
Thanks again for help.
Click to expand...
Click to collapse
Well, you shouldn't be afraid of flashing stock 5.0.x, as you're not flashing custom kernels. To flash pabx's rom, you just need to connect your phone via USB to PC, whilst holding Volum +. (Phone need to be turn on). Then blue led will show up and you're ready to write commands via CMD prompt, wich you can open in sdk/platform-tools/ (or simply download ADB and fastboot drivers).
To open them, just with holding RMB click on "open command prompt here", then write this command:
fastboot devices
Click to expand...
Click to collapse
And if it will show you like CXXXXXX (or something like that, if not even first letter is C, it's alright), you're ready to go.
Then download all files needed from Pabx site (ROM and gapps). Extract both in ADB-Fastboot driver's folder (in which are fastboot.exe, adb.exe). It should be these files: userdata.img, system.img, boot.img.
And then you just simple need to flash these IMGs:
fastboot flash userdata userdata.img
fastboot flash system system.img
fastboot flash boot boot.img
Click to expand...
Click to collapse
And then just type
fastboot reboot
Click to expand...
Click to collapse
.
Your phone will reboot and will load ~ 1-3 minutes.
Well, personally I don't encourge you to do that, I'm just suggesting. It's your choice to do that or not. I just have given you all the instructions.
Hope I helped you

Hi,
I have problem unlocking bootloader on my C6603. I successfully rooted it with easyroot, made TA backup, my phone says that unlocking bootloader is allowed but whenever i tried to do this it either fails or goes to bootloop. I was investigating a bit more and found some information saying that phone has to be simlock free with some certificates(???) and s1tool gives me answer that my simlock unlock is tampered. Is it the reason why i can't unlock bootloader? If so, is there any way to unlock it anyway?
Thanks in advance.
Sent from my C6603 using XDA Free mobile app

Unlocking Xperia Z bootloader
Hi guys
I 've got a trouble, i tried to unlock bootloader by flashtool and "classic" method. I've done it step by step like in video tutorial but finally cmd shows me that command.
I've checked it on other computer but it also failed.Installed all components + pc com.
Greetings.

Please someone tell me where is this goddamned "fastboot_with_Android_USB_file.rar" to download? It's almost four hours im searching everywhere to find it,but i can't.

Xperia Z2 stuck! help!!!
Hi guys, yesterday i tried to relock th bootloader of my xperia z2, and it was really easy, but now it doesn´t turn on, it´s stuck in flash mode, does anyone know what can i do to fix this? thanks a lot!

nikin101 said:
Hi guys, yesterday i tried to relock th bootloader of my xperia z2, and it was really easy, but now it doesn´t turn on, it´s stuck in flash mode, does anyone know what can i do to fix this? thanks a lot!
Click to expand...
Click to collapse
Did you relock while on a custom rom or kernel? Try flashing a stock FTF.
Sent from my C6603

kingvortex said:
Did you relock while on a custom rom or kernel? Try flashing a stock FTF.
Sent from my C6603
Click to expand...
Click to collapse
Yes, i think i did that. And how do i do that? And where can i download the stock FTF? Thanks, i'm new in this

nikin101 said:
Yes, i think i did that. And how do i do that? And where can i download the stock FTF? Thanks, i'm new in this
Click to expand...
Click to collapse
How to package and flash stock roms in FTF format
I wrote that guide for the Xperia Z, but the method is identical for the Z2. You will probably have to wipe data if you're coming from a custom rom.
Sent from my C6603

kingvortex said:
How to package and flash stock roms in FTF format
I wrote that guide for the Xperia Z, but the method is identical for the Z2. You will probably have to wipe data if you're coming from a custom rom.
Sent from my C6603
Click to expand...
Click to collapse
I can't find the words to thank you! I will try that today. Thanks a lot.

nikin101 said:
I can't find the words to thank you! I will try that today. Thanks a lot.
Click to expand...
Click to collapse
You're welcome.
Sent from my C6603

Related

[Q] Sorry, but i need help!! :(

Ok, i was looking for flashing a kernel on an Lg Optimus black (i do not own the device), but i really can't fins anything... Can someone be gentle with me and explain how to plug the device in fastboot mode and flash the kernel.... I work with the Xperia devices and there the life is easier xD. So the questions are:
1)Where can i find the drivers USB?
2)How to plug the device in fastboot mode??
3)How to unlock bootloader
and i think that when i achived those passages i know how to go on... maybe like this:
1- Enter in the folder with fastboot's files inside
2- press shift + right-click and then select open command prompt here
3- Type: fastboot flash boot boot.img
am i wrong?? Please tell all the things that can be helpfull, but only for me, maybe for others noobs like me that dosen't know anything about this device this post i think the can be very helpfull for lots of people. :laugh:
Thank you guys and for your time
p.s.: Sorry, for bad english
Enri1196 said:
Ok, i was looking for flashing a kernel on an Lg Optimus black (i do not own the device), but i really can't fins anything... Can someone be gentle with me and explain how to plug the device in fastboot mode and flash the kernel.... I work with the Xperia devices and there the life is easier xD. So the questions are:
1)Where can i find the drivers USB?
2)How to plug the device in fastboot mode??
3)How to unlock bootloader
and i think that when i achived those passages i know how to go on... maybe like this:
1- Enter in the folder with fastboot's files inside
2- press shift + right-click and then select open command prompt here
3- Type: fastboot flash boot boot.img
am i wrong?? Please tell all the things that can be helpfull, but only for me, maybe for others noobs like me that dosen't know anything about this device this post i think the can be very helpfull for lots of people. :laugh:
Thank you guys and for your time
p.s.: Sorry, for bad english
Click to expand...
Click to collapse
You can google these questions too..
Sent from my A2 using xda app-developers app
NC4777 said:
You can google these questions too..
Click to expand...
Click to collapse
but i can't find it out!!! plz if someone else have to answer like this plz stay away... Man please if it was a joke this wasn't funny i really don't know how to flash a new f*****g kernel, to flash cm10.1 nightly
The Optimus Black doesn't use fastboot. Everything is done through recovery.
Download Clockwork Mod from the Play store, use that app to flash a custom recovery.
Enter recovery by repeatedly pressing volume down at power up or use a reboot to recovery app.
To flash roms/kernels, copy to your sd card, boot into recovery, select install zip.
The bootloader is not locked, unless you have flashed the offical LG ICS rom with the smartflash tool. If you have and want to unlock it, just flash any froyo/gingerbread offical LG rom with smartflash, that will unlock.
1. Make sure you are rooted, if not, read Nooby's how-to on how to do it. It's a sticky in LGP970 section on xda.
2. Once rooted, you can install ROM Manager and flash cwm/twrp recovery from there. Give it root permissions when asked for.
3. Boot into recovery using ROM Manager or any other third-party app. Flash the .zip for the kernel you want. Make sure it is compatible with the ROM you are using.
4. Once kernel flashed, boot into the system.
Bootloader is generally unlocked unless you are running official ICS on your OB. If that is the case, don't do any of the above mentioned steps as you will end in a boot loop.
If on official ICS, use Smart Flash Tool to flash unlocked bootloader. You can follow instructions here on jockjoint's thread
Once bootloader is unlocked and you have flashed su.zip as per instructions in the previouslsy mentioned thread, boot into recovery (it's already there in the unlocked bootloader flash).
Once in there, flash a compatible kernel and ROM as per your needs/liking.

[Q] Stuck in bootloop (Free Xperia), cannot connect with ADB nor mount via recovery

So I followed the steps very carefully how to install Free Xperia on my Z1. When I booted up my phone in fastboot mode, LED turned blue and I got a new device on my computer under the name "Sony Fastboot Interface" (I believe I got it from Flashtool). I couldn't see my phone in "adb devices", the list was empty. However, I could still do a "fastboot flash boot.img" using the Free Xperia's boot.img. I rebooted using "fastboot reboot" and I was suddenly stuck in an endless loop of the "Free Xperia" boot screen.
So I tried adding another boot.img (Doomlord's "Advanced Stock Kernel with CWM Recovery.zip"). At least I got back the SONY boot screen, but I am still stuck in a loop. I went to the CWM Recovery menu and tried to mount the sdcard to my computer but with no success. I looked under Device Manager on my computer to check if the phone was detected, and frankly it is. However, it shows "Xperia Z1" with a yellow triangle stating "The drivers for this device are not installed. (Code 28)". No matter if I try to uninstall/update drivers or download the official Xperia Z1 drivers and point it to that, I get the message "Windows could not find driver software for your device." So I cannot connect my phone storage to my computer, can't access the phone via ADB, nor can I use fastboot boot a working boot.img.
I searched around on Google and found a solution using EMMA (Sony's own Flash Tool for Xperia devices). But I needed to register an account, and after doing so I never get a confirmation email to activate my account. So I'm stuck where I am. What to do now?
I'm not even sure if my phone is unlocked yet or not. I did the "fastboot.exe -i 0x0fce oem unlock 0xKEY" (with my own key I got in the mail from Sony's generator) and it said "OKAY [ 21.790s]" etc. I presumed that it got unlocked by then. Right?
Thanks in advance!
Well, if you followed all the steps on the sony site to get unlock bootloader then it should be unlocked. Cm roms don't work with stock kernels so flashing the advanced stock kernel will not help anything. When you're connected in fastboot mode, you use "fastboot devices" to see the list of device not "adb devices". Since you can get into fastboot mode then get into flash mode and flash a stock ftf with flashtool. Before doing that, try flashing pimped kernel and see if that works
What version of fxp did you flash btw?
Ahki767 said:
Well, if you followed all the steps on the sony site to get unlock bootloader then it should be unlocked. Cm roms don't work with stock kernels so flashing the advanced stock kernel will not help anything. When you're connected in fastboot mode, you use "fastboot devices" to see the list of device not "adb devices". Since you can get into fastboot mode then get into flash mode and flash a stock ftf with flashtool. Before doing that, try flashing pimped kernel and see if that works
What version of fxp did you flash btw?
Click to expand...
Click to collapse
Thanks for the answer. I was able to revert to stock FTF by following your advice.
I used the fxp honami. Latest CM11 (FXP320-cm-11-20140518-UNOFFICIAL-honami.zip). This was correct right? My phone is a C6903.
I don't understand how to proceed now though. You said I should try flashing a pimped kernel. I looked around and I'm so confused by how many pimped kernels there are, and I'm not exactly sure what a pimped kernel actually is. I need to find the right one specific to my firmware version? It's 14.3.A.0.757 for your info.
Thanks for your help!
bladefinor said:
Thanks for the answer. I was able to revert to stock FTF by following your advice.
I used the fxp honami. Latest CM11 (FXP320-cm-11-20140518-UNOFFICIAL-honami.zip). This was correct right? My phone is a C6903.
I don't understand how to proceed now though. You said I should try flashing a pimped kernel. I looked around and I'm so confused by how many pimped kernels there are, and I'm not exactly sure what a pimped kernel actually is. I need to find the right one specific to my firmware version? It's 14.3.A.0.757 for your info.
Thanks for your help!
Click to expand...
Click to collapse
Sounds like the latest one so that should be right.
Okay do you have root on .757?? If not, flash doomkernel or the advanced stock kernel to get working root and recovery on stock. And since you weren't sure if your bootloader is unlocked, make sure you double check on that before attempting to reflash fxp cm. I'm sure you know the steps to flash but I'll write it down anyways. Put the rom.zip onto your sdcard, get into your choice of recovery, wipe data factory reset, format /system, flash zip from sdcard. If it still doesn't work for you, try official cm builds instead
There's only one pimped kernel. It's a cm based kernel so don't run it on stock roms or you'll end up in bootloops again
Ahki767 said:
Sounds like the latest one so that should be right.
Okay do you have root on .757?? If not, flash doomkernel or the advanced stock kernel to get working root and recovery on stock. And since you weren't sure if your bootloader is unlocked, make sure you double check on that before attempting to reflash fxp cm. I'm sure you know the steps to flash but I'll write it down anyways. Put the rom.zip onto your sdcard, get into your choice of recovery, wipe data factory reset, format /system, flash zip from sdcard. If it still doesn't work for you, try official cm builds instead
There's only one pimped kernel. It's a cm based kernel so don't run it on stock roms or you'll end up in bootloops again
Click to expand...
Click to collapse
I do not have root on my .757. It's completely "stock" so to speak, besides the unlocked bootloader (if it is unlocked, I'm not quite sure). How do I check to see if it's unlocked or not? How exactly do you root? I thought I had found a "ROM" of choice (http://forum.xda-developers.com/showthread.php?t=2711982). But then I saw the prerequisites, that it already needed to be rooted to proceed. I've been looking for straight forward guides, but they all just complicate things with alternatives ways etc.
Which ROM would you recommend?
EDIT: I was able to check the phone's bootloader mode via Sony Mobile Flasher. It's unlocked. However, now I'm trying to enter Recover mode again but now since the phone boots correctly again, I never get any pink LED light or anything. No light, it just boots with the Sony/Xperia splash screen logos.
If you do not know if its unlocked then it is not unlocked.
Flash a stock FTF and spend a week or so reading up
You are lucky you have not bricked your phone...just flashing stuff with no idea what you are doing...
gregbradley said:
If you do not know if its unlocked then it is not unlocked.
Flash a stock FTF and spend a week or so reading up
You are lucky you have not bricked your phone...just flashing stuff with no idea what you are doing...
Click to expand...
Click to collapse
It's alright. I had it checked and it was unlocked. I just got the phone rooted now. It was fairly easy now when I had proper instructions...
Thanks for the help Ahki767!!
I still have one question remaining though... I cannot get Recovery mode to mount storage. Windows recognizes the device, but shows a yellow triangle:
i.imgur.com/so2idLB.jpg (apparently I cannot send links as a new member)
I tried selecting the official Xperia Z1 drivers downloaded from Sony's website. Got the message: "Windows could not find driver software for your device...". I also get the same message when searching the Internet. This prevents me from accessing the sdcard via Recovery mode.
Plus, I tried going into ADB sideload, and when doing the command: "adb devices", I get an empty list of devices. It doesn't say anything about not finding any devices, it's just empty underneath "List of devices attached".

Questions/concerns about CM12.1 + rooting + unlocking bootloader

Hey guys
So I just bought a new Z3C and I'm planning on rooting it and installing CM12.1 on it. But before that I wanna make sure I perfectly understood the entire process. So if anyone could help by answering/confirming some of the things below, I would really appreciate that.
First, Sony devices don't come with a default recovery? Did I get that part right? That's why I need to flash a custom one, right? I suppose this is also the reason why I need a custom recovery in order to flash CM12.1 on my phone. Since I don't know if CM can run without one.
Second of all, kingroot. Ok, so this is an app for PC or phone that will root your phone in one click. Still without needing to unlock the bootloader (thus compromising that TA partition), right? It's in Chinese but I guess I don't need to know Chinese to click the only button on the screen. ) So that won't be a problem.
Third, I need root access for the backup part, right? So after running kingroot, I need to make a backup of my DRM stuff, right? It won't be of any use in CM, I suppose. So I just keep it somewhere safe.
Another thing, since I don't already have a custom recovery, I need the "installer" version of that xzdrecovery recovery, right? Cause there is also a flashable zip version of it, and I was wondering how the hell do I install that with no default recovery.
Can CM12 run on a locked bootloader? Probably stupid question. But this forum seems to pack some really interesting tricks I never thought were possible. So...I'm asking.
One thing I didn't quite understand: why do I need to flash part of CM12.1 to have a working recovery? Is the recovery not usable after installing it? Does it need a "simulated" ROM in order to be accessible/visible? I mean, on my SGS4, I just had to have a custom recovery (in my case it was CWM, but I'm not sure there is such a thing for the Z3C) and then just boot into it and flash CyanogenMod ROM or any other custom ROM for that matter. I didn't have to "split" the installation. First the boot.img, and then the rest (which will basically rewrite the boot.img anyway). So this part is still a bit confusing to me. Can anyone explain?
Thank you very much.
arsradu said:
First, Sony devices don't come with a default recovery? Did I get that part right? That's why I need to flash a custom one, right? I suppose this is also the reason why I need a custom recovery in order to flash CM12.1 on my phone. Since I don't know if CM can run without one.
Click to expand...
Click to collapse
As far as I know there really isn't a default recovery for Sony devices so to install CM you will need a recovery.
arsradu said:
Second of all, kingroot. Ok, so this is an app for PC or phone that will root your phone in one click. Still without needing to unlock the bootloader (thus compromising that TA partition), right? It's in Chinese but I guess I don't need to know Chinese to click the only button on the screen. ) So that won't be a problem.
Click to expand...
Click to collapse
I do not recommend kingroot but you can try it if you trust it. I used the xda guide on doing it and it worked fine for me: http://forum.xda-developers.com/z3-compact/general/how-to-root-backup-drm-keys-t3013343 (takes some time but its worth it if you ever want to go back to factory). As long as the bootloader stays locked the TA partition wont be touched thats right but once you unlock it you will lose all DRM keys and they wont restore if you flash a factory frimware again.
arsradu said:
Third, I need root access for the backup part, right? So after running kingroot, I need to make a backup of my DRM stuff, right? It won't be of any use in CM, I suppose. So I just keep it somewhere safe.
Click to expand...
Click to collapse
Yes you need root to backup the TA parition and yes only Sony roms use the DRM keys, CM doesn't touch them.
arsradu said:
Another thing, since I don't already have a custom recovery, I need the "installer" version of that xzdrecovery recovery, right? Cause there is also a flashable zip version of it, and I was wondering how the hell do I install that with no default recovery.
Click to expand...
Click to collapse
You install it over fastboot pretty much or with locked bootloader you use the Sony flash tool. More here: http://forum.xda-developers.com/z3-compact/general/how-to-root-backup-drm-keys-t3013343
Also keep in mind that custom Kernels like "M5 Kernel" come with a pre-installed recovery.
arsradu said:
Can CM12 run on a locked bootloader? Probably stupid question. But this forum seems to pack some really interesting tricks I never thought were possible. So...I'm asking.
Click to expand...
Click to collapse
Im pretty sure its not possible. For not sony kernels you need a unlocked bootloader, otherwise it wont even boot up.
arsradu said:
One thing I didn't quite understand: why do I need to flash part of CM12.1 to have a working recovery? Is the recovery not usable after installing it? Does it need a "simulated" ROM in order to be accessible/visible? I mean, on my SGS4, I just had to have a custom recovery (in my case it was CWM, but I'm not sure there is such a thing for the Z3C) and then just boot into it and flash CyanogenMod ROM or any other custom ROM for that matter. I didn't have to "split" the installation. First the boot.img, and then the rest (which will basically rewrite the boot.img anyway). So this part is still a bit confusing to me. Can anyone explain?
Click to expand...
Click to collapse
Unlike Samsung... Sony devices have no recovery (maybe at a later time?) so you cant just replace the stock recovery with a custom one. You have to take out boot.img because fastboot cant flash entire zips like a recovery, so you flash the boot.img over fastboot which installs the recovery for you.
After that you execute "fastboot reboot" and spam your volume up key till you enter the recovery and from there you can install cyanogenmod and other.
MyPictures said:
As far as I know there really isn't a default recovery for Sony devices so to install CM you will need a recovery.
I do not recommend kingroot but you can try it if you trust it. I used the xda guide on doing it and it worked fine for me: http://forum.xda-developers.com/z3-compact/general/how-to-root-backup-drm-keys-t3013343 (takes some time but its worth it if you ever want to go back to factory). As long as the bootloader stays locked the TA partition wont be touched thats right but once you unlock it you will lose all DRM keys and they wont restore if you flash a factory frimware again.
Yes you need root to backup the TA parition and yes only Sony roms use the DRM keys, CM doesn't touch them.
You install it over fastboot pretty much or with locked bootloader you use the Sony flash tool. More here: http://forum.xda-developers.com/z3-compact/general/how-to-root-backup-drm-keys-t3013343
Also keep in mind that custom Kernels like "M5 Kernel" come with a pre-installed recovery.
Im pretty sure its not possible. For not sony kernels you need a unlocked bootloader, otherwise it wont even boot up.
Unlike Samsung... Sony devices have no recovery (maybe at a later time?) so you cant just replace the stock recovery with a custom one. You have to take out boot.img because fastboot cant flash entire zips like a recovery, so you flash the boot.img over fastboot which installs the recovery for you.
After that you execute "fastboot reboot" and spam your volume up key till you enter the recovery and from there you can install cyanogenmod and other.
Click to expand...
Click to collapse
Alright. Thank you a lot for your answers.
So, to sum up:
First, I need to root my device. You said you would not recommend Kingroot. Ok. But I'm on stock Lollipop right now. And for as far as I understood, in order to get root on it without using Kingroot method, I need to downgrade to KitKat using FlashTool. Did I get it right?
Second, I need to backup my TA partition stuff.
Third, I need to flash the boot.img from CM12.1 flashable zip and then the recovery (flashable zip version of it, right?). In this order. Am I right?
And for the recovery part, I think I'm gonna go with that FlashTool (since I already got it for downgrading to KitKat) or via fastboot (command line), for which I need the Android SDK installed, I suppose?
Forth, unlock the bootloader. I guess I'm gonna have to Google that part. I saw some videos explaining how to do that, so I guess I'm gonna be ok.
Fifth, boot into recovery and flash CM12.1 (finally).
Please, let me know if I got the flow right or if you would make any suggestions/adjustments/corrections to it.
Also, one other thing, I heard people not being able to flash back stock and booting with it, after having a custom ROM installed, even after re-adding the content of the TA partition back and re-locking the bootloader. Any idea how to get this right from the first time, in case I need to revert to stock?
Again, big thank you for your help.
arsradu said:
Alright. Thank you a lot for your answers.
So, to sum up:
First, I need to root my device. You said you would not recommend Kingroot. Ok. But I'm on stock Lollipop right now. And for as far as I understood, in order to get root on it without using Kingroot method, I need to downgrade to KitKat using FlashTool. Did I get it right?
Second, I need to backup my TA partition stuff.
Third, I need to flash the boot.img from CM12.1 flashable zip and then the recovery (flashable zip version of it, right?). In this order. Am I right?
And for the recovery part, I think I'm gonna go with that FlashTool (since I already got it for downgrading to KitKat) or via fastboot (command line), for which I need the Android SDK installed, I suppose?
Forth, unlock the bootloader. I guess I'm gonna have to Google that part. I saw some videos explaining how to do that, so I guess I'm gonna be ok.
Fifth, boot into recovery and flash CM12.1 (finally).
Please, let me know if I got the flow right or if you would make any suggestions/adjustments/corrections to it.
Also, one other thing, I heard people not being able to flash back stock and booting with it, after having a custom ROM installed, even after re-adding the content of the TA partition back and re-locking the bootloader. Any idea how to get this right from the first time, in case I need to revert to stock?
Again, big thank you for your help.
Click to expand...
Click to collapse
- Yes you need to downgrade to a version where that root exploit isn't patched and root that way
- Yea then when you got root and all, you use that tool to backup your TA partition
- Yea after that you unlock your bootloader: http://developer.sonymobile.com/unlockbootloader/unlock-yourboot-loader/ and then you flash boot.img from CM (or a custom Kernel that implements a recovery). After flashing the boot.img you reboot into your recovery and flash the whole Cyanogenmod.zip there (Apply update). I just installed my recovery over fastboot, never actually tried the FashTool way. fastboot.exe is in the Android SDK yeah but you can also just get the small ADB installer which has it too: http://forum.xda-developers.com/showthread.php?t=2588979 (For Linux you need to install it over your package manager I think).
- No. You need to unlock the bootloader before, otherwhise it wont allow you to flash a custom boot.img
Not sure about the restoring process, I kinda don't think that I will move back from CM anyways.
However if I would go back then I would try this:
- Relock bootloader
- Factory reset
- Flash back old sony rom with root exploit over flashtool
- Gain root over that exploit and use the TA Backup tool to restore TA partition
- Install latest Sony ROM and that should work? (Not sure)
Can you post one of those theards where they get issues with restoring? How do they do it?
MyPictures said:
- Yes you need to downgrade to a version where that root exploit isn't patched and root that way
- Yea then when you got root and all, you use that tool to backup your TA partition
- Yea after that you unlock your bootloader: http://developer.sonymobile.com/unlockbootloader/unlock-yourboot-loader/ and then you flash boot.img from CM (or a custom Kernel that implements a recovery). After flashing the boot.img you reboot into your recovery and flash the whole Cyanogenmod.zip there (Apply update). I just installed my recovery over fastboot, never actually tried the FashTool way. fastboot.exe is in the Android SDK yeah but you can also just get the small ADB installer which has it too: http://forum.xda-developers.com/showthread.php?t=2588979 (For Linux you need to install it over your package manager I think).
- No. You need to unlock the bootloader before, otherwhise it wont allow you to flash a custom boot.img
Not sure about the restoring process, I kinda don't think that I will move back from CM anyways.
However if I would go back then I would try this:
- Relock bootloader
- Factory reset
- Flash back old sony rom with root exploit over flashtool
- Gain root over that exploit and use the TA Backup tool to restore TA partition
- Install latest Sony ROM and that should work? (Not sure)
Can you post one of those theards where they get issues with restoring? How do they do it?
Click to expand...
Click to collapse
It was a post in a long thread. I'm not sure I can find it right now.
Anyway, I got stuck at flashing back KitKat. FlashTool says "waiting for flashmode", whike asking me to disconnect my phone, press the back button (I got it that this is for older phones that do have a physical button), and plugging back. Which I did. The result being a very nice animation for charging. The USB debugging is ON. What am I missing here?
Sent from my D5803 using Tapatalk
arsradu said:
It was a post in a long thread. I'm not sure I can find it right now.
Anyway, I got stuck at flashing back KitKat. FlashTool says "waiting for flashmode", whike asking me to disconnect my phone, press the back button (I got it that this is for older phones that do have a physical button), and plugging back. Which I did. The result being a very nice animation for charging. The USB debugging is ON. What am I missing here?
Sent from my D5803 using Tapatalk
Click to expand...
Click to collapse
Did you install the drivers properly and on which Operating system are you flashing it?
MyPictures said:
Did you install the drivers properly and on which Operating system are you flashing it?
Click to expand...
Click to collapse
I would say yes. I mean...after googling a bit, I saw that I actually don't need to just "ignore" that message asking to press the Back button, but to actually press Volume Down instead. Which I did. And I was able to go into Flash Mode. (Flash Tool says "device connected in Flash Mode"). The device was properly recognized in MTP mode. Still, I had to manually install the Flash-tool drivers to get it recognized in flash mode, as well. Not sure why...
I mean, if the phone was properly recognized without manually installing anything (Windows downloaded and installed its own drivers), why the hell do I need to install custom drivers to get it recognized in flash mode? By the way, this "flash mode" is similar to Samsung's "Download Mode", for as far as I could see. And, just like on Samsung's devices, the access is made by pressing the Volume Down upon booting up.
Anyway, even though the device is now recognized in flash mode, I still get an error trying to flash stock 4.4.4.
I get this:
Code:
14/014/2015 21:14:34 - INFO - Please connect your device into flashmode.
14/016/2015 21:16:28 - INFO - Device disconnected
14/017/2015 21:17:03 - INFO - Device connected in flash mode
14/017/2015 21:17:03 - INFO - Opening device for R/W
14/017/2015 21:17:03 - INFO - Reading device information
14/017/2015 21:17:03 - INFO - Unable to read from phone after having opened it.
14/017/2015 21:17:03 - INFO - trying to continue anyway
14/017/2015 21:17:03 - INFO - Start Flashing
14/017/2015 21:17:03 - INFO - Processing loader.sin
14/017/2015 21:17:03 - INFO - Checking header
14/017/2015 21:17:03 - ERROR - Processing of loader.sin finished with errors.
14/017/2015 21:17:03 - INFO - Ending flash session
14/017/2015 21:17:03 - ERROR - Error in processHeader : 1 : Incorrect function.
14/017/2015 21:17:03 - ERROR - Error flashing. Aborted
14/017/2015 21:17:03 - INFO - Device connected in flash mode
And after a while, it automatically reboots in normal mode.
Windows version is Windows 10. But I'm not sure that's the problem here since, as I said, the device does get recognized both in MTP and flash modes. Also, for as far as I could see, other people are having the same issues on other versions of Windows.
Hmm not exactly sure but for Windows 8 and 8.1 (also Vista 64 bit and 7 64 Bit) You sometimes need to disable enforced driver signature.
Are you running the correct executable for your OS?:
FlashTool64.exe for 64 Bit OS and
FlashTool.exe for 32 Bit OS.
Is the device properly recognized in your device manager. Maybe re-downloading the frimware might help.
MyPictures said:
Hmm not exactly sure but for Windows 8 and 8.1 (also Vista 64 bit and 7 64 Bit) You sometimes need to disable enforced driver signature.
Are you running the correct executable for your OS?:
FlashTool64.exe for 64 Bit OS and
FlashTool.exe for 32 Bit OS.
Is the device properly recognized in your device manager. Maybe re-downloading the frimware might help.
Click to expand...
Click to collapse
Yes, I'm running FlashTool64.exe since I'm running a 64-bit version of Windows.
The device is correctly recognized in flash mode (after manually selecting the driver installed with flash-tool). See the attached image for more info.
But indeed maybe I got the wrong firmware. Problem is that I'm not really sure which one should I choose.
I got one called D5803_23.0.1.A.5.77_Customized_FR.ftf. I don't mind it that it's in French. All of them have English anyway.
Also, I saw one for UK here called D5803_23.0.A.2.105_UK.ftf. Seems to be different.... I will try with that as well.
Update: same error with that UK firmware, as well.
Update2: Well I'm half way there. Got 4.4.4 installed and got it rooted. YAY. Still trying to figure out why adb is not correctly running when trying to backup TA.
Update3: ok, backup done too!
Update4: the boot.img that comes with CM12.1 doesn't seem to have a recovery.... Or if it does, I couldn't boot in it so I can flash CM12.1.
I tried the one from Doomlord (Z3c_DooMLoRD_AdvStkKernel_v01_FW-105.img) and that seems to be based on CWM v6.0.4.7.
Problem with that is that, even though I can boot into recovery, I can't flash CM12.1. It says error status 7. Any idea why or how to fix this?
I belive error 7 indicates a outdated recovery (CM 12.1 needs a up to date one).
MyPictures said:
I belive error 7 indicates a outdated recovery (CM 12.1 needs a up to date one).
Click to expand...
Click to collapse
Might be. The problem is the device is not correctly recognized upon flashing (it says the device is "Aries" but the ROM is for D5803, D5833, z3c LOL), due to the check made within the updater-script (first line). For as far as I could see, this is a known issue... Not sure why it hasn't been fixed by now.
Anyway, removing that line will get the ROM installed successfully (at least with THAT recovery).
So I'm on CM12.1 , been for a few days now (thank you for your help), and I was wondering if there are any "permanent" recoveries (compatible with CM12.1, of course) that I can flash, something that can give me the ability to boot into recovery (and not Cyanogen Recovery, since that one sucks) and do things like nandroid backup (I know TWRP and CWM can do that, but I couldn't find any permanent version of those (or maybe I just didn't dig deep enough), and I'm not sure they are compatible with CM12.1) and formatting /system. The last one is really important for a clean installation of the ROM, especially since it doesn't look like it's done by the ROM itself.

[HELP] How to Install TWRP without PC.

Hello everyone,
I'm in a little trouble. I need to install custom recovery on my Xperia SP C5302 but I have no PC.
How can I install TWRP ( preferred ) / CWM/Philz on my device ? Is there any way ?
Thank You.
Note : There's a cyber cafe beside my house. But all their computers are running Windows XP.
If there's no way to install without PC then can I be able to install custom recovery on my device with Win XP ?
Thanks again.
Do you have root?
TechnoSparks said:
Do you have root?
Click to expand...
Click to collapse
Yes I'm rooted and my bootloader is unlocked.
Are you ready to bear any risks?
TechnoSparks said:
Are you ready to bear any risks?
Click to expand...
Click to collapse
Yes I'm. but what kinda risk ? soft brick ? or something else ?
rhrokib said:
Yes I'm. but what kinda risk ? soft brick ? or something else ?
Click to expand...
Click to collapse
Most likely soft brick. But who knows, hard bricks even happen when they never touched anything for some people.
TechnoSparks said:
Most likely soft brick. But who knows, hard bricks even happen when they never touched anything for some people.
Click to expand...
Click to collapse
okay. Is there any way to install TWRP without PC then ?
or any custom recovery. philz, CWM anything
Install a terminal emulator by Jake Pelvich from Play store.
Extract the official TWRP img from the TWRP fota zip, or, if you already downloaded an official img, put it into the root of your internal storage.
For ease of access, but still mnemonic, rename the img into "twrp.img"
Open your terminal emulator, and enter "su" and run. This will make the terminal to request root, as you're elevating the shell into root.
Now, we "dd" the TWRP image into your FOTA partition. Copy and run the following:
Code:
dd if=/storage/emulated/0/twrp.img of=/dev/block/platform/msm_sdcc.1/by-name/FOTAKernel bs=4096
Reboot to check if recovery is accessible after hitting volume up when LED lights up
TechnoSparks said:
Install a terminal emulator by Jake Pelvich from Play store.
Extract the official TWRP img from the TWRP fota zip, or, if you already downloaded an official img, put it into the root of your internal storage.
For ease of access, but still mnemonic, rename the img into "twrp.img"
Open your terminal emulator, and enter "su" and run. This will make the terminal to request root, as you're elevating the shell into root.
Now, we "dd" the TWRP image into your FOTA partition. Copy and run the following:
Reboot to check if recovery is accessible after hitting volume up when LED lights up
Click to expand...
Click to collapse
Thanks a lot. Maybe it works. But how to boot into recovery ?
explain me please.
rhrokib said:
Thanks a lot. Maybe it works. But how to boot into recovery ?
explain me please.
Click to expand...
Click to collapse
Like already mentioned, press volume button UP when the LED lights up during your XSP bootup
TechnoSparks said:
Like already mentioned, press volume button UP when the LED lights up during your XSP bootup
Click to expand...
Click to collapse
There is no LED during bootup. Either I didn't understand. I tried with software to boot into recovery. But my device just complete a reboot everytime. What to do ?
rhrokib said:
There is no LED during bootup. Either I didn't understand. I tried with software to boot into recovery. But my device just complete a reboot everytime. What to do ?
Click to expand...
Click to collapse
What ROM are you using? You need a ROM that can boot a FOTAKernel recovery, and not all of them can (especially stock based ones, since stock by default doesn't allow this).
Ditto.
If you are not using a ROM that supports booting from TWRP, then I can't suggest a method to install other recoveries without a PC.
I do not say it is impossible though, but it'll take a lot of brain power, and moderate understanding of shell scripting in order to reverse engineer the other recoveries provided in the dev subforum.
TechnoSparks said:
Ditto.
If you are not using a ROM that supports booting from TWRP, then I can't suggest a method to install other recoveries without a PC.
I do not say it is impossible though, but it'll take a lot of brain power, and moderate understanding of shell scripting in order to reverse engineer the other recoveries provided in the dev subforum.
Click to expand...
Click to collapse
I tried with Terminal Emulator and it seems okay. But I can't boot into recovery. Tried a lot of process. Doesn't work. Now can I install TWRP with pc ? or I need to flash my stock back to install from PC as I replaced my stock img file ?
Again if I flash stock now, will my bootloader be locked again ?
rhrokib said:
I tried with Terminal Emulator and it seems okay. But I can't boot into recovery. Tried a lot of process. Doesn't work. Now can I install TWRP with pc ? or I need to flash my stock back to install from PC as I replaced my stock img file ?
Again if I flash stock now, will my bootloader be locked again ?
Click to expand...
Click to collapse
Like already explained by Tomoms and me, you need a ROM that supports booting recovery from the FOTA partition in order for my explained method to work. You didn't also tell us which ROM you are using.
No, you dont need to flash your stock back. Leaving the FOTA partition replaced does no absolute harm at all.
If you flash stock, your bootloader will still remain unlocked. In order to relock, you will need to explicitly relock it, by using the relock bootloader option provided by flashtool. If you backed up your TA partition, restoring it will automatically relock your bootloader.
TechnoSparks said:
Like already explained by Tomoms and me, you need a ROM that supports booting recovery from the FOTA partition in order for my explained method to work. You didn't also tell us which ROM you are using.
No, you dont need to flash your stock back. Leaving the FOTA partition replaced does no absolute harm at all.
If you flash stock, your bootloader will still remain unlocked. In order to relock, you will need to explicitly relock it, by using the relock bootloader option provided by flashtool. If you backed up your TA partition, restoring it will automatically relock your bootloader.
Click to expand...
Click to collapse
Okay thanks everyone. I finally installed TWRP, CWM as well as Philz.
I was using 4.3 Stock. Finally installed those from Doomlord's thread. That was really handy to use.
again thank you all for supporting me.
rhrokib said:
Okay thanks everyone. I finally installed TWRP, CWM as well as Philz.
I was using 4.3 Stock. Finally installed those from Doomlord's thread. That was really handy to use.
again thank you all for supporting me.
Click to expand...
Click to collapse
Alright, good to know you finally installed the recoveries. 4.3 Stock ROM does not support my method explained in my recent post. And no problem!

Stuck in bootloop after trying to flash TWRP

SOLVED - See second post
-----------------------------------------
Hi there, I'm big trouble.
I have a F8131 with unlocked bootloader. The system was on the latest Oreo.
I tried to flash the latest TWRP using flashtool. After it finished, I get a bootloop, which goes through the unlocked warning to the Sony screen again and again.
What should I do now? Thanks to you all for helping in any way possible!
EDIT: I reflashed TWRP from command line using flashboot and now I can get to TWRP, but now it tells me there is no OS installed (WTF?), so if reboot I go back to the bootloop. Should I try to flash a rom from TWRP, is there something I am missing?
Luckily I was able to solve the issue. I will leave this here in case someone is stuck in the same situation.
1) Use Flashtool in flashmode to flash the FTF firmware you get from XperiFirm into the phone. If you get an error related to drivers, use the Flashtool drivers tool (located in a subfolder in the Flashtool installation folder) to install a set of working drivers (also applies to flashboot drivers).
2) After flashing, disconnect the phone and reconnect it in flashboot mode. Flash TWRP through fastboot commands in a cmd terminal. Flash a boot.img if you have one.
3) This should work, and you should be able to continue to boot your phone or get into TWRP to flash custom packages (Safety, DRM fixes, Magisk, etc) or ROMs.
leandrox said:
Luckily I was able to solve the issue. I will leave this here in case someone is stuck in the same situation.
1) Use Flashtool in flashmode to flash the FTF firmware you get from XperiFirm into the phone. If you get an error related to drivers, use the Flashtool drivers tool (located in a subfolder in the Flashtool installation folder) to install a set of working drivers (also applies to flashboot drivers).
2) After flashing, disconnect the phone and reconnect it in flashboot mode. Flash TWRP through fastboot commands in a cmd terminal. Flash a boot.img if you have one.
3) This should work, and you should be able to continue to boot your phone or get into TWRP to flash custom packages (Safety, DRM fixes, Magisk, etc) or ROMs.
Click to expand...
Click to collapse
um, i need assistance with this
can you help me with it?
velva said:
um, i need assistance with this
can you help me with it?
Click to expand...
Click to collapse
Sure. Where are you at right now?
leandrox said:
Sure. Where are you at right now?
Click to expand...
Click to collapse
About drm fix, is it the same file all phone could use? Or is it special, like TA images? I walk around xda, and somehow i am still not understand.
hasbyduryea said:
About drm fix, is it the same file all phone could use? Or is it special, like TA images? I walk around xda, and somehow i am still not understand.
Click to expand...
Click to collapse
I used the one available at posts with tutorials for installing Kernel + TWRP + Roms for my device. I am not sure whether the drmfix is the same for all Sony Xperia devices.
Nevertheless, I don't think it worked for me, as my keys don't look like they have been recovered when I check them. I haven't noticed any problems so far, though, so maybe it's not a big deal.

Categories

Resources