[Huawei MediaPad M5  Guides, News, & Discussion] TiTiB:
This guide is for folks who want to turn their stock Mediapad M5 SHT-W09 (C567) in to a rooted, ROM-flashing-friendly device. All credit goes to those listed below, without whom I would have not had a clue how to proceed. The real purpose if this post is to, essentially, get all the steps in to one, comprehensive, guide for all those folks who were unfortunate enough to have purchased their BOOT-LOCKED, ENCRYPTED, FUNKY-AS-HELL Huawei device.

This is my first (and last) Huawei device because of those things. My previous (and any future) devices will not have a locked bootloader, or will at least be easily unlocked. Lesson learned—do your research before spending your money. That being said, let's proceed.

CREDITS

[MENTION=1743916]stinger4321[/MENTION] For link to online bootloader unlock service.
[MENTION=1192060]Apo11on[/MENTION] For rooting guide.

[MENTION=6037748]Zackptg5[/MENTION] For DM-Verity, ForceEncrypt, Disk Quota Disabler.

[MENTION=4873016]schwabe93[/MENTION] For TWRP & ROM [LOS 15.1 Unofficial]

[MENTION=4187311]Setialpha[/MENTION] and the NanoDroid team for µg (microG) via NanoDroid.

[MENTION=6773321]TiTiB[/MENTION] [me] For debloating guide.

In order to keep this guide as brief as possible, I am not going to mention any alternative, nor unsuccessful methods—only those that worked FOR ME. Do some "re/searching" and you may find something that works best FOR YOU.

UNLOCKING BOOTLOADER

[GRRRRRR ] Thanks to [MENTION=1743916]stinger4321[/MENTION]

AFAIK as of this writing, 18 Dec 18, you will have to pay to unlock the bootloader. I used the online service found here:

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

It took about 10 hours for me to get the code, so be patient.

ROOTING

Thanks to [MENTION=1192060]Apo11on[/MENTION]

https://xdaforums.com/mediapad-m5/how-to/root-root-guide-huawei-mediapad-m5-t3786157

It is a Magisk rooting solution, but once rooted you can change to another type, if you wish.

TWRP [3.2.2-1 Unofficial]

Thanks to [MENTION=4873016]schwabe93[/MENTION]

https://xdaforums.com/mediapad-m5/development/recovery-twrp-3-2-2-1-t3813825

Not everything is functional, but hey, you'll have TWRP.

ROM [LOS 15.1 Unofficial]

Thanks to [MENTION=4873016]schwabe93[/MENTION]

https://xdaforums.com/mediapad-m5/development/rom-lineageos-15-1-t3813826

DM-Verity, ForceEncrypt, Disk Quota Disabler

[MENTION=6037748]Zackptg5[/MENTION]

https://xdaforums.com/android/software/universal-dm-verity-forceencrypt-t3817389

Read the instructions, and pay attention to the order of the steps, "This zip should be flashed after anything that modifies your boot img"

Easily the most stable ROM I've ever used! And I've used, probably, 70 or 80 over the years.

µg (microG) via NanoDroid

Thanks to [MENTION=4187311]Setialpha[/MENTION] and the NanoDroid team

https://xdaforums.com/apps/magisk/module-nanomod-5-0-20170405-microg-t3584928

LOS 15.1 [Unofficial] does not, thankfully, include GAPPS. µg (microG) is "A free-as-in-freedom re-implementation of Google’s proprietary Android user space apps and libraries." that allows for most functionality that would otherwise require Google's crap.

GSI PROJECT TREBLE ROMS

Thanks to [MENTION=2641629]mishaal[/MENTION] Rahman, Editor-in-chief on the XDA-Developers Portal for the "How to flash a Generic System Image (GSI) on Project Treble supported devices" guide.

https://www.xda-developers.com/flash-generic-system-image-project-treble-device/

I played around with four different GSI ROMs, but came back to LOS. I highly recommend trying them out tho because in my experience, using the adb method [link and commands below], I never lost any apps/data/settings—everything was still there, just with a new ROM to play with.

ADB COMMANDS [assuming already installed/authorized/plugged in, etc.]

adb fastboot bootloader >>>BE SURE THAT "PHONE" & "FRP" BOTH SHOW "UNLOCKED" BEFORE PROCEEDING<<<

fastboot erase system

fastboot -u flash system [name of system image you downloaded]

fastboot reboot

Disconnect device and play with new ROM.

>> DEBLOAT <<

This device is not a phone. I don't do any phone-like things with it. My debloat list is not for everyone—I'm very aggressive in my approach. Use your favorite search engine to find "bloatware safe to remove", and proceed with your own brain. You now have a rooted device with TWRP so why not do a backup and have fun debloating? That's how I figured out what to, and most importantly, what *not* to delete. BTW, I have used logcat readers to analyze the errors caused by my aggressive deleting of system assets, and am okay with the few errors that are caused—mostly the device trying to do "phone things" and not finding the required assets.

My method is to delete files/FOLDERS of those things I don't want—you have a rooted device, why use a "system app uninstaller" that might not fully do the job? The folders in which I do my deleting are, in order, /data/data, /system/app, /system/priv-app, immediately followed by a reboot, without which all bad things are possible.

I use the awesome MiXplorer (available for free, here on xda) for many functions—including root exploring/deleting, so I get rid of the ROM's included:

html viewer, gallery app, PDF viewer, text viewer/editor, et. al.

Below items are from LOS 15.1 [UNOFFICIAL]

⫸ /DATA/DATA

"Tele" "phone" "call" "cell" anything, blockednumber, dialer, carrier, stk, ctsshim, egg, mms, gallery3d, live wallpaper picker, and live wallpapers (noisefield, music vis, et. al.), dreams

⫸ /SYSTEM/APP

WAPPushManager, Stk, messaging, LiveWallpapersPicker, EasterEgg, CtsShimPrebuilt, CarrierDefaultApp, BasicDreams

⫸ /SYSTEM/PRIV-APP

"Tele" everything, WeatherProvider, MmsService, ManagedProvisioning, Gallery2, EmergencyInfo, Dialer, CtsShimPrivPrebuilt, CellBroadcastReceiver, CallLogBackup, CarrierConfig

I may have missed a few, and every ROM is different, so you may find more things to debloat.

If you found this guide to be useful, please hit the "Thanks" button ?