DJI Mavic, Air and Mini Drones
Friendly, Helpful & Knowledgeable Community
Join Us Now

Huawei Ascend XT2 aka Wunderphone - Root / Stop USB Charging Tutorial

djiboi

Well-Known Member
Joined
Feb 27, 2018
Messages
352
Reactions
88
Age
44
OK, I was getting frustrated with the Controller charging the phone. To be fair, the XT2 draws very little power from the controller but still, I like to tweak :)

This is the app that will allow us to disable USB charging

https://play.google.com/store/apps/details?id=org.bramantya.stopcharging&hl=en

BUT, it requires root. so here is a little guide I whipped up below. Most if it is copy and pasted from other guides dotted around the net, I just wanted to bring them together into once place.

Required Files
  1. ADB Platform tools - https://dl.google.com/android/repository/platform-tools-latest-windows.zip
  2. Patched Boot - patched_boot.zip (25.91MB) - SendSpace.com
  3. TWRP - twrp-xt2.7z
  4. Magisk Manager - http://tiny.cc/latestmanager


Unlock the bootloader.

1. Geting the Bootloader Unlock Code: You need to get your bootloader unlock code. You can get this by going to https://emui.huawei.com/en/plugin.php?id=unlock and signing into your Huawei ID. If you dont have one, create one. Then, follow the instructions given to you by Huawei to get the code.

2. Enabling the Enable OEM Unlock Option: To enable this option, you must enable developer options. To do this, go to Settings>About Phone and tap the Build number until it says "You are now a Developer". back out of About Phone, and go to Developer options. turn on "Enable OEM unlock" and press Enable.

3. Enable USB Debugging: While you are still in Developer options, enable the option 'USB debugging" and press OK.

4. Booting Into the Bootloader: once you have completed the first three steps, you can now boot into the bootloader. Connect your phone to your computer, and open the Platform Tools folder you should have downloaded and extracted. Shift-Right click, and press "Open Command Window Here" or "Open Powershell Window Here", depending on your version of windows. Once it is open, make sure your device is detected by typing "adb devices". If it displays your device, you are good to continue. If not, something is not set up right on your computer or phone. Once you verified that your phone is detected, type
adb reboot bootloader

5. Unlocking the Bootloader: Once your phone has booted into the bootloader, you can now unlock the bootloader. YOUR PHONE WILL BE WIPED ONCE YOU TYPED THIS COMMAND. You can unlock it by typing
fastboot oem unlock <your bootloader unlock code>
Once it has finished, you can reboot your phone, and just run through the setup fast, because you will still have to wipe it again.

Root the phone

  1. Copy the patched_boot (make sure to unzip the file) to your sdcard.
  2. Reboot phone into fastboot using the ADB command
    adb reboot bootloader
  3. Flash TWRP into your recovery partition using this command. Make sure the
    plug usb cable in (from phone to computer) and the recovery.img is in the same folder as adb
    fastboot flash recovery recovery.img
  4. Boot into TWRP. Turn off the phone. Then while unplugged, hold volume up then press power until tablet starts, keep holding volume up until twrp begins
  5. Tap "Keep Read Only" when TWRP starts.
  6. Tap "Install", then tap "Install Image" at the bottom. Browse (Up a Level) then "external_sd"
    If you unzipped the patched_boot.zip you will see patched_boot.img here. Select it.
    Select "boot" (uncheck "recovery") partition to flash.
    Swipe to confirm Flash
    Tap "Reboot" once it's completed.
  7. You should be rooted!
  8. Install Magisk Manager. Without this, you won't be prompted to allow root!


One last thing, never update your system using OTA as this could brick your phone!
 
Last edited:
Nice write up. I followed these instructions from Lee earlier today and they worked spot on. There are other guides on the net, but there is conflicting information, so having this all in one place has made life loads easier for those who want to root their XT2.

Its worth it just for the challenge :)
 
I'm sure I missed a couple of things, so if you get stuck, give me a shout and i'll try and help out.
 
OK, I was getting frustrated with the Controller charging the phone. To be fair, the XT2 draws very little power from the controller but still, I like to tweak :)

This is the app that will allow us to disable USB charging

https://play.google.com/store/apps/details?id=org.bramantya.stopcharging&hl=en

BUT, it requires root. so here is a little guide I whipped up below. Most if it is copy and pasted from other guides dotted around the net, I just wanted to bring them together into once place.

Required Files
  1. ADB Platform tools - https://dl.google.com/android/repository/platform-tools-latest-windows.zip
  2. Patched Boot - patched_boot.zip (25.91MB) - SendSpace.com
  3. TWRP - twrp-xt2.7z
  4. Magisk Manager - http://tiny.cc/latestmanager


Unlock the bootloader.

1. Geting the Bootloader Unlock Code: You need to get your bootloader unlock code. You can get this by going to https://emui.huawei.com/en/plugin.php?id=unlock and signing into your Huawei ID. If you dont have one, create one. Then, follow the instructions given to you by Huawei to get the code.

2. Enabling the Enable OEM Unlock Option: To enable this option, you must enable developer options. To do this, go to Settings>About Phone and tap the Build number until it says "You are now a Developer". back out of About Phone, and go to Developer options. turn on "Enable OEM unlock" and press Enable.

3. Enable USB Debugging: While you are still in Developer options, enable the option 'USB debugging" and press OK.

4. Booting Into the Bootloader: once you have completed the first three steps, you can now boot into the bootloader. Connect your phone to your computer, and open the Platform Tools folder you should have downloaded and extracted. Shift-Right click, and press "Open Command Window Here" or "Open Powershell Window Here", depending on your version of windows. Once it is open, make sure your device is detected by typing "adb devices". If it displays your device, you are good to continue. If not, something is not set up right on your computer or phone. Once you verified that your phone is detected, type
adb reboot bootloader

5. Unlocking the Bootloader: Once your phone has booted into the bootloader, you can now unlock the bootloader. YOUR PHONE WILL BE WIPED ONCE YOU TYPED THIS COMMAND. You can unlock it by typing
fastboot oem unlock <your bootloader unlock code>
Once it has finished, you can reboot your phone, and just run through the setup fast, because you will still have to wipe it again.

Root the phone

  1. Copy the patched_boot (make sure to unzip the file) to your sdcard.
  2. Reboot phone into fastboot using the ADB command
    adb reboot bootloader
  3. Flash TWRP into your recovery partition using this command. Make sure the
    plug usb cable in (from phone to computer) and the recovery.img is in the same folder as adb
    fastboot flash recovery recovery.img
  4. Boot into TWRP. Turn off the phone. Then while unplugged, hold volume up then press power until tablet starts, keep holding volume up until twrp begins
  5. Tap "Keep Read Only" when TWRP starts.
  6. Tap "Install", then tap "Install Image" at the bottom. Browse (Up a Level) then "external_sd"
    If you unzipped the patched_boot.zip you will see patched_boot.img here. Select it.
    Select "boot" (uncheck "recovery") partition to flash.
    Swipe to confirm Flash
    Tap "Reboot" once it's completed.
  7. You should be rooted!
  8. Install Magisk Manager. Without this, you won't be prompted to allow root!


One last thing, never update your system using OTA as this could brick your phone!

Thanks!... worked with mine. I used Titanium Backup to freeze all those AT&T apps and other non-essential apps too.
 
I guess all Androids can be different, thought I would post my experience too. I was a little worried about the persistent selection of charging mode when plugging my Mavic Air controller into the trusted Android.

After multiple flights and reviewing the life cycle of batteries in the controller & phone. I can say without a doubt there is nothing to be worried about, based on my trial using the about hardware set-up.
  • I have the latest Motorola X2 Play (great phone), no extended battery attached just the slim on board battery.
  • Display brightness on auto being used outside in bright conditions meaning the display is likely at 100%
  • I have not enabled developer mode and tried to force the connection away from charging.
  • When I started flying the phone was only at 90% and I could see the battery on trickle charge.
The result:
  • I have experienced no app crashes on Android Nougat with the X2 Play and screen refresh rates are working perfectly while shooting movies.
  • After the first flight (20 min) there was little drop in the phone battery (approx 3-4%)
  • The controller was still showing 4 LED's
  • I continued flying with the remaining two drone batteries (making a total of 3)
  • The controller had reduced to 3 LED's
  • The X2 play phone had approx 80% charge, so I drained about 10% in total to do 3 flights
Even more interesting :-)...

I took a break from flying and used my phone for the next 4hrs, shopping, surfing, reading the news over the web and then returned to do some more flying after the drone batteries had recharged... "I didn't recharge the controller"
  • My phone was sitting on approx. 65% at the commencement of flight
  • I completed three more flights
  • The Mavic controller reduced to two solid LED's and did not go near the low battery alert.
  • The phone at the end of the second session had lowered to approx. 52%
Not bad at all.

Happy flying! :+)
 
The reason I use the app is when the RC only has a a few bars left and I don't need precious battery being diverted to the phone.
 
great write-up. I am stuck though on step 3 under Root the phone. how do I flash twrp to the recovery partition? what does that even mean? if you can rewrite that step in layman's terms I'd really appreciate it. thank you.


OK, I was getting frustrated with the Controller charging the phone. To be fair, the XT2 draws very little power from the controller but still, I like to tweak :)

This is the app that will allow us to disable USB charging

https://play.google.com/store/apps/details?id=org.bramantya.stopcharging&hl=en

BUT, it requires root. so here is a little guide I whipped up below. Most if it is copy and pasted from other guides dotted around the net, I just wanted to bring them together into once place.

Required Files
  1. ADB Platform tools - https://dl.google.com/android/repository/platform-tools-latest-windows.zip
  2. Patched Boot - patched_boot.zip (25.91MB) - SendSpace.com
  3. TWRP - twrp-xt2.7z
  4. Magisk Manager - http://tiny.cc/latestmanager


Unlock the bootloader.

1. Geting the Bootloader Unlock Code: You need to get your bootloader unlock code. You can get this by going to https://emui.huawei.com/en/plugin.php?id=unlock and signing into your Huawei ID. If you dont have one, create one. Then, follow the instructions given to you by Huawei to get the code.

2. Enabling the Enable OEM Unlock Option: To enable this option, you must enable developer options. To do this, go to Settings>About Phone and tap the Build number until it says "You are now a Developer". back out of About Phone, and go to Developer options. turn on "Enable OEM unlock" and press Enable.

3. Enable USB Debugging: While you are still in Developer options, enable the option 'USB debugging" and press OK.

4. Booting Into the Bootloader: once you have completed the first three steps, you can now boot into the bootloader. Connect your phone to your computer, and open the Platform Tools folder you should have downloaded and extracted. Shift-Right click, and press "Open Command Window Here" or "Open Powershell Window Here", depending on your version of windows. Once it is open, make sure your device is detected by typing "adb devices". If it displays your device, you are good to continue. If not, something is not set up right on your computer or phone. Once you verified that your phone is detected, type
adb reboot bootloader

5. Unlocking the Bootloader: Once your phone has booted into the bootloader, you can now unlock the bootloader. YOUR PHONE WILL BE WIPED ONCE YOU TYPED THIS COMMAND. You can unlock it by typing
fastboot oem unlock <your bootloader unlock code>
Once it has finished, you can reboot your phone, and just run through the setup fast, because you will still have to wipe it again.

Root the phone

  1. Copy the patched_boot (make sure to unzip the file) to your sdcard.
  2. Reboot phone into fastboot using the ADB command
    adb reboot bootloader
  3. Flash TWRP into your recovery partition using this command. Make sure the
    plug usb cable in (from phone to computer) and the recovery.img is in the same folder as adb
    fastboot flash recovery recovery.img
  4. Boot into TWRP. Turn off the phone. Then while unplugged, hold volume up then press power until tablet starts, keep holding volume up until twrp begins
  5. Tap "Keep Read Only" when TWRP starts.
  6. Tap "Install", then tap "Install Image" at the bottom. Browse (Up a Level) then "external_sd"
    If you unzipped the patched_boot.zip you will see patched_boot.img here. Select it.
    Select "boot" (uncheck "recovery") partition to flash.
    Swipe to confirm Flash
    Tap "Reboot" once it's completed.
  7. You should be rooted!
  8. Install Magisk Manager. Without this, you won't be prompted to allow root!


One last thing, never update your system using OTA as this could brick your phone!
 
I cannot get this file to download. I can find other versions of the apk, but the one under this link won't let me download it. Just keeps giving me pop ups

Oh and the Huawei bootloader unlock website doesn't seem to be working anymore. Maybe I can't root this sucker anymore.
 
So is there any other way to Root this phone, now that Huawei is no longer giving bootloader codes???
 
Nice write up. I followed these instructions from Lee earlier today and they worked spot on. There are other guides on the net, but there is conflicting information, so having this all in one place has made life loads easier for those who want to root their XT2.

Its worth it just for the challenge :)

hello,when you did this,did you run into locked FRP?
 

DJI Drone Deals

New Threads

Forum statistics

Threads
134,563
Messages
1,596,284
Members
163,063
Latest member
EddieWhite97
Want to Remove this Ad? Simply login or create a free account