How to root Doogee X5 Max Pro and remove malware

Rooting the Doogee X5 Max Pro and removing the pre-installed malware apps

After we revealed in this article that Doogee were shipping phones from the factory with malware pre-installed we decided to look at how easy it is to root our own Doogee X5 Max Pro and remove the malware.

Now if you are following this to try yourself be aware that you may be invalidating your warranty by doing this as there is a small chance that if something went wrong during the process it could ‘brick’ your phone and make it unusable. Now with that warning out-of-the-way lets take a look at how to do it.

Requirements for rooting the Doogee X5 Max Pro

  1. PC, laptop or tablet running Windows or linux (no current way to obtain root without connecting to a PC)
  2. A Doogee X5 Max pro smartphone
  3. Micro USB cable
  4. TWRP x32 recovery software
  5. SP Flash tools for windows or Linux
  6. About 15 minutes of your time

Flashing TWRP recovery

So if you follow the about links and download the files from Needrom onto your computer, you will need to register for an account with Needrom before you can download but you only need to give them your email address so if your worried about spam then sign up for a temporary email address to use with this website.

Once the files have been dowextracting the TWRP zip filenloaded you need to extract the TWRP and SP flash tools zip files.
If you cannot extract the files then download the free 7zip software onto your computer which can handle most compressed files.

Our instructions are all for using Windows to get root on the phone (in our case Windows 7) you will need to adapt any changes were applicable if you’re using a different version or windows or Linux.

driver install for mediatek chip smartphonesOnce you have extracted all the files go to where you unzipped the Flash tools and you should find a directory called drivers, open this folder and find the version that best applies to your setup and then run the driverinstall file. This will take a few minutes to install and may prompt you several times that it is an unsigned driver and do you want to continue, say yes to any prompts.

Installing TWRP

We now need to prepare the phone for installing TWRP software. Installing TWRP should not cause you to lose any apps or data from your Doogee X5 Max Pro phone but as a precaution it maybe worth backing up any photos videos, or other data from your phone before continuing.

Firstly we want to copy the from the TWRP folder to the phone by connecting your Doogee upto the computer and copying the file onto the internal memory. Once the superuser file has copied you need to power off your phone and remove the back cover and battery. With the battery disconnected from the phone plug-in the mini USB cable and attach it to a spare USB port on your computer (leave the phone powered off) Your computer should now detect some new USB devices and set them up.

Launch the SP flash tools program from where you extracted it to, once the program has opened up click the scatter loading button and browse to the location where you unzipped the TWRP folder and find a file named MT6737M_Android_scatter.txt
Ensure that only the recovery box is ticked and that it is set to download only. It should look similar to the screenshot below

Once you have your phone connected with battery out and powered off and the scatter file loaded click on the green download arrow to flash TWRP to the recovery partition of your phone. As TWRP is only a small app it should complete in a few seconds and give you a results screen with a green tick to indicate it has completed successfully.

Using SP flashtools to install TWRP recoveryOnce you have the green tick the TWRP is now installed on you phone and you can then disconnect it from your computer, and replace the battery. To access TWRP you need to power on the phone while holding down the volume up button. This will bring up a menu with the options of [Recovery mode] [Fastboot mode] or [Normal mode] using the volume up to select [Recovery mode] and then the volume down to choose that option.

After a few seconds you should get the Team Win Recovery Project (TWRP) screen. Press on Install and then browse to where you copied the Superuser zip to earlier, selected the superuser zip file and then swipe to confirm you wish to install it. It will then spend a few seconds updating your phone until it gives a message that it is done and you can then choose the option to Reboot System

Your phone should then boot back up to the familiar Android homescreen and all you apps and data will still be there but you will now have a new app called SuperSU and your phone is now rooted.

To remove the pesky malware though you will need some extra apps which can clean them out of the system folder. I used System app safe remover which you can download for free from the Play store. There are others but this was the first one I tried and it was able to detect and remove all the malware apps. It moves them to a recycle bin so if you want to you could restore them if you removed something that later you find causes your phone to become unstable.

I removed all the malware we identified in the other article here as well as installed Google launcher and removed launcher3, I left the noroot firewall running for now to check for any other apps which try to access the internet and the only ones are systemUI. Now because this is used by other parts of the Android OS it can’t be removed completely therefore it will still need to be blocked by a firewall. But now we have the option of installing root firewalls as well as Noroot firewalls.

Some apps detect that your phone has been rooted and won’t run (often video streaming apps) if this occurs then you can unroot your phone using the SuperSU app. This won’t cause the malware to come back but you won’t be able to remove any more system apps unless you booted back into the TWRP recovery and reinstalled the superuser zip.

If you have followed all the instructions above you should now have a malware free Doogee and having TWRP installed means you can dip your toe into the world of custom ROMs which we will look at in another article.