Root for my Huawei P8 Lite 2017 PRA-LX1

I’ve a smartphone Huawei P8 Lite 2017 (PRA-LX1)… beautiful but with a bug… the “doze mode system”, the system that kill or suspend some application for increase battery life, is too aggresive… and kill app like Telegram… or Automate.

Automate is a beautiful app for program and automate your task and you download here

In his FAQ, Automate say

Huawei devices have a non-standard Protected Apps feature, ensure Automate is enabled as such.

I’m ensure… but not works 🙁 Then… I must to be root for disable this feauture.


I read a lot of tutorials, but the better i found is here

I follow the guide above with little differents. I share my experince.

First of all, i need the UNLOCK CODE for unlock the bootloader.
The bootloader is a part of a system that “lock” your phone for avoid every change of firmware.

Huawei from July 2018 not sends you anymore this code :(. I try to email but this is the response from Huawei

Dear Giovanni,
Thank you for contacting us, in order to ensure better user experience, we have fully stop the boot loader unlock code service on 25th July’18 and the same date is already mentioned on our Official EMUI website.

Damn it! So… around the internet I found a not-free software for retrieve that. And i tried it and it works for only 4€. This is DC-Unlocker and you found here

**NOTE. This is only my experience and I am not responsible for any damage to the mobile phone. Be carefully, these operation CANCEL THE WARRANTY OF YOUR PRODUCT ***

Other importante note. These procedure will be RESET YOUR PHONE TO THE FACTORY SETTING. So backup all your data!!

Step 1 – Retrieve the bootloader unlock code

Download the software and install it. I’ve look this tuorial

For first, enable on your phone the “manufacture mode” dialing on your phone this code: *#*#2846579#*#*. After select “Background settings”, after “USB ports settings” and after “Manufacture mode”. Now you can go back. Remember this procedure because we have to repeat it in future.

Install on your windows the HiSuite, the software suite from Huawei. If you want you can search on google. In this way your windows will have the correct driver for communicate to smartphone.
In the meantime, if you have download DC-Unlocker, go to buy 4€ credit.

Now, in DC-Unlocker select Huawei-phones and auto-detect mode. It found for me that is a Huawei HiSilicon Kirin Android, and tell me some info like Model, IMEI, Serial number ecc. I have marked all this data.

Put into login the username and password and press Check Login.
Under Unlocking tab press “Read bootloader code”. In the log tab appear many text. Mark the code! It’s important because if you close DC-Unlocker you lost this code and your 4€ have go away. Mark this unlock-code on a paper!

If DC-Unlocker not see your phone first time, retry to enable “manufacture mode” like explain above. In my case I had to do it 3 times.

Step 2 – Unlock the bootloader (and lost the warranty)

Download ADB and Fastboot. These are utility that permit your PC communicate to smartphone. If you want you can download here platform-tools_r28.0.1-windows

Go trought the windows console (cmd) to the path where are adb.exe and fastboot.exe. Write

adb devices

for view list of smartphone connected. If your phone not appear you have to enable “manufacture mode” like above, or accept permissions on your phone.

Writing this, your P8Lite will reboot in bootloader mode

adb reboot bootloader

now you have to write

fastboot oem unlock [code]

Ok, now your phone is unlocked (and have lost the warranty)

Step 3 – Put the TWRP recovery

This step put on your phone a part of a system called TWRP Recovery, that it make possible the modding your phone. Remember that in this post I WILL NOT change my firmware…. I want only have root privilegies.

Download the TWRP here
In this page you have to search twrp_p10_lite_0.4.img

After a lot of search, I decided to put this TWRP designed for Huawei p10. And it works fine. Copy your TWRP image file in the same path of fastboot.exe and rename twrp.img

Reboot your phone in bootloader mode with

adb reboot bootloader

And now flash the image on your phone

flashboot flash recovery twrp.img

Now reboot with

fastboot reboot

Step 4 – Put Magisk for having root

Download the Magisk software here if you want, or search on google. Magisk is the APP that manage root privillgies and it is in two files:

a ZIP –> Magisk-v17.1
a APK (dezipped first) –> MagiskManager-v6.0.0

Copy these two files on your phone in the download path and switch off the phone.

Now, from phone off and USB disconnected, press vol+ and power on and mantein pressing. The phone goes on in the “Recovery TWRP mode” where you have to select the file, and swipe for install. After, reboot the system.
Now, normaly with your phone, install the APK.

Ok, now we have root privilegies. In Magisk App you can add root privileges  to an APP.

Step 5 – Disable “aggressive doze mode”

I have to call this on the phone command line

dumpsys deviceidle disable

This command force the disable of all doze system. For call this, I have to install the APP SManager found here in the Play Store

Following this video-tutorial we can create a script that disable the doze mode (with root privileges). Put it to run at every boot.

It’s works fine.

Please follow and like us:

Leave a Reply

Your email address will not be published. Required fields are marked *

Fork me on GitHub