yashsingh1/xdaforums huggingface dataset:
[Huawei Mate 9 Guides, News, & Discussion] SonOfTheRain:
I have twrp-3.1.0-1-hi3660, version is B182. I reinstalled from Magisk github Magisk-UD-v13-170416.zip, but still the same.
[Huawei Mate 9 Guides, News, & Discussion] ante0:
Check your kernel version build date in Settings - About, at the bottom.

Make sure it's April. (mines April 11th)

Do you have SuperSU or phh installed now?
[Huawei Mate 9 Guides, News, & Discussion] SonOfTheRain:
Mine is April 11 too. It somehow replaced root with its own but it works, however Magisk is not installed it says.
[Huawei Mate 9 Guides, News, & Discussion] ante0:
If boot was not stock (you had supersu or phh when flashing magisk), try flashing back your stock B182 boot then Magisk.
[Huawei Mate 9 Guides, News, & Discussion] SonOfTheRain:
Flashing boot will not re-lock my bootloader?
[Huawei Mate 9 Guides, News, & Discussion] ante0:
No.

The only way to re-lock is by flashing a Full or OTA firmware.

You know how to get your boot?

Download your firmware from: http://hwmt.ru/oth/HWFF/info/view.php?find_model=mha

FULL-MF or OTA-MF doesn't matter as we only need BOOT. (OTA are smaller so faster download)

Download Huawei Update Extractor: https://xdaforums.com/showthread.php?t=2433454

Extract update.app from update.zip

Extract Huawei Update Extractor.

Open Huawei Update Extractor.

Open update.app in Huawei Update Extractor.

Rightclick on BOOT and click on "Extract Selected".

Save to desktop.

Transfer BOOT.IMG to your phone.

Reboot to TWRP, tap on Install, tap on "Install Image" at the bottom of your screen.

Select Boot.img and flash to BOOT.

Now try and flash Magisk again

If you're currently decrypted, use the modified MagiskV12: https://mega.nz/#!U4FRSAwQ!JUk81I-_DYBwa85ajPkYzDNww8tgHuMtdVuWFmBRl60

(I forgot if you were or not :P)
[Huawei Mate 9 Guides, News, & Discussion] SonOfTheRain:
I didn't decrypt my phone, I used your file SuperSU-v2.79-MATE9-init.d_support_no_decrypt-signed.zip to root. In this case, can I use Magisk-UD-v13-170416.zip from https://github.com/stangri/MagiskFiles? At least it did not give any error aldough Magisk did not appear in Magisk Manager. I assume my rooting will be also reversed. Magisk has its own root yes?
[Huawei Mate 9 Guides, News, & Discussion] ante0:
Use Magiskv12 http://tiny.cc/latestmagisk

Nightlies are buggy. And it uses its own su yes
[Huawei Mate 9 Guides, News, & Discussion] SonOfTheRain:
I flashed via TWRP as you said and now phone does not boot properly, it just goes to eRecovery. How to get rid of that?
[Huawei Mate 9 Guides, News, & Discussion] ante0:
Just flashed boot then Magisk?

Flash back your stock boot again, it should fix it.

I dont get why it doesn't want to install though.
[Huawei Mate 9 Guides, News, & Discussion] SonOfTheRain:
I did not install Magisk yet, just flashed stock boot via TWRP and now I am in eRecovery
[Huawei Mate 9 Guides, News, & Discussion] ante0:
Oh. And you did flash to Boot partition?

Try from Download mode.

Fastboot flash boot boot.img

I remembering having problems with some stock boot image before in twrp, but fixed when I unpacked and repacked with Android Image Kitchen. Not sure why it does that.
[Huawei Mate 9 Guides, News, & Discussion] SonOfTheRain:
Yes I flashed boot partition.

Now I don't know howto connect phone in this mode becuse computer says USB not recognized

---------- Post added at 09:35 AM ---------- Previous post was at 09:15 AM ----------

OK. Managed to flash boot.img via fastboot, first I tried the nightly build, I had a bootloop, later re-flashed the boot.img, flashed MagiskV12.zip and device boots ok, Magisk shows that installed.

Uff.. It was close :) Thanks!
[Huawei Mate 9 Guides, News, & Discussion] ante0:
I tried the nightlies too, wouldn't even flash. It couldn't unpack boot image. Then I read that the 04/15 nightly was the last working one, but got boot loop from that :P
[Huawei Mate 9 Guides, News, & Discussion] SonOfTheRain:
After all of that I could get the point, is Busybox integrated into this version of Magisk or should I install manually? I found some modules here: https://xdaforums.com/apps/magisk/collection-magisk-modules-t3445257

They are supposed to be installed via TWRP I assume? And do we have any systemless Xposed framework working with Mate 9?

edit:

I remember Busybox was integrated, maybe I'll need a script to make symlink in order to be visible for another apps?
[Huawei Mate 9 Guides, News, & Discussion] ante0:
You need to enable systemless BusyBox in magisks settings.

If you install regular busybox you will most likely fail SafetyNet.

Modules for Magisk are enabled and installed in Magisk, no TWRP installation.
[Huawei Mate 9 Guides, News, & Discussion] SonOfTheRain:
OK, after enabling I got what I need, however, SafetyNet says me CTS Profile mismatch. Any thoughts?
[Huawei Mate 9 Guides, News, & Discussion] ante0:
Oops, forgot one step xD

You need to enable Magisk Hide too, be cautious though, pin and fingerprint breaks if you reboot after enabling it. So just use it when you need it (for apps that use SafetyNet). I'm hoping for a fix for this. It's the same with Mate 8 etc on Nougat so not limited to Mate 9
[Huawei Mate 9 Guides, News, & Discussion] SonOfTheRain:
OK, actually I don't need so much for this feature, but I'm curious if there is any Xposed framework which works with Mate 9 and Magisk?
[Huawei Mate 9 Guides, News, & Discussion] ante0:
No Xposed for any Nougat firmware yet, for any phone.
[Huawei Mate 9 Guides, News, & Discussion] ferry013:
ok old noob here

can somebody help me to root my mate9

i have MHA-L09C432B182 I need the public_data.zip and full_hw_data.zip for

allready unlocked and TWRP is on

please help
[Huawei Mate 9 Guides, News, & Discussion] SonOfTheRain:
Thanks to ante0 after a lot of experiences... One sentence. Just install Magisk v12.zip via TWRP and later Magisk Manager from Google Play. It has its own root and Busybox integrated.
[Huawei Mate 9 Guides, News, & Discussion] ferry013:
thanks i will try

ok i can not install Magisk TWRP just pass over and nothing is installed

help

---------- Post added at 07:30 PM ---------- Previous post was at 06:36 PM ----------

yess

root is here

---------- Post added at 07:33 PM ---------- Previous post was at 07:30 PM ----------

which rom is working? really light user

i know this is not good q. but i am new for this phone

thanks
[Huawei Mate 9 Guides, News, & Discussion] SonOfTheRain:
I did not want to deal with zips and did not format the data. If your aim is to root only, you can just install the MagiskV12.zip and that's all. B182 version will work only as far as I know.
[Huawei Mate 9 Guides, News, & Discussion] ferry013:
i prefer custom roms and pico gapps

and dont care about format the data
[Huawei Mate 9 Guides, News, & Discussion] ejohn3288:
I just got a notification about a firmware update. If I update, will I lose root? How can I update without loosing root?
[Huawei Mate 9 Guides, News, & Discussion] ejohn3288:
This is the update its showing me
[Huawei Mate 9 Guides, News, & Discussion] eddmecha:
There is no way to update without losing root....yet..not from what i know,others please correct me if im wrong.
[Huawei Mate 9 Guides, News, & Discussion] Sraichvold:
I updated my MHA-L29-C567 to B190 build. Before the update I was rooted with phh's superuser and I had TWRP installed. Now I'm unable to root after the update. I can install TWRP just fine, but flashing the superboot zip gives me error code 1. Does anyone know what's going on or know of a way to fix it?
[Huawei Mate 9 Guides, News, & Discussion] ante0:
You are correct. And since bootloader is locked when updating you will still have to unlock again which means a wipe, and then flash back twrp and root.

Im not sure how it would be possible to keep intact. Root (Magisk in this case) is partially kept in the kernel, but since boot image is overwritten it's lost (magisk.img is kept in /data until you wipe it, but instructions to mount said image is kept in the kernel thus lost. ).

For both SuperSU and Phh in this thread everything for root is kept in the boot image.
[Huawei Mate 9 Guides, News, & Discussion] Peppus:
Hi, did you use the right twrp version? did you format data previously? Only in case...

Cheers!
[Huawei Mate 9 Guides, News, & Discussion] Sraichvold:
I used the term version in the first post and formatted my data. :(

---------- Post added at 03:25 PM ---------- Previous post was at 03:24 PM ----------

Yes to both questions. :/
[Huawei Mate 9 Guides, News, & Discussion] eddmecha:
Thanks for the confirmation@ante0 ur the best!! Anyway i have gave up this phone and moved to a 6.2inch phone:)
[Huawei Mate 9 Guides, News, & Discussion] Peppus:
I'm curious, which one?
[Huawei Mate 9 Guides, News, & Discussion] eddmecha:
s8 Plus:)
[Huawei Mate 9 Guides, News, & Discussion] ejohn3288:
So here's a question. If I go into TWRP and format data, flash the files for the latest firmware on my phone. Even if I haven't done the OTA update (causing root to be lost), would this work. Or do I have to accept the OTA update, and start completely over with unlocking, flashing TWRP, flashing root?
[Huawei Mate 9 Guides, News, & Discussion] mr.r9:
I love this phone,and I don't really care for custom roms anymore, even after owning a nexus 6p, But I need root.

This has got to be one of the most complicated and time consuming rooting/updating /re-rooting processes.

I really wish there was a one clock root method :(
[Huawei Mate 9 Guides, News, & Discussion] SonOfTheRain:
In fact you don't have to format the data. I didn't do it and it works OK. Just unlock your phone and install TWRP, later install MagiskV12.zip, you'll have Magisk, root and BusyBox all together.
[Huawei Mate 9 Guides, News, & Discussion] mr.r9:
OK I'm gonna follow your advise. Which root do you recommend? Super root or Super Su?
[Huawei Mate 9 Guides, News, & Discussion] SonOfTheRain:
None of them you need. Magisk has its own systemless root. Just install Magisk, nothing more. First I rooted my phone using SuperRoot_noverity_no_decrypt-signed.zip, later when I wanted to install Magisk I had to replace my boot.img with stock one. As I said, if you have untouched phone, unlock, install TWRP (do not modify the /system), install MagiskV12.zip and here you go.
[Huawei Mate 9 Guides, News, & Discussion] TheKaptone:
I have already unlocked my device as have two 3.0.3-1 running. Can I just flash superoot including wipe data and go from there. I Have the l29c636b
[Huawei Mate 9 Guides, News, & Discussion] ante0:
You need 3.0.2-2 (or 3.1.0, depends on your L29C636Bxxx).

So just flash twrp 3.0.2 in twrp to recovery and you should be good to go.
[Huawei Mate 9 Guides, News, & Discussion] TheKaptone:
I have B172, so i will change to 3.0.2-0 then wipe data then follow the steps as per OP

I have the other files from firmware finder so they will work, correct

I will get them again because I had the rename them for an issue that was fixed on another thread
[Huawei Mate 9 Guides, News, & Discussion] TheKaptone:
01-UNLOCK YOUR BOOTLOADER*

02-FLASH*TWRP 3.0.2-2*(thanks to [MENTION=5899304]Tkkg1994[/MENTION]) using ADB

03-Boot into TWRP (HOLD VOL up + POWER)

03(a)-Backup your Boot thru TWRP into your ext SD or OTG(optional)

04-Format Data in TWRP

05-Flash*superRoot.zip*(thanks to [MENTION=2247733]ante0[/MENTION]*for this)

06-Flash Public_data.zip if you are on build L29C636 u can use*THIS

07-Flash Full_HW_data.zip(you will get error 7 but it still went thru)if you are on build L29C636 u can use*THIS

***how to obtain files for step 6&7 Read*THIS*thanks to [MENTION=4115953]gm007[/MENTION]

08-Boot into system (setup ur phone)

09-Install PHH superuser from playstore.

boot to twrp*

format data(if you are still encrypted)

flash stock boot.img (select flash image)

flash superRoot.zip

flash public data.zip

flash hw data.zip

boot into system

good luck

So i followed the op instructions. Idid not backup my boot image because it said optional at the end. everything went fine but i am now stuck on the Huawei logo and going no further. I can get into twrp so not all is lost but i need the boot.img for L29 C636B172. can anyone help so i can get things going again

Thanks

All good found my mistake and have sorted it out
[Huawei Mate 9 Guides, News, & Discussion] ante0:
Did you Format Data in TWRP?

Oh, saw your edit now.
[Huawei Mate 9 Guides, News, & Discussion] TheKaptone:
I forgot to back up the boot.img. Did it properly and it worked a treat
[Huawei Mate 9 Guides, News, & Discussion] mr.r9:
Thanks man. All is good now and root is working by Magisk.

But I had to use the latest TWRP, because the one in OP couldn't flash MagiskV12 for some reason.
[Huawei Mate 9 Guides, News, & Discussion] serKhl:
Error/ What im doing wrong? Bootloader unlocked

(C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot oem get-bootinfo

...

(bootloader) unlocked

OKAY [ -0.000s]

finished. total time: -0.000s)

drivers installed,

USB debugging turned on.

Plz help FAILED (remote: Command not allowed)

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash recovery recovery.img

target reported max download size of 471859200 bytes

sending 'recovery' (19084 KB)...

OKAY [ 0.657s]

writing 'recovery'...

FAILED (remote: Command not allowed)

finished. total time: 0.657s﻿
[Huawei Mate 9 Guides, News, & Discussion] audioralf:
Do unlock again. Sometimes it gets locked even if displaying unlocked.

My device: Mate 9 supersu b156 Mediapad X2 GEM 701->703 B212 KangVIP (AJ mod)
[Huawei Mate 9 Guides, News, & Discussion] calchung:
Is the magisk hide working (after you turn on magisk hide and restart if you hv set your password or pin) ?
[Huawei Mate 9 Guides, News, & Discussion] mr.r9:
Actually when I tried to hide root, the whole device crash. It boots into Android, but the device stays locked and doesn't accept my finger or pin. I think it crashed because of the protection.
[Huawei Mate 9 Guides, News, & Discussion] calchung:
I see. That means magisk hide is not fully compatible with mate9 yet.

I bought this phone for half a year already, but too bad it is still not ready to be my main phone yet.
[Huawei Mate 9 Guides, News, & Discussion] ante0:
It is if you turn MagiskHide off before reboot, or use a lockscreen replacement. I use Floatify and pin works, fingerprint still breaks though.
[Huawei Mate 9 Guides, News, & Discussion] calchung:
I understand that. But it is not safe enough to become my main phone yet, in case i forgot to turn off magisk hide b4 reboot.

Anyway, thank for your contribution to this forum. You done a lot of great work for us.
[Huawei Mate 9 Guides, News, & Discussion] mermaidkiller:
Does this root method prevent getting OTA updates ?

Or is it 'systemless' ?
[Huawei Mate 9 Guides, News, & Discussion] ante0:
SuperRoot is. SuperSU is not, because of init.d in /system
[Huawei Mate 9 Guides, News, & Discussion] pathstar:
MHA-L29C185 model's public zip is not available

The links for update.zip of full firmware is currently down for MHA-L29C185 model.any way around it?. My firmware MHA-L29C185b126
[Huawei Mate 9 Guides, News, & Discussion] Surfinette:
[MENTION=2247733]ante0[/MENTION] : thank you for your numerous recommandations in this thread regarding the Magisk installation

But I still have issues with Magisk

After several trials and errors, I finally managed to install Magisk v12 on my recently acquired Mate 9, but I have issues with Magisk Hide which doesn't seem to be effective hiding root.

I've tried primarily with Pokemongo ... No luck, so I have also tested to tick the hide box for other root apps (like Titanium Backup) but even with the Hide box ticked, they don't complain that I'm not rooted (I'm assuming that Titanium Backup, which can't operate without Root, would complain that my phone is not rooted with the Magisk Hide box ticked.

And safetynet doesn't pass

To install Magisk v12, I have used Recovery twrp-3.1-hi3660-c432b182 and the Magisk v12 moded to keep data decryped as advised here by [MENTION=2247733]ante0[/MENTION]

I've also tried to install Magisk v13, but no luck... the phone is bootlooping right after install. Has anyone been successful installing Magisk v13 on Mate 9? If so how did you do it?
[Huawei Mate 9 Guides, News, & Discussion] ante0:
Try entering: *#*#2846579#*#* into dialer, go to Background settings then LOG Settings and enable AP Log. You might have to reboot after. Then turn on MagiskHide and see if it works.
[Huawei Mate 9 Guides, News, & Discussion] Surfinette:
Thank you for your help.

After trying what you have suggested, Magisk hide seems to work better, as now Titanium Backup says my phone is not rooted when the Magisk hide box is ticked for Titanium backup.

However, I still don't pass Safety Net (CTS profile mismatch).

The other strange thing is that now SafetyNet can only be tested when I'm on wifi. If I use my data connection (mobile 4G) Safety cannot be tested and ask me to check my internet connection (which works great with any other app)
[Huawei Mate 9 Guides, News, & Discussion] ante0:
I'm not sure how it checks...

Do you have busybox installed? If so uninstall it and use the systemless one in Magisk managers settings.
[Huawei Mate 9 Guides, News, & Discussion] Lace84:
Do it work also with the new TWRP unofficial 3.1.* or I neet 3.0.2 ? I have the L09C432B182 version.

...All istruction is clear , but I've some problems with the point 5 and 6...

If is correct I've undertand this: i've checked for my version in one page (don't remember link) ....and I've founded. So I've copyed the link and I've opened with my browser replacing update.zip witht the ****.xml (don't remeber the names).

So, the next pass I didn't understand:Is it sufficent add HW.zip and public.zip to the end to the first link? Right? (The correct names of HW and pubbic to add is in the xml file righ?)

So After these I will downlo the 2 files with the crated links and than i'll flash them (before wipe data with Twrp)
[Huawei Mate 9 Guides, News, & Discussion] Surfinette:
No, I did not have busybox installed. After checking it in the Magisk app, I still have the same problems
[Huawei Mate 9 Guides, News, & Discussion] Surfinette:
I have finally solved my problems with Magisk v12:

- To pass Safetynet, I have to toggle UBS debugging ON and OFF and then toggle Magisk Hide OFF and ON. I have to do this everytime I reboot my phone, otherwise SafetyNet won't pass after reboot. :eek:

- For some reason that I don't get, access to mobile data was blocked for Google service framework in the Mate's 9 firewall... that is why SafetyNet pass could not be check using mobile data.
[Huawei Mate 9 Guides, News, & Discussion] Paz9:
Im familiar with adb

How would it be done?
[Huawei Mate 9 Guides, News, & Discussion] eddmecha:
tbh idk mayb u can try to figure it out and make a thread guide.

p/s this thread is about rooting not about adb sorry
[Huawei Mate 9 Guides, News, & Discussion] gm007:
They are here https://xdaforums.com/mate-9/how-to/mha-l29c567b167-update-usa-version-t3561355/post71200976
[Huawei Mate 9 Guides, News, & Discussion] allen099:
Thanks so much for putting the work into this! Worked like a charm for me. I'm coming from a Nexus 6P and with AdFree from Odiusapps, I was able to block adds using a setting within Magisk to enable "systemless hosts support for Adblock apps."

Even though I rooted the Mate 9 and confirmed access, ads still come up after installing, updating hosts file, and rebooting. Any suggestions for blocking them?
[Huawei Mate 9 Guides, News, & Discussion] eddmecha:
u r welcome,btw which adaway r u using?bcoz mine just work fine.

ps- im using adAway by dominik
[Huawei Mate 9 Guides, News, & Discussion] allen099:
I use the one here (been using it for years): https://adfree.odiousapps.com/

I'll try adaway now as well. Will report back momentarily.

---------- Post added at 07:52 AM ---------- Previous post was at 07:44 AM ----------

Looks like it worked! I wonder why the other one stopped. Oh well, thank you for the recommendation and I can't thank you enough for continuing to support this incredible community!
[Huawei Mate 9 Guides, News, & Discussion] eddmecha:
glad it works,btw i also wonder y the one doesn't work.but all my rooting life have been using the same adaway haha..enjoy ur m9 bro..?
[Huawei Mate 9 Guides, News, & Discussion] allen099:
Oh! No way to pass safetynet yet for Android Pay, correct? SUhide won't work with this one right?
[Huawei Mate 9 Guides, News, & Discussion] eddmecha:
yeap ,none for the moment..
[Huawei Mate 9 Guides, News, & Discussion] audioralf:
Ok friends, I have done it after comparing the different methods.

I decided to start with the superroot.zip method to keep the branding.

I was stuck on developer options after first boot. But as I knew I had to wipe cache and dalvic again.

Now I understand why the TWRP has access on the data and internal SD card.

Encryption is not active. This is shown clearly in Titanium Backup APP.

So TWRP will need no password at all and can access to the files and backup data partition.

I have a function available in options security menu to encrypt. So if someone wants it, it's available.
[Huawei Mate 9 Guides, News, & Discussion] grumpyg4:
Does not work for me, tried everything but I still get error message when I try to flash supersu zip file.

Any ideas, thanks
[Huawei Mate 9 Guides, News, & Discussion] eddmecha:
sorry may i know were u trying to flash superSU instead of superRoot from OP?bcoz it only works with stock unpatch boot.img with twrp 3.0.2-2
[Huawei Mate 9 Guides, News, & Discussion] Paz9:
what is public_data and full_hw_Data?

whats in these two zips?
[Huawei Mate 9 Guides, News, & Discussion] ante0:
Public data and full hw data...

.

.

.

:D

They contain bloat apps (Huawei stock apps), lots of settings, themes.

When you do a full install using Firmware Finder or Funky Huawei they're downloaded and flashed automatically, and installed to /data/hw_init/, when you Format Data that folder is removed. Some people can't use camera either if they don't flash it.

Make sure you use the guide linked by gm007 so you get the correct versions of those 2 files.

---------- Post added at 06:33 PM ---------- Previous post was at 06:22 PM ----------

[MENTION=7541133]biggzo[/MENTION]

It's in one of the OTA for b167.

http://update.hicloud.com:8180/TDS/...59/f2/full/public/update_data_full_public.zip

http://update.hicloud.com:8180/TDS/.../v76459/f2/full/hw/usa/update_full_hw_usa.zip

The path is not /eu/, it's /usa/. And there are other paths too so check filelist.xml to get the path.

---------- Post added at 06:46 PM ---------- Previous post was at 06:33 PM ----------

You will need to extract and modify your boot image ramdisk and ramdisk cpio's default.prop from ro.secure=1 to ro.secure=0. That will allow you to run adb shell as root without having su. However, if your boot image still has verity enabled it might not be a good idea to write stuff to system. (I'm not sure how Huawei has done it as I've yet to see a dm-verity screen at boot, only thing I've seen are files reverted to their original after reboot)

But for this you still need to unlock bootloader. And a modified /system = OTA will fail to install.

That's how you're supposed to do it, but apparently adbd does not have this enabled.

ro.adb.secure=0 does nothing either.
[Huawei Mate 9 Guides, News, & Discussion] grumpyg4:
I tried both with full wipe (format) with Twrp 3.0.2-2 but got the the same error message
[Huawei Mate 9 Guides, News, & Discussion] eddmecha:
and did u flash the superRoot.zip?what error did u get?
[Huawei Mate 9 Guides, News, & Discussion] grumpyg4:
Yes I tried flashing SuperRoot and get:

Updater process ended with ERROR: 1

Error installing zip file....

Thanks
[Huawei Mate 9 Guides, News, & Discussion] Spyder2999:
Boot Loop

Where do I get the files: Public_data.zip, and Full_HW_data.zip for my current firmware MHA-L29C567B167? There are no full firmware listed for this B167. The link says to find a full firmware. I tried B158 (Jan 2017) and it didn't work. And it sent me into a bootloop. Can anyone please post a link to the B167 files? Thanks.

Also, the instructions say to download TWRP 3.0.2. I am already at 3.0.3-1. Should I reflash 3.0.2? Thanks.