[Recovery][27.09.2017][3.1.1-0] TWRP for the Huawei Mate 9 (hi3660)

Status
Not open for further replies.
Search This thread

Tkkg1994

Inactive Recognized Developer / Contributor
Jun 10, 2014
10,138
29,148
Coding City
Team Win Recovery Project 3.1.1-0


This has been tested and working great on MHA-L29 international dual sim model. It will work probably on all mate 9 devices, however I added a list of supported devices below which can be checked.

WARNING #1: Unlocking BL and flashing a custom recovery voids your warranty. Please make sure to contact your carrier/seller if your phone is still under warranty after unlocking the bootloader.

WARNING #2: Make sure you have enabled OEM unlock and unlocked bootloader before trying to flash this. How you can successful root and install TWRP will be described below.

WARNING #3: I have not yet fully tested the problems of dm-verity v2.0 introduced in Nougat. So as long as you don't need to modify /system, keep it read only. If you want to edit something inside system, make a backup until I can tell you more about it.

WHAT IS TWRP?

Oh come on, you know what it is - don't try to fool me!
In case you're serious, though...

Team Win Recovery Project is a custom recovery for Android devices.
It allows you to back up and restore your data, flash custom ROMs to your device, repair broken file systems, and root your device.

HOW-TO INSTALL
  • 0. Make sure you enabled OEM unlock in settings, if you haven't please do that now by tipping 10 times on build number (to activate developer options), than open developer options and go to OEM unlock, enable it
  • 1. Have an unlocked bootloader is required! (In my case, I called huawei and received the unlock code 12 hours later)
  • 2. Download the TWRP recovery from the download section below
  • 3. Make sure you got fastboot drivers installed (I will describe this below in how to unlock your bootloader)
  • 4. Open the adb/fastboot application on your pc and go to the directory where your TWRP img file is downloaded
  • 5. Boot your phone into download mode (First method: fastboot reboot-bootloader while connected to pc. Second method: power off your phone, hit power on and volume down until it boots to download mode)
  • 6. Check again if there is written: unlocked phone!
  • 7. If yes type now into your adb/fastboot terminal: fastboot flash recovery twrp-3.1.1-0-hi3660.img
  • 8. Type: fastboot reboot
  • 9. Now boot into recovery by pressing: power+volume up+volume down at the same time
  • 10. Enjoy twrp :)

HOW-TO UNLOCK BOOTLOADER
  • 1. Call Huawei in the HiCare app, request the bootloader unlock code there (I had to give my email, IMEI, serial number etc) or register yourself here on this link and get the code immediately!
  • 2. You will receive an email maybe a few days or hours later with the unlock code, when you got it you can go on here
  • 3. Install minimal adb and fastboot drivers from here: ADB and Fastboot drivers
  • 4. Plug in your phone and make sure all huawei drivers got installed
  • 5. Enable developer options in settings as described above.
  • 6. Enable OEM unlock, enable USB debugging (both in developer options)
  • 7. Open the adb tool you installed recently
  • 8. Type fastboot devices (now a device number should show up)
  • 9. Type fastboot reboot-bootloader (your phone will now boot into bootloader, if not, you haven't set up drivers or adb/fastboot correctly)
  • 10. This step will wipe all your data! Type: fastboot oem unlock xxxxxxxxxxxxxxxx (xx is for your unlock code)
  • 11. Ones it's done type: fastboot reboot. Your phone will reboot and you have an unlocked bootloader!
  • 12. You can now go on installing TWRP on your device

HOW-TO ROOT YOUR MATE 9
  • 0. Backup, just in case :)
  • 1. Have an unlocked bootloader and TWRP installed from above
  • 2. We will use this root method: Phh's superuser
  • 3. Download latest official phh superuser zip r310 version
  • 4. Put the zip on your external sd card of your phone (since we can't access /data in twrp)
  • 5. Boot into twrp and flash the downloaded file
  • 6. Install latest Material phh apk: Release post
  • 7. Now you are rooted, congrats!

SUPPORTED DEVICES
  • MHA-L29 devices
  • MHA-L09 devices
  • MHA-AL00 devices
  • MHA-TL01 devices
  • LON-L29 devices
  • LON-AL00 devices

DOWNLOAD
Download v3.1.1-0

TELEGRAM CHAT
Click on the Invite link

CHANGES
  • v3.0.2-0 - First unofficial release
  • v3.0.2-1 - Added mount options for vendor, version and product. Adjusted partition table sizes. Changed brightness
  • v3.0.3-0 - Switched to Android 7.1 branch, got usb storage working (at least something)
  • v3.0.3-1 - MTP fully working (thanks to @Laststandingdroid's helps), included FBE in boardconfig for future decrypt support, some other cleanups
  • v3.1.0-0 - Official update to the latest TWRP version
  • v3.1.0-1 - Kernel update for loop support
  • v3.1.1-0 - Official TWRP update to latest version, Kernel updated, source updated, small changes in MTP

FEATURES
  • Latest stock kernel included
  • f2fs file system support (read, write, format, backup & restore)
  • exFAT file system support (read, write, format, backup & restore)
  • Full SELinux support
  • Built in android 7.1 tree

KNOWN ISSUES
  • Encryption is not supported yet!
  • Aroma is broken, seems on all other Huawei phones (as mate 8 and p9) as well

CONTACT & SUPPORT

You can find TeamWin on IRC at #twrp on chat.freenode.net.
You can also post in this thread and I will attempt to answer any questions you may have.

SOURCE CODE

TWRP: TWRP source code (7.1 branch)
Device tree (International): generic_a15 (master branch)

CREDITS
  • TWRP master @jcadduono
  • Creator of Mate 8 TWRP for source tree

CONTRIBUTIONS

Gerrit for TWRP: Omni gerrit
Gerrit for officially supported devices: TWRP gerrit

XDA:DevDB Information
TWRP Huawei Mate 9, Tool/Utility for the Huawei Mate 9

Contributors
Tkkg1994
Source Code: https://github.com/Tkkg1994/android_device_hi3660


Version Information
Status: Stable
Current Stable Version: 3.1.1-0
Stable Release Date: 2017-09-27
Current Beta Version: 3.0.3-1
Beta Release Date: 2016-12-28

Created 2016-12-09
Last Updated 2017-10-23
 

opasha

Senior Member
Jul 2, 2009
2,293
616
Yes. I could also disable force encryption as well.
I will probably be able to make a custom rom with aroma options etc in the near future. :)

Sent from my SuperMan powered SM-G930F
You literally just made my night. Thank you so much! :highfive:
 

albireox

Senior Member
Nov 25, 2009
1,621
404
Timisoara
Guys, one question : the unlock code is officially offered by Huawei everywhere? I wrote them an email (Huawei Romania) and they replied they can't offer the unlocking code that being in contradiction with the Huawei's security policy.
 

Tkkg1994

Inactive Recognized Developer / Contributor
Jun 10, 2014
10,138
29,148
Coding City
Guys, one question : the unlock code is officially offered by Huawei everywhere? I wrote them an email (Huawei Romania) and they replied they can't offer the unlocking code that being in contradiction with the Huawei's security policy.
I called huawei directly. Told them my IMEI, serial number and email address, a day later I had the code. So they have to release it for sure
 
  • Like
Reactions: albireox
L

LastStandingDroid

Guest
I called huawei directly. Told them my IMEI, serial number and email address, a day later I had the code. So they have to release it for sure
You rooted N with phh? 0.0

Sent from my FRD-L09 using Tapatalk

---------- Post added at 10:06 PM ---------- Previous post was at 09:53 PM ----------

@Tkkg1994 may i use ur mall in OP to setup on my twrp? also nice share forgot about phh superuser :p only used he's su for magisk :p

also all i know is that chainfire's su patches DM verity properly
 
Last edited:

Tkkg1994

Inactive Recognized Developer / Contributor
Jun 10, 2014
10,138
29,148
Coding City
You rooted N with phh? 0.0

Sent from my FRD-L09 using Tapatalk

---------- Post added at 10:06 PM ---------- Previous post was at 09:53 PM ----------

@Tkkg1994 may i use ur mall in OP to setup on my twrp? also nice share forgot about phh superuser :p only used he's su for magisk :p

also all i know is that chainfire's su patches DM verity properly
Yes I rooted N with phh and this even successful :)
Dm-verity is patch in phh as well so no issues here

Yes sure go ahead!
 
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 59
    Team Win Recovery Project 3.1.1-0


    This has been tested and working great on MHA-L29 international dual sim model. It will work probably on all mate 9 devices, however I added a list of supported devices below which can be checked.

    WARNING #1: Unlocking BL and flashing a custom recovery voids your warranty. Please make sure to contact your carrier/seller if your phone is still under warranty after unlocking the bootloader.

    WARNING #2: Make sure you have enabled OEM unlock and unlocked bootloader before trying to flash this. How you can successful root and install TWRP will be described below.

    WARNING #3: I have not yet fully tested the problems of dm-verity v2.0 introduced in Nougat. So as long as you don't need to modify /system, keep it read only. If you want to edit something inside system, make a backup until I can tell you more about it.

    WHAT IS TWRP?

    Oh come on, you know what it is - don't try to fool me!
    In case you're serious, though...

    Team Win Recovery Project is a custom recovery for Android devices.
    It allows you to back up and restore your data, flash custom ROMs to your device, repair broken file systems, and root your device.

    HOW-TO INSTALL
    • 0. Make sure you enabled OEM unlock in settings, if you haven't please do that now by tipping 10 times on build number (to activate developer options), than open developer options and go to OEM unlock, enable it
    • 1. Have an unlocked bootloader is required! (In my case, I called huawei and received the unlock code 12 hours later)
    • 2. Download the TWRP recovery from the download section below
    • 3. Make sure you got fastboot drivers installed (I will describe this below in how to unlock your bootloader)
    • 4. Open the adb/fastboot application on your pc and go to the directory where your TWRP img file is downloaded
    • 5. Boot your phone into download mode (First method: fastboot reboot-bootloader while connected to pc. Second method: power off your phone, hit power on and volume down until it boots to download mode)
    • 6. Check again if there is written: unlocked phone!
    • 7. If yes type now into your adb/fastboot terminal: fastboot flash recovery twrp-3.1.1-0-hi3660.img
    • 8. Type: fastboot reboot
    • 9. Now boot into recovery by pressing: power+volume up+volume down at the same time
    • 10. Enjoy twrp :)

    HOW-TO UNLOCK BOOTLOADER
    • 1. Call Huawei in the HiCare app, request the bootloader unlock code there (I had to give my email, IMEI, serial number etc) or register yourself here on this link and get the code immediately!
    • 2. You will receive an email maybe a few days or hours later with the unlock code, when you got it you can go on here
    • 3. Install minimal adb and fastboot drivers from here: ADB and Fastboot drivers
    • 4. Plug in your phone and make sure all huawei drivers got installed
    • 5. Enable developer options in settings as described above.
    • 6. Enable OEM unlock, enable USB debugging (both in developer options)
    • 7. Open the adb tool you installed recently
    • 8. Type fastboot devices (now a device number should show up)
    • 9. Type fastboot reboot-bootloader (your phone will now boot into bootloader, if not, you haven't set up drivers or adb/fastboot correctly)
    • 10. This step will wipe all your data! Type: fastboot oem unlock xxxxxxxxxxxxxxxx (xx is for your unlock code)
    • 11. Ones it's done type: fastboot reboot. Your phone will reboot and you have an unlocked bootloader!
    • 12. You can now go on installing TWRP on your device

    HOW-TO ROOT YOUR MATE 9
    • 0. Backup, just in case :)
    • 1. Have an unlocked bootloader and TWRP installed from above
    • 2. We will use this root method: Phh's superuser
    • 3. Download latest official phh superuser zip r310 version
    • 4. Put the zip on your external sd card of your phone (since we can't access /data in twrp)
    • 5. Boot into twrp and flash the downloaded file
    • 6. Install latest Material phh apk: Release post
    • 7. Now you are rooted, congrats!

    SUPPORTED DEVICES
    • MHA-L29 devices
    • MHA-L09 devices
    • MHA-AL00 devices
    • MHA-TL01 devices
    • LON-L29 devices
    • LON-AL00 devices

    DOWNLOAD
    Download v3.1.1-0

    TELEGRAM CHAT
    Click on the Invite link

    CHANGES
    • v3.0.2-0 - First unofficial release
    • v3.0.2-1 - Added mount options for vendor, version and product. Adjusted partition table sizes. Changed brightness
    • v3.0.3-0 - Switched to Android 7.1 branch, got usb storage working (at least something)
    • v3.0.3-1 - MTP fully working (thanks to @Laststandingdroid's helps), included FBE in boardconfig for future decrypt support, some other cleanups
    • v3.1.0-0 - Official update to the latest TWRP version
    • v3.1.0-1 - Kernel update for loop support
    • v3.1.1-0 - Official TWRP update to latest version, Kernel updated, source updated, small changes in MTP

    FEATURES
    • Latest stock kernel included
    • f2fs file system support (read, write, format, backup & restore)
    • exFAT file system support (read, write, format, backup & restore)
    • Full SELinux support
    • Built in android 7.1 tree

    KNOWN ISSUES
    • Encryption is not supported yet!
    • Aroma is broken, seems on all other Huawei phones (as mate 8 and p9) as well

    CONTACT & SUPPORT

    You can find TeamWin on IRC at #twrp on chat.freenode.net.
    You can also post in this thread and I will attempt to answer any questions you may have.

    SOURCE CODE

    TWRP: TWRP source code (7.1 branch)
    Device tree (International): generic_a15 (master branch)

    CREDITS
    • TWRP master @jcadduono
    • Creator of Mate 8 TWRP for source tree

    CONTRIBUTIONS

    Gerrit for TWRP: Omni gerrit
    Gerrit for officially supported devices: TWRP gerrit

    XDA:DevDB Information
    TWRP Huawei Mate 9, Tool/Utility for the Huawei Mate 9

    Contributors
    Tkkg1994
    Source Code: https://github.com/Tkkg1994/android_device_hi3660


    Version Information
    Status: Stable
    Current Stable Version: 3.1.1-0
    Stable Release Date: 2017-09-27
    Current Beta Version: 3.0.3-1
    Beta Release Date: 2016-12-28

    Created 2016-12-09
    Last Updated 2017-10-23
    10
    TWRP 3.1.0-0

    Changelog V3.1.0-0 TWRP
    - Updated branch to most recent android 7.1.2
    - Updated TWRP to official 3.1.0 release
    - Fix errors during phh superuser flash

    I don't own this device, still I wanted to keep you updated!

    So have fun and download the new TWRP:
    Download V3.1.0-0 (flash with fastboot or inside TWRP)

    Also phh superuser got updated to r310 version:
    Latest r310 phh superuser
    10
    Great work! You got not only TWRP but root too!?
    I will try it out later today!
    Yes. I could also disable force encryption as well.
    I will probably be able to make a custom rom with aroma options etc in the near future. :)

    Sent from my SuperMan powered SM-G930F
    8
    Recovery from 6.0 tree

    Hello dear friends. Many of you had problems with rooting due to mksh on 7.1 branch on twrp (6.0 uses sh).
    So I decided to do an update of the 6.0 TWRP tree I did before and release a 3.0.2-2 version with all fixes I did in latest release on 7.1 branch.
    Have fun and keep on rocking, happy new year by the way :)

    To explain, only difference between 3.0.3-1 and 3.0.2-2 is the branch used to build the twrp, everything else is the same!

    Download 3.0.2-2 for phh compatibility
    8
    So till now there is no way to backup data even with boot.img floating around?

    If you don't care about root you can back up your data. How I did it is I backed up my stock rom when I got the phone (everything except data) Then I modded the stock boot.img to not force encryption which I can share if you guys want. Then in TWRP I went to Wipe then Format data and typed in yes. That will decrypt your data. Then I restored the stock rom and flashed the decrypted boot.img. Then I was decrypted, twrp could see my internal storage and was able to back up data. The key is to never boot up with an encrypted boot.img so you stay decrypted.

    HRT Team (Kangvip) modded the boot.img with root but they never disabled encryption. (sometimes they just don't think) I tried modding their boot.img but because it's "wrrapped" with SuperSU I got errors unpacking it. You can't even unpack their system.img without errors. If I could find a way to properly unpack it then I can make it not force encryption and still have root which is what we need right now. Then everyone can just flash that boot.img and stay decrypted. Then twrp would work fine until we have a build that supports encryption.

    Android is open source and it always bugs me when people don't share their ways of doing things.