[Miscellaneous Android Development] skeleton1911:
Root Elephone U Pro

Foreword:

It was a long way to get root on the U Pro and dangerous , i could brick my phone , but finally its done!

It wasn't my own work at all. We all shared ideas and thoughts . We that are

Mr. Fünke (not an xda member) [MENTION=7875981]Maherabed1986[/MENTION] [MENTION=4457396]lKinder_Bueno[/MENTION] [MENTION=5803133]dypak[/MENTION] and me [MENTION=4626501]skeleton1911[/MENTION] .

so thanks goes also to them.

In the last days we spent hours and hours to get not only root . ( but this is another chapter, soon more :D:D )

Took the last OTA 20180227 Build and extracted the payload.bin (in it are all images etc.) Surprise :P

the System has a second partition table of all images . called _a and _b ( example: boot_a.img , boot_b.img)

thats a good thing, because if one gets damaged the Bootloader will boot the other Partition.

i could write many more but lets come to the Topic.

[SIZE="3"][COLOR="Red"]#/Disclaimer[/COLOR]

* I am not responsible for anything/bricked devices, dead SD cards,
* thermonuclear war, or exploding cars.
[/SIZE]

What do we need for Root our U Pro

1. QPST flashtools (qualcomm)

2. Qualcomm Drivers for the Device

3. a firehose file for SDM660

4. rawprogram_unsparse and patch0.xml

6. patched_boot.img

7.ADB

8.unlocked bootloader

Uploaded all here: https://1drv.ms/u/s!Am93l3qEx-D_hJZQQpXbjL45aKcUiQ only for 20180227

TOOL FILES https://1drv.ms/u/s!Am93l3qEx-D_hOcLmv0inQJ-vrVdLg

IF YOU USE QFIL FLASHTOOLS YOU DONT NEED TO UNLOCK THE BOOTLOADER:

THIS IS ONLY NECCESARY IF YOU WANT TO USE FASTBOOT COMMANDS: SINCE 20180423 BASE

(files are at the bottom of this post)

Also enable USB Debugging in settings/system/developer settings

(tap 7 times on the build number in settings/system/phone info if you dont have developer settings)

we need an unlocked bootloader

Enable OEM unlock in developer settings..

If you unlocked the bootloader , that will wipe your userdata and

you have the google protection password screen.

Notice: if your password dont work , no panic! just enter 30 times a wrong password with minimal 5 letters and the phone will make a factory reset.

for unlock bootloader do:

adb shell

reboot bootloader

and

fastboot flashing unlock

that will wipe userdata!

after that you can enter recovery via bootloader or it reboots itself to it . when you see the red android icon . hold power and vol- 5 seconds and then slide to vol+ and back to vol- or try : press power and then click on vol+

that will enter recovery, then reboot , you will have to enter the google password 30times (look above)

After the phone is back on Homescreen , enable usb debugging again and use adb

adb shell

reboot edl

1. install ADB . (newest ADB files are in the zip) . copy the "adb" folder to C:/

2. install the QPST/QFIL Flashtool

3. install Qualcomm Drivers

-----------------------------------------------------------------

Connect your phone to pc

when all is installed open a command (cmd) and go to your adb folder

C:\>cd adb

we need to reboot the phone to the EDL mode (emergency download mode) to use the Flashtool :

adb shell
reboot edl

phone will reboot to edl mode ( black screen, no led)

Now check your device manager . the COM & LTP port should show "Qualcomm HS-USB QDLoader 9008"

if not then update the driver and choose it from your internal list. or google for it :D

if the driver is fine, open the QPST/QFIL FLashtool in

C:\Program Files (x86)\Qualcomm\QPST\bin\QFIL.exe

prepare the Flashtool:

in Select Build Type:

choose: Flat Build

in Select Programmer:

browse and choose the "prog_emmc_ufs_firehose_Sdm660_ddr.elf" file

( you cant see it change to "all files" )

Load XML:

now choose the rawprogram_unsparse.xml and right after the patch0.xml

you can press the "download button"

wait a bit , at the end of the flashing procedure it will make an error, thats normal because i left the patch0.xml empty.

after all disconnect the cable and hold Power button a few seconds. phone will reboot and you have root.

install magisk manager.apk from magisk thread .

enjoy:)

This is the boot.img of the boot_b partition and will root the system_b.

the system_a is untouched , also the boot_a.img . so if an OTA will come you can install it with no problem.

BTW after you installed magisk manager.apk , choose install again and direct download to get magisk files into system.

IF YOU USE QFIL FLASHTOOLS YOU DONT NEED TO UNLOCK THE BOOTLOADER:

THIS IS ONLY NECCESARY IF YOU WANT TO USE FASTBOOT COMMANDS: SINCE 20180423 BASE

20180227 Root Boot.img

Flashable via QFIL Flashtools only!

you dont need to be unlock. just install qfil and its drivers...

Go here: https://1drv.ms/u/s!Am93l3qEx-D_hJZPwPoJzH4zTrkLqQ

20180423 Root Boot.img

use QFil flashtools when you dont want to unlock your bootloader- (unlocking bootloader will wipe your data)

if you want fastboot commands unlock the bootloader and flash the boot.img via fastboot . ( you have to be in bootloader mode )

for this place only the boot.img to your adb folder and do this commands

GO here: https://1drv.ms/u/s!Am93l3qEx-D_hJZODc_2yG3Kl-VTow

20180511 Root Boot.img

Rooted Boot.img .- https://1drv.ms/u/s!Am93l3qEx-D_hJZv4OOlKoGa6BFxdA

you can use this with the files above ( raw.xml etc for QFIL , or flash it via fastboot if you are unlocked

go to bootloader mode with

adb shell
reboot bootloader

then

fastboot flash boot_a boot.img

and

fastboot flash boot_b boot.img

thats all.

easy to do

after install magisk manager to activate root