I am trying to install a custom on my Xiaomi Mi A2 Lite (first timer). However, I am facing a difficulty as my phone is showing me the error "Device Unable to Boot, Error - mdtp image is corrupted".

System I am using: Linux Mint 20.2

Things I did:

  1. Downloaded TWRP and ROM file.
  2. Unlocked the bootloader.
  3. Booted into TWRP by running "fastboot boot twrp*.img" in the terminal when fast screen appears on my phone. [I tried out this command "fastboot flash recovery twrp*.img" before running the above command, but failed and showed remote: partition table doesn't exist]

[So, it worked out well. However, I forgot to create backups]

  1. Wiped "Dalvik/ART Cache", Data, System, Internal Storage.

  2. Went to "install" and tried to flash the zip file of the ROM. However, it gave an error. [Probably, error 7, don't know what that mean]

  3. Then, tried to reboot and carry out the same process from the step 3, it gave me the error and I am stuck.

Now, I cannot do anything. Can you please help me out.

Thank You.

  • after install error 7 'adb pull /tmp/recovery.log'
    – alecxs
    Aug 14, 2021 at 10:39
  • @alecxs, I have tried the above command, but, getting this error message: "adb: error: failed to get feature set: no devices/emulators found". Aug 14, 2021 at 11:27
  • use official TWRP (have double checked adb will work)
    – alecxs
    Aug 14, 2021 at 12:42
  • Yes, I am using the official TWRP, but not working... Aug 14, 2021 at 13:20
  • 'adb kill-server' and re-plug cable until you can see it on 'adb devices'
    – alecxs
    Aug 14, 2021 at 13:37

1 Answer 1


flash vbmeta (if your device has verified boot) and disable verified boot before flashing custom recovery by the following command.

fastboot --disable-verification flash vbmeta vbmeta.img

(ofc get vbmeta img for ur device yourself)

then flash recovery using the following command

fastboot flash recovery <recovery file name.img

then try flashing rom, if still fails, flash vendor partition in twrp before flashing rom

  • How does this fix error 7 in TWRP while flashing ROM "Updater process ended with ERROR: 7 Error installing zip file"?
    – alecxs
    Aug 14, 2021 at 14:31

You must log in to answer this question.

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