Magisk has officially landed on the lovely Treble enabled Huawei devices! Props to Huawei reaching out and sent me a device for development 
Instead of holding it off and wait till the next proper release, I decide to release it here so those willing to root their device can give it a try.
These Huawei Treble devices use an interesting setup: it no longer has a boot and recovery partition, but instead has a kernel partition, a ramdisk partition, and a recovery_ramdisk partition. Both boot and recovery share the same kernel, but with separate ramdisks on separate partitions. Since Magisk modifies the ramdisk in boot images, the patches will have to be applied to the ramdisk partition. This nature will very likely to also slightly change how custom recovery will be installed, my bet is similar to Pixel devices which ships with a full ramdisk image, and should be flashed to the recovery_ramdisk partition.
This build is only tested with Honor View 10, but it should work with Mate 10 and Mate 10 Pro in theory since these devices are very similar.
Enough of the rambling, let's get right into it!
Instructions
If your device have TWRP support, just directly flash it via TWRP. For devices without TWRP yet (currently all Huawei Treble devices), you can follow the instructions below:
https://www.paypal.me/topjohnwu
Instead of holding it off and wait till the next proper release, I decide to release it here so those willing to root their device can give it a try.
These Huawei Treble devices use an interesting setup: it no longer has a boot and recovery partition, but instead has a kernel partition, a ramdisk partition, and a recovery_ramdisk partition. Both boot and recovery share the same kernel, but with separate ramdisks on separate partitions. Since Magisk modifies the ramdisk in boot images, the patches will have to be applied to the ramdisk partition. This nature will very likely to also slightly change how custom recovery will be installed, my bet is similar to Pixel devices which ships with a full ramdisk image, and should be flashed to the recovery_ramdisk partition.
This build is only tested with Honor View 10, but it should work with Mate 10 and Mate 10 Pro in theory since these devices are very similar.
Enough of the rambling, let's get right into it!
Instructions
If your device have TWRP support, just directly flash it via TWRP. For devices without TWRP yet (currently all Huawei Treble devices), you can follow the instructions below:
- Install latest Magisk Manager from the Official Thread
- Go to Settings > Update Settings > Update Channel > Custom, and insert the following URL: https://goo.gl/jefZKH
- Follow the instructions of "Install Via Magisk Manager" in the main thread, but instead of providing the boot image (which these devices do NOT have), provide the stock ramdisk.img.
If you are using EU View 10 with model BKL-L09, you can download the stock ramdisk.img I extracted from official OTAs in the attachments
If you have stock ramdisk images for other devices, please share them and I'll add them to the OP.
Make sure you are installing Magisk-v15.4(1541), which is only available through the custom channel you've set in step 2. - Pull the patched image with adb pull /sdcard/MagiskManager/patched_boot.img, and flash the patched ramdisk via fastboot:
fastboot flash ramdisk patched_boot.img - Reboot and you shall have a properly rooted device passing SafetyNet, start playing with some Magisk modules!
https://www.paypal.me/topjohnwu
Attachments
-
Screenshot_20180213-221125.jpg247.7 KB · Views: 15,150
-
Magisk-v15.4(1541).zip5.4 MB · Views: 17,872
-
huawei.txt462 bytes · Views: 100,749
-
BKL-L09_ramdisk.img16 MB · Views: 7,508
-
BLA-L29_ramdisk.img16 MB · Views: 3,687
-
STF-L09_ramdisk.img16 MB · Views: 3,333
-
VKY-L29_ramdisk.img16 MB · Views: 2,419
Last edited: