- @Wirmpolter - this root method largely based on his Magisk guide for Mate 9
- @topjohnwu for creating the awesome Magisk Manager, which was used to patch ramdisk image with superuser binary
- People, who created HuaweiUpdateExtractor
- @magnumlove who pointed me in the right for developing root method in this post
- This site, for hosting stock firmware for Huawei MediaPad M5
1. First, you will need to unlock the bootloader of your M5. Follow this guide
2. Transfer this patched ramdisk image to your device
Note for users with version of M5 other than SHT-AL09: Do NOT use the above ramdisk image. Download the full stock rom (update.zip) from the site I linked in the credits. Extract UPDATE.APP file from the zip. Then use HuaweiUpdateExtractor to extract ramdisk.img specific to your device. If you get errors in HuaweiUpdateExtractor - uncheck first 2 checkboxes for checksum verification on Settings tab and try again
3. Once bootloader is unlocked, install latest Magisk Manager from the official Magisk thread
4. Once Magisk Manager gives you a pop-up prompt to either download Magisk zip or patch the boot image file - chose to patch the boot image, but instead of boot.img select ramdisk.img from step 2. Magisk Manager should give you a message the image was successfully patched. It will be saved as patched_boot.img in MagiskManager folder on your sdcard. If it does not say success - do NOT proceed
5. Transfer the newly created patched_boot.img back to your PC
6. If you already have ADB and Fastboot tools installed on your PC you can just use what you've got. If not - get them from here
7. Connect your M5 to PC via USB cable
8. Run command prompt. If your ADB and Fastboot are installed as system app - you can do this from any path in CMD. If not - you need to switch in CMD to your ADB and Fastboot folder. Either way, the patched ramdisk patched_boot.img file must be in the same path, from which you will be running commands below in CMD window
9. Type "adb " in CMD window to start android debug bridge
10. Type "adb reboot-bootloader" and wait until your device restarts in Download mode
11. Once in Download mode, type "fastboot flash ramdisk patched_boot.img" - you should see some output from flash procedure, indicating successful flash
12. Once patched ramdisk is flashed, type "fastboot reboot"
That is it - you're done. Once your device reboots it will be rooted.
Note 1: Magisk Manager has it's own built-in superuser app, and even though it's located in /sbin/su - you will not see external, standalone app like SuperSU or SU you might be familiar with in your App Drawer. The way to control the superuser app is from Magisk Manager itself: Settings->Superuser section
Note 2: I don't do tech support via PM, so don't PM me for help or with questions. Use the thread instead, and some other XDA members or myself will probably help you. Good luck!
Note 3: You may find some links to Huawei stock firmware in the 2nd post