2

I try to install a custom ROM on my Motorola Moto E5+. To do that, I'm following this tutorial (and check what is said online on the tools used): https://www.getdroidtips.com/lineage-os-17-motorola-moto-e5-plus/. So I'm at the step where I need to flash the TWRP image, but it seems to don't work.

   $ ./adb devices
* daemon not running; starting now at tcp:5037
* daemon started successfully
List of devices attached
ZL5225HPHW  device
   $ ./adb reboot bootloader
   $ sudo ./fastboot flash recovery ../twrp-3.6.0_9-0-hannah.img
(bootloader) is-logical:recovery: not found
Sending 'recovery' (20972 KB)                      OKAY [  0.851s]
Writin 'recovery'                                  (bootloader) Image recovery failed validation
(bootloader) Preflash validation failed
FAILED (remote: '')
fastboot: error: Command failed
   $ sudo ./fastboot boot ../twrp-3.6.0_9-0-hannah.img
Sending 'boot.img' (20972 KB)                      OKAY [  0.685s]
Booting                                            (bootloader) permission denied!
FAILED (remote: '')
fastboot: error: Command failed

Original screenshot of the terminal screen

So I try to use the command: ./fastboot flash recovery ../../Downloads/twrp-3.6.0_9-0-hannah.img (I'm sudo because it doesn't recognize my phone without) and I try to boot with the image as proposed here: Can't flash custom TWRP recovery image on Motorola Moto G7 Power phone But it doesn't work either. On my phone, it says "Mismatched partition size (recovery)" when I try to flash. And when I try to boot, it just say download and boot and that it.

Btw, I download the file from here: https://twrp.me/motorola/motorolamotoe5plus.html.

So do you know what I'm missing and what I need to do? Or even if I'm doing it right?

PS: when I'm trying with the official guide of LineageOS, it's doing the same:

   $ sudo ./fastboot flash recovery ../lineage-18.1-20220104-recovery-hannah.img
(bootloader) is-logical:recovery: not found
Sending 'recovery' (15432 KB)                      OKAY [  0.666s]
Writing 'recovery'                                 (bootloader) Image recovery failed validation
(bootloader) Preflash validation failed
FAILED (remote: '')
fastboot: error: Command failed

And it's say the same on the phone:

cmd: download: number
cmd: boot
cmd: getvar:has-slot:recovery
cmd: getvar:max-download-size
cmd: getvar:is-logical:recovery
cmd: download: another number
cmd: flash:recovery
Mismatched partition size (recovery)

PS²: I'm not sure if it's recognize in the good way, since, when I try the command sudo ./fastboot devices, it's listed as ZL5225HPHW Motorola Fastboot Interface, but I'm not sure that the Motorola Fastboot Interface is good or not?

PS³: Here are some more commands and the output (I made them under the guidance of @alecxs): So here is the output:

$ sudo fastboot getvar unlocked
(bootloader) unlocked: not found
getvar:unlocked FAILED (remote failure)
finished. total time: 0.003s
$ sudo fastboot getvar securestate
securestate: oem_locked
finished. total time: 0.009s

So, what I'm understanding is that my phone is not unlocked? How I can do that?

12
  • I don't know how accurate the guide on Get Droid Tips is, but there's an official guide for LineageOS on wiki.lineageos.org/devices/hannah
    – Andrew T.
    Jan 6, 2022 at 13:03
  • 2
    I'm a bit curious about the "Preflash validation failed" message. Note that we have a few questions related to that message, but I'm not sure if it may help since I don't have experience with Moto devices.
    – Andrew T.
    Jan 7, 2022 at 16:01
  • 1
    check output of 'fastboot getvar unlocked' and 'fastboot getvar securestate'
    – alecxs
    Jan 10, 2022 at 19:11
  • 1
    on your linked tutorial there is a section Pre-Requirements - there you will find another link under "You will require to unlock the device bootloader at first"
    – alecxs
    Jan 13, 2022 at 20:02
  • 1
    Ok, Thanks @alecxs, I try again to unlock the device bootloader. And there is it: ➜ ~ fastboot oem unlock ********** (bootloader) WARNING: This command erases all user data. (bootloader) Please re-run this command to continue. OKAY [ 0.002s] Finished. Total time: 0.002s ➜ ~ fastboot oem unlock ********** (bootloader) Bootloader is unlocked! Rebooting phone OKAY [ 0.165s] Finished. So, I run the command twice and it works, thanks
    – Unixcorn
    Jan 19, 2022 at 23:21

1 Answer 1

1

Thanks to @alecxs, I just don't unlock the device bootloader correctly.

I just need to run the command fastboot oem unlock ******** twice. And after that, it's working well.

Here the command and the output I have done to resolve the issue

➜ ~ fastboot oem unlock **********
(bootloader) WARNING: This command erases all user data.
(bootloader) Please re-run this command to continue.
OKAY [ 0.002s] Finished.
Total time: 0.002s
➜ ~ fastboot oem unlock **********
(bootloader) Bootloader is unlocked! Rebooting phone
OKAY [ 0.165s] Finished.

So, I run the command twice, and it works, thanks to all of you in the comments.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .