[Q] fastboot oem unlock with correct code fails with "command did not succeed" - Xperia Z Q&A, Help & Troubleshooting

[Q] fastboot oem unlock with correct code fails with "command did not succeed"
Hi,
I recently got an xperia Z into my hands and wanted to unlock the bootloader.
I checked the IMEI in the system settings and requested and received an unlock code for the device.
I unlocked the bootloader with the code,
but now I am not able to flash or boot anything via fastboot (device still boots normally though).
When trying to flash e.g. twrp to the boot partition
(
Code:
fastboot flash boot boot.img
)
it fails with "remote: command not allowed"
Also trying
Code:
fastboot boot boot.img
does not work properly:
In this case it just reboots into Android.
I am using Linux to flash stuff.
I already tried using the flashtool, which also didnt bring me any success.
Does anyone have an idea or a solution to this problem?
Best regards

Related

[SOLVED] [Q] HTC One Doesn't boot, Can't Get Into Bootloader, only Fastboot

Hi guys,
I've searched the entire web (including all the XDA links regarding the HTC One), tried every solution out there and still can't fix my problem. I don't know where else to turn, so I am creating a new thread in XDA Developers.
Originally, I had unlocked my bootloader and rooted the phone to use stock android. A couple days ago, I tried to re-lock the bootloader and change back to the original Sense UI; however, when I did this, I got stuck in a boot loop (the phone kept rebooting and didn't boot into the OS).
I then went back into fastboot and restored all the files and settings.
Now, the only things I can actually go into is fastboot and bootloader (cannot boot into OS or even see the boot screen). The only way the phone can connect to my PC is if I'm in fastboot. When I go into bootloader, the phone disconnects from my PC.
My phone is from Telus in Canada and I can find a couple .zip RUU files on the web for Telus, however when I try to flash the phone using the command "fastboot flash zip filename.zip", I get the error "signature verify fail."
When I tried to use the RUU.exe from BrightStar (developer version), the update failed and there was a message saying to download the original firmware.
The last thing I tried was the command "fastboot oem rebootRUU" (I did this to change the CID and MID, so I could use the Google Play RUU). When I do this, it goes to a black boot screen that has the HTC logo in grey (this is the boot screen I got from trying to use the BrightStar RUU.exe. It was originally a white screen with the HTC logo in green.). When I'm at this screen, I can communicate with the phone using fastboot commands, however when I try to change the CID, I get the error: "status read failed (too many links)," and when I try to change the MID, I get the error: "Command error !!!"
Just to remind you guys, I can only communicate with the phone using fastboot commands. No adb.
I have officially given up and gone crazy! Please Help!!!
*UPDATE* - Sorry, forgot to mention that I've idiotically re-locked the bootloader. Unlocking the bootloader would probably get rid of the "signature verify fail" message. I'm unable to flash the recovery because the bootloader is locked and I can't get into the filesystem because the phone needs to go into the OS for that.
When I try to unlock the bootlader by using "fastboot flash unlocktoken Unlock_code.bin" it gives me the error: "cannot open 'Unlock_code.bin'."
I need to be able to access and make changes to the file system by using fastboot commands and I have no idea how to do this.
*UPDATE #2* - I've managed to re-unlock the bootlader (I didn't have the Unlock_code.bin file in the same directory as the current directory in my cmd window). I've re-flashed the recovery successfully. Now when I reboot, it goes into recovery mode (still can't boot into the OS). I'm using ClockWorks for the recovery.
Now I'm unable to root the phone. I'm trying to write SuperSU v1.65 to the phone by using the command: "fastboot flash zip UPDATE-SuperSU-v1.65.zp" and I get the error message: "remote: not allowed."
I can flash the recovery.img and boot.img (can't flash system.img because there's "not enough space"), but I can't flash .zip files
When I try flashing another boot.img, I still get the same thing. The phone goes to the boot screen and can't boot. Then, it reboots and goes automatically into recovery (I can still get into the bootloader and recovery).
Any suggestions to get past these permissions?
bkhosh2 said:
Hi guys,
I've searched the entire web (including all the XDA links regarding the HTC One), tried every solution out there and still can't fix my problem. I don't know where else to turn, so I am creating a new thread in XDA Developers.
Originally, I had unlocked my bootloader and rooted the phone to use stock android. A couple days ago, I tried to re-lock the bootloader and change back to the original Sense UI; however, when I did this, I got stuck in a boot loop (the phone kept rebooting and didn't boot into the OS).
I then went back into fastboot and restored all the files and settings.
Now, the only things I can actually go into is fastboot and bootloader (cannot boot into OS or even see the boot screen). The only way the phone can connect to my PC is if I'm in fastboot. When I go into bootloader, the phone disconnects from my PC.
My phone is from Telus in Canada and I can find a couple .zip RUU files on the web for Telus, however when I try to flash the phone using the command "fastboot flash zip filename.zip", I get the error "signature verify fail."
When I tried to use the RUU.exe from BrightStar (developer version), the update failed and there was a message saying to download the original firmware.
The last thing I tried was the command "fastboot oem rebootRUU" (I did this to change the CID and MID, so I could use the Google Play RUU). When I do this, it goes to a black boot screen that has the HTC logo in grey (this is the boot screen I got from trying to use the BrightStar RUU.exe. It was originally a white screen with the HTC logo in green.). When I'm at this screen, I can communicate with the phone using fastboot commands, however when I try to change the CID, I get the error: "status read failed (too many links)," and when I try to change the MID, I get the error: "Command error !!!"
Just to remind you guys, I can only communicate with the phone using fastboot commands. No adb.
I have officially given up and gone crazy! Please Help!!!
Click to expand...
Click to collapse
Try command "fastboot erase cache", then try to re-flash an other recovery (recommended : twrp 2.6.3.3)
superbellefleche said:
Try command "fastboot erase cache", then try to re-flash an other recovery (recommended : twrp 2.6.3.3)
Click to expand...
Click to collapse
I'm sorry, but I'm kind of a noob. How exactly do I re-flash a recovery. do I do this using the command: "fastboot flash recovery recovery.img" or should I try "fastboot flash zip filname.zip" (RUU.zip) again?
*UPDATE* - I've tried erasing the cache and re-flashing the recovery and I still get the error message: "signature verify fail."
I'm still waiting for someone to help me. Is anyone going to help me fix my problem or is my HTC One doomed?
If you are on Telus
Download http://www.htc1guru.com/dld/ruu-zip...157-04_release_336571_signed_2_decrypted-zip/
Relock your bootloader
Then
fastboot oem rebootRUU
fastboot flash zip RUU_ZIP_M7_UL_JB43_SENSE50_MR_TELUS_WWE_3.22.661.1_R3_Radio_4A.20.3263.16_10.38k.1157.04_release_336571_signed_2_decrypted.zip
May have to run the flash zip command twice..
SaHiLzZ said:
If you are on Telus
Relock your bootloader
Then
fastboot oem rebootRUU
fastboot flash zip RUU_ZIP_M7_UL_JB43_SENSE50_MR_TELUS_WWE_3.22.661.1_R3_Radio_4A.20.3263.16_10.38k.1157.04_release_336571_signed_2_decrypted.zip
May have to run the flash zip command twice..
Click to expand...
Click to collapse
I've already tried that. When the bootloader is locked, I get the error: "signature verify fail."
OK.. Unlock bootloader, flash custom recovery, adb push this file: http://www.htc1guru.com/2013/11/guru-reset-3-22-661-1/, and install it from recovery.
SaHiLzZ said:
OK.. Unlock bootloader, flash custom recovery, adb push this file
Click to expand...
Click to collapse
I can't use adb commands...
I have all kinds of USB drivers installed (including the one from SDK Manager). When I type in the command "adb devices", I get nothing.
bkhosh2 said:
I can't use adb commands...
I have all kinds of USB drivers installed (including the one from SDK Manager). When I type in the command "adb devices", I get nothing.
Click to expand...
Click to collapse
adb commands will work if your in twrp recovery
and the reason your ruu.zip failed is because you were not in fastboot oem rebootRUU when you tried them, seems you mixing and matching different forums of flashing .. it don't work like that.
Just to re-iterate..
1. fastboot oem rebootRUU (this will show a gray HTC logo on black screen)
2. fastboot flash zip RUU_ZIP_M7_UL_JB43_SENSE50_MR_TELUS_WWE_3.22.661.1 _R3_Radio_4A.20.3263.16_10.38k.1157.04_release_336 571_signed_2_decrypted.zip
May have to run #2 again if it shows flush error..
clsA said:
adb commands will work if your in twrp recovery
and the reason your ruu.zip failed is because you were not in fastboot oem rebootRUU when you tried them, seems you mixing and matching different forums of flashing .. it don't work like that.
Click to expand...
Click to collapse
I Installed the TWRP recovery instead of the ClockWorkMod and adb command work! Never using ClockWork ever again!
SaHiLzZ said:
Just to re-iterate..
1. fastboot oem rebootRUU (this will show a gray HTC logo on black screen)
2. fastboot flash zip RUU_ZIP_M7_UL_JB43_SENSE50_MR_TELUS_WWE_3.22.661.1 _R3_Radio_4A.20.3263.16_10.38k.1157.04_release_336 571_signed_2_decrypted.zip
May have to run #2 again if it shows flush error..
Click to expand...
Click to collapse
I Installed TWRP and went into the TWRP recovery and noticed the adb commands work.
That file didn't work, however the Guru file you mentioned earlier did (with the "adb push" command)! Thanks so much for your help! Everything is working perfectly again!
Thanks for posting back. Edit your title to [SOLVED]! and enjoy!

stuck in fastboot, cant flash anything, cant go to recovery

my phone: Nexus 6 32gb international
marshmallow (MRA58R) with cataclysm rom
twrp custom recovery and elementalx kernel
rooted, unlocked bootloader, no xposed
1. my phone was running fine until it randomly crashed and got stuck in fastboot menu. trying to start does nothing but in bootloader logs it shows this:
Code:
failed to validate boot image ret=-1
trying to reboot recovery gives:
Code:
failed to validate recovery image ret=-1
so i guess time to flash a MRA58R factory image right? however:
2. trying to flash via "flash all" script, manual one by one flash, or using the nexus root toolkit gives:
Code:
<bootloader> failed to flash partition
FAILED <remote failure>
this happens when i try to flash recovery (Stock or twrp) or bootloader or bootimage or system or anything. i have to my knowledge adequate platform tools setup which ive used multiple times before. my sdk tools are updated as well. at this point ill try anything. and i use windows. please help
Osaab said:
my phone: Nexus 6 32gb international
marshmallow (MRA58R) with cataclysm rom
twrp custom recovery and elementalx kernel
rooted, unlocked bootloader, no xposed
1. my phone was running fine until it randomly crashed and got stuck in fastboot menu. trying to start does nothing but in bootloader logs it shows this:
Code:
failed to validate boot image ret=-1
trying to reboot recovery gives:
Code:
failed to validate recovery image ret=-1
so i guess time to flash a MRA58R factory image right? however:
2. trying to flash via "flash all" script, manual one by one flash, or using the nexus root toolkit gives:
Code:
<bootloader> failed to flash partition
FAILED <remote failure>
this happens when i try to flash recovery (Stock or twrp) or bootloader or bootimage or system or anything. i have to my knowledge adequate platform tools setup which ive used multiple times before. my sdk tools are updated as well. at this point ill try anything. and i use windows. please help
Click to expand...
Click to collapse
Is the phone unlocked?
Code:
fastboot oem unlock
Can you erase userdata and cache
Code:
fastboot -w
mywindow said:
Is the phone unlocked?
Code:
fastboot oem unlock
Can you erase userdata and cache
Code:
fastboot -w
Click to expand...
Click to collapse
the phone is unlocked. it shows unlocked status 3 or something. and no -w gives the same error (failed to flash partition).
i was wondering i dont remember if i had "allow oem unlocking" enabled in the dev options and now i cant access it. is there a way that can be a problem?
Osaab said:
the phone is unlocked. it shows unlocked status 3 or something. and no -w gives the same error (failed to flash partition).
i was wondering i dont remember if i had "allow oem unlocking" enabled in the dev options and now i cant access it. is there a way that can be a problem?
Click to expand...
Click to collapse
I doubt it, since you don't need to unlock it a little more.
You should check your USB cable, or try to switch to another port. But if the error still persists, you need to send it to repair.
I am sorry mate, but u might have to send it in for real
Maybe your nand memory is corrupted. Since ur phone just crashed for "no reason" and then got stuck in fastboot, it may be an indicator for that.
Best regards!
Osaab said:
the phone is unlocked. it shows unlocked status 3 or something. and no -w gives the same error (failed to flash partition).
i was wondering i dont remember if i had "allow oem unlocking" enabled in the dev options and now i cant access it. is there a way that can be a problem?
Click to expand...
Click to collapse
I BELIEVE once you tick it and unlock, it does not turn back off (allow OEM unlock)
But as said above, this option only allows the bootloader to accept the unlock command...
Best case is the internal storage got scrambled and your partitions/ partition table is corrupt/missing/gone, worse case and maybe more likely is hardware failure?
Not sure if you can send terminal commands, but next step is either just RMA or searching the internet for a way to manually rebuild partition table from bootloader?
I guess?
Sounds like it messed it self up pretty good somehow, sorry man.

Help me , my phone is corrupt data, not boot!

My phone can't boot . The display is " your device is corupt . It cant be trusted and will not boot after I root and install twrp, gapps , i have used the command "fastboot oem lock" "fastboot flashing lock" "fastboot oem relock" .
i can't unlock bootloader ( flasing unlock not allow )
my bootloader is lock
plz help me !
nil3m1 said:
My phone can't boot . The display is " your device is corupt . It cant be trusted and will not boot after I root and install twrp, gapps , i have used the command "fastboot oem lock" "fastboot flashing lock" "fastboot oem relock" .
i can't unlock bootloader ( flasing unlock not allow )
my bootloader is lock
plz help me !
Click to expand...
Click to collapse
You need to enable bootloader unlock through setting in developer option enable oem unlock, and then you can use the ' fastboot flashing unlock'
You can't root with locked bootloader as it will show an error message your device is corrupt,
At you situation now you should flash stock boot and then the phone will open and then you go to settings as i mentioned to enable oem unlock through developer option in settings
Fastboot unlock bootloader with long command, you will see it unlock temporarily till reboot, flash boot.img and recovery.img, reboot into recovery wipe data & cache, utilize USB otg to reinstall rom.
em902566 said:
You need to enable bootloader unlock through setting in developer option enable oem unlock, and then you can use the ' fastboot flashing unlock'
You can't root with locked bootloader as it will show an error message your device is corrupt,
At you situation now you should flash stock boot and then the phone will open and then you go to settings as i mentioned to enable oem unlock through developer option in settings
Click to expand...
Click to collapse
-I cannot boot into os to enable oem unlock ,I can't go into recovery
Hope you will help me,thank you
SuperDroidMe said:
Fastboot unlock bootloader with long command, you will see it unlock temporarily till reboot, flash boot.img and recovery.img, reboot into recovery wipe data & cache, utilize USB otg to reinstall rom.
Click to expand...
Click to collapse
I used the command "fastboot oem nubia_unlock NUBIA_NX629J" ,"fastboot flashing unlock" , command but it reported an error "flashing unlock not allow"
Please help me with what I should do. thank you
nil3m1 said:
I used the command "fastboot oem nubia_unlock NUBIA_NX629J" ,"fastboot flashing unlock" , command but it reported an error "flashing unlock not allow"
Please help me with what I should do. thank you
Click to expand...
Click to collapse
Okay now you have to download the stock cn version from official site, and extract the zip file , now olyou have to flash the stock boot image and recovery image
,Fastboot devices
,Fastboot fastboot oem nubia_unlock NUBIA_NX629J
,Fastboot flash boot boot.img
,Fastboot flash recovery recovery.img
,Fastboot reboot
And wait let it reboot at least 3 time
And it will work just fine ?
em902566 said:
Okay now you have to download the stock cn version from official site, and extract the zip file , now olyou have to flash the stock boot image and recovery image
,Fastboot devices
,Fastboot fastboot oem nubia_unlock NUBIA_NX629J
,Fastboot flash boot boot.img
,Fastboot flash recovery recovery.img
,Fastboot reboot
And wait let it reboot at least 3 time
And it will work just fine
Click to expand...
Click to collapse
it dont work . my device not boot with report " your device is corrupt .It can not be trusted and wil not boot " .
update?
nil3m1 said:
it dont work . my device not boot with report " your device is corrupt .It can not be trusted and wil not boot " .
Click to expand...
Click to collapse
did you fixed it? we have same situation.
godric12 said:
did you fixed it? we have same situation.
Click to expand...
Click to collapse
Use "Fastboot fastboot oem nubia_unlock NUBIA_NX629J" to unlock the bootloader and flash the correct boot img. Or you can go to stock recovery flash the whole system. It is caused by an unsigned boot file.
JerryYin said:
Use "Fastboot fastboot oem nubia_unlock NUBIA_NX629J" to unlock the bootloader and flash the correct boot img. Or you can go to stock recovery flash the whole system. It is caused by an unsigned boot file.
Click to expand...
Click to collapse
I have this error when installing the rom, what should I do to fix it?
mos98p said:
I have this error when installing the rom, what should I do to fix it?
Click to expand...
Click to collapse
Maybe you can check other post and find the solutions, there are someone already fix the phone with same issue

i was updating china rom [ RED MAGIC 3 ] from local update and phone got curropted

it says your device is corrupt. it cant be trusted
how to fix it please help me how to start phone , i tryed some solution to flash and all that but nothing worked
I think u also same mistake. Before install cn rom. U not enable oem unlock option in davoloper features
brawlhack said:
it says your device is corrupt. it cant be trusted
how to fix it please help me how to start phone , i tryed some solution to flash and all that but nothing worked
Click to expand...
Click to collapse
Few days before I was in the same situation.
Tried lot of solution but the simplest to solve was using the below 2 command when in fastboot.
fastboot oem nubia_unlock NUBIA_NX629J
fastboot flashing unlock
This should unlock the bootloader and you should be able continue the setup.
All the Best...
it says flashing unlock is not allowed
rajnathr said:
Few days before I was in the same situation.
Tried lot of solution but the simplest to solve was using the below 2 command when in fastboot.
fastboot oem nubia_unlock NUBIA_NX629J
fastboot flashing unlock
This should unlock the bootloader and you should be able continue the setup.
All the Best...
Click to expand...
Click to collapse
it says flashing unlock is not allowed
Same thing happened to me, tried all the recommendations given on this site, none works . Any help will be appreciated, now i have a paper weight
re-flashed the phone using the first version of the Chinese ROM v2.12 now can use the OTG update option. just need to get a usb adapter now
Which files i need to flash
Steffran said:
re-flashed the phone using the first version of the Chinese ROM v2.12 now can use the OTG update option. just need to get a usb adapter now
Click to expand...
Click to collapse
Can you tell full step and i guess i need system.img also where i can get it ...kindly please help sir ?
https://drive.google.com/drive/folders/16in6Jnyi4s5aIIuQwapQ1KK1LjysSfYm
Here is the link to download required file by an XDA member.
But before you flash system image first try with the boot img and recovery img.
I was to getting the message that i cant flash so used the command for oem unlock which reset the counter to 1
After which did flashing of boot .img and then recovery.img
If issue the use the falshboot flashing unlock.
This were the steps used by me to recovery, i didnot do any other flashing.
Hope this helps you
Edit: After the oem unlock command directly try to flash boot and then recovery and then if required flashing unlock command.
its still saying your device is corrupt ...anyone can help me
rajnathr said:
https://drive.google.com/drive/folders/16in6Jnyi4s5aIIuQwapQ1KK1LjysSfYm
Here is the link to download required file by an XDA member.
But before you flash system image first try with the boot img and recovery img.
I was to getting the message that i cant flash so used the command for oem unlock which reset the counter to 1
After which did flashing of boot .img and then recovery.img
If issue the use the falshboot flashing unlock.
This were the steps used by me to recovery, i didnot do any other flashing.
Hope this helps you
Edit: After the oem unlock command directly try to flash boot and then recovery and then if required flashing unlock command.
Click to expand...
Click to collapse
its not booting after doing that please help me if possible can we talk in discord
using cm
fastboot oem nubia_unlock NUBIA_NX629J
fastboot -w
reboot phone done
after this
nil3m1 said:
using cm
fastboot oem nubia_unlock NUBIA_NX629J
fastboot -w
reboot phone done
Click to expand...
Click to collapse
after this i need to flash boot and recovery img ?

Flashing is not allowed in lock state (nubia_nx629j)

Can somebody help me?
I unlock the bootloader recently via adb fastboot.
My problem is, when i want to instal twrp in my phone, it failed. It says "FLASHING IS NOT ALLOWED IN LOCK STATE'
Why was that?
Appreciate if anyone can guide me.
kyevaldez said:
Can somebody help me?
I unlock the bootloader recently via adb fastboot.
My problem is, when i want to instal twrp in my phone, it failed. It says "FLASHING IS NOT ALLOWED IN LOCK STATE'
Why was that?
Appreciate if anyone can guide me.
Click to expand...
Click to collapse
Hi.
Try this:
Code:
fastboot oem nubia_unlock NUBIA_NX629J
and
Code:
fastboot flash recovery recoveryname.img
, where you replace recoveryname.img with the name of your recovery image.
If you haven't previously unlocked your bootloader, the first command will delete your data, so backup... If the bootloader was previously unlocked, it won't wipe anything.

Categories

Resources