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?
And it's say the same "Mismatched partition size (recovery)
– Unixcorn Jan 06 '22 at 13:15lineage-18.1-20220105-recovery-hannah.imgand the image of the OS (like an iso). First of all, I'm not sure what the recovery file? And why "Sam", in the link who send @AndrewT., try to flash so many files??? – Unixcorn Jan 08 '22 at 00:06fastboot oem fb_mode_set, this returnOKAY [ 0.002s] Finished. Total time: 0.002sin my terminal andoem fb_node_seton my phone. So this one seems OK. But, when I'm doing the commandsudo ./fastboot flash recovery ../lineage-18.1-20220104-recovery-hannah.imgafter, it's return the same error. – Unixcorn Jan 08 '22 at 21:25sudo fastboot getvar unlocked(bootloader) unlocked: not found getvar:unlocked FAILED (remote failure) finished. total time: 0.003s $sudo fastboot getvar securestatesecurestate: oem_locked finished. total time: 0.009s – Unixcorn Jan 13 '22 at 19:40So, I run the command twice and it works, thanks
– Unixcorn Jan 19 '22 at 23:21