[Miscellaneous Android Development] skeleton1911:
Elephone U Pro Guide for:

1. set up ADB

2. set up QPST/QFIL Qualcomm Flashtool

3. How to use Qfil Flashtool / Flashing Guide and Drivers

4. How to Unlock Bootloader / enter Recovery

5. How to : U Pro is Very hard to Brick. very good thing :D

6. some infos about the phone ( Developer only)

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

First of all you have to enable USB Debugging in Developer Settings

(to enable it go to settings/system/about and tap 7 times on the Build number .

that enables Developer Settings in settings/system .)

Download this Zip. In it there is all you need:

https://1drv.ms/u/s!Am93l3qEx-D_hJVt9qwUVrxYwHvG3w

extract the zip folder to your desktop and install everything one by one like in this Guide.

Install Python2.7 and Python3.... neccesary for flashtools

1. Set up ADB

copy the adb folder to C:/ you can start it with a command window (cmd)

use cd.. (location back ) and cd (location up) to browse to it.

it has to look like

C:\>cd adb

C:\adb>

2. set up QPST/QFIL Qualcomm Flashtool

-Start the.exe file in QPST.2.7.460 folder.

-accept the terms

-dont change the install path . (

-choose complete installation

-install

- you have to browse to the QFIL.exe in C:\Program Files (x86)\Qualcomm\QPST\bin , best would be to make shortcut for it on the desktop.

it will look like this:

[IMG="qfil1"]https://xdaforums.com/attachment.php?attachmentid=4472344&d=1523366247[/IMG]

4. How to use it:

We need to reboot to edl (emergency download mode) use flashtools.

you can easy reboot to it via adb, use:

adb shell
reboot edl

have trouble, phone dont boot, look at part 5 of this guide

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

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

Load XML:

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

you can press the "download content"

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

here:

[IMG="qfil"]https://xdaforums.com/attachment.php?attachmentid=4472310&d=1523364436[/IMG]

Drivers

we need to use the Qualcomm HS-USB QDLoader 9008

in the downloaded zip is the driver , just install it .

this will install:

HS-USB QDLoader 9008 and Qualcomm HS-USB Diagnostics 900E

for Flashing we only need the HS-USB QDLoader 9008.

[IMG="driver"]https://xdaforums.com/attachment.php?attachmentid=4472302&d=1523364371[/IMG]

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

4. How to Unlock Bootloader

enable USB Debugging in Developer Settings and OEM UNLOCK BOOTLOADER

(to enable it go to settings/system/about and tap 7 times on the Build number .

that enables Developer Settings in settings/system .)

plug in the phone cable and open a cmd

go to the adb folder ( c:/adb)

and input

adb shell

(a Notification will pop up on the phone, apply it)

then input

reboot bootloader

phone will reboot to bootloader.

Now input

fastboot flashing unlock

and apply the unlock on your phone with the volume and power button.

You will get a warranty notification by each boot now. thats normal

The Reason to unlock the bootloader is that we can flash custom roms or kernels/recovery etc...

Notice: the bootloader itself (in the current state) dont allow fastboot commands, we will all do with QFIL flashtool.

Unlocking your bootloader will wipe the userdata , all your stuff will be gone. make a backup of your pictures/musik etc first

[IMG="unlock"]https://dl.xda-developers.com/thumbs/4/4/7/2/3/1/5/4472315.jpg[/IMG]

Enter Recovery

to Reboot to recovery there are no button Commands , so we can only have access to recovery by

booting to bootloader and choose recovery or via adb

adb shell
reboot bootloader

or

reboot recovery

you will see an android with a red icon. now hold power and press vol+ .

if that dont work, press power and vol- for togehter for ~3seconds and slide from vol- to vol+ and back to vol- while holding power button.

[IMG="recovery"]https://xdaforums.com/attachment.php?attachmentid=4472327&d=1523365037[/IMG]

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

5. how to solve a bootloop, not booting phone.

the U Pro is very hard to brick. nearly not possible.

with this method you can always go back to the EDL Mode and flash a Stock Rom.

open your device manager and connect your phone to your pc.

hold power vol- and vol+ togehter as long as the phone vibrates.

in device manager you will see the HS-USB QDLoader 9008 driver. then use flashtool to flash a Stock Rom.

if you see the HS-USB Diagnostics 900E make the procedure again, hold power vol- and vol+......

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

6. some infos about the phone ( Developer only)

there is no recovery images . its merged in the boot.img

also with the new Android 8.0 and project Treble we have A/B partitions

ls -l /dev/block/platform/soc/c0c4000.sdhci/by-name

lrwxrwxrwx 1 root root 21 1970-01-08 10:22 abl_a -> /dev/block/mmcblk0p32
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 abl_b -> /dev/block/mmcblk0p33
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 apdp -> /dev/block/mmcblk0p36
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 bluetooth_a -> /dev/block/mmcblk0p45
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 bluetooth_b -> /dev/block/mmcblk0p46
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 boot_a -> /dev/block/mmcblk0p12
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 boot_b -> /dev/block/mmcblk0p13
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 cmnlib64_a -> /dev/block/mmcblk0p21
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 cmnlib64_b -> /dev/block/mmcblk0p23
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 cmnlib_a -> /dev/block/mmcblk0p20
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 cmnlib_b -> /dev/block/mmcblk0p22
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 ddr -> /dev/block/mmcblk0p43
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 devcfg_a -> /dev/block/mmcblk0p57
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 devcfg_b -> /dev/block/mmcblk0p58
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 devinfo -> /dev/block/mmcblk0p35
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 dip -> /dev/block/mmcblk0p34
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 dpo -> /dev/block/mmcblk0p38
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 dsp_a -> /dev/block/mmcblk0p30
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 dsp_b -> /dev/block/mmcblk0p31
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 factory -> /dev/block/mmcblk0p48
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 factorybak -> /dev/block/mmcblk0p49
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 frp -> /dev/block/mmcblk0p59
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 fsc -> /dev/block/mmcblk0p50
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 fsg -> /dev/block/mmcblk0p11
lrwxrwxrwx 1 root root 20 1970-01-08 10:22 hyp_a -> /dev/block/mmcblk0p7
lrwxrwxrwx 1 root root 20 1970-01-08 10:22 hyp_b -> /dev/block/mmcblk0p8
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 keymaster_a -> /dev/block/mmcblk0p18
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 keymaster_b -> /dev/block/mmcblk0p19
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 keystore -> /dev/block/mmcblk0p56
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 limits -> /dev/block/mmcblk0p40
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 logdump -> /dev/block/mmcblk0p60
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 logfs -> /dev/block/mmcblk0p42
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 mdtp_a -> /dev/block/mmcblk0p26
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 mdtp_b -> /dev/block/mmcblk0p27
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 mdtpsecapp_a -> /dev/block/mmcblk0p24
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 mdtpsecapp_b -> /dev/block/mmcblk0p25
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 misc -> /dev/block/mmcblk0p55
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 modem_a -> /dev/block/mmcblk0p28
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 modem_b -> /dev/block/mmcblk0p29
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 modemst1 -> /dev/block/mmcblk0p52
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 modemst2 -> /dev/block/mmcblk0p53
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 msadp -> /dev/block/mmcblk0p37
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 persist -> /dev/block/mmcblk0p54
lrwxrwxrwx 1 root root 20 1970-01-08 10:22 pmic_a -> /dev/block/mmcblk0p9
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 pmic_b -> /dev/block/mmcblk0p10
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 prodinfo -> /dev/block/mmcblk0p47
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 rawdump -> /dev/block/mmcblk0p63
lrwxrwxrwx 1 root root 20 1970-01-08 10:22 rpm_a -> /dev/block/mmcblk0p5
lrwxrwxrwx 1 root root 20 1970-01-08 10:22 rpm_b -> /dev/block/mmcblk0p6
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 sec -> /dev/block/mmcblk0p44
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 splash -> /dev/block/mmcblk0p39
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 ssd -> /dev/block/mmcblk0p51
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 sti -> /dev/block/mmcblk0p61
lrwxrwxrwx 1 root root 21 19
70-01-08 10:22 storsec -> /dev/block/mmcblk0p62
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 system_a -> /dev/block/mmcblk0p14
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 system_b -> /dev/block/mmcblk0p15
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 toolsfv -> /dev/block/mmcblk0p41
lrwxrwxrwx 1 root root 20 1970-01-08 10:22 tz_a -> /dev/block/mmcblk0p3
lrwxrwxrwx 1 root root 20 1970-01-08 10:22 tz_b -> /dev/block/mmcblk0p4
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 userdata -> /dev/block/mmcblk0p66
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 vbmeta_a -> /dev/block/mmcblk0p64
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 vbmeta_b -> /dev/block/mmcblk0p65
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 vendor_a -> /dev/block/mmcblk0p16
lrwxrwxrwx 1 root root 21 1970-01-08 10:22 vendor_b -> /dev/block/mmcblk0p17
lrwxrwxrwx 1 root root 20 1970-01-08 10:22 xbl_a -> /dev/block/mmcblk0p1
lrwxrwxrwx 1 root root 20 1970-01-08 10:22 xbl_b -> /dev/block/mmcblk0p2

sector and start adress for making rawprogram_unsparse.xml ( i made a full one already,its in my stock rom 20180227 thread)

Number Start End Size File system Name Flags
1 131072s 138239s 7168s xbl_a
2 138240s 145407s 7168s xbl_b
3 145408s 153599s 8192s tz_a
4 153600s 161791s 8192s tz_b
5 161792s 162815s 1024s rpm_a
6 162816s 163839s 1024s rpm_b
7 163840s 164863s 1024s hyp_a
8 164864s 165887s 1024s hyp_b
9 165888s 166911s 1024s pmic_a
10 166912s 167935s 1024s pmic_b
11 167936s 172031s 4096s fsg
12 262144s 393215s 131072s boot_a
13 393216s 524287s 131072s boot_b
14 524288s 6815743s 6291456s ext4 system_a
15 6815744s 13107199s 6291456s ext4 system_b
16 13107200s 14745599s 1638400s ext4 vendor_a
17 14745600s 16383999s 1638400s ext4 vendor_b
18 16384000s 16386047s 2048s keymaster_a
19 16386048s 16388095s 2048s keymaster_b
20 16388096s 16390143s 2048s cmnlib_a
21 16390144s 16392191s 2048s cmnlib64_a
22 16392192s 16394239s 2048s cmnlib_b
23 16394240s 16396287s 2048s cmnlib64_b
24 16396288s 16404479s 8192s mdtpsecapp_a
25 16404480s 16412671s 8192s mdtpsecapp_b
26 16412672s 16478207s 65536s mdtp_a
27 16478208s 16543743s 65536s mdtp_b
28 16543744s 16769023s 225280s fat16 modem_a
29 16769024s 16994303s 225280s fat16 modem_b
30 16994304s 17027071s 32768s ext4 dsp_a
31 17027072s 17059839s 32768s ext4 dsp_b
32 17059840s 17061887s 2048s abl_a
33 17061888s 17063935s 2048s abl_b
34 17063936s 17065983s 2048s dip
35 17065984s 17065991s 8s devinfo
36 17065992s 17066503s 512s apdp
37 17066504s 17067015s 512s msadp
38 17067016s 17067017s 2s dpo
39 17067024s 17133871s 66848s splash
40 17133872s 17133879s 8s limits
41 17133880s 17135927s 2048s toolsfv
42 17170432s 17186815s 16384s logfs
43 17301504s 17303551s 2048s ddr
44 17303552s 17303583s 32s sec
45 17303584s 17305631s 2048s bluetooth_a
46 17305632s 17307679s 2048s bluetooth_b
47 17432576s 17436671s 4096s prodinfo
48 17436672s 17457151s 20480s ext4 factory
49 17457152s 17477631s 20480s ext4 factorybak
50 17477632s 17477633s 2s fsc
51 17477640s 17477655s 16s ssd
52 17477656s 17481751s 4096s modemst1
53 17481752s 17485847s 4096s modemst2
54 17485848s 17551383s 65536s ext4 persist
55 17551384s 17553431s 2048s misc
56 17553432s 17554455s 1024s keystore
57 17554456s 17556503s 2048s devcfg_a
58 17556504s 17558551s 2048s devcfg_b
59 17558552s 17559575s 1024s frp
60 17559576s 17690647s 131072s logdump
61 17690648s 17694743s 4096s sti
6
2 17825792s 17826047s 256s storsec
63 17956864s 18219007s 262144s rawdump
64 18219008s 18219135s 128s vbmeta_a
65 18219136s 18219263s 128s vbmeta_b
66 18350080s 244277214s 225927135s userdata

cat /proc/cmdline

rcupdate.rcu_expedited=1 console=ttyMSM0,115200,n8 androidboot.console=ttyMSM0 earlycon=msm_serial_dm,0xc170000 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 sched_enable_hmp=1 sched_enable_power_aware=1 service_locator.enable=1 swiotlb=1 androidboot.configfs=true androidboot.usbcontroller=a800000.dwc3 buildvariant=user veritykeyid=id:7e4333f9bba00adfe0ede979e28ed1920492b40f root=/dev/dm-0 dm="system none ro,0 1 android-verity /dev/mmcblk0p15" androidboot.verifiedbootstate=orange androidboot.keymaster=1 androidboot.veritymode=enforcing androidboot.bootdevice=c0c4000.sdhci androidboot.serialno=A208DDBK0402 androidboot.isn=A208DDBK0402 androidboot.baseband=sdm mdss_mdp.panel=1:dsi:0:qcom,mdss_dsi_sw43404_amoled_fhd_video:config0:1:none:cfg:single_dsi androidboot.slot_suffix=_b skip_initramfs rootwait ro init=/init

need something else, then write me a pm

enjoy.