• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

TWRP & LineageOS 16 installed in T5

Search This thread


Aug 7, 2015
Hello everyone, I did something with my T5 I can start with the fact that I uploaded recovery twrp_mate9_0.1.img and the phone was rotated, but I started to mess around and I used the wrong commands from this tab,

adb shell

mke2fs /dev/block/mmcblk0p3

mount -w -t ext4 /dev/block/mmcblk0p3


now everything is suspended, unable to boot the system I also tried to re-upload the recovery and other firmware but Nothing helps I do not have Huawei recovery or uploaded via ADB

C:\Users\......\Desktop\platform-tools>fastboot flash recovery_ramdisk twrp_mate9_0.1.img
target reported max download size of 471859200 bytes
sending 'recovery_ramdisk' (24954 KB)...
OKAY [ 0.689s]
writing 'recovery_ramdisk'...
OKAY [ 0.553s]
finished. total time: 1.248s


C:\Users\......\Desktop\platform-tools>fastboot flash system lineage-16.0-20201019-emui8-gapps.img
target reported max download size of 471859200 bytes
sending sparse 'system' 1/5 (460796 KB)...
OKAY [ 13.133s]
writing 'system' 1/5...
OKAY [ 10.322s]
sending sparse 'system' 2/5 (426700 KB)...
OKAY [ 12.266s]
writing 'system' 2/5...
OKAY [ 9.341s]
sending sparse 'system' 3/5 (460796 KB)...
OKAY [ 13.189s]
writing 'system' 3/5...
OKAY [ 10.130s]
sending sparse 'system' 4/5 (460796 KB)...
OKAY [ 13.228s]
writing 'system' 4/5...
OKAY [ 10.058s]
sending sparse 'system' 5/5 (58496 KB)...
OKAY [ 1.668s]
writing 'system' 5/5...
OKAY [ 1.285s]
finished. total time: 94.646s

fastboot -w
C:\Users\........\Desktop\platform-tools>fastboot -w
wiping userdata...
Erase successful, but not automatically formatting.
Can't determine partition type.
FAILED (remote: Command not allowed)
erasing 'userdata'...
(bootloader) success to erase cryypt info in oeminfo
OKAY [  0.049s]
finished. total time: 0.050s

Can you help me somehow? Thank you in advance
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Hi guys, I have successfully installed LineageOS 16 on my Mediapad T5 LTE. So far everything seems to work fine including wifi and LTE and i haven't had any problems with it. I followed this: https://forum.xda-developers.com/mediapad-t5/how-to/how-to-unlock-bootloader-t4141705 to unlock the bootloader. I then followed the instructions on OpenKirin website to flash LineageOS 16. I have also successfully installed magisk on LOS16 by patching the ramdisk from ags-l09. Hope it works for you guys as well. Here are screenshots.
    I have been able to install LineageOS, it is working but with bugs, for example the 5GHz Wifi is not working & It have been hard to make it connect to the 2.4 GHz, once connected for first time it worked fine (2.4 only)

    Here is how to do:

    You need fastboot, connect T5 to computer.
    Download TWRP for Huawei P20 Lite, I used this one:

    Copy downloaded file to adb&fastboot folder
    Open a DOS box or command line, use:

    adb reboot bootloader
    fastboot flash recovery_ramdisk TWRP.img
    fastboot reboot

    Press volume+ & diconnnect USB, TWRP will start.

    From the main menu of TWRP, tap Wipe, and then tap Format Data.
    Follow TWRP’s instructions.
    Tap on Advanced Wipe.
    Check the boxes: Dalvik/ART Cache, System, and Cache. Leave all the others unchecked.
    Swipe from left to right on the slider marked Swipe.

    Download LineageOS 16 from:
    go down to EMUI 8-based Builds
    Copy downloaded file to adb&fastboot folder
    Extract the compressed .XZ file
    Go to command line & enter:

    adb reboot bootloader
    fastboot flash system lineage16.img
    fastboot reboot

    Disconnect USB, LineageOS will start.
    Hi, did you trie to install ROM without TWRP ?
    Got my mediapad t5 working with the latest lineageOS 16 and magisk 21.1!
    Took a while but finally figured it out.
    TWRP will get stuck on the boot screen after you fastboot flash lineageOS so either erase the recovery partition or leave it if you want to take the risk (I never got stuck on it, just press and hold the power button, plug in cable + volume down when it restarts to go into fastboot mode).

    Follow the instructions here: https://openkirin.net/user_guide/how-to-install-magisk/ for magisk install without TWRP. You'll need to find the closest firmware download to your device model #. Mine was AGS2-L03 but I could only find AGS2-L09 to be the closest here: https://pro-teammt.ru/en/online-firmware-database/?firmware_model=ags2&firmware_page=0.
    You'll need to extract the update.APP, and then extract the ramdisk using the Huawei recovery tool. Then patch with magisk manager (and flash the patched boot.img with fastboot).