[Guide] Mate 9 Magisk

Search This thread

wancyber

Senior Member
Jan 14, 2018
51
21
Cyberjaya
Update:
***UPDATE LINK FOR MAGISK 17.1 & TWRP 3.2.1
***No need to Format Data/Wipe unless you know what you doing !


THINGS NEED :
"Minimal ADB and Fastboot"
"Unlock Code"
"MAGISK"
"TWRP"
"PC"
"HW.zip & Public Data.zip (if you wipe/format)-usually u don't need this
"Huawei Prop Fix" (if safetynet test fail)
"Ramdisk.img" (if supersu installed)


FIRST STEP :
- Download and Install "Minimal ADB and Fastboot" and install it on your computer.
- Download Magisk, TWRP, and all the files that you need - Link Provided Below
- Enable 'USB debugging' in phone settings
- Make sure that Hisuite is installed (which will ensure that USB drivers are installed)

*If you choose Format Data => yes (wipe) in TWRP :
- Download HW.zip and Public_data.zip for your firmware from http://pro-teammt.ru/firmware-database/
- Search for your firmware, eg: MHA-L29C432B365.
- Click on the "filelist" next to your firmware, copy and paste the full links in new tabs to download "update_full_MHA-L29_hw_eu.zip" and "update_data_full_public.zip".
- hw_eu/sea.zip will be different depending on your region/cust.

*** BACKUP all your data (internal storage) as UNLOCKING bootloader will WIPE all your DATA !!!


A) UNLOCKING BOOTLOADER :
- Visit this page :
http://emui.huawei.com/en/
- Then click on Download. And then click on "Unlock bootloader"
OR https://emui.huawei.com/en/plugin/unlock/detail
(direct you to login/sign up pages)
- Fill the required details on the form.
- Copy paste the code and save it in any text file.

Make sure,
- USB Debugging has been enabled on the phone
- Phone has been verified to connect to the computer and permanently accepted the RSA id and connected in debug mode.
- "Enable OEM Unlock" has been enabled in the developer options.

Now,
- Power off the phone, then hold volume-down and insert usb cable to enter fastboot mode.
- Enter the following commands :
fastboot oem unlock xxxxx (xxxxx your unlock code)
fastboot reboot
Congrats, now your bootloader is unlocked ! :D

B) COPYING :
- Copy the twrp.img file to the "Minimal ADB and Fastboot" directory
- Copy the Magisk, Huawei Prop Fix & all necessary files to SD Card (not internal storage)

C) FLASHING :
- Power off the phone, then hold volume-down and insert usb cable to enter fastboot mode / bootloader mode.
- Enter the following commands :
fastboot flash recovery_ramdisk TWRP_3.2.1-0_OREO_fixlinks.img (flash 1 only 3.0.3 / 3.2.1)
fastboot reboot
** If you have SuperSU installed, flash ramdisk.img :
(fastboot flash ramdisk ramdisk.img)

** Note: if you have SuperSU installed, you must restore stock ramdisk.img.
Download your firmwares update.zip from
http://pro-teammt.ru/firmware-database/
Search for your firmware, example used below : MHA-L29C432B365.
Then extract update.app from update.zip.
Download and Open Huawei Update Extractor, go to settings tab and disable both checksum.
Open update.app in Huawei update extractor and extract ramdisk.img.


- Power off the phone, hold volume-up and power button to enter TWRP.
- Entering TWRP, select "Keep Read Only" (Everytime enter TWRP select this.)
- Wipe => Format Data => Yes/No (Choose NO, if you don't know)
* If Format Data=> Yes,
- Flash Public Data.zip
- Flash Hw.zip.
* If Format Data=> No, continue flashing Magisk.

- Install => Select 'Magisk-v16.0(1600).zip' file
- Reboot => System => Do Not Install.
You're Rooted with Magisk 17.1 !



Minimal ADB and Fastboot :
https://xdaforums.com/showthread.php?t=2317790

Magisk 17.1 :
https://mega.nz/#!jVUnWKZQ!fw4Ch6rnRtK6UUoOcI9FqwLykOmwgw-wgCUPD854vNk

TWRP 3.0.3 with fixlinks by Mankindtw:
https://mega.nz/#!AWpymRbC!ncVMIZL177b2OssrjSuKVq2AyyxzUqj_BKfsMEAajhw

TWRP 3.2.1 with fixlinks by Blackball :
https://mega.nz/#!qVFTTKLb!DfE5y43bJWfEM_Xt2jmK71ZwSNEorRebgEydiEJr1fo

Huawei Prop Fix by mankindtw :
https://drive.google.com/open?id=1Ru...W0LTMR6Ip5xIcM



OFFICIAL ANNOUNCEMENT :
https://xdaforums.com/hon...0-pro-t3749280
(patching ramdisk in Manager is not necessary as we have TWRP, and if you already have Magisk installed, Direct Install will work)


Credits :
This is their works : mankindtw, ante0
( I'm just helping them :D )
Magisk : topjohnwu
TWRP : mankindtw, Blackball
Unlocking Bootloader Guide : Saurabhg9
Minimal ADB and Fastboot : Shimp208
Huawei Firmwares Finder: Team MT

Guideance by : @ante0

Sent from my Huawei Mate 9 using XDA Labs
 
Last edited:
  • Like
Reactions: eeeric

ante0

Senior Member
Dec 28, 2009
3,214
1,581
Stockholm
Updated :
***No need to Format Data(Wipe) with MAGISK 15.4 or 16.0.


THINGS NEED :
"Minimal ADB and Fastboot"
"Unlock Code"
"MAGISK"
"TWRP"
"PC"
"HW.zip & Public Data.zip (if you wipe/format)-usually u don't need this
"Huawei Prop Fix" (if safetynet test fail)
"Ramdisk.img" (if supersu installed)


FIRST STEP :
- Download and Install "Minimal ADB and Fastboot" and install it on your computer.
- Download Magisk, TWRP, and all the files that you need - Link Provided Below
- Enable 'USB debugging' in phone settings
- Make sure that Hisuite is installed (which will ensure that USB drivers are installed)

*If you choose Format Data => yes (wipe) in TWRP :
- Download HW.zip and Public_data.zip for your firmware from http://pro-teammt.ru/firmware-database/
- Search for your firmware, eg: MHA-L29C432B365.
- Click on the "filelist" next to your firmware, copy and paste the full links in new tabs to download "update_full_MHA-L29_hw_eu.zip" and "update_data_full_public.zip".
- hw_eu/sea.zip will be different depending on your region/cust.

*** BACKUP all your data (internal storage) as UNLOCKING bootloader will WIPE all your DATA !!!


A) UNLOCKING BOOTLOADER :
- Visit this page :
http://emui.huawei.com/en/
- Then click on Download. And then click on "Unlock bootloader"
OR https://emui.huawei.com/en/plugin/unlock/detail
(direct you to login/sign up pages)
- Fill the required details on the form.
- Copy paste the code and save it in any text file.

Make sure,
- USB Debugging has been enabled on the phone
- Phone has been verified to connect to the computer and permanently accepted the RSA id and connected in debug mode.
- "Enable OEM Unlock" has been enabled in the developer options.

Now,
- Power off the phone, then hold volume-down and insert usb cable to enter fastboot mode.
- Enter the following commands :
fastboot oem unlock xxxxx (xxxxx your unlock code)
fastboot reboot
Congrats, now you're bootloader is unlocked ! :D

B) COPYING :
- Copy the twrp.img file to the "Minimal ADB and Fastboot" directory
- Copy the Magisk, Huawei Prop Fix & all necessary files to SD Card (not internal storage)

C) FLASHING :
- Power off the phone, then hold volume-down and insert usb cable to enter fastboot mode / bootloader mode.
- Enter the following commands :
fastboot flash recovery_ramdisk TWRP_3.2.1-0_OREO_fixlinks.img (flash 1 only 3.0.3 / 3.2.1)
fastboot reboot
** If you have SuperSU installed, flash ramdisk.img :
(fastboot flash ramdisk ramdisk.img)

** Note: if you have SuperSU installed, you must restore stock ramdisk.img.
Download your firmwares update.zip from
http://pro-teammt.ru/firmware-database/
Search for your firmware, example used below : MHA-L29C432B365.
Then extract update.app from update.zip.
Download and Open Huawei Update Extractor, go to settings tab and disable both checksum.
Open update.app in Huawei update extractor and extract ramdisk.img.


- Power off the phone, hold volume-up and power button to enter TWRP.
- Entering TWRP, select "Keep Read Only" (Everytime enter TWRP select this.)
- Wipe => Format Data => Yes/No (Choose NO, if you don't know)
* If Format Data=> Yes,
- Flash Public Data.zip
- Flash Hw.zip.
* If Format Data=> No, continue flashing Magisk.

- Install => Select 'Magisk-v16.0(1600).zip' file
- Reboot => System => Do Not Install.
You're Rooted with Magisk 16.0 !



Minimal ADB and Fastboot :
https://xdaforums.com/showthread.php?t=2317790

Magisk 16.0 :
https://mega.nz/#!ncEwXKQS!hmgQlzPQ9slK3yZRzyhl2no-rJ6DAxHOTyE6xaU-7Gc

TWRP 3.0.3 with fixlinks by Mankindtw:
https://mega.nz/#!AWpymRbC!ncVMIZL177b2OssrjSuKVq2AyyxzUqj_BKfsMEAajhw

TWRP 3.2.1 with fixlinks by Blackball :
https://mega.nz/#!4DYngAxL!OJEgQ4a4cSTypHgRBbMQbok2BRDuVHSDXNktAJ_PnKQ

Huawei Prop Fix by mankindtw :
https://drive.google.com/open?id=1Ru...W0LTMR6Ip5xIcM



OFFICIAL ANNOUNCEMENT :
https://xdaforums.com/hon...0-pro-t3749280
(patching ramdisk in Manager is not necessary as we have TWRP, and if you already have Magisk installed, Direct Install will work)


Credits :
This is their works : mankindtw, ante0
( I'm just helping them :D )
Magisk : topjohnwu
TWRP : mankindtw, Blackball
Unlocking Bootloader Guide : Saurabhg9
Minimal ADB and Fastboot : Shimp208
Huawei Firmwares Finder: Team MT

Guideance by : @ante0

Sent from my Huawei Mate 9 using XDA Labs

Also, an FYI, Pretoriano80 made a TWRP with decryption support: https://xdaforums.com/mate-9/development/recovery-twrp-3-2-1-0-t3783353
 
  • Like
Reactions: wancyber

ulli5

Member
Mar 11, 2018
11
0
Unfortunately the link to Huawei Prop Fix is broken. Please renew it. Without it Magisk can't pass SafetyNet.
 

ulli5

Member
Mar 11, 2018
11
0
SafetyNet test fails

It can. No need to install prop fix at all.

Why doesn't it do then in my case? My phone is an MHA-L29C432B363. I just flashed Android 7 via HWOTA and updgraded via OTA. Then I flashed Xposed and Magisk (tried v16.0 and v16.6). Everything seems to be OK, but when I do the SafetyNet Test with Magsik Manager I get "false" in both tests.
 

rufik

Senior Member
Why doesn't it do then in my case? My phone is an MHA-L29C432B363. I just flashed Android 7 via HWOTA and updgraded via OTA. Then I flashed Xposed and Magisk (tried v16.0 and v16.6). Everything seems to be OK, but when I do the SafetyNet Test with Magsik Manager I get "false" in both tests.
Because of exposed. I have same model as you but B366 build and I'm passing safety net.
 
  • Like
Reactions: wancyber and ulli5

Top Liked Posts

  • There are no posts matching your filters.
  • 12
    I'm using mate 9 with Magisk for a while. Here is the steps how I flash my phone.
    Notice: Only verified Mate 9 MHA-L29C636B188 (Pass SafetyNet Check).

    Magisk: Thanks to @topjohnwu
    Huawei Firmware Finder: Thanks to (Team MT)
    TWRP 3.1.0-1: Thanks to @Tkkg1994

    1. Prepare:
    2. Download:
      • A. Download Huawei Firmware Finder PC Tool (Link)
      • B. Run "FimrwareFinderRewrite.exe" and select "Common Base".
      • C. Select phone brand (Ex: MHA-L29C636) and click "Find".
      • D. Select 1A. Firmware (Ex: MHA-L29C636B188) "Filelist" and download the second and third link file.
      • E. Put 1B. bootimg_data_decrypt_xxx.zip and 2D. files(___data___.zip and ___hw___.zip) into phone SDCard.
    3. Unlock:
      • A. Phone power off, press vol-down and usb cable to enter fastboot mode.
      • B. fastboot oem unlock xxxxxx (xxxxxx is your unlock code)
    4. Flash:
      • A. Enter Fastboot again using "fastboot flash recovery MHA_xxxx-3.1.0-1-hi3660.img" to flash TWRP Recovery.
      • B. Phone power off, press vol-up and power to enter TWRP.
      • C. TWRP select "Keep Read Only" (Everytime enter TWRP select this.)
      • D. Wipe => Format Data => yes
      • E. Install => Select 2E. bootimg_data_decrypt_xxx.zip file.
      • F. Install => Select 2E. xxxx__data__xxxx.zip file.
      • G. Install => Select 2E. xxxx__hw__xxxx.zip file (Ignore errors).
      • H. Reboot => System => Do Not Install.
    5. Magisk:
      • A. Download "SafetyNet Test" application in Google Play Store.
      • B. Run SafetyNet Test, only CTS profile match fail.
      • C. Put 1B. Magisk-vxxxx.zip and Huawei-Prop-Fix-xxxx.zip into SDCard.
      • D. Phone power off, press vol-up and power to enter TWRP again.
      • E. Install => Select Magisk-vxxxx.zip
      • F. Install => Select Huawei-Prop-Fix-xxxx.zip
      • G. First boot SafetyNet Test can't pass.
      • H. After second boot SafetyNet Test pass.
      • I. If SafetyNet Test failure in the future, disable all modules in Magisk, reboot SafetyNet pass then enable modules.
    Update: Huawei-Prop-Fix-v1.2_2017091101.zip (Be sure Magisk has busybox, recommend v14.0) [Link]
    4
    Mate 9 OREO Magisk

    Note: if you have SuperSU installed, restore stock ramdisk.img. This can be acquired by downloading your firmwares update.zip from http://pro-teammt.ru/firmware-database/ then extracting update.app from it. Download Huawei Update Extractor, go to settings tab and disable both checksum. Open update.app in Huawei update extractor and extract ramdisk.img, flash using fastboot flash ramdisk ramdisk.img

    Magisk 15.4: https://mega.nz/#!IbgyBR5T!TWqoTHp3h92WZjIjuCmGHLJA-zllHjfSSe_-NuWQOjs
    Tested with TWRP 3.0.3: https://mega.nz/#!YaIUhZhQ!ewDfrlQC5-fQ1oHfEj2YOo-2rDyi6b-dUoM4qx13e9A

    Just flash in TWRP and you should be set.

    Reboot.
    Flash the Prop fix by mankindtw https://drive.google.com/open?id=1RulVwM9jmXWpxRn5DsW0LTMR6Ip5xIcM if you fail SafetyNet in Magisk Manager.

    If you have Magisk 15.3 installed and want to update using manager:
    Open Magisk Manager and update to 5.6.0 if you haven't already, go to settings - update channel - custom - enter https://goo.gl/jefZKH
    Tap OK, go back to Magisk Manager main screen and swipe down to refresh. Tap install when it asks to get 15.4. Select Direct install. Reboot
    (Make sure it tries to install 15.4 (1541), the 1541 is important as the regular beta is 1540 and that one bootloops)

    Official announcement:
    https://xdaforums.com/honor-view-10/development/magisk-root-honor-view-10-mate-10-pro-t3749280
    (patching ramdisk in Manager is not necessary as we have TWRP, and if you already have Magisk installed Direct Install will work)
    3
    Update :
    Okay, so now i just replace with this 2 TWRP.
    No need to Format Data(Wipe) with magisk 15.4/16.
    You just need the fixlinks recovery if you want to flash through TWRP.


    THINGS NEED :
    "Minimal ADB and Fastboot"
    "Unlock Code"
    "MAGISK"
    "TWRP"
    "PC"
    "HW.zip & Public Data.zip (if you wipe)
    "Huawei Prop Fix" (if safetynet test fail)
    "Ramdisk.img" (if supersu installed)


    ** Note: if you have SuperSU installed, you must restore stock ramdisk.img.
    Download your firmwares update.zip from http://pro-teammt.ru/firmware-database/
    Search for your firmware, example used below : MHA-L29C432B365.
    Then extract update.app from update.zip. Download and Open Huawei Update Extractor, go to settings tab and disable both checksum.
    Open update.app in Huawei update extractor and extract ramdisk.img.


    Firstly,
    - Download and Install "Minimal ADB and Fastboot" and install it on your computer.
    - Download Magisk, TWRP, and all the files that you need - Link Provided
    - Enable USB debugging in phone settings
    - Make sure that Hisuite is installed (which will ensure that USB drivers are installed)

    *If you choose Format Data => yes(wipe) in TWRP :
    - Download HW.zip and Public_data.zip for your firmware from http://pro-teammt.ru/firmware-database/
    - Search for your firmware, eg: MHA-L29C432B365.
    - Click on the "filelist" next to your firmware, copy and paste the full links in new tabs to download "update_full_MHA-L29_hw_eu.zip" and "update_data_full_public.zip".
    - hw_eu/sea.zip will be different depending on your region/cust.

    *** BACKUP all your data (internal storage) as UNLOCKING bootloader will WIPE all you DATA !!!


    A) UNLOCKING BOOTLOADER :
    - Visit this page :
    http://emui.huawei.com/en/
    - Then click on Download. And then click on "Unlock bootloader"
    OR https://emui.huawei.com/en/plugin/unlock/detail
    (direct you to login/sign up pages)
    - Fill the required details on the form.
    - Copy paste the code and save it in any text file.

    Make sure,
    - USB Debugging has been enabled on the phone
    - Phone has been verified to connect to the computer and permanently accepted the RSA id and connected in debug mode.
    - "Enable OEM Unlock" has been enabled in the developer options.

    Now,
    - Power off the phone, then hold volume-down and insert usb cable to enter fastboot mode.
    - Enter the following commands :
    fastboot oem unlock xxxxx (xxxxx your unlock code)
    fastboot reboot
    Congrats, now you're bootloader is unlocked ! :D

    B) COPYING :
    - Copy the twrp.img file to the "Minimal ADB and Fastboot" directory
    - Copy the Magisk, Huawei Prop Fix & all necessary files to SD Card (not internal storage)

    C) FLASHING :
    - Power off the phone, then hold volume-down and insert usb cable to enter fastboot mode/download mode/bootloader mode.
    - Enter the following commands :
    fastboot flash recovery_ramdisk TWRP_3.2.1-0_OREO_fixlinks.img (flash only 1 either 3.0.3 / 3.2.1)
    fastboot reboot
    * If you have SuperSU installed, flash ramdisk.img
    (fastboot flash ramdisk ramdisk.img)

    - Power off the phone, hold volume-up and power button to enter TWRP.
    - Entering TWRP, select "Keep Read Only" (Everytime enter TWRP select this.)
    - Wipe => Format Data => Yes/No (Depends on you)
    - Install => Select 'Magisk-v16.0(1600).zip' file
    * If Format Data=> yes,
    Flash Public data.zip
    Flash Hw.zip.
    * If Format Data=>No,
    Just continue to Reboot.

    - Reboot => System => Do Not Install.
    You're Done !



    Minimal ADB and Fastboot :
    https://xdaforums.com/showthread.php?t=2317790

    Magisk 16.0 : https://mega.nz/#!ncEwXKQS!hmgQlzPQ9slK3yZRzyhl2no-rJ6DAxHOTyE6xaU-7Gc

    TWRP 3.0.3 with fixlinks by Mankindtw: https://mega.nz/#!AWpymRbC!ncVMIZL177b2OssrjSuKVq2AyyxzUqj_BKfsMEAajhw

    TWRP 3.2.1 with fixlinks by Blackball : https://mega.nz/#!4DYngAxL!OJEgQ4a4cSTypHgRBbMQbok2BRDuVHSDXNktAJ_PnKQ

    Huawei Prop Fix by mankindtw https://drive.google.com/open?id=1Ru...W0LTMR6Ip5xIcM



    Official announcement:
    https://xdaforums.com/hon...0-pro-t3749280
    (patching ramdisk in Manager is not necessary as we have TWRP, and if you already have Magisk installed, Direct Install will work)


    Credits :
    This is their works : mankindtw, ante0
    ( I'm just helping them :D )
    Magisk : topjohnwu
    TWRP : mankindtw, Blackball
    Unlocking Bootloader Guide : Saurabhg9
    Minimal ADB and Fastboot : Shimp208
    Huawei Firmwares Finder: Team MT

    Guideance by : @ante0

    Sent from my Huawei Mate 9 using XDA Labs
    2
    Why doesn't it do then in my case? My phone is an MHA-L29C432B363. I just flashed Android 7 via HWOTA and updgraded via OTA. Then I flashed Xposed and Magisk (tried v16.0 and v16.6). Everything seems to be OK, but when I do the SafetyNet Test with Magsik Manager I get "false" in both tests.
    Because of exposed. I have same model as you but B366 build and I'm passing safety net.
    2
    But, I've tried with the latest github source and it won't work with Mate 9 or Mate 10.
    So for now we're stuck at 15.3 (which is latest currently) until someone figures it out. :p
    It's all @mankindtw 's work, so he get all credit.
    Edit: It doesn't work, probably, because 15.3 uses stock 'init' in ramdisk. Later commits in github uses the magisk binary as 'init'.

    Huawei Oreo doesn't like init to be replaced. :p
    No matter what I tried, it always got replaced init crash.
    Magisk 15.3 already uses it's init, that's why I ported 14.x to 15.3
    using no init replacement method. I think that Magisk should
    keep both methods for further version, although Magisk init
    executes original init. It can't guarantee that all different brands
    can accept init replacement.