Hi,
I was trying to flash stock rom to my Moto E Indian version. It was running Cm 12 but suddenly it stopped detecting sim card. so I used this script to flash the stock firmware
mfastboot.exe oem lock begin
mfastboot.exe flash partition gpt.bin
mfastboot.exe flash motoboot motoboot.img
mfastboot.exe flash logo logo.bin
mfastboot.exe flash boot boot.img
mfastboot.exe flash recovery recovery.img
mfastboot.exe flash system system.img_sparsechunk.0
mfastboot.exe flash system system.img_sparsechunk.1
mfastboot.exe flash system system.img_sparsechunk.2
mfastboot.exe flash modem NON-HLOS.bin
mfastboot.exe erase modemst1
mfastboot.exe erase modemst2
mfastboot.exe flash fsg fsg.mbn
mfastboot.exe erase cache
mfastboot.exe erase userdata
mfastboot.exe oem lock
pause
mfastboot.exe reboot
but flash wasnt successful and its now stuck at recovery loop. If I try to flash any custom rom from recovery it says unable to mound data and system. Tried everything I know but doesnt help.
when I flash the above script it shows CM boot logo and gets stuck there
Using this stock firmware RETAILDSDSALL_XT1022_4.4.4_KXC21.5-40_cid7_CFC
C:\MotoTool\ADB>"Retail+lock.bat"
C:\MotoTool\ADB>mfastboot.exe oem lock begin
...
(bootloader) Ready to flash signed images
OKAY [ 0.089s]
finished. total time: 0.092s
C:\MotoTool\ADB>mfastboot.exe flash partition gpt.bin
target max-sparse-size: 256MB
sending 'partition' (32 KB)...
OKAY [ 0.028s]
writing 'partition'...
(bootloader) Preflash validation failed
FAILED (remote failure)
finished. total time: 0.577s
C:\MotoTool\ADB>mfastboot.exe flash motoboot motoboot.img
target max-sparse-size: 256MB
sending 'motoboot' (1669 KB)...
OKAY [ 0.099s]
writing 'motoboot'...
(bootloader) Motoboot: Preflash validation for tz
(bootloader) Preflash validation failed
FAILED (remote failure)
finished. total time: 0.574s
C:\MotoTool\ADB>mfastboot.exe flash logo logo.bin
target max-sparse-size: 256MB
sending 'logo' (460 KB)...
OKAY [ 0.083s]
writing 'logo'...
OKAY [ 0.144s]
finished. total time: 0.233s
C:\MotoTool\ADB>mfastboot.exe flash boot boot.img
target max-sparse-size: 256MB
sending 'boot' (10200 KB)...
OKAY [ 0.391s]
writing 'boot'...
(bootloader) Preflash validation failed
FAILED (remote failure)
finished. total time: 1.101s
C:\MotoTool\ADB>mfastboot.exe flash recovery recovery.img
target max-sparse-size: 256MB
sending 'recovery' (10280 KB)...
OKAY [ 0.399s]
writing 'recovery'...
OKAY [ 1.757s]
finished. total time: 2.161s
C:\MotoTool\ADB>mfastboot.exe flash system system.img_sparsechunk.0
target max-sparse-size: 256MB
sending 'system' (243072 KB)...
OKAY [ 7.676s]
writing 'system'...
(bootloader) Invalid signed image
(bootloader) Preflash validation failed
FAILED (remote failure)
finished. total time: 8.348s
C:\MotoTool\ADB>mfastboot.exe flash system system.img_sparsechunk.1
target max-sparse-size: 256MB
sending 'system' (257254 KB)...
OKAY [ 8.128s]
writing 'system'...
(bootloader) Invalid signed image
(bootloader) Preflash validation failed
FAILED (remote failure)
finished. total time: 8.197s
C:\MotoTool\ADB>mfastboot.exe flash system system.img_sparsechunk.2
target max-sparse-size: 256MB
sending 'system' (201709 KB)...
OKAY [ 6.381s]
writing 'system'...
(bootloader) Invalid signed image
(bootloader) Preflash validation failed
FAILED (remote failure)
finished. total time: 6.447s
C:\MotoTool\ADB>mfastboot.exe flash modem NON-HLOS.bin
target max-sparse-size: 256MB
sending 'modem' (46132 KB)...
OKAY [ 1.507s]
writing 'modem'...
OKAY [ 4.589s]
finished. total time: 6.101s
C:\MotoTool\ADB>mfastboot.exe erase modemst1
erasing 'modemst1'...
OKAY [ 0.012s]
finished. total time: 0.013s
C:\MotoTool\ADB>mfastboot.exe erase modemst2
erasing 'modemst2'...
OKAY [ 0.022s]
finished. total time: 0.025s
C:\MotoTool\ADB>mfastboot.exe flash fsg fsg.mbn
target max-sparse-size: 256MB
sending 'fsg' (649 KB)...
OKAY [ 0.106s]
writing 'fsg'...
OKAY [ 0.127s]
finished. total time: 0.237s
C:\MotoTool\ADB>mfastboot.exe erase cache
erasing 'cache'...
OKAY [ 0.366s]
finished. total time: 0.369s
C:\MotoTool\ADB>mfastboot.exe erase userdata
erasing 'userdata'...
OKAY [ 1.415s]
finished. total time: 1.419s
C:\MotoTool\ADB>mfastboot.exe oem lock
...
(bootloader) sst lock failure!
OKAY [ 0.043s]
finished. total time: 0.046s
C:\MotoTool\ADB>pause
Press any key to continue . . .
C:\MotoTool\ADB>mfastboot.exe reboot
rebooting...
finished. total time: 0.002s
C:\MotoTool\ADB>
Hi, even I'm experiencing the same issue, it started after installing 2nd soak test. I tried downgrading but it showed few errors like you. Now my phone is stuck at 'M' logo, please let ne know if you have got any solution.
rizzee said:
Hi, even I'm experiencing the same issue, it started after installing 2nd soak test. I tried downgrading but it showed few errors like you. Now my phone is stuck at 'M' logo, please let ne know if you have got any solution.
Click to expand...
Click to collapse
Try the 5.1 factory images
please provide me the link of 5.1 if you have.
Here you go : Link
rizzee said:
please provide me the link of 5.1 if you have.
Click to expand...
Click to collapse
Why u all gave lock command at first?
Flashed with 5.1 stock image, now phone is booting in recovery mode and 'failed to validate system image' is flashing in pink color. Please help
rizzee said:
Flashed with 5.1 stock image, now phone is booting in recovery mode and 'failed to validate system image' is flashing in pink color. Please help
Click to expand...
Click to collapse
@abhi98228 You probably messed up the partitions. You ran useless commands which were not meant to be run. Never blindly download any script and run it without knowing what you are doing, be careful. Those unnecessary lock commands messed up your system. I don't know how to fix your partitions but try this.
Run each command ONE BY ONE in the order given below manually via command prompt. Don't download some stupid script from the internet and run it.
Code:
mfastboot flash boot boot.img
mfastboot flash recovery recovery.img
mfastboot flash system system.img_sparsechunk.0
mfastboot flash system system.img_sparsechunk.1
mfastboot flash system system.img_sparsechunk.2
mfastboot flash modem NON-HLOS.bin
mfastboot erase modemst1
mfastboot erase modemst2
mfastboot flash fsg fsg.mbn
mfastboot erase cache
mfastboot erase userdata
mfastboot reboot
Now see if it works.
nilanko said:
@abhi98228 You probably messed up the partitions. You ran useless commands which were not meant to be run. Never blindly download any script and run it without knowing what you are doing, be careful. Those unnecessary lock commands messed up your system. I don't know how to fix your partitions but try this.
Run each command ONE BY ONE in the order given below manually via command prompt. Don't download some stupid script from the internet and run it.
Code:
mfastboot flash boot boot.img
mfastboot flash recovery recovery.img
mfastboot flash system system.img_sparsechunk.0
mfastboot flash system system.img_sparsechunk.1
mfastboot flash system system.img_sparsechunk.2
mfastboot flash modem NON-HLOS.bin
mfastboot erase modemst1
mfastboot erase modemst2
mfastboot flash fsg fsg.mbn
mfastboot erase cache
mfastboot erase userdata
mfastboot reboot
Now see if it works.
Click to expand...
Click to collapse
tried, not working. it is the primary phone of my younger brother. if possible reach me on whatsapp 8986834888
rizzee said:
tried, not working. it is the primary phone of my younger brother. if possible reach me on whatsapp 8986834888
Click to expand...
Click to collapse
Sorry I was talking to the OP. Can you tell us what did you do just before this problem started? Which commands did u run?
nilanko said:
Sorry I was talking to the OP. Can you tell us what did you do just before this problem started? Which commands did u run?
Click to expand...
Click to collapse
phone was running on 5.0.x soak test 1, i downloaded soak test 2 and updated it with system update. Updating went fine, but the phone got stuck at 'M' Logo after booting. Tried recovery and cleared cache and restored factory but in vain. then I tried downgrading with stock firmware 4.4.4 but nothing happened. Phone was still getting stuck at 'M' logo while booting. then I downloaded the 5.1 stock firmware from the link given above, used the commands you mentioned every thing during the process went ok but after completion thing got worse. when I try to turn it on it enters fastboot mode directly and shows "failed to validate system image".
rizzee said:
phone was running on 5.0.x soak test 1, i downloaded soak test 2 and updated it with system update. Updating went fine, but the phone got stuck at 'M' Logo after booting. Tried recovery and cleared cache and restored factory but in vain. then I tried downgrading with stock firmware 4.4.4 but nothing happened. Phone was still getting stuck at 'M' logo while booting. then I downloaded the 5.1 stock firmware from the link given above, used the commands you mentioned every thing during the process went ok but after completion thing got worse. when I try to turn it on it enters fastboot mode directly and shows "failed to validate system image".
Click to expand...
Click to collapse
Okay, the thing I am going to tell you is extremely important... So listen to me carefully:
1) Download TWRP and flash it using fastboot flash recovery recovery.img
2) Now reboot into recovery from the bootloader mode
3) after entering TWRP, Select Wipe, Advanced Wipe and Select all Partitions EXCLUDING your SD Card
After that is done, go to the Home menu of TWRP and select Reboot, Power Off
A warning will come saying no OS is installed and to fix root etc... Select DO NOT INSTALL, and your phone will power off.
Now boot into the bootloader mode, and flash the 5.1 image i gave you, executing each command as @nilanko told you to.
I have attached TWRP below:
Download
Rohitagni said:
Okay, the thing I am going to tell you is extremely important... So listen to me carefully:
1) Download TWRP and flash it using fastboot flash recovery recovery.img
2) Now reboot into recovery from the bootloader mode
3) after entering TWRP, Select Wipe, Advanced Wipe and Select all Partitions EXCLUDING your SD Card
After that is done, go to the Home menu of TWRP and select Reboot, Power Off
A warning will come saying no OS is installed and to fix root etc... Select DO NOT INSTALL, and your phone will power off.
Now boot into the bootloader mode, and flash the 5.1 image i gave you, executing each command as @nilanko told you to.
I have attached TWRP below:
Click to expand...
Click to collapse
I'm confused which one to download and install, there are many different versions available.
rizzee said:
I'm confused which one to download and install, there are many different versions available.
Click to expand...
Click to collapse
I made a correctin to the previous post
rizzee said:
phone was running on 5.0.x soak test 1, i downloaded soak test 2 and updated it with system update. Updating went fine, but the phone got stuck at 'M' Logo after booting. Tried recovery and cleared cache and restored factory but in vain. then I tried downgrading with stock firmware 4.4.4 but nothing happened. Phone was still getting stuck at 'M' logo while booting. then I downloaded the 5.1 stock firmware from the link given above, used the commands you mentioned every thing during the process went ok but after completion thing got worse. when I try to turn it on it enters fastboot mode directly and shows "failed to validate system image".
Click to expand...
Click to collapse
You currently have the 5.0.2 booloader. Maybe your bootloader and gpt needs to be upgraded and since it's the old one, it's failing to validate the newer 5.1 system. This is just a wild guess. If it shows that message with a green dead android, its not the fastboot mode. That image is inside the logo.bin of the 5.1 system. So nothing has changed, you are still stuck at the logo only, the difference being, the old logo.bin didn't show that the system validation was failing but this time it's showing up because of the upgraded logo.bin that's it.
You should also try unlocking your bootloader, maybe that will bypass the validity checks for originality. After unlocking, try flashing the firmware again. If still doesn't work, you gotta be brave and flash motoboot.img and gpt.bin as well. I DO NOT TAKE ANY GAURANTEE AND PLEASE DON'T BLAME ME IF ANYTHING GOES WRONG AFTER FLASHING BOOTLOADER AND GPT. DO IT AT YOUR OWN DISCRETION. I JUST TOLD YOU ABOUT SOME POSSIBILITIES, NOT ASKING YOU TO FOLLOW THEM.
nilanko said:
You currently have the 5.0.2 booloader. Maybe your bootloader and gpt needs to be upgraded and since it's the old one, it's failing to validate the newer 5.1 system. This is just a wild guess. If it shows that message with a green dead android, its not the fastboot mode. That image is inside the logo.bin of the 5.1 system. So nothing has changed, you are still stuck at the logo only, the difference being, the old logo.bin didn't show that the system validation was failing but this time it's showing up because of the upgraded logo.bin that's it.
You should also try unlocking your bootloader, maybe that will bypass the validity checks for originality. After unlocking, try flashing the firmware again. If still doesn't work, you gotta be brave and flash motoboot.img and gpt.bin as well. I DO NOT TAKE ANY GAURANTEE AND PLEASE DON'T BLAME ME IF ANYTHING GOES WRONG AFTER FLASHING BOOTLOADER AND GPT. DO IT AT YOUR OWN DISCRETION. I JUST TOLD YOU ABOUT SOME POSSIBILITIES, NOT ASKING YOU TO FOLLOW THEM.
Click to expand...
Click to collapse
Maybe you're right... He does have the 5.0.2 bootloader... So, flashing the 5.1 gpt.bin won't do any harm.
At least that is what I think
Rohitagni said:
Okay, the thing I am going to tell you is extremely important... So listen to me carefully:
1) Download TWRP and flash it using fastboot flash recovery recovery.img
2) Now reboot into recovery from the bootloader mode
3) after entering TWRP, Select Wipe, Advanced Wipe and Select all Partitions EXCLUDING your SD Card
After that is done, go to the Home menu of TWRP and select Reboot, Power Off
A warning will come saying no OS is installed and to fix root etc... Select DO NOT INSTALL, and your phone will power off.
Now boot into the bootloader mode, and flash the 5.1 image i gave you, executing each command as @nilanko told you to.
I have attached TWRP below:
Download
Click to expand...
Click to collapse
Hi, I downloaded TWRP from the like you provided. Now, please guide me the steps to flash it.
rizzee said:
Hi, I downloaded TWRP from the like you provided. Now, please guide me the steps to flash it.
Click to expand...
Click to collapse
Rename the file you have downloaded to recovery.img (ignore the img part if it is already present).
Now go to the bootloader mode of your phone, and then connect to your computer.
Open up the command prompt and type in fastboot flash recovery recovery.img.
On your phone something will appear like Partition Size mismatch or something. Ignore it.
Then when you get the message "OKAY" in the command prompt, disconnect your phone and USING ONLY the Vol Down button navigate to Recovery and press vol up.... Now u should be greeted with the TWRP screen.
Do this and tell me....
Rohitagni said:
Rename the file you have downloaded to recovery.img (ignore the img part if it is already present).
Now go to the bootloader mode of your phone, and then connect to your computer.
Open up the command prompt and type in fastboot flash recovery recovery.img.
On your phone something will appear like Partition Size mismatch or something. Ignore it.
Then when you get the message "OKAY" in the command prompt, disconnect your phone and USING ONLY the Vol Down button navigate to Recovery and press vol up.... Now u should be greeted with the TWRP screen.
Do this and tell me....
Click to expand...
Click to collapse
failed bootloader preflash validation failed
rizzee said:
failed bootloader preflash validation failed
Click to expand...
Click to collapse
It won't work unless you unlock your bootloader.
http://forum.xda-developers.com/showthread.php?t=2753110
After reflash from 11.2.5.26 to 10.12.3.130 (yes, downgrade) phone stucks on logo. Recovery also doesn't boot - phone goes into fastboot. On try to flash boot or recovery I have:
Code:
D:\Soft\android-sdk-windows\platform-tools>fastboot flash boot D:\ASUS\boot.img
target reported max download size of 1879048192 bytes
sending 'boot' (8052 KB)...
OKAY [ 0.270s]
writing 'boot'...
FAILED (remote: Security is Enable, close 'flash' function !!)
finished. total time: 0.291s
On try to boot from image I have:
Code:
D:\Soft\android-sdk-windows\platform-tools>fastboot boot D:\ASUS\XDA\TWRP.img
downloading 'boot.img'...
OKAY [ 0.398s]
booting...
FAILED (remote: dtb not found)
finished. total time: 0.527s
Phone starts to boot with boot.img image from 10.12.3.130 but stucks like in ordinary boot.
Tried to boot from TWRP images for other phones - on old images there's no error but phone stucks. With new images - same error with dtb. As I see, I need recovery from JB version, but I can't find it not among stock on asus.com, nor TWRP or CWM. Another way is to unlock partitions, but I can't find, how I can do this too.
I'll be grateful for any help.
Hello and welcome to XDA Q&A section of the Forums.
I suggest you try to format "boot" and then re-flashing it. Do so by typing "fastboot erase boot", then follow standard procedures for flashing boot. You can even try doing so with the recovery partition and see what happens (I suggest you do this before erasing your boot).
If I helped, hit "thanks" .
RAZERZDAHACKER said:
Hello and welcome to XDA Q&A section of the Forums.
I suggest you try to format "boot" and then re-flashing it. Do so by typing "fastboot erase boot", then follow standard procedures for flashing boot. You can even try doing so with the recovery partition and see what happens (I suggest you do this before erasing your boot).
If I helped, hit "thanks" .
Click to expand...
Click to collapse
Thanks. I didn't write it, but I already erased recovery and then boot and then tried to reflash them in order. No difference, still "Security is Enable, close 'flash' function".
Before:
I just unlocked the bootloader and installed a custom ROM (LineageOS 15.1: https://forum.xda-developers.com/huawei-y6/development/lineageos-15-1-huawei-y6-2018-t3832278) on my Huawei but it won't let me flash the TWRP from adb. I tried before flashing the custom ROM and also after but no progress. I tried with 'fastboot flash recovery recovery.img' as well as 'fastboot flash boot recovery.img' because I knew some smartphones include the recovery in the boot.img but I am always getting the same error:
Code:
fastboot flash recovery recovery.img
target reported max download size of 535822336 bytes
sending 'recovery' (16544 KB)...
OKAY [ 0.522s]
writing 'recovery'...
FAILED (remote: partition table doesn't exist)
finished. total time: 0.553s
I am not an expert but I understood that 'recovery' partition doesn't exist. I found some possible solutions online such as writing 'fastboot flash RECOVERY recovery.img' or 'fastboot flash erecovery recovery.img' (because Huawei calls the stock one 'erecovery') but they both gave me another error:
Code:
fastboot flash RECOVERY recovery.img
target reported max download size of 535822336 bytes
sending 'RECOVERY' (16544 KB)...
OKAY [ 0.522s]
writing 'RECOVERY'...
FAILED (remote: Command not allowed)
finished. total time: 0.528s
UPDATE: I found, maybe, the correct name of the recovery partition and it seems to work:
Code:
fastboot flash recovery_ramdisk twrp.img
< waiting for device >
target reported max download size of 535822336 bytes
sending 'recovery_ramdisk' (14026 KB)...
OKAY [ 0.443s]
writing 'recovery_ramdisk'...
OKAY [ 0.323s]
finished. total time: 0.767s
BUT it actually doesn't work properly because when I boot into recovery it boots the stock one. I tried other solutions found on the net like instantly unplug the phone after the flash and reboot it into recovery immediately but again it boots into stock one...
OTHER UPDATE: I managed to find and flash a TWRP that can boot up but it shows the internal storage 0MB not allowing me to install any .zip file. Because of that, I cannot install SuperSU to get root access.
I tried installing TWRP also with stock ROM but still showing 0MB because the phone is encrypted. To disable encryption I need to install the bluspark TWRP (As I found online), the problem is that bluspark won't boot and gets immediately overwritten by the stock ROM as it happened with the one I mentioned in the first update of the post.
Now I will try buying a microSD card and see if it shows right so that I can still flash .zip from the microSD card.
Now:
LATEST UPDATE: The SD card is working properly and I see it as around 60 GB instead of 64 but that's not the problem. I can see the .zip files I'd want to flash but when I try to do it it says me that it failed to mount every single partition and after some research I discovered that my Huawei has all the data encrypted. After other research I found that there are some TWRPs like blu_spark that could decrypt the data but every version I tried doesn't work and gets immediately overwritten by the stock recovery.
Does anyone know other methods to decrypt all the data on Huawei? Otherwise it's impossible to flash any .zip. Actually it flashes it but it fails to update the partitions state so the system doesn't recognize the changes.
Rooting Huawei is so difficult.. I will buy an OP5t as soon as I have the money XD.
Y6 2018 twrp
Any progress? I'm also looking for a version of TWRP that works with the Y6 2018.
I tried to install lineage OS 17.1 on a Moto-Z with Android 6.0.1, and failed.
Here is one error I'd like to solve - this command:
fastboot flash recovery twrp-3.3.1-0-griffin.img
Results in:
(bootloader) has-slot:recovery: not found
(bootloader) is-logical:recovery: not found
Sending 'recovery' (20536 KB) OKAY [ 0.443s]
Writing 'recovery' (bootloader) Image not signed or corrupt
OKAY [ 0.481s]
Finished. Total time: 0.932s
twrp-3.3.1-0-griffin.img is the lastest image, from here.
The same error appears when I try to flash the lineage recovery:
fastboot flash recovery lineage-17.1-20201211-recovery-griffin.img
So what is wrong here?
I've been flashing a Moto e5 Plus today, and the ADB messages were the same, except without the "has slot" line. I think they are standard.
I also had trouble getting TWRP to "stick". What ended up working was booting into the bootloader, flashing TWRP and instead of rebooting I selected "recovery" with the volume buttons.
The TWRP site says this in its instructions:
Note many devices will replace your custom recovery automatically during first boot. To prevent this, use Google to find the proper key combo to enter recovery. After typing fastboot reboot, hold the key combo and boot to TWRP. Once TWRP is booted, TWRP will patch the stock ROM to prevent the stock ROM from replacing TWRP. If you don't follow this step, you will have to repeat the install.
Click to expand...
Click to collapse
but holding Power + Volume Up after reboot didn't seem to work for me.
mfs-ness said:
What ended up working was booting into the bootloader, flashing TWRP ...
Click to expand...
Click to collapse
How did you flash TWRP - from the bootloader?
Or from the PC via fastboot - in which case there is always the above error, not just with TWRP images.
This is how I flashed TWRP from a linux desktop:
Code:
./adb -d reboot bootloader
sudo ./fastboot flash recovery ~/Downloads/twrp-3.4.0-0-hannah.img
(bootloader) is-logical:recovery: not found
Sending 'recovery' (19798 KB) OKAY [ 0.795s]
Writing 'recovery' (bootloader) Image not signed or corrupt
OKAY [ 0.552s]
Finished. Total time: 1.352s
The first line results in the screen with the open-chested android. Then I ran the fastboot command. Then I selected "recovery mode" on the phone.
mfs-ness said:
This is how I flashed TWRP from a linux desktop:
...
Click to expand...
Click to collapse
Not different from my technique.
So we seem to have different conditions on the phone, firmware, whatever.