Moto G7 Soft brick - Moto G7 Questions & Answers

I was asked yesterday to install LineageOS on someone's phone. It's been a few years, and I screwed some stuff up and now I need help. I'll go through what I did first and then I'll go through my current problems.
Enabled USB debugging and OEM unlock in the phone's settings.
Used ADB to reboot ot bootloader (adb reboot bootloader)
Verified the device's existence with adb.
Used Motorola's website to unlock the phone's bootloader. Process went fine.
Restarted the phone. Got the message that the bootloader was unlocked.
Went back to developer settings to re-enable USB debugging.
Rebooted to fastboot.
Typed in "fastboot flash boot twrp.img" (the file name was longer, but I'll abbreviate for the sake of brevity).
Wiped data.
Formatted data
Now, this is where the problems started. With the data formatted, I couldn't sideload anything, mounting didn't work, and the TWRP file manager showed literally nothing on the phone. No file system or anything, it looked like. This was done on a Linux computer (which also turned two of my MicroSD cards into read only. Thanks Fedora.
Anyway, I figured I should go back to fastboot to fix things. This was probably a mistake, because now I can't do anything. I can't flash TWRP, I can't boot into it, nothing. For example, when I type in
fastboot flash recovery twrp.img
Click to expand...
Click to collapse
I get this:
(bootloader) is-logical:recovery: not found
Sending 'recovery' (27096 KB) OKAY [ 0.802s]
Writing 'recovery' (bootloader) Invalid partition name recovery
FAILED (remote: '')
fastboot: error: Command failed
Click to expand...
Click to collapse
I Googled around. Some people said I might need to flash partitions from gpt.bin, but that didn't work either. Every time, I get "invalid partition name xxx."
What can I do?
Thanks you in advance.

Related

[GUIDE] LG G STYLO How to root the T-Mobile 6.0 update

This guide was made before Kingroot was able to root the official update. But thanks to @oskar and @TheDerekHarper on XDA and to @josephwv on Android forums it is now comfirmed that Kingroot will root the official update. But first you must still follow steps #1 through #6 so Kingroot can root your device.
Now before Kingroot was able to root the update I figured out how to root the official update and it is not all to complicated. The following guide will walk you through the root process. But I am not responsible for anything that happens to your devices by using this guide as you are responsible for your device.
What you need:
1. A computer running Linux or Windows with adb and fastboot installed. (I used Ubuntu)
2. If you are using Windows you need all the drivers for your device installed. Linux users will not have to worry about this.
3. A functioning USB cable for your device.
4. Battery charged at least 50% just for safety.
5. The TWRP revovery.img, this is the same TWRP recovery we already have for the LG G Stylo I have just renamed it to recovery.img to make it easier to type the name in while typing fastboot commands.
6. The SuperSU-v2.65-20151226141550.zip by Chainfire. (All credit to Chainfire for this awesome zip.)
How to root your device:
1. I suggest you first go to Settings/General/About Phone/Software info and tap on the "Build number" until it says"You are now a developer". Then back out of until you are in Settings/General and go to "Developer options" and turn "Enable OEM unlock" on. This is to allow TWRP recovery to be able to boot. Also turn on "USB debugging" while you are there.
2. Download the SuperSU-v2.65-20151226141550.zip to your device. You need to move the zip file from your Downloads folder to somewhere on your external SD card as it will not be deleted from there when you use the "fastboot oem unlock" command in step #6.
3. Download the recovery.img to your computer. If you do not have adb and fastboot setup globally for linux or in your path for windows you need to move the recovery.img to the directory your adb and fastboot is in and open a terminal or command line (depending on your OS) in that directory or cd to that directory. If you do have adb and fastboot globally or in your path you can just open a terminal or command line in the directory you have the recovery.img or cd to the directory you have the recovery.img.
4. Once you have the terminal or command line open run the command "adb devices" to make sure your devices is detected by adb. You may get a toast pop up on your device asking if you to "Allow usb debugging". Except this as this is the RSA key you need to allow your computer to communicate with your device via adb. You should see something like "LGH631dffacad9 device" in your terminal or command line. If you see "unauthorized" instead of "device" you have not excepted the RSA key.
5.Now type the following command in your terminal or command line. Type "adb reboot bootloader". This will reboot your device to fastboot mode. Once in fastboot mode use the "fastboot devices" to make sure your device is recognized by fastboot. You should see something like "dffacad9 fastboot". If you are in Linux and get a error message you may have to use "sudo fastboot devices" for fastboot to work. (If you are using Windows and are having trouble with fastboot recognizing your device you need to install the device drivers. If it still does not work install the drivers again with your device connected to your computer in fastboot mode.)
6. To fully unlock your bootloader you have to use the command "fastboot oem unlock". You have to do this or this root method will not work. But be warned that if you do use this command it will factory reset your device. Plus you will get a line of text saying the bootloader is unlocked on the splash screen when you boot your device.
6-1: If you are wanting to use Kingroot to root your device you can reboot your device now. Open the Kingroot app and let it root your device and then use Flashify, Rashr, or a similar app to flash the recovery. Then boot to recovery and flash the SuperSU.zip in recovery and it will remove Kingroot and have SuperSU installed on your device.
7. Now you can do this two ways if you do not want to keep the stock recovery you can use the command "fastboot flash recovery.img" to install the recovery and then use the command "fastboot reboot recovery" to boot to the TWRP recovery. (If this command gives you issue like it seems to be for many then just use the the following method and then use Flashify or Rashr app to install TWRP after you are done rooting.) If you want to keep the stock recovery you can use the command "fastboot boot recovery.img" to boot to the TWRP recovery.
8. Once you are booted to the TWRP recovery you should make a full backup first so you have a backup to restore to in case things go bad. After you make a backup then select install and then find the SuperSU-v2.65-20151226141550.zip and install it. Once it is installed reboot your device to system. If TWRP gives you a warning about the su binaries missing and asks if you want to install thee su binaries before you reboot select no or it will interfere with the rooting process of the SuperSU.zip. When your device reboots it will boot to the LG splash screen and then reboot again. But then it will boot to the OS but it will take a minute. Make sure you let your device reboot all the way to the lockscreen or home screen depending on if you have a lockscreen enabled or not. You should be fully rooted after this, enjoy.
Resserved in case needed later.
Thank you.
target reported max download size of 268435456 bytes
sending 'recovery' (11300 KB)...
OKAY [ 0.359s]
writing 'recovery'...
FAILED (remote: unknown command)
finished. total time: 0.359s
ok so i know this is 100% my fault for not reading, but why would you even include step 6? it wipes everything including the supersu.zip. the files i'm pissed about, but i can get over. mostly music plus some ****ty pictures. contacts can text me. but the main thing is i had to restart my phone, get it started up and everything, then put the super su.zip back onto the phone. just a tedious task.
Can I use this guide with my G4 Stylus (H635)?
wtf... i get this same error
C:\adb>fastboot flash recovery v10.img
target reported max download size of 268435456 bytes
sending 'recovery' (11230 KB)...
OKAY [ 0.390s]
writing 'recovery'...
FAILED (remote: unknown command)
finished. total time: 0.390s
I've tried multiple versions of the TWRP for the g stylo on adroidforum and none of it flashes with the fastboot flash recovery .....img option. Every single one fails. Please tell me how you flashed the recovery... Also I cant run it through Flashify because my SuperSU says no binary is installed... I'm completely lost at this point
aaron2z said:
wtf... i get this same error
C:\adb>fastboot flash recovery v10.img
target reported max download size of 268435456 bytes
sending 'recovery' (11230 KB)...
OKAY [ 0.390s]
writing 'recovery'...
FAILED (remote: unknown command)
finished. total time: 0.390s
I've tried multiple versions of the TWRP for the g stylo on adroidforum and none of it flashes with the fastboot flash recovery .....img option. Every single one fails. Please tell me how you flashed the recovery... Also I cant run it through Flashify because my SuperSU says no binary is installed... I'm completely lost at this point
Click to expand...
Click to collapse
Someone mentioned using the Kingroot app and I gotta admit, I was skepticle at first but after testing. I can confirm it works.
Just go go KingRoot.net, download their apk, install and run the root program. Igll work out of the box after, sadly I couldn't get the above method to work either with super su.
aaron2z said:
wtf... i get this same error
C:\adb>fastboot flash recovery v10.img
target reported max download size of 268435456 bytes
sending 'recovery' (11230 KB)...
OKAY [ 0.390s]
writing 'recovery'...
FAILED (remote: unknown command)
finished. total time: 0.390s
I've tried multiple versions of the TWRP for the g stylo on adroidforum and none of it flashes with the fastboot flash recovery .....img option. Every single one fails. Please tell me how you flashed the recovery... Also I cant run it through Flashify because my SuperSU says no binary is installed... I'm completely lost at this point
Click to expand...
Click to collapse
do the fastboot boot recovery.img so it boots up twrp then flash the supersu zip then boot your phone you should be rooted then flash twrp using flashify
I was getting the same error, ( in step 7 don't flash the recovery )
just use "fastboot boot recovery.img" and it will boot to TWRP without installing it
you can then install SU, ( note ) when you exit or re boot from TWRP it will say SU in not installed do you want to install it, I did the first time and it seemed to hose up, so I did everything over and the second time selected no to re install.
once booted I used flashify to install the TWRP img, and I am able to boot to recovery using Quickboot apk
on a side note I have SU installed, I can use root explorer and other apps that ask for SU access, but Titanium backup
doesn't seem to uninstall apps anymore, they seem to re install after a reboot
Hope this helps yall's
aaron2z said:
wtf... i get this same error
C:\adb>fastboot flash recovery v10.img
target reported max download size of 268435456 bytes
sending 'recovery' (11230 KB)...
OKAY [ 0.390s]
writing 'recovery'...
FAILED (remote: unknown command)
finished. total time: 0.390s
I've tried multiple versions of the TWRP for the g stylo on adroidforum and none of it flashes with the fastboot flash recovery .....img option. Every single one fails. Please tell me how you flashed the recovery... Also I cant run it through Flashify because my SuperSU says no binary is installed... I'm completely lost at this point
Click to expand...
Click to collapse
TheDerekHarper said:
Someone mentioned using the Kingroot app and I gotta admit, I was skepticle at first but after testing. I can confirm it works.
Just go go KingRoot.net, download their apk, install and run the root program. Igll work out of the box after, sadly I couldn't get the above method to work either with super su.
Click to expand...
Click to collapse
I gotta be honest... I'm pretty skeptical to try it. I've read of everyone having either a softbrick boot loop or the root just not staying after reboot. Yours worked for H631 T-mobile 6.0 and stayed? If you confirm T-mobile variant and 6.0 I'll try it. There's a lot of headache with this method for me (not saying it doesn't work). I bricked my phone trying to get the binary files for SU by trying to reroot. But unbricked it with LG Flash Tools and a stock kdz. So I don't want to brick it again twenty minutes later lol
aaron2z said:
I gotta be honest... I'm pretty skeptical to try it. I've read of everyone having either a softbrick boot loop or the root just not staying after reboot. Yours worked for H631 T-mobile 6.0 and stayed? If you confirm T-mobile variant and 6.0 I'll try it. There's a lot of headache with this method for me (not saying it doesn't work). I bricked my phone trying to get the binary files for SU by trying to reroot. But unbricked it with LG Flash Tools and a stock kdz. So I don't want to brick it again twenty minutes later lol
Click to expand...
Click to collapse
Made a tutorial on how to get the marshmallow update (i.e. rom i've used.)
And then afterwards i downloaded Minimal ADB & Fastboot, OEM Unlocked the device (for safety) and downloaded the Kingroot Apk.
Installed it, and just allowed the program to root. It was pretty simple, haven't had any issues (i've even disabled OEM Unlock from the phone & USB Debugging.)
Hell, even adoptable storage is enabled for my phone too (but that's another tutorial from somewhere else.)
I do plan to make a root video, just so someone could see it and grab their opinion.
To be clear: I'm using a metroPCS LG Stylo. Also, only time the phone had issues was when i factory reset it to get rid of root. (didn't work)
so i had to follow the steps from the above tutorial to reflash the stock rom.
jothe1 said:
do the fastboot boot recovery.img so it boots up twrp then flash the supersu zip then boot your phone you should be rooted then flash twrp using flashify
Click to expand...
Click to collapse
well this did it, the root actually worked.
I got a permanent root from the procedure listed on page one of this thread. The only thing I did differently was, when booted into TWRP and you try to re boot the system you will get the question if you want TWRP to install root. If you do allow TWRP to install root, you wont get root. At this point select the option to just reboot the phone. The LG Logo will appear twice before it fully boots. When the device is fully up, you will have root.
Foamp said:
ok so i know this is 100% my fault for not reading, but why would you even include step 6? it wipes everything including the supersu.zip. the files i'm pissed about, but i can get over. mostly music plus some ****ty pictures. contacts can text me. but the main thing is i had to restart my phone, get it started up and everything, then put the super su.zip back onto the phone. just a tedious task.
Click to expand...
Click to collapse
My apologies as I made a typo in the guide. The correct command is "fastboot flash recovery recovery.img" to flash the recovery. I will fix this along with another rework about putting the SusperSU.zip only on your SD card.
oskar5510 said:
Can I use this guide with my G4 Stylus (H635)?
Click to expand...
Click to collapse
I do not know if you can use it or not as I do not have that device. But you can try it bit if your device does not boot to fastboot mode when you issue the adb reboot bootloader command then your device's bootloader is not unlockable and this root method will not work for you. But from the posts in this thread point out that Kingroot now works on the 6.0 update so you can also try Kingroot to see if it willroot your device.
aaron2z said:
wtf... i get this same error
C:\adb>fastboot flash recovery v10.img
target reported max download size of 268435456 bytes
sending 'recovery' (11230 KB)...
OKAY [ 0.390s]
writing 'recovery'...
FAILED (remote: unknown command)
finished. total time: 0.390s
I've tried multiple versions of the TWRP for the g stylo on adroidforum and none of it flashes with the fastboot flash recovery .....img option. Every single one fails. Please tell me how you flashed the recovery... Also I cant run it through Flashify because my SuperSU says no binary is installed... I'm completely lost at this point
Click to expand...
Click to collapse
Again sorry as this is fully my fault for making the typo on the fastboot command to flash recovery. I am fixing it as soon as I am done with this post.
TheDerekHarper said:
Someone mentioned using the Kingroot app and I gotta admit, I was skepticle at first but after testing. I can confirm it works.
Just go go KingRoot.net, download their apk, install and run the root program. Igll work out of the box after, sadly I couldn't get the above method to work either with super su.
Click to expand...
Click to collapse
Thank you for posting this.
jothe1 said:
do the fastboot boot recovery.img so it boots up twrp then flash the supersu zip then boot your phone you should be rooted then flash twrp using flashify
Click to expand...
Click to collapse
Yes this is how I did it when I rooted my device. I will edit the guide some to point this out.
AgainstTheFlow said:
I got a permanent root from the procedure listed on page one of this thread. The only thing I did differently was, when booted into TWRP and you try to re boot the system you will get the question if you want TWRP to install root. If you do allow TWRP to install root, you wont get root. At this point select the option to just reboot the phone. The LG Logo will appear twice before it fully boots. When the device is fully up, you will have root.
Click to expand...
Click to collapse
Thank you for posting this so others can see this does work.
infektedpc said:
target reported max download size of 268435456 bytes
sending 'recovery' (11300 KB)...
OKAY [ 0.359s]
writing 'recovery'...
FAILED (remote: unknown command)
finished. total time: 0.359s
Click to expand...
Click to collapse
I also apologize to you for my mistake. It will be corrected shortly.
TheDerekHarper said:
Made a tutorial on how to get the marshmallow update (i.e. rom i've used.)
And then afterwards i downloaded Minimal ADB & Fastboot, OEM Unlocked the device (for safety) and downloaded the Kingroot Apk.
Installed it, and just allowed the program to root. It was pretty simple, haven't had any issues (i've even disabled OEM Unlock from the phone & USB Debugging.)
Hell, even adoptable storage is enabled for my phone too (but that's another tutorial from somewhere else.)
I do plan to make a root video, just so someone could see it and grab their opinion.
To be clear: I'm using a metroPCS LG Stylo. Also, only time the phone had issues was when i factory reset it to get rid of root. (didn't work)
so i had to follow the steps from the above tutorial to reflash the stock rom.
Click to expand...
Click to collapse
Thanks for posting this I will add this to the post as another option to root seeing as it is comfirmed. I will give credit to you and @oskar for this info.
Is there anyway to do this without wiping your data from 'fastboot oem unlock'? My bootloader keeps saying locked in fastboot mode even though I checked Enable OEM Unlock in settings. It won't let me boot the recovery.img because it's locked.
supersonic125 said:
Is there anyway to do this without wiping your data from 'fastboot oem unlock'? My bootloader keeps saying locked in fastboot mode even though I checked Enable OEM Unlock in settings. It won't let me boot the recovery.img because it's locked.
Click to expand...
Click to collapse
Are you trying to use the fastboot boot recovery.img command?
Yeah, if I try to flash instead of booting I get:
C:\adb>fastboot flash recovery recovery.img
target reported max download size of 268435456 bytes
sending 'recovery' (11300 KB)...
OKAY [ 0.380s]
writing 'recovery'...
FAILED (remote: unknown command)
finished. total time: 0.401s
supersonic125 said:
Yeah, if I try to flash instead of booting I get:
C:\adb>fastboot flash recovery recovery.img
target reported max download size of 268435456 bytes
sending 'recovery' (11300 KB)...
OKAY [ 0.380s]
writing 'recovery'...
FAILED (remote: unknown command)
finished. total time: 0.401s
Click to expand...
Click to collapse
Hmmm looks like maybe fully unlocking the bootloader enables all fastboot commands. You can try downloading and installing Kingroot and root with it as the posts here comfirm it will root the update now. Or just u lock the bootloaderb but your device will be reset if you do.
T-Macgnolia said:
Hmmm looks like maybe fully unlocking the bootloader enables all fastboot commands. You can try downloading and installing Kingroot and root with it as the posts here comfirm it will root the update now. Or just u lock the bootloaderb but your device will be reset if you do.
Click to expand...
Click to collapse
What if we just enable oem unlock in both the system and the bootloader then use adb to push the recovery, superuser, and busybox to the system. King Root caused too many system instabilities, it had injected itself as a system app and after unrooting and uninstalling after a reboot I was left with a soft brick due to a secure boot error 1003. A stock 5.1.1 kdz and the lg flash tool was able to bring my Stylo back to life.
It could all be done by running a simple batch file bundled with everything we need for our device. Linux would probably be the better option but it could work the same in windows.

Amazon Moto G4 bootloaders can't be unlocked?

I've followed a couple tutorials of that explain how to unlock Motorola's Moto G4 bootloader. This seems to be the "official" one from Motorola:
https://motorola-global-portal.custhelp.com/app/standalone/bootloader/unlock-your-device-b
I copied part of it up to where I get stuck. Here it is:
Put your device in fastboot mode (power off, then press the power and volume down buttons simultaneously).
On your desktop, open a command prompt or terminal, and go to the directory where you installed the Android SDK tools (or make sure fastboot is in your $PATH)
At the prompt, type $ fastboot oem get_unlock_data
The returned string will be used to retrieve your unlock key.
Example: On a Windows Desktop, the returned string format would be $ fastboot oem get_unlock_data
(bootloader) 0A40040192024205#4C4D3556313230
(bootloader) 30373731363031303332323239#BD00
(bootloader) 8A672BA4746C2CE02328A2AC0C39F95
(bootloader) 1A3E5#1F53280002000000000000000
(bootloader) 0000000
****************************************
OK, so I just bought a Moto G4 for $125 on Amazon's prime day. This means that it has ads on the lock screen. I'm OK with that. But I think they also made the locked bootloader unlocakble as 3 times I've gotten this from a Windows machine in ADB mode:
(bootloader) Unlock data:
(bootloader) 3A45210407248602#
(bootloader) 5A59323233433246534C004D6F746F2047200000#
(bootloader) 1095EFAB6000EDC14660539C503A04F7900B9A01#
(bootloader) 9F93C800000000000000000000000000
There should be numbers in that first Bootloader line and then Motorola says:
You're device does not qualify for bootloader unlocking.
Has anybody else had this happen? This is my second time doing this to a Motorola phone and the Moto g2 was a snap! I was hoping to install a custom recovery like TWRP so I could get a nandroid backup while everything is new
Marty
LinuxHippy said:
You're device does not qualify for bootloader unlocking.
Has anybody else had this happen? This is my second time doing this to a Motorola phone and the Moto g2 was a snap! I was hoping to install a custom recovery like TWRP so I could get a nandroid backup while everything is new
Marty
Click to expand...
Click to collapse
A Lot of us have already unlocked our bootloader
Rempala said:
A Lot of us have already unlocked our bootloader
Click to expand...
Click to collapse
Do u have the Amazon moto g4?
I do and I unlocked my bootloader and rooted the phone already.
Yes I have the Amazon G4
Well, these posts gave me hope that I was repeating the same mistake and I was. Forth time worked to unlock the BL. I was deleting the # signs at the end of each line. That was the mistake. It should be this from 4 lines:
3A45210407248602#5A59323233433246534C004D6F746F2047200000#1095EFAB6000EDC14660539C503A04F7900B9A01#9F93C800000000000000000000000000
Now I'm trying to boot into the TWRP image I flashed with fastboot and fastboot gave me errors about it not being signed so I'm not sure it worked. Where are people here getting the Moto g4 TWRP images? I went here:
https://www.androidfilehost.com/?w=...23bf15e9165ccc3b437c48af2047195d3fae863dca817
This is what I get when I try to flash TWRP now and then reboot into it with adb:
C:\Users\Huntz\Downloads>fastboot devices
ZY223C2FSL fastboot
C:\Users\Huntz\Downloads>fastboot flash recovery twrp_athene_20160526.img
(bootloader) has-slot:recovery: not found
target reported max download size of 536870912 bytes
sending 'recovery' (12498 KB)...
OKAY [ 0.398s]
writing 'recovery'...
(bootloader) Image not signed or corrupt
OKAY [ 0.344s]
finished. total time: 0.746s
C:\Users\Huntz\Downloads>adb reboot recovery
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
error: no devices/emulators found
Just FYI, Motorola's bootloader unlock website has a webtool that you can use to clean the output of get_unlock_data, so you'll only get the relevant info. Copy-paste the raw code into the tool, hit clean, copy paste the output into the unlock code line on the website, submit.
Regarding TWRP, yes I think everyone gets that "Image not signed or corrupt" message. Also, you can't "adb reboot recovery" from fastboot. Just flash it via fastboot, reboot into fastboot, then go into recovery.
Maybe it did install twrp OK since it still boots into the original stock ROM OK. How do u get into twrp with the buttons on the phone?
LinuxHippy said:
Maybe it did install twrp OK since it still boots into the original stock ROM OK. How do u get into twrp with the buttons on the phone?
Click to expand...
Click to collapse
Boot into fastboot (press and hold power + volume down, let go when the bootloader screen shows up), press down on the volume rocker twice, and it'll say "recovery mode" on the screen. Press power once and it'll boot into TWRP.
Something's wrong then. I get to the fastboot screen OK but when I go into recovery it says your device has been unlocked and can't be trusted. It will reboot in 5 sec and then I see a dead robot.
EDIT
it does boot OK into the stock ROM from there if u do nothing for a minute or two or if u just hold in power button for 15 secs to get a black screen and then release the button and hold it 4 secs to get a normal boot
Sounds like TWRP didn't flash correctly, or maybe was a bad download (can download directly from TWRP's website here: https://dl.twrp.me/athene/). Reboot back into fastboot and try flashing TWRP again (you might also want to try renaming it to recovery.img, so the flashing command would be "fastboot flash recovery recovery.img").
I'll try again later today-hopefully it works and thanks for the link
I'm gonna try doing adb in Linux too.
xtermmin said:
Sounds like TWRP didn't flash correctly, or maybe was a bad download (can download directly from TWRP's website here: https://dl.twrp.me/athene/). Reboot back into fastboot and try flashing TWRP again (you might also want to try renaming it to recovery.img, so the flashing command would be "fastboot flash recovery recovery.img").
Click to expand...
Click to collapse
When u reboot now, do u get a 5 second delay screen that says your device has been unlocked and can't be trusted?
Marty
LinuxHippy said:
When u reboot now, do u get a 5 second delay screen that says your device has been unlocked and can't be trusted?
Marty
Click to expand...
Click to collapse
Yes, that is normal for devices with unlocked bootloaders. You can get rid of it by rebooting into fastboot and following this guide: http://forum.xda-developers.com/showpost.php?p=67031810&postcount=5
(if you don't have mfastboot, you can use plain-old fastboot as well)
I'm puzzled-the md5 on twrp was right and I unlocked the BL OK. I'll try it in Linux later and see if it takes.
Might be worth trying another USB port or even another cable. Some people have issues when trying to flash things on a USB 2.0 phone plugged into a USB 3.0 port.
About how much time should it take to flash twrp? I don't think it even flashed anything yesterday because it was too quick.
LinuxHippy said:
About how much time should it take to flash twrp? I don't think it even flashed anything yesterday because it was too quick.
Click to expand...
Click to collapse
It is almost instantaneous. As for the booting into recovery and seeing the dead robot, that is probably due to the fact that the phone tries to re-write the recovery when you reboot automatically. Just flash the twrp.img, and then go to recovery from the bootloader without rebooting and you will be fine; just make sure you have whatever you want to flash (e.g. supersu) on your device storage when you get there.
Sounds like a plan! What's the md5 on the supersu file?

Unable to format in TWRP

When I try to wipe internal it says
Code:
Wiping internal storage -- /data/media...
Error opening: '/data/media' (No such file or directory)
When I try to format instead - I get even more errors:
Code:
Formatting Data using make_ext4fs...
Failed to mount '/data' (Device or resource busy)
Failed to mount '/data' (Device or resource busy)
Unable to recreate /data/media folder.
You may need to reboot recovery to be able to use /data again.
Updating partition details...
Failed to mount '/data' (Device or resource busy)
...done
Is this because of encryption? And if so - this is weird because I never encrypted my device. I currently have no OS and just trying to unsoftbrick my phone.
specialk00 said:
...Is this because of encryption? And if so - this is weird because I never encrypted my device. I currently have no OS and just trying to unsoftbrick my phone.
Click to expand...
Click to collapse
Use fastboot and make sure you are using the latest binaries. Format system, userdata and cache. Upon booting for the first time, the 6P automatically defaults to encryption- unless you intervene and stop it from doing so.
v12xke said:
Use fastboot and make sure you are using the latest binaries. Format system, userdata and cache. Upon booting for the first time, the 6P automatically defaults to encryption- unless you intervene and stop it from doing so.
Click to expand...
Click to collapse
Yep, I just fixed it somehow, I think it was related to MTP in TWRP. However now I'm stuck with a different issue. No matter what I flash in fastboot - I get
Code:
C:\Users\Nexusflip\AppData\Local\Android\sdk\platform-tools>fastboot flash recovery D:\Downloads\angler\twrp-3.1.1-0-angler.img
target didn't report max-download-size
sending 'recovery' (16948 KB)...
FAILED (command write failed (No error))
finished. total time: 0.003s
I always get this weird "No error" thing.
specialk00 said:
Yep, I just fixed it somehow, I think it was related to MTP in TWRP. However now I'm stuck with a different issue. No matter what I flash in fastboot - I get
Click to expand...
Click to collapse
Are you sure you are using the latest binaries? Hash checked the TWRP file? Put TWRP img in your fastboot folder? Format/erase recovery partition?
v12xke said:
Are you sure you are using the latest binaries? Hash checked the TWRP file? Put TWRP img in your fastboot folder? Format/erase recovery partition?
Click to expand...
Click to collapse
Yes I'm using the latest binaries - I got them via Android SDK and updated everything. I checked the ones you linked and they are exactly the same.
Regarding the hash check - this has nothing to do with the file being corrupted. This happens with ANY file I try to flash.
I tried putting the TWRP img in my fastboot folder and the results are the same.
Erasing the recovery partition gives the same error.
Code:
C:\Users\username\AppData\Local\Android\sdk\platform-tools>fastboot erase recovery
erasing 'recovery'...
FAILED (command write failed (No error))
finished. total time: 0.009s
specialk00 said:
Yes I'm using the latest binaries - I got them via Android SDK and updated everything. I checked the ones you linked and they are exactly the same. Regarding the hash check - this has nothing to do with the file being corrupted. This happens with ANY file I try to flash. I tried putting the TWRP img in my fastboot folder and the results are the same. Erasing the recovery partition gives the same error.
Click to expand...
Click to collapse
Were you able to successfully fastboot format userdata, system and cache with no errors? Did you get the same error using format as you did erase recovery? Is your phone bootlooping ? If yes, then your phone may have the BLOD. There are a few instances of users still having access to recovery mode, but not being able to flash anything. If you flash a full stock image with flash-all.bat, it finishes but the phone still loops then you likely have the BLOD.
v12xke said:
Were you able to successfully fastboot format userdata, system and cache with no errors? Did you get the same error using format as you did erase recovery? Is your phone bootlooping ? If yes, then your phone may have the BLOD. There are a few instances of users still having access to recovery mode, but not being able to flash anything. If you flash a full stock image with flash-all.bat, it finishes but the phone still loops then you likely have the BLOD.
Click to expand...
Click to collapse
I tried minimal adb & fastboot (bit older version) and got this.
Code:
C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash recovery twrp-3.1.1-0-angler.img
target didn't report max-download-size
sending 'recovery' (16948 KB)...
FAILED (command write failed (Unknown error))
finished. total time: 0.007s
Then I tried another old version of fastboot - got one from july 2016 (23.0.1) and nothing happened when executing flash or format commands.
Then I tried normal, latest fastboot and both (new & old) versions of fastboot gave me this error.
Code:
C:\Users\Nexusflip\AppData\Local\Android\sdk\platform-tools>fastboot erase userdata
erasing 'userdata'...
FAILED (command write failed (No error))
finished. total time: 0.023s
Then I tried to format (instead of erase)
Code:
C:\Users\Nexusflip\AppData\Local\Android\sdk\platform-tools>fastboot format userdata
FAILED (command write failed (No error))
I don't know if my phone is bootlooping because I don't have OS installed and my internal storage is squeaky clean. All this crap didn't just start out of nowhere - I flashed 8.0.0 dev preview 2 images through TWRP. I know I'm not the brightest. When I launch flash-all.bat it's just blank and does nothing at all.
specialk00 said:
I don't know if my phone is bootlooping because I don't have OS installed and my internal storage is squeaky clean. All this crap didn't just start out of nowhere - I flashed 8.0.0 dev preview 2 images through TWRP. I know I'm not the brightest. When I launch flash-all.bat it's just blank and does nothing at all.
Click to expand...
Click to collapse
It sounds to me like your internal storage (memory) is bad. Bottom line is that if you can't format your basic partitions successfully, you will not be able to flash a full ROM. If you don't believe your memory is bad, you can search the 6P forums for the Qualcomm Flash Image Loader (QFIL) & EDL mode. There is a rescue binary for the 6P floating around that some people have been successful in using restoring corrupt partitions, presumably because it works at the hardware level.
v12xke said:
It sounds to me like your internal storage (memory) is bad. Bottom line is that if you can't format your basic partitions successfully, you will not be able to flash a full ROM. If you don't believe your memory is bad, you can search the 6P forums for the Qualcomm Flash Image Loader (QFIL) & EDL mode. There is a rescue binary for the 6P floating around that some people have been successful in using restoring corrupt partitions, presumably because it works at the hardware level.
Click to expand...
Click to collapse
What should I do from now on? I have no idea what to do. The device has been bricked for 24 hours now.
This is the closest I've found to my problem. Also on a Nexus 6P. https://forum.xda-developers.com/nexus-6p/help/zip-file-signature-verification-error-t3561054
I tried adb reboot edl and it says error: closed. So not even that works.
specialk00 said:
What should I do from now on? I have no idea what to do. The device has been bricked for 24 hours now. This is the closest I've found to my problem. Also on a Nexus 6P. https://forum.xda-developers.com/nexus-6p/help/zip-file-signature-verification-error-t3561054
I tried adb reboot edl and it says error: closed. So not even that works.
Click to expand...
Click to collapse
Stock fastboot does not support boot to EDL. You need a modified fastboot, BUT getting to EDL mode won't help you until you have all the proper tools and 6P specific files. I don't want to get your hopes up. I think your device is not recoverable due to a hardware issue (bad memory). If you are looking for a learning project to keep you busy with very little hope of success, keep digging. If you need a working phone, you need to buy another one, or a 6P replacement motherboard from a screen damaged parts phone. Unfortunately, there have been many onboard memory failures on the 6P.
I fixed the problem. It turned out to be a faulty USB-C to USB-A cable. The only problems were with file transfer-related commands. I then tried transferring a 1 kb file, then 1 mb (failed) then 200kb, then 300kb (failed). So it turns out the cable is ****ty. Wow. And nothing is corrupted. I'm typing this from my phone now.

Unable to flash TWRP on Moto G4 Plus

I had previously rooted my Moto G4 Plus and used multiple custom ROMs before switching back to Stock firmware.
Now, I'm unable to flash TWRP on my device. Any attempts to flash TWRP ends up with the following error:
Code:
reboot bootloader
mfastboot flash recovery twrp.img
target max-sparse-size: 256MB
sending 'recovery' (12530 KB)...
OKAY [ 0.406s]
writing 'recovery'...
(bootloader) Image not signed or corrupt
OKAY [ 0.203s]
finished. total time: 0.608s
Any further tries to reboot via adb commands results in the following:
Code:
adb reboot recovery
error: device not found
adb reboot
error: device not found
adb reboot bootloader
error: device not found
The device says the bootloader is unlocked while rebooting. the ID field shows 'bad key'(I feel this is weird).
Can someone please help me with this?
Thanks
unknown_geek said:
I had previously rooted my Moto G4 Plus and used multiple custom ROMs before switching back to Stock firmware.
Now, I'm unable to flash TWRP on my device. Any attempts to flash TWRP ends up with the following error:
Code:
reboot bootloader
mfastboot flash recovery twrp.img
target max-sparse-size: 256MB
sending 'recovery' (12530 KB)...
OKAY [ 0.406s]
writing 'recovery'...
(bootloader) Image not signed or corrupt
OKAY [ 0.203s]
finished. total time: 0.608s
Any further tries to reboot via adb commands results in the following:
Code:
adb reboot recovery
error: device not found
adb reboot
error: device not found
adb reboot bootloader
error: device not found
The device says the bootloader is unlocked while rebooting. the ID field shows 'bad key'(I feel this is weird).
Can someone please help me with this?
Thanks
Click to expand...
Click to collapse
It has got flashed correctly as you got "OKAY" at end of command. Try to boot into recovery and tell us what happens.
1) That TWRP message of 'Image not signed or corrupt' is normal, since the TWRP custom recovery is not signed. After you see the [OKAY], reboot to recovery directly to fix the TWRP, else the stock recovery will overwrite it. Afterwards, you can boot as normal.
2)If you're still in the bootloader on your device, adb commands do not work - you need to use fastboot commands, or use your device volume keys to select 'Start' (to boot to system) or 'Recovery mode' (to boot to recovery) and press the power key to select. Of course, in this case, after flashing TWRP, you'll want to select 'Recovery Mode' in your bootloader and press the power key. This should then boot into TWRP.
If you find yourself in the bootloader in the future, then 'fastboot reboot' or 'fastboot continue' (both commands to be used without quotes, in the ADB terminal) may get your device rebooting to system.
3)ID Bad key is normal with an unlocked bootloader, on subsequent boots this may change to ID:N/A
echo92 said:
1) That TWRP message of 'Image not signed or corrupt' is normal, since the TWRP custom recovery is not signed. After you see the [OKAY], reboot to recovery directly to fix the TWRP, else the stock recovery will overwrite it. Afterwards, you can boot as normal.
2)If you're still in the bootloader on your device, adb commands do not work - you need to use fastboot commands, or use your device volume keys to select 'Start' (to boot to system) or 'Recovery mode' (to boot to recovery) and press the power key to select. Of course, in this case, after flashing TWRP, you'll want to select 'Recovery Mode' in your bootloader and press the power key. This should then boot into TWRP.
If you find yourself in the bootloader in the future, then 'fastboot reboot' or 'fastboot continue' (both commands to be used without quotes, in the ADB terminal) may get your device rebooting to system.
3)ID Bad key is normal with an unlocked bootloader, on subsequent boots this may change to ID:N/A
Click to expand...
Click to collapse
Hi @echo92,
Thanks for pointing out what I was doing wrong. I now realize that the TWRP recovery was being overwritten by stock recovery and I didn't know adb commands don't work while still in bootloader mode.
I did boot into recovery mode from the bootloader (using the volume buttons from the phone) and it worked.
And the ID: bad key is also gone and now it shows ID: N/A.
Thanks again for your help!
Regards
____Mdd said:
It has got flashed correctly as you got "OKAY" at end of command. Try to boot into recovery and tell us what happens.
Click to expand...
Click to collapse
Hi @____Mdd,
I rebooted into recovery right after flashing TWRP and it worked fine. Now, I'm able to boot into TWRP recovery.
Thanks for your response.
Regards.
Im Facing this issue while flashing TWRP
C:\adb>fastboot flash recovery twrp.img
(bootloader) has-slot:recovery: not found
(bootloader) is-logical:recovery: not found
Sending 'recovery' (12644 KB) OKAY [ 0.422s]
Writing 'recovery' (bootloader) Image size exeeded partition limits
(bootloader) Preflash validation failed
FAILED (remote: '')
fastboot: error: Command failed
Click to expand...
Click to collapse
vaibhavhr2010 said:
Im Facing this issue while flashing TWRP
Click to expand...
Click to collapse
Pre flash validation errors suggest that your bootloader is locked (i.e. you have not unlocked your bootloader, or it has been re locked). Can you confirm your bootloader is unlocked, e.g. if there is a warning screen on boot saying your device is unlocked?
echo92 said:
Pre flash validation errors suggest that your bootloader is locked (i.e. you have not unlocked your bootloader, or it has been re locked). Can you confirm your bootloader is unlocked, e.g. if there is a warning screen on boot saying your device is unlocked?
Click to expand...
Click to collapse
Thank You for the Reply!
Yes I have already unlocked the Bootloader.
The device status in Bootloader shows Device is Unlocked, Status Code: 3
vaibhavhr2010 said:
Thank You for the Reply!
Yes I have already unlocked the Bootloader.
The device status in Bootloader shows Device is Unlocked, Status Code: 3
Click to expand...
Click to collapse
Thanks, what device are you trying to flash TWRP to and which TWRP image are you using?
echo92 said:
Thanks, what device are you trying to flash TWRP to and which TWRP image are you using?
Click to expand...
Click to collapse
I'm Flashing my Moto G4 using the twrp-3.0.2-3-titan.
vaibhavhr2010 said:
I'm Flashing my Moto G4 using the twrp-3.0.2-3-titan.
Click to expand...
Click to collapse
That TWRP won't work, if it's for Titan. The codename for Moto G4/plus is athene, only TWRP images specifying athene in their name will work.
https://forum.xda-developers.com/mo...recovery-twrp-3-2-1-unofficial-touch-t3722206 or https://eu.dl.twrp.me/athene/ give these a try instead

[HELP] Z00TD/ZE551KL soft-bricked? No recovery mode, no OS, locked bootloader.

Hey guys, I need help with this Asus Zenfone 2 Laser that:
Cannot boot to any OS (asus logo pops up, freezes, and then a blue screen flashes for a really short period, before it powers off, see video here.)
Can't download the unlock app to unlock bootloader
Can't access ADB
Cannot access Recovery mode
Can't "factory reset", apply update over ADB, etc.
Bootloader is locked
Can't flash custom recovery, boot TWRP, or really anything...
See fastboot reference below for more info
Code:
$ fastboot boot twrp-3.7.0_9-0-Z00T.img
Sending 'boot.img' (31066 KB) OKAY [ 0.987s]
Booting FAILED (remote: 'unlock device to use this command')
fastboot: error: Command failed
$ fastboot flash recovery twrp-3.7.0_9-0-Z00T.img
Sending 'recovery' (31066 KB) OKAY [ 0.987s]
Writing 'recovery' FAILED (remote: 'Permission denied, phone is protected')
fastboot: error: Command failed
$ fastboot flash boot boot.img # (Original boot.img from factory image)
Warning: skip copying boot image avb footer (boot partition size: 0, boot image size: 17980722).
Sending 'boot' (17559 KB) OKAY [ 1.478s]
Writing 'boot' FAILED (remote: 'Permission denied, phone is protected')
fastboot: error: Command failed
$ fastboot flashing unlock
FAILED (remote: 'unknown command')
fastboot: error: Command failed
$ fastboot oem device-info
(bootloader) Device unlocked: false
(bootloader) Charger screen enabled: false
(bootloader) Display panel:
OKAY [ 0.003s]
Finished. Total time: 0.003s
As someone who has only worked with Google Pixel phones in the past, I'm very frustrated for a few reasons.
Firstly, why the hell is the ONLY WAY to unlock a bootloader through an app that was released in such a clandestine, under-the-table way?
Second, why is the manufacturer gatekeeping the recovery files? The only way I was able to find the stock recovery.img is through a comment on a Reddit post (ironically posted by an ASUS Employee).
Third, I've been scouring the internet for many, many days trying to find any kind of emergency recovery method, but every single tutorial acts on the assumption that the bootloader is unlocked, and that boot.img, recovery.img, etc. can be flashed.
Enough about the frustration. Now let's talk about what I've tried so far.
I tried ASUS Flash Tool (Finding ADB drivers was a whole different fiasco for this device), and came up empty handed, as it doesn't detect the device when in fastboot mode.
I tried using fastboot to flash boot, recovery, system, fastboot, and dnx/ifwi, to no avail.
I tried booting into recovery via `fastboot reboot recovery`, `fastboot reboot-recovery`, `fastboot oem reboot-recovery`, and by holding Vol Down while booting up. They all give the same result, which is just an instant (<1 second) reboot. My best guess is that recovery.img is either missing or badly corrupt, so the bootloader just gives up and exits immediately.
Please help. I don't want an expensive paperweight sitting in my drawer just because of a bootloop that wasn't my fault (seriously this device just bootlooped itself one day, I didn't flash a custom rom, root or anything like that).
Any help is appreciated,
Thanks in advance
you can flash on locked bootloader in EDL mode. search in the forum, don't hesitate to ask for clarity on search results. I give you a starting point.
(don't read the whole thread, it will only confuse you)
https://forum.xda-developers.com/t/...image-dump-file-raw-bin.4543217/post-88139417
alecxs said:
you can flash on locked bootloader in EDL mode. search in the forum, don't hesitate to ask for clarity on search results. I give you a starting point.
(don't read the whole thread, it will only confuse you)
https://forum.xda-developers.com/t/...image-dump-file-raw-bin.4543217/post-88139417
Click to expand...
Click to collapse
Probably a dumb question, but how can I put my device into EDL mode?
I've tried many key combinations in conjunction with plugging it into the computer, and I've tried connecting it without a battery.
if nothing else works you need to figure out test points
https://forum.xda-developers.com/t/...ed-to-unlock-bootloader.4531349/post-87944673
you still have fastboot? try this for EDL mode.
Code:
fastboot oem enter-dload
Good news and bad news. Good news is: I was able to enter EDL mode.
Bad news is, apparently my entire partition scheme was messed up, and upon running "edl w gpt gptboth0.bin", fastboot no longer works.
I have tried flashing aboot using edl ("edl w aboot emmc_appsboot.mbn") and it's not working.
Not to mention that it is almost impossible to find the firmware file with all the factory files such as "emmc_appsboot.mbn". The place where I got my file seemed very sketchy and I'm not surprised if the reason it's not working is because it's the wrong file.
Once again, this is a result of ASUS gatekeeping their recovery files to service centers to drive up repair sales.
If anyone has a link, or would like to provide a donor file, it would be VERY much appreciated.
what is inside official download?
https://www.asus.com/supportonly/asus zenfone 2 laser (ze551kl)/helpdesk_bios
alecxs said:
what is inside official download?
https://www.asus.com/supportonly/asus zenfone 2 laser (ze551kl)/helpdesk_bios
Click to expand...
Click to collapse
So yes, I was able to get fastboot back. However, I am now facing another issue.
In order to get fastboot back, I had to run this command
Bash:
edl qfil rawprogram0.xml patch0.xml image_dir
This seemed fine at first, but now, running "edl printgpt" returns nothing. Somehow, the phone is able to boot to fastboot without any GPT partitions visible.
However, when I try to flash gpt_main0, or gpt_both0, the phone now becomes unbootable.
This means, if I try to create a partition table to flash recovery onto, appsboot (and by extension, fastboot) no longer works.
Code:
$ fastboot flash recovery recovery.img
Sending 'recovery' (18115 KB) OKAY [ 0.581s]
Writing 'recovery' FAILED (remote: 'partition table doesn't exist')
fastboot: error: Command failed
"partition table doesn't exist"
If I try to create the partition table, the phone refuses to boot...
OS were
sj-dan said:
So yes, I was able to get fastboot back. However, I am now facing another issue.
In order to get fastboot back, I had to run this command
Bash:
edl qfil rawprogram0.xml patch0.xml image_dir
This seemed fine at first, but now, running "edl printgpt" returns nothing. Somehow, the phone is able to boot to fastboot without any GPT partitions visible.
However, when I try to flash gpt_main0, or gpt_both0, the phone now becomes unbootable.
This means, if I try to create a partition table to flash recovery onto, appsboot (and by extension, fastboot) no longer works.
Code:
$ fastboot flash recovery recovery.img
Sending 'recovery' (18115 KB) OKAY [ 0.581s]
Writing 'recovery' FAILED (remote: 'partition table doesn't exist')
fastboot: error: Command failed
"partition table doesn't exist"
If I try to create the partition table, the phone refuses to boot...
Click to expand...
Click to collapse
So we're you able to find a fix in any way? I find myself in just about the same situation tho for different reasons. I have a radiant max 5g att device i moronicaly tried to download a gsi using the dsu updater, but forgot to unlock bootloader or even enable USB debugging before attempt. So OS system is crashing an saying 'device corrupted' on boot attempt. Recovery mode gets the same result. Was able to use the bugjaegar app to connect ad run the bootloader but every repair attempt is blocked by the fact the USB debugging isn't on. To make matters worse I accidentky hit boot fastbootd command instead of normal and whatever that did wiped out my ability to even connect with bootloader so I'm kind of stuck.
faisaliteb said:
Mod. edit: spammer gone. alecxs
I found many tutorials about fixing bootloops on the Nexus but they all seem to require an unlocked bootloader.
The bootloader on the device is locked. I can see the device in fastboot devices but I can't unlock it.
Any idea how to repair this? Can I somehow flash a factory image onto the device even though OEM unlock is disabled? There is no data on the device that would need to be preserved. I'm ideally looking for a Linux-based solution. more info... ***
Click to expand...
Click to collapse
Yeah man I've been looking at this problem for over a week now and can't find much online at all to help. Except for this EDLmode some devices can boot into, and apparently you can flash a locked system using this emergency download mode. I dunno still researching.

Categories

Resources