[Huawei MediaPad M5  Guides, News, & Discussion] pazzu:
I am going to document my experience with unlocking, rooting and custom rom'ing my device.

I have an SHT-AL09, MediaPad M5 LTE. Country code is C00 (China). I don't know why my experience is quite different from [MENTION=6773321]TiTiB[/MENTION]; it could be the fact that mine is LTE device. But the fact is Huawei has MediaPad M5 8.4" (WiFi or LTE), MediaPad M5 10.8" (WiFi or LTE), MediaPad M5 Pro. That's at least 5 variants, and I suspect the ROM'ing procedure won't be the same.

Going back to stock

Firstly, I found myself bricking the device a couple times. But the eRecovery feature saves the day. As soon as you unlock the bootloader, the boot screen would tell you that the device is not safe, and you can run eRecovery to reset it (pressing volume Up for 3 seconds). That feature can connect to WiFi outside of Android, download the ROM specific to your device, and reset the whole thing. I had to do it twice, and I think it took about 45 minutes. It works flawlessly, and everything is reset (except the bootloader still stays unlocked.) So, I would say, don't be concerned about bricking it. Unless you plan to replace the bootloader, then I can't advise you.

Important key combo

As you install TWRP and ROM, you will need these key combination handy.

• Reboot - hold down the power button.

• Fastboot - As soon as it boots, and just before the mediapad screen, hold the volume down button WITH the USB cable connected.

• Recovery - Hold down the power button and volume up WITHOUT the USB cable connected.

Credit to [MENTION=9346109]pyarle[/MENTION] on https://xdaforums.com/showpost.php?p=77238982&postcount=31

Choice of TWRP

This is important to know. I found two TWRP's advertised for MediaPad M5.

• From [MENTION=4873016]schwabe93[/MENTION] https://xdaforums.com/mediapad-m5/development/recovery-twrp-3-2-2-1-t3813825

• From [MENTION=2642882]Pretoriano80[/MENTION] https://xdaforums.com/honor-view-10/development/recovery-twrp-3-2-1-0-t3769917

The first one can boot even if the data is encrypted. But it cannot decrypt data, nor can it flash any LineageOS ROM (even the one posted by [MENTION=4873016]schwabe93[/MENTION] here https://xdaforums.com/mediapad-m5/development/rom-lineageos-15-1-t3813826 )

The second one cannot boot if the data is encrypted. But, it can boot just fine if the data is unencrypted, and it could flash the LineageOS image from https://openkirin.net/

You can switch between them; it's a matter of flashing the right image in fastboot. Sadly, not one TWRP can rule it all, but that's the way it is today.

My success story

Here goes how I got LineageOS on my MediaPad M5 LTE

Download ROM and zip file

• This is the ROM I used. https://openkirin.net/builds/openkirin_los_beta5.img.xz

• Unzip it, then copy it to the external SD card.

• For DM-Verity, ForceEncrypt, Disk Quota Disabler [MENTION=6037748]Zackptg5[/MENTION] See https://xdaforums.com/and...crypt-t3817389

• Download the zip file, and copy it to the external SD card as well. You will need to decide whether to disable encryption or not. See the ROM section below. But if you decide to keep the data encrypted, rename the file to Disable_Dm-Verity_12.16.2018.zip before you copy it to the SD card.

Unlock the bootloader

• https://xdaforums.com/mediapad-m5/how-to/bootloader-unlock-guide-t3781275

• I ended up paying $22 to get an unlock code. https://global-unlocking-solutions.miiduu.com/bootloader-unlock-codes-choose-model-below

• If your device has not been updated to a new Huawei ROM, you might have luck with a $5 solution with dc-unlocker. Otherwise, don't bother with downgrading. I tried for days; I just couldn't get it to work.

Root

• This is straightforward. https://xdaforums.com/mediapad-m5/how-to/root-root-guide-huawei-mediapad-m5-t3786157

TWRP

• Install this first. [MENTION=4873016]schwabe93[/MENTION] https://xdaforums.com/mediapad-m5/development/recovery-twrp-3-2-2-1-t3813825

• Don't forget, after the fastboot flash command and fastboot reboot, you have to boot to recovery right away. Otherwise the stock ROM might remove TWRP. Don't forget your key combo.

• Boot to recovery. Do a normal wipe (aka. Data, Cache, and Dalvik). (It won't be able to wipe /Cache.) Then do a "Format Data".

• Boot to Bootloader, and flash the second TWRP [MENTION=2642882]Pretoriano80[/MENTION] https://xdaforums.com/honor-view-10/development/recovery-twrp-3-2-1-0-t3769917

• With the data partition not encrypted, the second TWRP will boot. It can wipe /Cache.

Install ROM

• Hopefully, you have the LineageOS ROM from openkirin downloaded onto the SD card already.

• Still running [MENTION=2642882]Pretoriano80[/MENTION] TWRP, flash the ROM. It already has google apps.

• You will be flashing the ROM as an IMAGE (to the "system" partition.)

• Here comes an important decision you have to make. Would you like to encrypt your data partition? If so, no TWRP can flash anything onto the device again, so you better figure out all the zip files you'd like to install.

• After you make your decision, rename the Disable_Dm-Verity_ForceEncrypt_12.16.2018.zip file if necessary, and flash it. (TWRP has a file manager for you to rename files).

Should I encrypt or not encrypt?

• This is a personal decision. If you keep it unencrypted, your life would be easier. You can stick with [MENTION=2642882]Pretoriano80[/MENTION] TWRP and boot to it, and flash whatever zip files you'd like down the road.

• If you encrypt it, you will have to flash [MENTION=4873016]schwabe93[/MENTION] TWRP next time you'd like to run TWRP. And all it could do is to format data, so that you can flash [MENTION=2642882]Pretoriano80[/MENTION] TWRP again and flash. You would have to backup data with TitaniumBackup in Android, and restore it after the fact. You see the inconvenience?

• But, you know, if you lose your device, you would hate yourself for not encrypting your device.

Hope this helps anyone who has an SHT-AL09. The LineageOS rom runs really well, and I love the screen and sound.