Hey guys,
I'm living a nightmare with lineageos and i really cannot switch back to the original ROM.
Ive flashed the original ROM back, but with the bootloader ublocked, it wont passou the verity check, thus i havĂȘ no working banking apps.
Ive tried to flash and just after complete, lock it, but with no luck.
How to make a full restore? Ive tried the lenovo rescue tool, but with no luck either... It flashes back my original ROM, but verity fails (,it doesnt relock the bootloader)
try flashing dm-verity zip
Moto Z2 Force disables dm-verity when you OEM unlock thats probably why your phone bootloops.
Related
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.
So, being the stupid person I am I broke my Mate SE one day after purchase ._. I'm posting my entire process just in case anything helps.
I started off by updating to the latest ROM and then unlocking the bootloader, which went fairly well, then flashed TWRP. A lot of versions I found didn't work(Bootloader says Func NO: 11 (recovery image) and Error NO: 2 (load failed!)), but I got a working version here: https://forum.xda-developers.com/honor-7x/development/oreo-twrp-complete-backup-t3764500 .
After that, I installed Magisk, which went well, then Xposed framework inside Magisk, which put my phone in a bootloop. I didn't know what to do, so I went with a factory reset[terrible idea]. Now, my phone has the FRP lock on, and the android setup is stuck on a "just a sec" page, right after selecting language and wifi, so I can't login to my google account to disable the FRP lock.
I tried flashing, but apparently the FRP lock stops me from being able to flash anything inside the bootloader. I do still have my TWRP recovery and a backup of the kernel and ramdisk(sadly nothing else useful, although I do also have dts, dfx, vendor_image, oeminfo and secure_storage) but restoring them or wiping the system again has no effect(still stuck on "just a sec").
After some google searching someone in a thread said that I should use stock recovery to wipe factory data(by restoring the stock recovery in TWRP), and I would be able to get past the "just a sec" problem, but I am reluctant because if it doesn't work, I would permanently lose my TWRP recovery with no way to flash it back(because of that FRP lock). I also tried installing update.app and other stock ROMs from various sources using TWRP, but all of them had a "check_write_data_to_partition, write data error" error. I'm not sure if it's related to FRP.
I think my next course of action is to either a) disable FRP in recovery, b) bypass the setup screen or c) install some ROM on it and somehow bypassing the check_write_data_to_partition error, but I'm not sure how to do any of these. Any ideas or suggestions? Thanks.
rkevin_arch said:
So, being the stupid person I am I broke my Mate SE one day after purchase ._. I'm posting my entire process just in case anything helps.
I started off by updating to the latest ROM and then unlocking the bootloader, which went fairly well, then flashed TWRP. A lot of versions I found didn't work(Bootloader says Func NO: 11 (recovery image) and Error NO: 2 (load failed!)), but I got a working version here: https://forum.xda-developers.com/honor-7x/development/oreo-twrp-complete-backup-t3764500 .
After that, I installed Magisk, which went well, then Xposed framework inside Magisk, which put my phone in a bootloop. I didn't know what to do, so I went with a factory reset[terrible idea]. Now, my phone has the FRP lock on, and the android setup is stuck on a "just a sec" page, right after selecting language and wifi, so I can't login to my google account to disable the FRP lock.
I tried flashing, but apparently the FRP lock stops me from being able to flash anything inside the bootloader. I do still have my TWRP recovery and a backup of the kernel and ramdisk(sadly nothing else useful, although I do also have dts, dfx, vendor_image, oeminfo and secure_storage) but restoring them or wiping the system again has no effect(still stuck on "just a sec").
After some google searching someone in a thread said that I should use stock recovery to wipe factory data(by restoring the stock recovery in TWRP), and I would be able to get past the "just a sec" problem, but I am reluctant because if it doesn't work, I would permanently lose my TWRP recovery with no way to flash it back(because of that FRP lock). I also tried installing update.app and other stock ROMs from various sources using TWRP, but all of them had a "check_write_data_to_partition, write data error" error. I'm not sure if it's related to FRP.
I think my next course of action is to either a) disable FRP in recovery, b) bypass the setup screen or c) install some ROM on it and somehow bypassing the check_write_data_to_partition error, but I'm not sure how to do any of these. Any ideas or suggestions? Thanks.
Click to expand...
Click to collapse
There is an unlock frp patch by a dev in another that works with the 7x. It should work for you too.
I will find link when I get off the road
mrmazak said:
There is an unlock frp patch by a dev in another that works with the 7x. It should work for you too.
I will find link when I get off the road
Click to expand...
Click to collapse
Link to frp unlock
https://mega.nz/#!nw0wAYoA!hYtf78s0AjwRCpPo_NQ2F4LYclngNBNurJNETypSNKQ
Posted many places. But I found it on the bottom of post 2.
Here.
https://forum.xda-developers.com/showpost.php?p=76398556&postcount=2
mrmazak said:
Link to frp unlock
https://mega.nz/#!nw0wAYoA!hYtf78s0AjwRCpPo_NQ2F4LYclngNBNurJNETypSNKQ
Posted many places. But I found it on the bottom of post 2.
Here.
https://forum.xda-developers.com/showpost.php?p=76398556&postcount=2
Click to expand...
Click to collapse
Thanks for the help! It worked, and the bootloader says FRP unlocked. It didn't help the "just a sec" issue, but since I can use fastboot flash, I might be able to flash a new rom in it and just ditch EMUI[probably]. I'll play around with it a bit. Again, thanks a lot for your help!
I got everything working now! Just in case anyone had the same "just a sec" issue: it was fixed by flashing stock recovery then doing a factory reset there(I'm not sure how that's different from wiping dalvik/cache/data/internal storage in twrp, but it makes a difference apparantly). Just flashing custom ROMs didn't solve the problem. After that I installed magisk, and then installed this version of xposed: https://forum.xda-developers.com/showpost.php?p=76582399&postcount=11 . I installed the v90-beta3 version before which caused the bootloop, but it is fixed in the next version. Magisk has some issues so the magisk manager can't start with internet(adb logcat says there's a NullPointerException in com.topjohnwu.magisk.database.RepoDatabaseHelper.removeRepo) but frankly I don't need to open it with internet anyways. Now I have everything I need on my new phone! Thanks to mrmazak for pointing me to the right direction.
Regarding to title, I was trying to flash a custom rom on my Honor 7X but apparently with the crazy amount of idk twrp recoveries and failed flashes, the phone (totally empty with both system and data) decides to factory reset lowlevel after i try to fastboot oem relock bootloader and it stays stuck at 99%. Any troubleshooting tips would be great.
Well, am experiencing similar problems.
I was on rooted Stock, when I got a System update available prompt.
I uninstalled Magisk, Flashed stock recovery and did a Factory reset from the Stock recovery.
It booted up, but there was no Keyboard installed. I think, I had uninstalled the pre-installed one when I was rooted.
I couldn't get past the Setup Wizard, as the FRP was Locked and there was no way of typing the password.
I tried to flash the system.img from fastboot but it gave me 'Remote: command not allowed' error. (Even for flashing recovery)
I google'd a bit and ended up on a solution as to relock the bootloader, Turn on OEM Unlocking and lock the bootloader again.
I relocked the bootloader, it did a 'Low-level factory reset' and now the phone is even bootloop. (it boots into eRecovery from the Honor/Huawei logo)
I tried the 'Download latest version and recovery' from eRecovery. It's giving me 'Package verification failed' error.
'dload' method never worked for me, and it is still the same.
Any solution/suggestion?
Bootloader relock with empty system is a definite hard brick.
I think you may need to ues dload method and flash a service rom to get back up and running.
dload says software install failed, any ideas? @mrmazak
apparently now its back to usual after leaving it stuck at 99% overnight until the battery dies out, could go back to fastboot and stuff
How far did it get? Stop and fail at 5% happens when update not found or not correct update.app.
Of it loads higher that 5% then fails , that's probably not gonna be able to fix it.
We have only found 2 service roms. Both are bnd-l21c432 one is Nougat one is Oreo. Both have been used on other versions of honor 7x. But after it runs you need to run hurupdater or hwota with correct model / region fullOTA.
I recently found a moto g5 in one of my fellow "old tech" drawers and decided to turn it on, it was on the
1. May 2018
Security patch on nougat, I decided to use the inbuilt system updater to go to Oreo, and now....it crashes during flashing process after about 25-30% completion,
Now im guessing boot or System is not properly installed due to the zip file having aborted mid-flash
Recovery doesn't properly boot as that is used to install the update and thus imidiately goes to doing that
Also, it hang up during installation on random times, it basically has a record of 2mins of not crashing whilst still being stuck on 30%
I got it to "boot" when trying factory mode, yeah it crashed mid boot animation...not a help
Any suggestions? EDL mode maybe?
Can you not flash firmware via fastboot
In theory as long as firmware is signed you don't need an unlocked bootloader to flash firmware
Firmware can be downloaded from https://mirrors.lolinet.com/firmware/moto/cedric/official/
You can also try the lenovo moto smart assistant to flash the firmware
https://forum.xda-developers.com/g5/how-to/guide-how-download-official-fastboot-t3916778
If not you will most likely need a motherboard replacement or jtag firmware flash at a repair shop
TheFixItMan said:
Can you not flash firmware via fastboot
In theory as long as firmware is signed you don't need an unlocked bootloader to flash firmware
Firmware can be downloaded from https://mirrors.lolinet.com/firmware/moto/cedric/official/
You can also try the lenovo moto smart assistant to flash the firmware
https://forum.xda-developers.com/g5/how-to/guide-how-download-official-fastboot-t3916778
If not you will most likely need a motherboard replacement or jtag firmware flash at a repair shop
Click to expand...
Click to collapse
SOMEHOW it just decided to boot, I have never seen such behaviour, even on my g5s which I had for a while, (and am currently daily driving to school if it wasn't closed....NEVER
Maybe I'll unlock it and try somehow recreating it? Well it's in physically rough shape but all components inside are fine...so that can't be the reason....?
My g5 got stuck in a bootloop without an update, no root or anything modded. Is there any way to recover the data if its stuck like this?
anonymous724 said:
My g5 got stuck in a bootloop without an update, no root or anything modded. Is there any way to recover the data if its stuck like this?
Click to expand...
Click to collapse
Flash the stock rom and boot the device. But this will format the device.
To save data, remove the command fastboot erase userdata
Fastboot erase customisation.
Apps may be gone, but files In internal storage will be safe, like download,photos, music.
riyan65 said:
Flash the stock rom and boot the device. But this will format the device.
To save data, remove the command fastboot erase userdata
Fastboot erase customisation.
Apps may be gone, but files In internal storage will be safe, like download,photos, music.
Click to expand...
Click to collapse
no luck on this front, gets to the passcode screen, write in passcode then motorola logo shows and screen keeps on turning off and on.
Thanks for the effort though, much appreciated
Mine is similar to yours. Initially was on permanent loop of the following:
1. Boot to moto g splash screen... Repeat
2. Boot to lock screen then usually a few loops of 1. (after entering the patter or left Idle)
The phone initially didnt have any developer options enabled.
I wiped cache using recovery mode. Restarted and pretty much the same thing except that it would on rare occasions actually fully boot up usually only last a few minutes before cycling between steps 1 and 2 above.
I used those rare boot ups to backup all files and enable any USB debugging /oem unlock (incase I need to use a solution dependent on these being enabled.)
Factory resetted it and its still the same with the random successful boot amongst the numerous failed ones.
I managed to hook it up to Lenovo's Lmsa and flash the latest ROM. Now I get a lot more successful boots but still loops every so often. The downside is that I can no longer do any functions that make use of the audio/ mic/ video (can take pictures). If I do then it will crash and loop.
The hardware test on the LMSA passed for every component before flashing to the latest version. Post update it predictably fails on the audio/ mic components.
I guess I'll have to go back to the old version to see I get the audio back.
I have a weird situation going on with my phone
My phone is Chinese Pack and I had Xiaomi Eu MIUI 12 previously
I tried flashing MIUI 11 Stable China rom on it using TWRP
when I installed the rom, TWRP didn't get deleted and my phone started to bootloop, so I flashed magisk and the bootloop was gone and I could boot my device after flashing magisk.
Now I want to sell my phone and I'm trying to flash everything back to normal, get rid off TWRP and Magisk and lock the bootloader as well using MiFlash
the phone is running on V11.0.5.0.PCACNXM and I'm trying to flash the same rom using MiFlash and lock bootloader, but at first, it says device mismatch
and when I delete the first 2 lines of flash_all_lock.bat which causes this problem, something else happen
check the attached image
when I press the flash button, this screen comes up and nothing changes except the timer that goes up, and when I remove the phone cable, the phone boots normally without any problem, practically, MiFlash doesn't change a thing
any solution that can help me unlock Bootloader, remove Twrp and Magisk?
Already tried different versions of MiFlash and an app called XiaomiADBFastbootTools.jar, nothing again
P.S: while flashing with XiaomiADBFastbootTools.jar, I get the same message but after removing the cable, the error changes to "current device anti-rollback version is greater than this package", which is nonsense because I have the same ROM on phone already.