yashsingh1/xdaforums huggingface dataset:
[Huawei Mate 9 Guides, News, & Discussion] franzyroy:
That, I can't confirm as I haven't your phone. But is it really necessary to remove the encryption of data?

For our device, it's not really necessary. I talk about of a method to root the phone. Until now , we had to format in order that works. Not it's no longer necessary.

---------- Post added at 09:37 PM ---------- Previous post was at 09:33 PM ----------

The method used in the OP post was a method of me, now we no longer use it because it became useless to root our device.
[Huawei Mate 9 Guides, News, & Discussion] ante0:
It is required if we want to flash stuff to /data or back the partition up. Since twrp for our device doesn't handle encryption, /data stays encrypted in twrp :( and that tosses errors if you try to back up or flash stuff to it.

Also, what happens if you try to root using your zip now?

Also, thanks for the method :P
[Huawei Mate 9 Guides, News, & Discussion] franzyroy:
Like I haven't your phone, I can't say the opposite. Maybe due to your TWRP. Our TWRP enables it. You should ask to [MENTION=4960686]OldDroid[/MENTION] if he can make an identical TWRP for you. For our I have made a TWRP which enables to read the encrypted and Decrypted data. With it, it was possible to make what I say. OldDroid has made a better TWRP which works really fully now.
[Huawei Mate 9 Guides, News, & Discussion] ante0:
Yeah, someone from that team tried to. I don't know how it went. I tried the last build he made and it wouldn't mount data at all. But he didn't have the Mate 9 either so he had to rely on us.
[Huawei Mate 9 Guides, News, & Discussion] franzyroy:
The one that I had made, it worked to read the encrypted and Decrypted data. There is no reason it doesn't work on your device. But like I said, the best will be to ask to OldDroid to make a better. If he doesn't answer, I can always make like the one that I made.

---------- Post added at 22:52 ---------- Previous post was at 22:03 ----------

[MENTION=2247733]ante0[/MENTION]

I made this TWRP based on the TWRP in the OP post. If you want to try it for those who have the encrypted data and also those who have the decrypted data. Like that, you could see if it works with the both. The only thing which couldn't work with it, it's formatted the data when you have the encrypted data. All the rest should work fine.

I tested this method with decrypted data, all works for me. Others have tested it with encrypted data, for them, all works, just format data doesn't work, it's only OldDroid said me that.

---------- Post added at 22:55 ---------- Previous post was at 22:52 ----------

With this TWRP, you should can use the method that I talked before. With the modified boot.
[Huawei Mate 9 Guides, News, & Discussion] OldDroid:
actually I can't because it utilizes another encryption method (file-based-encryption instead of full-disk encryption)
[Huawei Mate 9 Guides, News, & Discussion] franzyroy:
OK. Thanks for this info!
[Huawei Mate 9 Guides, News, & Discussion] Dioky:
Failed to mount /data

Hi there,

Been trying all night long with various versions and guides but still get the message:

failed to mount /data: Mo such file or directory

This message displays during the flashing of the full_hw_eu_MH-L29C....zip file

Anybody knows what's going wrong here?

I have formatted Data and TWRP 3.0.2.2 running.

Regards,
[Huawei Mate 9 Guides, News, & Discussion] 5[Strogino]:
No, it is not necessary to remove encryption if you want root only or root + dm-verity off

But topic name has clear text: how to root with DECRYPT data. If user wants, he will get it.

Just note that superRoot.zip is patch and it actually patches boot.img while applying.
[Huawei Mate 9 Guides, News, & Discussion] ante0:
After formatting data, go back to start screen of twrp and tap on Reboot - Reboot recovery.

Sometimes after formatting data it won't mount until you reboot recovery.
[Huawei Mate 9 Guides, News, & Discussion] franzyroy:
OK. Like they want.
[Huawei Mate 9 Guides, News, & Discussion] Peppus:
Hi, I just rebranded to the L09C432B182 and this method that I always used, now doesn't work, I get errors installing the supersu zip and the data zip (corrupted file said and I downloaded twice). What method do you recommend me instead? Thanks a lot!

EDIT: I think the problem is that I used the wrong twrp, has anyone rooted with this method a C432B182 rom? Only to be sure it is still working. Thanks!

Re-EDIT: I answer myself, still working, it is only a matter of use the right twrp recovery from first post. The rebrand process installed another one and that was all.
[Huawei Mate 9 Guides, News, & Discussion] Dioky:
Hi,

Thanks for the reply. It doesn't help though. I even went as far as to reboot into recovery after every step with wipe cache & data....

Still that same error message:

Verifying current userdata...

mountencrypt: failed to mount \Data: no such file or directory

After that, every time I end up with a disfunctioning system. Such as no recognition of SIM, half installed ROM etc.

Still puzzled as to what is causing this :(

Regards,
[Huawei Mate 9 Guides, News, & Discussion] ante0:
Oh, it's when you flash the hw_init zips?

That message is normal as twrp can't execute the mountencrypt command (and /data would need to be encrypted for it to function if it were to work in twrp). Make sure you flash Public zip first as that wipes hw_init. if you flash public after data, the files that data installs get removed. And that leads to a lot of problems as /data/hw_init contains files needed for themes, settings etc.

Public shouldn't give more errors than mountencrypt, data will end in error 7 but it still installs fine.

Also make sure you're installing the zips for your model/build.
[Huawei Mate 9 Guides, News, & Discussion] Dioky:
Hi,

Since it still didn't work out, I decided to just follow the unbrick / rebrand method from gm007.

That did the trick for me! :D

Now I find myself at another cross road as I can update to latest firmware through OTA, before I root the phone.

My question now would be if in doing so, I still will be able to root? For I cannot find a full firmware ROM with the same build number from that firmware download site. Only OTA's which won't suffice to extract the needed files to repair the ROM after formatting Data.

Anyone?
[Huawei Mate 9 Guides, News, & Discussion] Peppus:
Hi, take a look here, you can install easily any last updated rom and make root by this method afterward:

https://xdaforums.com/mate-9/how-to/guide-mate-9-flash-update-package-t3593108

Cheers!
[Huawei Mate 9 Guides, News, & Discussion] ante0:
Some contain data and Public too, check filelist.xml of the build you want. Alternatively I can edit the zip of superroot or supersu to not edit the boot image for decryption. Downside to that is you won't be able to backup /data in twrp, or flash stuff that flashes to /data.

PM me if you want that.

Edit: the firmware that's named FullOTA are the full roms.
[Huawei Mate 9 Guides, News, & Discussion] Dioky:
Hi,

Thanks for the offer! I will try and work with the method peppus mentioned just above these posts.

Will let you know if that worked out fine.

Regards,
[Huawei Mate 9 Guides, News, & Discussion] Dioky:
BusyBox was the culprit!

Hi,

After my reinstalling and all, I faced the same problems all over again.

So after a day of trial and error I finally found the culprit: busybox!

Only after trying several apps and cleaning up after every try, I can now say that if installing BusyBox with the MHA-L29C432 (and C636), don't try any other BusyBox app installer than the one from meefik.

That's the only one that kept me out of problems :cowboy:

Regards,
[Huawei Mate 9 Guides, News, & Discussion] drvsbsm:
Ok I need help I went to this link from another tutorial and got a couple files I have questions about and downloaded 2 update files that match the build MHA-L29C567B167 one update file is around 600mbs the other is 1.7gb I got both files here http://hwmt.ru/oth/HWFF/info/view.php?find_model=mha about a third down the page. This is only a guess but it seems that one is an update and one is a full install of that build, I needed one of them for a tutorial for TWRP and Root. I’m confused.

My Device is MHA-L29 device My Build right now is MHA-L29C567B167 any help with these questions and getting TWRP and Root would be very much appreciated.

It says on this Bootloader Unlock and Root Guide that on the steps 6 and 7 where I’m supposed to change the end of the link from changelog.xml and I saw where someone else was having the same issues I need the public_data.zip and full_hw_data.zip for MHA-L29C567B167. I’d appreciate it if someone could help me out. I tried the firmware site it won't let me dl. If someone could help me figure out these links I would appreciate it a lot.

I just got my Mate 9 and this is the first Huawei phone I have ever done any Developing, Rooting, or using any Rom’s on a Huawei Device ever so I’m really confused.

What is the difference between this https://xdaforums.com/mate-9/development/root-root-mate-9-t3556590 Unlock and Root Method on the first page or this way of doing it,

And the other way here https://xdaforums.com/mate-9/development/recovery-unofficial-twrp-huawei-mate-9-t3515617

Sorry a lot of questions just really confusing I’m used to OnePlus and Samsung Devices, if anyone can help answer my questions I would appreciate it a lot because I would really like to get my Mate 9 Rooted but I’m confused and only had it 2 days don’t want to brick it. Thank in advance for any help.

Thanks to Anyone who can help a first time Huawei Phone Owner.......
[Huawei Mate 9 Guides, News, & Discussion] Dioky:
Hi,

Lot of questions indeed.

I myself have been studying too before I started off. Here's what I can say:

The rooting method described in both threads you mentioned are the same but for the decrypting of your \Data partition.

It would be advised to go for decrypted \Data.

Once you decrypt, some parts of your ROM will be lost, that will be repaired by flashing the \public_data etc. and \full_HW etc.

The files you need will be the FullOTA. That site has another page where you can easily find the appropriate builds for your firmware. Look here

Finally if you want to rebrand/ update, just use the tool from mankindtw mentioned in my signature.

Hope this helps you out in some way :)

Regards,
[Huawei Mate 9 Guides, News, & Discussion] Nekobreak:
hi! i have the MHA-L09C25B108 AND I DID NOT FIND THE find firmware/hw/public FOR ME

need hepl :c
[Huawei Mate 9 Guides, News, & Discussion] ante0:
Yeah, if no OTA was released for your phone it won't be there...

You could rebrand to a different model using: https://xdaforums.com/mate-9/how-to/guide-mate-9-flash-update-package-t3593108
[Huawei Mate 9 Guides, News, & Discussion] roygaard:
Only Boot

Hi

Do I have to unlock BL even if I only BOOT the twrp-image over USB?

like:

# fastboot boot twrp.img

BTW: I will receive my Mate9 on friday so I can't realy test it out now.

Regards,

Roy
[Huawei Mate 9 Guides, News, & Discussion] Exodecim:
So you can't transfer files to either internal, or external storage in TWRP? Looking to upgrade from my idol 3, where mtp in twrp was a huge relief
[Huawei Mate 9 Guides, News, & Discussion] fily1212:
Hi.

I want to root my Mate 9, Chinese version. (MHA-AL00C00B167)

I have required the unlocking code for the bootloader and I've it.

I have the OTA update for B186.

First question: Is this the right procedure for rooting my phone?

1. Unlock bootloader

2. Install custom recovery TWRP and use PHH super User

3. flash (how??) Stock recovery

After this, can I update via OTA?

I have asked for the right procedure because I don't want to brick ...
[Huawei Mate 9 Guides, News, & Discussion] spc_hicks09:
Correct. Now it may have been something on my end. Maybe I didn't have the correct drivers installed or something? I'm pretty sure I had everything installed though and there was no MTP through TWRP.
[Huawei Mate 9 Guides, News, & Discussion] ante0:
TWRP 3.0.2-2 doesn't have a working MTP.

3.0.3 does, but you need to manually mount and unmount, after unmount it mounts. For some reason.

3.1.0 auto mounts (atleast in linux).

However, for both SuperRoot and SuperSU you need 3.0.2.

Magisk needs 3.1.0 but only works on newer kernels (April 2017, or B182+)

It's just a limitation of TWRP 3.0.2, not the phone itself :P
[Huawei Mate 9 Guides, News, & Discussion] spc_hicks09:
So after you're rooted, you can flash an updated TWRP to gain MTP functionality right?
[Huawei Mate 9 Guides, News, & Discussion] ante0:
Yup. And flash back 3.0.2 if you need to reflash.
[Huawei Mate 9 Guides, News, & Discussion] fily1212:
Can I flash stock recovery after root to gain MTP and OTA updates? If yes, how?

Inviato dal mio MHA-AL00 utilizzando Tapatalk
[Huawei Mate 9 Guides, News, & Discussion] Peppus:
Extracting recovery.img with Huawei Update Extractor.
[Huawei Mate 9 Guides, News, & Discussion] Exodecim:
Oh I see.. that makes sense then!

So then, after flashing SuperSU and achieving root, it's possible to flash 3.0.3/3.10 for MTP support whlist keeping SuperSU/root? :D
[Huawei Mate 9 Guides, News, & Discussion] ante0:
Yes. The specific twrp is only needed when you flash.
[Huawei Mate 9 Guides, News, & Discussion] Peppus:
Hi, little question... when rooted you flash a stock rom and want to make root again, do you need to format data every time? Thanks!
[Huawei Mate 9 Guides, News, & Discussion] jr313:
If you want to decrypt data you do. Otherwise you won't be able to see your internal data with TWRP if you're encrypted

sent from my telegram machine
[Huawei Mate 9 Guides, News, & Discussion] SonOfTheRain:
Hi,

In the first post there are steps:

What are those files for? Can I skip those steps and finish after flashing SuperSU?
[Huawei Mate 9 Guides, News, & Discussion] st_voss:
Your system will be incomplete if you skip flashing Public_data.zip und Full_HW_data.zip.

These zips contains parts of /data. So flashing these zips will restore most (all?) of the contents that was deleted by the step before (04-Format Data in TWRP)
[Huawei Mate 9 Guides, News, & Discussion] SonOfTheRain:
In this case to avoid problems may I not format the /data partition? In fact twrp for me needed only for rooting. I'd like to turn back to stock recovery after root. It will be OK?
[Huawei Mate 9 Guides, News, & Discussion] ante0:
You will need to modify SuperSU.zip or Superroot.zip then, as both removes the encryption flag (fileencryptioninline) in the kernel. If you try to boot your phone with that flag removed and /data is still encrypted you will end up in a boot loop.

As for return to stock recovery, it's fine.

Edit: For encrypted /data

SuperRoot https://mega.nz/#!Yotj1AAC!dqGo3FpCHEcOSIr1-G1gIslm1nEYAFEj4MaEocBpHZE

SuperSU https://mega.nz/#!lkV0jbYJ!b1h-5uVksvpt7rw0tRHV7Qxjwk2xkKox0w-iRsCLlbU

SuperSU still modifies /system as I haven't changed the init.d location yet.
[Huawei Mate 9 Guides, News, & Discussion] Peppus:
Hi ante0, then if in the next rom update I use SuperRoot I won't need to format data, neither flash the 2 additional zips and I will keep all my data? Anything more to do for use SuperRoot, onky flash it's zip and install Phh Supersu? Thank's!
[Huawei Mate 9 Guides, News, & Discussion] ante0:
If you update stock it will re-encrypt. And bootloader gets locked again so you still need to wipe when unlocking...
[Huawei Mate 9 Guides, News, & Discussion] Peppus:
Hi, you are right, I didn't think of it. Is there any way to avoid hardreset after unlock bootloader as it seems to me not necessary at all? When you lock it by restoring oeminfo but you still have twrp installed, when you reopen the bootloader, it try to reboot in stock recovery to hardreset, but boot in twrp instead, then you can skip hardreset and nothing goes wrong.

Cheers!
[Huawei Mate 9 Guides, News, & Discussion] ante0:
It's a dead end. I guess I figure you could update OTA, well you can, but you will still need to unlock bootloader again to flash a su zip and that means wipe after. So being able to OTA update is no different from using a full update, at least if you plan on rooting again. We'd need "custom" updates you flash in twrp to stay rooted.

I wonder if one could remove/replace recovery.img and other .img from update.app and then update using the recovery in the Force update and rebrand thread. It does skip a few security steps.
[Huawei Mate 9 Guides, News, & Discussion] SonOfTheRain:
Let me summarize what I understand (my aim is to root the device and continue to receive OTA updates):

1. I'll unlock the phone using fastboot oem unlock ABCDEF from adb (it will erase everything, OK I can live with it). Here it says sometimes wipe data failed but after booting the phone I do a factory reset from settings

2. Flash twrp-3.1.0-1-hi3660.img

3. Uncheck (modify /system) and apply the SuperRoot_noverity_no_decrypt-signed.zip from your link (not wipe anything anymore)

4. Extract recovery.img from update.app of my build and flash using adb.

5. Restart and enjoy the root, until next OTA update

Antyhing I am missing?

Thanks!
[Huawei Mate 9 Guides, News, & Discussion] ante0:
1: Correct

2: You need twrp-3.0.2-2-hi3660.img for that one.

3. It doesn't matter. It will only modify /system if you flash anything that applies to /system

4. Yes, but fastboot :P

5. Yes.

Though as I wrote in my previous reply. When you update using OTA your bootloader gets locked again, this came to light for me yesterday.

That means, next time you want to update and root you will still have to unlock bootloader after to flash back twrp and then root.

So it won't make a difference if you update using OTA or a full update using Firmware Finder/Force Update thread, as you still need to unlock bootloader and that means a mandatory wipe.

If we somehow could modify the official updates to include TWRP we could flash stuff but still have a locked bootloader :eek:
[Huawei Mate 9 Guides, News, & Discussion] SonOfTheRain:
Thank you :) I will have to look for hw_update and any other files from Huawei since I didn't format the /data

I am aware that my root will survive until next OTA, I have to live with that, for me is enough that I will receive and be able to install OTA. What happened previously, after rooting and flashing back to stock recovery, I received one update to 156 version, update started and in %5, said update failed, reboot the phone. Firmware finder nor any other method didn't help and I had to send to repair.
[Huawei Mate 9 Guides, News, & Discussion] ante0:
Which root did you use then?

If Huawei would use "normal" OTA updates, like it was in... Android 5 I think, we wouldn't have this problem. But now we're using "block" updates. It means it treats the /system partition as a single file, and patches only the code it needs to. Before it would replace all files it needed to replace, but that meant larger updates. Now it just need to replace a byte here and there but that means it needs to verify the partition so it's intact and not modified. If it is, and you'd disable verification, it would patch files it's not supposed to patch.
[Huawei Mate 9 Guides, News, & Discussion] SonOfTheRain:
As far as I remember I used SuperRoot. SuperSu didn't want to install even. After installation I didn't wipe anything but I didn't face bootloop either.
[Huawei Mate 9 Guides, News, & Discussion] ante0:
Maybe you used superuser-r275 from the TWRP thread? That one doesn't decrypt without modifications to the script changes.sh :P
[Huawei Mate 9 Guides, News, & Discussion] SonOfTheRain:
Yes probably it was this one :)
[Huawei Mate 9 Guides, News, & Discussion] Peppus:
Hi, now you could use the new method to recover your phone... and also to get the last update without wait until OTA arrives.

https://xdaforums.com/mate-9/how-to/guide-mate-9-flash-update-package-t3593108

Cheers!
[Huawei Mate 9 Guides, News, & Discussion] SonOfTheRain:
I just tried all steps like I wrote, I had no errors. Installed stock recovery back. Boots with no problems. Installed phh's root app. Everything so far works. I hope OTA updates too. Now I'm restoring my data. ante0, thanks, enjoy your coffee :)
[Huawei Mate 9 Guides, News, & Discussion] ante0:
I'm getting me some Starbucks xD thanks!
[Huawei Mate 9 Guides, News, & Discussion] SonOfTheRain:
One more question :) What about Busybox? In order to not modify the /sytem, which directory you suggest?
[Huawei Mate 9 Guides, News, & Discussion] ante0:
You would need /data for that then... Or install Magisk, it has systemless busybox. But you need a B182 firmware for that.

I'm not sure how well it works in /data though, if at all.

I made a script which installed busybox to /su/bin at boot, because of the method used to install supersu we can't modify /su, it doesnt stick after reboot. So it installed busybox after booting which made it systemless. I couldn't get busybox integrated with the installer :/

You can achieve the same thing with phh init (su --init)
[Huawei Mate 9 Guides, News, & Discussion] SonOfTheRain:
I have already B182. What to choose boot location because system could not detect. Also confirming that installation of it will not break OTA?
[Huawei Mate 9 Guides, News, & Discussion] ante0:
You need to flash Magiskv12.0.zip in twrp. It will detect boot partition automatically from there.

https://xdaforums.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445

It does not install anything to /system.
[Huawei Mate 9 Guides, News, & Discussion] spc_hicks09:
What is broken in the newer version with flashing SuperSU?
[Huawei Mate 9 Guides, News, & Discussion] ante0:
I lied, apparently. It installs fine. No errors.

I guess I figured it wouldn't work as 3.0.3 can't flash phh, and SuperSU uses phh to install.
[Huawei Mate 9 Guides, News, & Discussion] spc_hicks09:
Cool, so the newer version is fixed and can flash it? Might have to update later today.
[Huawei Mate 9 Guides, News, & Discussion] albertobom:
It's magisk working fine with mate 9?
[Huawei Mate 9 Guides, News, & Discussion] jokay:
Hi guys, there is someone who has tested this method on C4 firmware.

Who has already created the files needed for the root in step 6-7 on C4fw? thanks :D
[Huawei Mate 9 Guides, News, & Discussion] ante0:
As long as you're on B182+ and using twrp 3.1.0 it works.
[Huawei Mate 9 Guides, News, & Discussion] albertobom:
Thanks my friend. ☺️
[Huawei Mate 9 Guides, News, & Discussion] ante0:
Please note, while the official Magisk v12 (and probably some of the v13 nightlies) does work, none of them keep our /data decrypted. If you don't care about decryption and are not decrypted now, use the official release. If you use decrypted /data now, use: https://mega.nz/#!U4FRSAwQ!JUk81I-_DYBwa85ajPkYzDNww8tgHuMtdVuWFmBRl60
[Huawei Mate 9 Guides, News, & Discussion] Peppus:
Hi, so for the next update do you recommend not to format data and use Magisk to root? Thanks!
[Huawei Mate 9 Guides, News, & Discussion] albertobom:
I use twrp 3.0.2-2 and decrypted data can I proceed?
[Huawei Mate 9 Guides, News, & Discussion] ante0:
It's up to you :P

Without decrypt you won't be able to backup /data in TWRP.

But of course, if you never backup /data anyway there's no use to stay decrypted.

If you're on B182+ (Maybe B181 if it says April on Kernel version) and flash twrp 3.1.0, you can.
[Huawei Mate 9 Guides, News, & Discussion] Alexnoj:
If I root my phone, its not cancel the warranty?
[Huawei Mate 9 Guides, News, & Discussion] Peppus:
If you install a stock rom nobody will know that it was rooted.
[Huawei Mate 9 Guides, News, & Discussion] Alexnoj:
How I do unroot?
[Huawei Mate 9 Guides, News, & Discussion] Peppus:
By installing a stock rom this way root disappear and the bootloder is locked again:

https://xdaforums.com/mate-9/how-to/guide-mate-9-flash-update-package-t3593108

Cheers!
[Huawei Mate 9 Guides, News, & Discussion] Alexnoj:
Ok

thank you very much for your help.
[Huawei Mate 9 Guides, News, & Discussion] SonOfTheRain:
I installed Magisk 12 from TWRP, it did not give error but it immediatelly restarted. In Magisk Manager still I don't see Magisk installed. What can be problem?
[Huawei Mate 9 Guides, News, & Discussion] ante0:
You don't have twrp 3.1.0 or not on b182+. That happened before, when we didn't have loop support.