Can't boot, stuck with "ID: bad key" - Moto G5S Questions & Answers

Hey guys, so I bought the phone and the first thing was unlocking BL. Then I flashed TWRP (or booted it via fastboot).
Then an accident happened and I flashed the TWRP image over the boot partition with fastboot, since then the phone does not
boot anymore.
I tried flashing the stock images from XDA here via fastboot, but that tells me that some preflash conditions failed...
When I try to start recovery or boot Android, I get the unlocked BL warning screen and "ID: bad key", then nothing.
I managed flashing boot.img and system via dd in TWRP but it does not boot either, something is messed up.
Bootloader tells be I have the montana XT1794 32GB P3 version (from Germany). I guess all firmware I tried may be
for a slightly different version...
I get these messages when flashing boot.img and others via fastboot:
Code:
(bootloader) Image signed with key bad key
or
Code:
(bootloader) Image boot failed validation
(bootloader) Preflash validation failed

I by now means am any kind of expert with this. I too, am learning this on the fly, and only been at this a few days. But I will try to give some advice. (most will be useless advice because Im not 100% on my own experiances even now)
First, again, im not 100%, you may of messed up your OS totally. I have experiance reinstalling my OS from scratch. I have a moto g5s plus sanders phone. 7.1.1 nougat. I went through hell trying to flash my OEM rom. Finding it was a pain, installing it was even more of a pain. Now what monstly, not entirely worked was: --youtube.com/watch?v=-FszZOx2pWU for reflashing.
Also, --xda-developers.com/moto-g5s-plus/development/flash-official-firmware-moto-g5s-plus-t3681018 has some advice to reflash. Now I dont know at all if this is useful for you or not, im sorry The key for reflashing for me was the ADB fastboot files FINDING the right rom. The commands with the xda link...the ones that started with "m" dont work for me. I had to use the youtube commands. Now for me, this was VERY important, TO RELOCK YOUR PHONE. The command to "fastboot oem lock" was a must! If I didnt enable that I too got the message of bad key and never could load into TWRP. I had to reinstall my OEM rom AND relock the phone. Then go through the process again to root. Before rooting your phone, I hightly suggest you get an OS working either custom or original. And relock the phone in the process. That is key, relock the phone, dont keep it unlocked. At least for ME that was true.
Now shouldnt be to hard to find your OEM rom. (im not good enough for custom ROM'ing yet) Then again if its a germany specific phone might be hard. Again im sorry, I dont know.
Now as for the bad key. I too had much experiance with this, that I cant exactly explain how I overcame it. Basically I think youre not installing TWRP correctly that is the bad key message youre getting, i "think" the message should say "N/A" instead, Im not 100%! Once you install ur choice of root'ing (I prefer supersu over magisk. Both work) boot into recovery and install TWRP. If you have the root program of your choice installed install it now. Dont reboot, just load TWRP and install immediately. Now if you cant find your rooting program because you wiped it, didnt transfer it, whatever. You have to do that first. You must, must install root program first. I have a backup sd micro card, I had to format that PORTABLE NOT INTERNAL. With it being internal I had to many problems of apps not working correctly. It being portable made it easier to do anything. So "if" you need to reflash do so. Put root program on your phone however method you choose. I use MTP and install the .zips in both local and external memory.
Go into recovery, load TWRP..."fastboot flash recovery xxxxxxxxxxxxxx.img". Then boot into twrp with "fastboot boot xxxxxxxxxxxxx.img". Or just volume keys into recovery mode. Swipe to allow modifications (i hear that can be a bad thing if you do NOT have ur root program saved on the phone, I dont know) And find the zip and install. Youre done.
I hope this was a little help. If even a little of it is relevant, Im glad. Otherwise sorry that I couldnt help more!

I wanted to mention too "bad key" does not mean your OS is corrupt. Not all. If you did corrupt your OS, that wasnt twrp or rooted program.

Thanks for your reply. I got it working. I flashed the stock fw with mfastboot. I did not know about that before. After flashing everything to stock it worked again.

Related

[Q] Bricked A100

Hello everyone,
I accidentally flashed using CWM recovery the stock rom and over it the Flexreaper ROM.
Now the problem:
Booting normally: Boot verified failed
Booting recovery: Recovery verified failed
Fastboot: Yes it works, but it's locked, can't flash anything.
ADB is not available.
Any suggestions how to fix this or get a unlocked bootloader again ?
Greetings, sniperfield
sniperfield said:
Hello everyone,
I accidentally flashed using CWM recovery the stock rom and over it the Flexreaper ROM.
Now the problem:
Booting normally: Boot verified failed
Booting recovery: Recovery verified failed
Fastboot: Yes it works, but it's locked, can't flash anything.
ADB is not available.
Any suggestions how to fix this or get a unlocked bootloader again ?
Greetings, sniperfield
Click to expand...
Click to collapse
Sounds like you locked your bootloader while on a modded rom? If that is the case you hosed it, sorry to say. You need access to fast boot or adb to fix it, if you have neither its locked for good.
OK one thing, did you try booting with update.zip and holding volume down + power?
With luck it will install the stock rom so you can start over.
Tapatalked from my Galaxy S II.
pio_masaki said:
Sounds like you locked your bootloader while on a modded rom? If that is the case you hosed it, sorry to say. You need access to fast boot or adb to fix it, if you have neither its locked for good.
OK one thing, did you try booting with update.zip and holding volume down + power?
With luck it will install the stock rom so you can start over.
Tapatalked from my Galaxy S II.
Click to expand...
Click to collapse
Yes locked bootloader + modded rom
update.zip doesn't work (how should it with a broken recovery ?)
but i which update.zip you mean exactly ?
Is there any hope with APX-Mode maybe ?
sniperfield said:
Yes locked bootloader + modded rom
update.zip doesn't work (how should it with a broken recovery ?)
but i which update.zip you mean exactly ?
Is there any hope with APX-Mode maybe ?
Click to expand...
Click to collapse
APX mode has so far proven completely useless for us, we don't have the SBK keys for our device.
The update.zip method is, partly, activated BEFORE recovery is, if you watch the bootloader text while booting up holding volume down, you'll see it look for update.zip before moving on to recovery, and TWRP and CWM don't look for it on their own, unless its something extra just on our versions of the those recoveries.
If fastboot DOES work, the only thing I can really suggest is attempt flashing CWM recovery.img, but of course, the bootloader will likely block it. You could also attempt to flash the bootloader blob again, which will accept fastboot oem unlock, but the normal method is through android's system, not fasboot.
...or hell just throw fastboot oem unlock at it anyways. If the bootloader is still the same, just locked, they may just unlock it. If the bootloader was replaced, it won't work either.
Good days;
I also have a tablet brick from yesterday. And I am very angry. Tape-worm the tablet with CWM and for supues the unblocked bootloader. Tape-worm installed this room http: // forum.xda-developers.com/showthread.php? T=1574897 and empece to having problem with CWM, since not me leia the external card SD for what not podia to do backup, or to load a new rom. at the time I put to look and lei, that was a problem probably of compatibility of the card SD or that was returning to realize again everything the process of unfreezing of bootloader. and this way I did it. again this process, which was the same that it uses previously and I me work. Http: // forum.xda-developers.com/showthread.php? T=1557445.
I restart the tablet, and from this moment, have the logo of green maple tree, and a phrase of red color that he says: " recovery verified failed .... " it does not start the tablet, and it does not also leave me to enter the recovery. if I try to enter the recovery this message goes out for me.
Erasing cache before SD update...
SD update cmd: recovery -
update_package=SDCARD:update.zip
Booting kernel recovery image
please, I am driven to despair, have tried flashear with different roms, with distitnas cards mike SD, with formats in fat, fat32 and ntfs. and do not manage to do anything. I have tried to install again everything across the PC, but the PC neither recognizes me the tablet, when I connect it to the PC, even the connection of the usb nor is heard, since this one does not manage to be ignited completely. And I am not going to take her to the SAT to whom receive from me 100 €, , Since for other 100 € mas I buy myself the new nexus. but it gives me great anger, because really I like a heap this tablet and it was going less than two weeks with her. Please, to say to me what should be, if necesitais mas information, to say it to me. Thank you very much
pio_masaki said:
APX mode has so far proven completely useless for us, we don't have the SBK keys for our device.
The update.zip method is, partly, activated BEFORE recovery is, if you watch the bootloader text while booting up holding volume down, you'll see it look for update.zip before moving on to recovery, and TWRP and CWM don't look for it on their own, unless its something extra just on our versions of the those recoveries.
If fastboot DOES work, the only thing I can really suggest is attempt flashing CWM recovery.img, but of course, the bootloader will likely block it. You could also attempt to flash the bootloader blob again, which will accept fastboot oem unlock, but the normal method is through android's system, not fasboot.
...or hell just throw fastboot oem unlock at it anyways. If the bootloader is still the same, just locked, they may just unlock it. If the bootloader was replaced, it won't work either.
Click to expand...
Click to collapse
can you please give me a exact link for a update.zip ? there are so many different versions -.-
yes bootloader blocks recovery.img flash ...
how can i to flash a bootloader blob with locked fastboot ? ;o
tried already fastboot oem unlock, does not work, bootloader seems replaced
and thank you for trying to help me, if it's really bricked, i'm going to buy a nexus tablet 7 ;D

Edut;Deleted OS and all zips are marked as corrupted.

First, let me start off by saying I'm an idiot; my phone was stuck in a bootloop and out of panic I tried to fix the problem and only made it worse. Now I'm left with no OS installed and I'm stuck at my custom recovery.
I am using twrp as my custom recovery and I'm able to use my mac to send files successfully to my phone. The problem arises when I try to flash the zip and I am prompted with the message that says that the file is corrupted. I tried installing multiple zip files onto my phone and when returning it to stock did not work I even tried to flash Cyanogen Mod. Each time I was greeted with the same message.
This sucks because I just bought my nexus 5x and I don't want to lose it to a stupid mistake. If anyone could help in anyway that would be amazing. If not I will still accept prayers for my potentially dead phone.
-Carlos
Edit: problem solved. I did what you guys said and returned to stock and didn't panic. Thanks so much.
you mean the unlocked bootloader message? thats nothing
or maybe the md5 message, which also is normal?
to me sounds like you are panicking for no reason, but anyway, search for nexus root toolkit, install it, and choose the option to revert stock + unroot
Giorgos Chatziioannou said:
you mean the unlocked bootloader message? thats nothing
or maybe the md5 message, which also is normal?
to me sounds like you are panicking for no reason, but anyway, search for nexus root toolkit, install it, and choose the option to revert stock + unroot
Click to expand...
Click to collapse
Yeah as said above there is no need for panic.
Even if your recovery wont flash the zips you can flash the stock factory images via fastboot manually (i dont now if its available on mac if not boot a linux live disk).
And if your bootloader is still locked unlock it reboot to bootloader and then flash the images.
By the way you should provide more information such as os details twrp version bootloader state and so on...:fingers-crossed:

stuck on twrp

i bricked my moto z play. i somehow after many days got twrp on the phone. since the phone is encrypted i had many issues. anyway got it installed. my system as far as i could tell did not exist. i put sept.zip on a flash drive and connected it and it was there under usb otg. so i installed it. the fie appears to be on the system. (i saw it in the files twrp has). but i cannot get it to work. i reboot it. and back to twrp. PLEASE HELP!!!!
I think you need to flash the official software through fastboot and get back to stock Nougat somehow. Try booting into fastboot iff you can do that its not bricked. Bricked means when the phone is off and doesnt respongd or switch on at all.
Iff. you can get into fastboot you can reinstall the official nougat software and there are guides somewhere on this forum how to do that.
You have twrp, download and install the rom from here https://forum.xda-developers.com/moto-z-play/development/rom-nov-patch-npns26-118-22-2-8-t3717037
You'll lose everything on your phone, but if it's not booting now anyway....
punkerEVO said:
You'll lose everything on your phone, but if it's not booting now anyway....
Click to expand...
Click to collapse
Usually it is not necessary to lose anything.
First: use twrp to do backup of data. Don't forget data/media which is not included, there are your photos.
Second: flash the ROM you want, but omit the command "erase userdata". Then your data should (!) survive.

Moto G7 Play XT1952-4 Recovery

Hello, does anybody know when a recovery for the moto G7 play XT1952-4 might be released? I am eager to root my new phone.
I am also looking for the recovery of Moto G7 Play, I unlocked my BootlLoader to make Root and I do not think any Recovery
You don't need TWRP to root the phone. As long as the bootloader is unlocked, you can root with Magisk. Select the Link To Installation Instructions and follow the Boot Image Patching section. It requires using ABD commands, and although it looks/seems complicated, it is actually very easy. Plus, you will have learned something as well as root your phone.
If the G7 Play is actually code-named "Channel", then this link will give you stock firmware for you to download and extract the stock boot image.
Magisk boot.img
Ok I got the retail Canada ROM. Now I am going to extract boot img and patch it with Magisk manager. Once patched I am going to flash it to my phone using abd fastboot? At this point it will be rooted or do I use SuperSU to root? Under software channel on my phone it says "Bell" but the build number and model number matched up. XT1952-4 PPY29. 105-57 so it should be good hopefully.
Thanks
Error: cannot open 'magisk_patched.img'
Must be wrong Rom. Everything worked fine until I had to flash it. I put patched IMG right in adb directory and opened a command window from there but when I tried to flash it I got the error cannot open file. Oh well I think I will wait for a recovery it's the easy way for me.
Thanks
Code named 'channel'
There are 2 more versions of it in the list you provided. Not sure what the abbreviations are before CA for Canada but I will try them too. If I get the same error when flashing these patched boot.imgs I will have to wait for a recovery. Hopefully it won't by be too much longer. I just hope there will be a recovery.
Thanks
Continued error when flashing patched files.
I have tried 3 boot images from 3 different retail Canada firmwares. All 3 patched alright by magisk manager but when I try to fastboot flash boot magisk_patched.img I get the same error cannot open file. I must be doing something wrong. My phone's bootloader is unlocked so unless someone has a solution. I will definitely have to wait for a recovery. Hopefully soon!.
Thanks
Dumb question...when you are attempting to flash your patched boot image, is your phone in fastboot mode? Also, you may be able to extract your boot image via ADB. It's been a while since I've done it and am having trouble finding the proper commands, but you can try this:
adb pull /dev/block/bootdevice/by-name/boot stockboot.img
Click to expand...
Click to collapse
It may or may not work. I hope it does but apologize if it does not.
Furthermore, you will likely have to wait quite a while for a custom recovery (TWRP). The G7 play has A/B partitions, which makes ROM building and recoveries very difficult. There is no separate "recovery" partition with A/B...the recovery is combined within the boot image. FYI - I have a Xiaomi A2 Lite that has A/B partitions. We still don't have a 100% working TWRP after 9 months. Custom ROMs have just been coming out slowly. I was able to root with Magisk using ABD commands though.
This link might provide clearer steps for installing Magisk.
Best of luck!
Yes, it was in fastboot mode. I will keep trying with your new intructions. Thanks for your help.
My mistake
I did not even have adb fastboot installed I was opening a command window out of the folder that was left over from uninstallation. I am about to try it again. It should work now. Stay tuned.
So far
Okay, so I installed adb fastboot and flashed the patched boot file from the RETCA firmware. I got this message " failed (boot a)" . So I tried the flashing the 2nd patched boot file that was from I think BWACA firmware. With this flash I got " not signed or corrupt" then the phone failed to start with bootloader log to confirm.
So I took the original unpatched boot.img from RETCA and flashed it. This fixed the phone so it would start fine making me believe that it's the right boot image but maybe the other firmware boot.img would have fixed the failing to start issue as well. So I think I need to pull the boot.img from the phone itself like you suggested. I am going to read some more and continue. I will figure it out. Any suggestions would be of great value.
Thanks.
Getting Closer
I realized that the magisk zip file that magisk manager downloaded did not get unzipped so that it could patch the boot.img properly. Fixed that. Flashed the boot.img and it said "okay" but said "(bootloader) image signed with key bad key" so I think I will have to pull the boot.img from the phone itself. So I am about to read up on that then I should be able to flash successfully for root access.
Thanks
jwreidmoto said:
I realized that the magisk zip file that magisk manager downloaded did not get unzipped so that it could patch the boot.img properly. Fixed that. Flashed the boot.img and it said "okay" but said "(bootloader) image signed with key bad key" so I think I will have to pull the boot.img from the phone itself. So I am about to read up on that then I should be able to flash successfully for root access.
Thanks
Click to expand...
Click to collapse
A few posts back you said you flashed the stock RETCA boot image. If that's the case, then if you successfully pull the boot image from the phone, you are simply pulling the RETCA boot image you already flashed. It seems that the RETCA boot image is the correct one for you phone. I would start completely from scratch with that. To verify which build number you have, go to Settings>About Phone or ( Settings > About Phone > Software channel) and scroll down to Build Number. Match it up to one from link with all the firmware images.
The only other thing I can say is that you should read and completely understand what to do prior to doing it. I am sorry you are having difficulties with this. It really should not be so hard. As I don't have the phone I cannot be of much more assistance. However, once you figure it out, perhaps you can write a quick guide to help others.
EDIT: You should be rooted. SEE POSTS 10-13. Did you check for root?
EDIT 2: I'm assuming that since you unlocked the bootloader, when you reboot the phone the screen goes black and says "Bad Key", correct? That is normal for Moto phones.
2nd, after you root, when you reboot the phone, the screen should go black and say "N/A". Again that is normal for Moto phones.
I understand what you are saying I would also expect the N/A on the black screen that's when I knew I successfully rooted my old phone. I must have the right boot image if flashing it fixed the startup failure. I am going to start all over again and see.
Have to give up.
Tried and tried it's just not going to work. I think it's the patching because the boot file starts out as 32mb and only 18mb after being patched. Flashing has no effect on my phone even though it says 'okay' when I flash. I never get the N/A on boot unless there is a startup failure. Oh well have to live with ads among other anoyyances. My Moto g4 play is rooted I can use than in case a solution comes up. Thanks for all your help.
jwreidmoto said:
Oh well have to live with ads among other anoyyances.
Click to expand...
Click to collapse
DNS66 is your friend! I have used it on other unrooted phones. It was decent from what I remember. Good luck!
Sorry that root wasn't working.
EDIT - If you are up for a little more testing...I just found this. I don't remember if it's what I had to do for my Xiaomi or not, but it makes sense. (Further research - No I did not have to do this). Scroll down to method #2 and look for the part about A/B partitions:
fastboot flash boot_a patched_boot.img
fastboot flash boot_b patched_boot.img
Click to expand...
Click to collapse
Edit #2 - I don't give up easily LOL
After any of your attempts to flash the patched_boot image, did you ever boot the phone and open the Magisk Manager app? Doing so should ask to install Magisk, if not you must tap on the "Install" button. Then choose "Install" > "Direct Install (Recommended)" to install Magisk on the phone, and reboot when finished.
Neither do I
I have been trying everything since we last talked. Just so you know the link labelled as "this" in your last response is not working. I always opened the magisk app after flashing to see if it was either installed or gave me the option to do a direct install unfortunately, it did not. I have magisk manager installed on my rooted Moto G4 plus and it gives me that option to do a direct install. Will definitely try your new info. Thanks so much for more help. I will let you know.
Still no luck
Without the link I got the jist of what you were saying by the quote boot_a boot_b I tried both consequtively and then tried it for ever possible retail Canada image still no luck. Thanks for your help. I don't know why it's so hard for this phone. I will keep researching.
I'm at about the same place where jwreidmoto is. I purchased my unlocked g7play from Best Buy. First I tried the files in the channel/RETUS folder, these all caused a bootloop. I then tried in the RETAIL folder... still no joy. None of the version numbers quite matched up, and none worked to restore the phone. I finally found a matching file in the AMZ folder, which I was able to use to get the phone to boot up again. So I used that boot.img file with magisk and when I flashed, it gave no errors, no indication anything failed. Unfortunately though, I do not have root access. I started over from scratch and did the process over with the AMZ boot img again, and again no errors, but no root. I've never rooted before, so I don't know if there's another part somewhere I missed, but I do feel like I was able to follow the directions on the g7 thread by mingkee, and performed the steps accurately. I supposed it's just the wrong boot img. The about phone says the software channel is US Retail, and the build number is PPY29.105-36. The RETUS folder only has PPY29.105-43 and RETAIL folder has five different zip files, but none were PPY29.105-36.
You are doing it right
You have not missed any steps. If the boot.img fixed the boot loop then it should be the right one. I had the same issue with a startup failure and fixed it with the RETCA boot.img so I am also using the right one also. I think it's an issue with the model of phone, this method just does not work. We might have to wait a while until someone comes up with a solutuon. I know it sucks.

bricked

Hi i have a pixel xl. I had it rooted via magisk and I had LOS on it. But then i decided to go back to stock. I did that but i forgot that I had to uninstall magisk so i locked the bootloader and wound up with a stock rom rooted. It worked for a while them it started crashing. Im not too sure what happened or what i did it was a year ago. So anyway when i turn it on it says the bootloader is corrupt which it did before. Android flash tool did not work wok. I can boot into recovery but i dont know what to mdo no.
can someone please help me.
Also I am able to use fastboot I just tried from my pc. I just dont know what to do to fix this. I know I have to somehow get twrp back on the phone and flash the magisk uninstall.zip. But this was so long ago i dont even remember which version of magisk I was using or which magisk uninstall file to flash.
i was able to get a flash-all .bat to work but im still in the same position. Basically the phone gives me the message your device cant be checked for corruption then goes on to the google screen and eventually the screen goes blank and it starts over so it is bootlooping i guess.
Can anyone tell me how i can flash twrp.img on the phone with fastboot? Right now the current active slot is b. I tried typing fastboot flash b then the twrp.img file name and it gives me an error. Am I supposed to be flashing to a certain partition?
Please someone help I am not very good with the command line. I dont know all the lingo

Categories

Resources