[Guide] Root your Elephone U Pro Manual - Miscellaneous Android Development

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) @Maherabed1986 @lKinder_Bueno @dypak and me @skeleton1911 .
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 )
Took the last OTA 20180227 Build and extracted the payload.bin (in it are all images etc.) Surprise
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.
Code:
[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:
Code:
adb shell
Code:
reboot bootloader
and
Code:
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
Code:
adb shell
Code:
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
Code:
C:\>cd adb
we need to reboot the phone to the EDL mode (emergency download mode) to use the Flashtool :
Code:
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
if the driver is fine, open the QPST/QFIL FLashtool in
Code:
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
Code:
adb shell
reboot bootloader
then
Code:
fastboot flash boot_a boot.img
and
Code:
fastboot flash boot_b boot.img
thats all.
easy to do
after install magisk manager to activate root

maybe some of you are interested in the partitions and sectors of the U pro to take out a dump or make a rawprogram_unparse.xml for a fullrom
i took them out with adb for you :
Code:
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
Code:
[SIZE="3"]1|U_Pro:/ # ls -l /dev/block/platform/soc/c0c4000.sdhci/by-name
total 0
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[/SIZE]

Great job buddy very clear explaining
Wish you the best as always

skeleton1911 said:
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) @Maherabed1986 @lKinder_Bueno @dypak and me @skeleton1911 .
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 )
Took the last OTA 20180227 Build and extracted the payload.bin (in it are all images etc.) Surprise
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.
Code:
[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
5. python-2.7.13.amd64
6. patched_boot.img
7.ADB
Uploaded all here: https://androidfilehost.com/?fid=673956719939832819
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 dont need an unlocked bootloader.
If you unlocked the bootloader already and dont locked it again the flashtool will do it , that could wipe all 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.
1. install ADB . (newest ADB files are in the zip) . copy the "adb" folder to C:/
2. install the QPST/QFIL Flashtool
3. install python 2.7.13
4. install Qualcomm Drivers
-----------------------------------------------------------------
Connect your phone to pc
when all is installed open a command (cmd) and go to your adb folder
Code:
C:\>cd adb
we need to reboot the phone to the EDL mode (emergency download mode) to use the Flashtool :
Code:
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
if the driver is fine, open the QPST/QFIL FLashtool in
Code:
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.
Click to expand...
Click to collapse
Hello skeleton
Thanks for the perfect job!
May you can help me, I've done all steps and all went fine except after magisk manager installation I've to choose download zip only or patch boot.img. I tried both but only download is for twrp and patching boot.img I can only patch it on as card ?
What's the next step ?

Laptapper said:
Hello skeleton
Thanks for the perfect job!
May you can help me, I've done all steps and all went fine except after magisk manager installation I've to choose download zip only or patch boot.img. I tried both but only download is for twrp and patching boot.img I can only patch it on as card ?
What's the next step ?
Click to expand...
Click to collapse
In magisk manager tap on install , a new window pops up. Choose directly install.
That's all. After it downloaded and flashed the file you can reboot.
Wait.
Do you see direct install?
Gesendet von meinem U_Pro mit Tapatalk

No I didn't see direct install
---------- Post added at 10:36 AM ---------- Previous post was at 10:32 AM ----------
skeleton1911 said:
In magisk manager tap on install , a new window pops up. Choose directly install.
That's all. After it downloaded and flashed the file you can reboot.
Wait.
Do you see direct install?
Gesendet von meinem U_Pro mit Tapatalk
Click to expand...
Click to collapse
No I didn't see direct install.

Laptapper said:
No I didn't see direct install
---------- Post added at 10:36 AM ---------- Previous post was at 10:32 AM ----------
No I didn't see direct install.
Click to expand...
Click to collapse
What build number you are on?
You are on 20180227 build?
If so. Flash the boot.img again. And reboot.
Gesendet von meinem U_Pro mit Tapatalk

Success! I have gotten my UPro rooted! Thanks so much Skeleton! I'm new to it, I did something wrong at my first attempt, the flushing stopped, wrong path
on my pc or something, but it gave me a scare when I had to enter like, x10 a pin and at some point there was some warnings that the phone will be locked out after 9 more trials. I've managed to shut it off and go manually to recovery and do factory reset. The second time was the charm, the end of the flushing hangs on some error(as you predicted) and then this big relief, the phone comes to life!
https://drive.google.com/file/d/1RYP40jVhYsQXAu8ZBxz_zrByGxEIXtzw/view?usp=sharing

mzsquared said:
Success! I have gotten my UPro rooted! Thanks so much Skeleton! I'm new to it, I did something wrong at my first attempt, the flushing stopped, wrong path
on my pc or something, but it gave me a scare when I had to enter like, x10 a pin and at some point there was some warnings that the phone will be locked out after 9 more trials. I've managed to shut it off and go manually to recovery and do factory reset. The second time was the charm, the end of the flushing hangs on some error(as you predicted) and then this big relief, the phone comes to life!
https://drive.google.com/file/d/1RYP40jVhYsQXAu8ZBxz_zrByGxEIXtzw/view?usp=sharing
Click to expand...
Click to collapse
yep . that it hangs at the end of the flashtool is normal. because i left the patch0.xml empty...
also you didnt reboot to recovery. just enter the password . 10 times and phone display. please reboot info. after that another 10 times. phone displays a reboot info. after that it shows that it will reboot itself and delete userdata after another 10 times .... that is not part of my mistaken. its because of googles protection laws....

skeleton1911 said:
In magisk manager tap on install , a new window pops up. Choose directly install.
That's all. After it downloaded and flashed the file you can reboot.
Wait.
Do you see direct install?
Gesendet von meinem U_Pro mit Tapatalk
Click to expand...
Click to collapse
I used Total Commander from Google Play, had MagiskAPK on mu sd card, Total Commander asks for permission to install "other sources app" and it's done.

mzsquared said:
I used Total Commander from Google Play, had MagiskAPK on mu sd card, Total Commander asks for permission to install "other sources app" and it's done.
Click to expand...
Click to collapse
thanks. but thats not the problem of @Laptapper.
i think he is not on the latest build. because we have _a and _b system.
the latest build is on _b . also the root is only in _b
he could use cmd and adb in bootlader mode
fastboot set_active b
Setting current slot to 'b'...
but that will not work . the bootloader in the u pro is a bit strange. tested many things

Did u finally get root?
---------- Post added at 09:40 PM ---------- Previous post was at 09:37 PM ----------
skeleton1911 said:
thanks. but thats not the problem of @Laptapper.
i think he is not on the latest build. because we have _a and _b system.
the latest build is on _b . also the root is only in _b
he could use cmd and adb in bootlader mode
fastboot set_active b
Setting current slot to 'b'...
but that will not work . the bootloader in the u pro is a bit strange. tested many things
Click to expand...
Click to collapse
Same boat. I could not get root.

abbas said:
Did u finally get root?
---------- Post added at 09:40 PM ---------- Previous post was at 09:37 PM ----------
Same boat. I could not get root.
Click to expand...
Click to collapse
Strange . For many users it works. For some not.
One user told me that he installed the ota with the fota app.
And then he flashed the ota.zip again. So he did installed it twice.
For him the root also don't work.
So maybe _a and _b partitions are the same now.
And the system is running in _a partition now.
The root only goes to _b partition.
That could be an explaining for it..
Also can you send me the Qfil log ?

skeleton1911 said:
Strange . For many users it works. For some not.
One user told me that he installed the ota with the fota app.
And then he flashed the ota.zip again. So he did installed it twice.
For him the root also don't work.
So maybe _a and _b partitions are the same now.
And the system is running in _a partition now.
The root only goes to _b partition.
That could be an explaining for it..
Also can you send me the Qfil log ?
Click to expand...
Click to collapse
Thanks for your help. This is my log
Validating Application Configuration
Load APP Configuration
COM:-1
PBLDOWNLOADPROTOCOL:0
PROGRAMMER:True
PROGRAMMER:C:\Users\abbas\Desktop\boot_b_root__QPST\prog_emmc_ufs_firehose_Sdm660_ddr.elf
RESETSAHARASTATEEMACHINE:False
SEARCHPATH:C:\Users\abbas\Desktop\boot_b_root__QPST
RAWPROGRAM:
rawprogram_unsparse.xml
PATCH:
patch0.xml
ACKRAWDATAEVERYNUMPACKETS:False
ACKRAWDATAEVERYNUMPACKETS:100
MAXPAYLOADSIZETOTARGETINBYTES:False
MAXPAYLOADSIZETOTARGETINBYTES:49152
DEVICETYPE:eMMC
PLATFORM:8x26
VALIDATIONMODE:0
RESETAFTERDOWNLOAD:False
MAXDIGESTTABLESIZE:8192
SWITCHTOFIREHOSETIMEOUT:30
RESETTIMEOUT:200
RESETDELAYTIME:2
FLATBUILDPATH:C:\
FLATBUILDFORCEOVERRIDE:True
QCNPATH:C:\Temp\00000000.qcn
QCNAUTOBACKUPRESTORE:False
SPCCODE:000000
ENABLEMULTISIM:False
AUTOPRESERVEPARTITIONS:False
PARTITIONPRESERVEMODE:0
PRESERVEDPARTITIONS:0
PRESERVEDPARTITIONS:
ERASEALL:False
Load ARG Configuration
Validating Download Configuration
Image Search Path: C:\Users\abbas\Desktop\boot_b_root__QPST
RAWPROGRAM file path: C:\Users\abbas\Desktop\boot_b_root__QPST\rawprogram_unsparse.xml
PATCH file path:C:\Users\abbas\Desktop\boot_b_root__QPST\patch0.xml
Programmer Path:C:\Users\abbas\Desktop\boot_b_root__QPST\prog_emmc_ufs_firehose_Sdm660_ddr.elf
Process Index:0
Image Search Path: C:\Users\abbas\Desktop\boot_b_root__QPST
RAWPROGRAM file path: C:\Users\abbas\Desktop\boot_b_root__QPST\rawprogram_unsparse.xml
PATCH file path:C:\Users\abbas\Desktop\boot_b_root__QPST\patch0.xml
Start Download
Program Path:C:\Users\abbas\Desktop\boot_b_root__QPST\prog_emmc_ufs_firehose_Sdm660_ddr.elf
***** Working Folder:C:\Users\abbas\AppData\Roaming\Qualcomm\QFIL\COMPORT_10
Binary build date: Oct 31 2016 @ 22:51:05
QSAHARASERVER CALLED LIKE THIS: 'C:\Program Files (x86)\Qualcomm\QPST\bin\QSaharaServer.ex'Current working dir: C:\Users\abbas\AppData\Roaming\Qualcomm\QFIL\COMPORT_10
Sahara mappings:
2: amss.mbn
6: apps.mbn
8: dsp1.mbn
10: dbl.mbn
11: osbl.mbn
12: dsp2.mbn
16: efs1.mbn
17: efs2.mbn
20: efs3.mbn
21: sbl1.mbn
22: sbl2.mbn
23: rpm.mbn
25: tz.mbn
28: dsp3.mbn
29: acdb.mbn
30: wdt.mbn
31: mba.mbn
13: C:\Users\abbas\Desktop\boot_b_root__QPST\prog_emmc_ufs_firehose_Sdm660_ddr.elf
22:52:17: Requested ID 13, file: "C:\Users\abbas\Desktop\boot_b_root__QPST\prog_emmc_ufs_firehose_Sdm660_ddr.elf"
22:52:18: 629284 bytes transferred in 0.313000 seconds (1.9174MBps)
22:52:18: File transferred successfully
22:52:18: Sahara protocol completed
Sending Programmer Finished
Switch To FireHose
Wait for 3 seconds...
Max Payload Size to Target:49152 Bytes
Device Type:eMMC
Platform:8x26
Disable Ack Raw Data Every N Packets
Skip Write:False
Always Validate:False
Use Verbose:False
***** Working Folder:C:\Users\abbas\AppData\Roaming\Qualcomm\QFIL\COMPORT_10
Base Version: 16.10.28.15.28
Binary build date: Oct 31 2016 @ 22:51:02
Incremental Build version: 16.10.31.22.51.02
22:52:22: INFO: FH_LOADER WAS CALLED EXACTLY LIKE THIS
************************************************
C:\Program Files (x86)\Qualcomm\QPST\bin\fh_loader.exe --port=\\.\COM10 --sendxml=rawprogram_unsparse.xml --search_path=C:\Users\abbas\Desktop\boot_b_root__QPST --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=emmc
************************************************
22:52:22: INFO: Current working dir (cwd): C:\Users\abbas\AppData\Roaming\Qualcomm\QFIL\COMPORT_10\
22:52:22: INFO: Showing network mappings to allow debugging
22:52:22: INFO:
22:52:22: INFO: Trying to store 'rawprogram_unsparse.xml' in string table
22:52:22: INFO: Looking for file 'rawprogram_unsparse.xml'
22:52:22: INFO: User wants to talk to port '\\.\COM10'
22:52:22: INFO: Took 0.00000000 seconds to open port
22:52:22: INFO: Sorting TAGS to ensure order is <configure>,<erase>, others, <patch>,<power>
22:52:22: INFO: If you don't want this, use --dontsorttags
22:52:22: INFO: Looking for file 'boot.img'
22:52:22: INFO:
Total to be tansferd with <program> or <read> is 47.79 MB
22:52:22: INFO: Sending <configure>
22:52:22: INFO: TARGET SAID: 'UFS DEVICE RESET'
22:52:22: INFO: TARGET SAID: 'Binary build date: Dec 8 2017 @ 13:33:11'
22:52:22: INFO: TARGET SAID: 'Chip serial num: 0 (0x0)'
22:52:22: INFO: TARGET SAID: 'Supported Functions: program configure nop firmwarewrite patch setbootablestoragedrive ufs emmc power benchmark read getstorageinfo getsha256digest erase peek poke '
22:52:22: INFO: TARGET SAID: 'Calling usb_al_bulk_set_zlp_mode(TRUE) since ZlpAwareHost='1''
22:52:22: INFO: fh.attrs.MaxPayloadSizeToTargetInBytes = 1048576
22:52:22: INFO: fh.attrs.MaxPayloadSizeToTargetInBytesSupported = 1048576
22:52:22: INFO: In handleProgram('boot.img')
22:52:22: INFO: Looking for file 'boot.img'
22:52:22: INFO: =======================================================
22:52:22: INFO: {<program> FILE: 'C:\Users\abbas\Desktop\boot_b_root__QPST\boot.img'}
22:52:22: INFO: {<program> (47.79 MB) 97883 sectors needed at location 393216 on LUN 0}
22:52:22: INFO: =======================================================
22:52:23: INFO: TARGET SAID: 'start 393216, num 97883'
22:52:24: INFO: Overall to target 1.391 seconds (34.36 MBps)
22:52:24: INFO: {percent files transferred 100.00%}
22:52:24: INFO: TARGET SAID: 'Finished programming start_sector 491099 and TotalSectorsToProgram 97883'
22:52:24: INFO:
22:52:24: INFO: =======================================================
22:52:24: INFO: ==================== {SUCCESS} ========================
22:52:24: INFO: =======================================================
22:52:24: INFO: {percent files transferred 100.00%}
22:52:24: INFO: ==============================================================
22:52:24: INFO: Files used and their paths
22:52:24: INFO: 1 'C:\Users\abbas\AppData\Roaming\Qualcomm\QFIL\COMPORT_10\port_trace.txt'
22:52:24: INFO: 2 'C:\Users\abbas\Desktop\boot_b_root__QPST\rawprogram_unsparse.xml'
22:52:24: INFO: 3 'C:\Users\abbas\Desktop\boot_b_root__QPST\boot.img'
22:52:24: INFO: _ (done)
22:52:24: INFO: | |
22:52:24: INFO: __| | ___ _ __ ___
22:52:24: INFO: / _` |/ _ \| '_ \ / _ \
22:52:24: INFO: | (_| | (_) | | | | __/
22:52:24: INFO: \__,_|\___/|_| |_|\___|
22:52:24: INFO: {All Finished Successfully}
22:52:24: INFO: Overall to target 1.657 seconds (28.84 MBps)
22:52:24: INFO: {percent files transferred 100.00%}
Writing log to 'C:\Users\abbas\AppData\Roaming\Qualcomm\QFIL\COMPORT_10\port_trace.txt', might take a minute
Log is 'C:\Users\abbas\AppData\Roaming\Qualcomm\QFIL\COMPORT_10\port_trace.txt'
***** Working Folder:C:\Users\abbas\AppData\Roaming\Qualcomm\QFIL\COMPORT_10
Base Version: 16.10.28.15.28
Binary build date: Oct 31 2016 @ 22:51:02
Incremental Build version: 16.10.31.22.51.02
22:52:27: INFO: FH_LOADER WAS CALLED EXACTLY LIKE THIS
************************************************
C:\Program Files (x86)\Qualcomm\QPST\bin\fh_loader.exe --port=\\.\COM10 --sendxml=patch0.xml --search_path=C:\Users\abbas\Desktop\boot_b_root__QPST --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=emmc
************************************************
22:52:27: INFO: Current working dir (cwd): C:\Users\abbas\AppData\Roaming\Qualcomm\QFIL\COMPORT_10\
22:52:27: INFO: Showing network mappings to allow debugging
22:52:28: INFO:
22:52:28: INFO: Trying to store 'patch0.xml' in string table
22:52:28: INFO: Looking for file 'patch0.xml'
_____
| ___|
| |__ _ __ _ __ ___ _ __
| __| '__| '__/ _ \| '__|
| |__| | | | | (_) | |
\____/_| |_| \___/|_|
22:52:28: {ERROR: XML packet not formed correctly. Ran out of room looking for TAG}
_____
| ___|
| |__ _ __ _ __ ___ _ __
| __| '__| '__/ _ \| '__|
| |__| | | | | (_) | |
\____/_| |_| \___/|_|
22:52:28: {ERROR: XML is not formatted correctly. Could not find closing />
}
Writing log to 'C:\Users\abbas\AppData\Roaming\Qualcomm\QFIL\COMPORT_10\port_trace.txt', might take a minute
Log is 'C:\Users\abbas\AppData\Roaming\Qualcomm\QFIL\COMPORT_10\port_trace.txt'
Download Fail:FireHose Fail:FHLoader Failrocess fail
Finish Download

skeleton1911 said:
thanks. but thats not the problem of @Laptapper.
i think he is not on the latest build. because we have _a and _b system.
the latest build is on _b . also the root is only in _b
he could use cmd and adb in bootlader mode
fastboot set_active b
Setting current slot to 'b'...
but that will not work . the bootloader in the u pro is a bit strange. tested many things
Click to expand...
Click to collapse
Hello skeleton
Many thanks for your private chat support! I've tried a lot of things alone but only in case of your know-how to get a bricked phone working again.
I've got root now :highfive:
For me it's clear now that the problem was in my manually update of the full it's file. The phone has booted alone after the update and so I think it changed from image a to b.
I've done the update again and it has booted again.
Then I've removed all flashing software from Windows 10 and deleted old drivers. Complete clean up with registry clean with temp clean........
Then I've installed all of your tools again except python , here I took python 3 (by the way: we've talked about my short flashing time.....it was exactly short as before).
So may be also python could be the problem before but I guess it was the full ota.
Anyway ....for those who had problems like me try to flash the ota again (if before was done) or because better AND clean up all and then try again.
Many thanks again to the elephone u pro conqueror skeleton
Hopefully he will go further on with a full rom with twrp. And for this I've send him some dollars and I'll hope the other users will do it like me.

Laptapper said:
Hello skeleton
Many thanks for your private chat support! I've tried a lot of things alone but only in case of your know-how to get a bricked phone working again.
I've got root now :highfive:
For me it's clear now that the problem was in my manually update of the full it's file. The phone has booted alone after the update and so I think it changed from image a to b.
I've done the update again and it has booted again.
Then I've removed all flashing software from Windows 10 and deleted old drivers. Complete clean up with registry clean with temp clean........
Then I've installed all of your tools again except python , here I took python 3 (by the way: we've talked about my short flashing time.....it was exactly short as before).
So may be also python could be the problem before but I guess it was the full ota.
Anyway ....for those who had problems like me try to flash the ota again (if before was done) or because better AND clean up all and then try again.
Many thanks again to the elephone u pro conqueror skeleton
Hopefully he will go further on with a full rom with twrp. And for this I've send him some dollars and I'll hope the other users will do it like me.
Click to expand...
Click to collapse
Thank you very much i appreciate it

abbas said:
Thanks for your help. This is my log
Validating Application Configuration
Load APP Configuration
COM:-1
PBLDOWNLOADPROTOCOL:0
PROGRAMMER:True
PROGRAMMER:C:\Users\abbas\Desktop\boot_b_root__QPST\prog_emmc_ufs_firehose_Sdm660_ddr.elf
RESETSAHARASTATEEMACHINE:False
SEARCHPATH:C:\Users\abbas\Desktop\boot_b_root__QPST
RAWPROGRAM:
rawprogram_unsparse.xml
PATCH:
patch0.xml
ACKRAWDATAEVERYNUMPACKETS:False
ACKRAWDATAEVERYNUMPACKETS:100
MAXPAYLOADSIZETOTARGETINBYTES:False
MAXPAYLOADSIZETOTARGETINBYTES:49152
DEVICETYPE:eMMC
PLATFORM:8x26
VALIDATIONMODE:0
RESETAFTERDOWNLOAD:False
MAXDIGESTTABLESIZE:8192
SWITCHTOFIREHOSETIMEOUT:30
RESETTIMEOUT:200
RESETDELAYTIME:2
FLATBUILDPATH:C:\
FLATBUILDFORCEOVERRIDE:True
QCNPATH:C:\Temp\00000000.qcn
QCNAUTOBACKUPRESTORE:False
SPCCODE:000000
ENABLEMULTISIM:False
AUTOPRESERVEPARTITIONS:False
PARTITIONPRESERVEMODE:0
PRESERVEDPARTITIONS:0
PRESERVEDPARTITIONS:
ERASEALL:False
Load ARG Configuration
Validating Download Configuration
Image Search Path: C:\Users\abbas\Desktop\boot_b_root__QPST
RAWPROGRAM file path: C:\Users\abbas\Desktop\boot_b_root__QPST\rawprogram_unsparse.xml
PATCH file path:C:\Users\abbas\Desktop\boot_b_root__QPST\patch0.xml
Programmer Path:C:\Users\abbas\Desktop\boot_b_root__QPST\prog_emmc_ufs_firehose_Sdm660_ddr.elf
Process Index:0
Image Search Path: C:\Users\abbas\Desktop\boot_b_root__QPST
RAWPROGRAM file path: C:\Users\abbas\Desktop\boot_b_root__QPST\rawprogram_unsparse.xml
PATCH file path:C:\Users\abbas\Desktop\boot_b_root__QPST\patch0.xml
Start Download
Program Path:C:\Users\abbas\Desktop\boot_b_root__QPST\prog_emmc_ufs_firehose_Sdm660_ddr.elf
***** Working Folder:C:\Users\abbas\AppData\Roaming\Qualcomm\QFIL\COMPORT_10
Binary build date: Oct 31 2016 @ 22:51:05
QSAHARASERVER CALLED LIKE THIS: 'C:\Program Files (x86)\Qualcomm\QPST\bin\QSaharaServer.ex'Current working dir: C:\Users\abbas\AppData\Roaming\Qualcomm\QFIL\COMPORT_10
Sahara mappings:
2: amss.mbn
6: apps.mbn
8: dsp1.mbn
10: dbl.mbn
11: osbl.mbn
12: dsp2.mbn
16: efs1.mbn
17: efs2.mbn
20: efs3.mbn
21: sbl1.mbn
22: sbl2.mbn
23: rpm.mbn
25: tz.mbn
28: dsp3.mbn
29: acdb.mbn
30: wdt.mbn
31: mba.mbn
13: C:\Users\abbas\Desktop\boot_b_root__QPST\prog_emmc_ufs_firehose_Sdm660_ddr.elf
22:52:17: Requested ID 13, file: "C:\Users\abbas\Desktop\boot_b_root__QPST\prog_emmc_ufs_firehose_Sdm660_ddr.elf"
22:52:18: 629284 bytes transferred in 0.313000 seconds (1.9174MBps)
22:52:18: File transferred successfully
22:52:18: Sahara protocol completed
Sending Programmer Finished
Switch To FireHose
Wait for 3 seconds...
Max Payload Size to Target:49152 Bytes
Device Type:eMMC
Platform:8x26
Disable Ack Raw Data Every N Packets
Skip Write:False
Always Validate:False
Use Verbose:False
***** Working Folder:C:\Users\abbas\AppData\Roaming\Qualcomm\QFIL\COMPORT_10
Base Version: 16.10.28.15.28
Binary build date: Oct 31 2016 @ 22:51:02
Incremental Build version: 16.10.31.22.51.02
22:52:22: INFO: FH_LOADER WAS CALLED EXACTLY LIKE THIS
************************************************
C:\Program Files (x86)\Qualcomm\QPST\bin\fh_loader.exe --port=\\.\COM10 --sendxml=rawprogram_unsparse.xml --search_path=C:\Users\abbas\Desktop\boot_b_root__QPST --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=emmc
************************************************
22:52:22: INFO: Current working dir (cwd): C:\Users\abbas\AppData\Roaming\Qualcomm\QFIL\COMPORT_10\
22:52:22: INFO: Showing network mappings to allow debugging
22:52:22: INFO:
22:52:22: INFO: Trying to store 'rawprogram_unsparse.xml' in string table
22:52:22: INFO: Looking for file 'rawprogram_unsparse.xml'
22:52:22: INFO: User wants to talk to port '\\.\COM10'
22:52:22: INFO: Took 0.00000000 seconds to open port
22:52:22: INFO: Sorting TAGS to ensure order is <configure>,<erase>, others, <patch>,<power>
22:52:22: INFO: If you don't want this, use --dontsorttags
22:52:22: INFO: Looking for file 'boot.img'
22:52:22: INFO:
Total to be tansferd with <program> or <read> is 47.79 MB
22:52:22: INFO: Sending <configure>
22:52:22: INFO: TARGET SAID: 'UFS DEVICE RESET'
22:52:22: INFO: TARGET SAID: 'Binary build date: Dec 8 2017 @ 13:33:11'
22:52:22: INFO: TARGET SAID: 'Chip serial num: 0 (0x0)'
22:52:22: INFO: TARGET SAID: 'Supported Functions: program configure nop firmwarewrite patch setbootablestoragedrive ufs emmc power benchmark read getstorageinfo getsha256digest erase peek poke '
22:52:22: INFO: TARGET SAID: 'Calling usb_al_bulk_set_zlp_mode(TRUE) since ZlpAwareHost='1''
22:52:22: INFO: fh.attrs.MaxPayloadSizeToTargetInBytes = 1048576
22:52:22: INFO: fh.attrs.MaxPayloadSizeToTargetInBytesSupported = 1048576
22:52:22: INFO: In handleProgram('boot.img')
22:52:22: INFO: Looking for file 'boot.img'
22:52:22: INFO: =======================================================
22:52:22: INFO: {<program> FILE: 'C:\Users\abbas\Desktop\boot_b_root__QPST\boot.img'}
22:52:22: INFO: {<program> (47.79 MB) 97883 sectors needed at location 393216 on LUN 0}
22:52:22: INFO: =======================================================
22:52:23: INFO: TARGET SAID: 'start 393216, num 97883'
22:52:24: INFO: Overall to target 1.391 seconds (34.36 MBps)
22:52:24: INFO: {percent files transferred 100.00%}
22:52:24: INFO: TARGET SAID: 'Finished programming start_sector 491099 and TotalSectorsToProgram 97883'
22:52:24: INFO:
22:52:24: INFO: =======================================================
22:52:24: INFO: ==================== {SUCCESS} ========================
22:52:24: INFO: =======================================================
22:52:24: INFO: {percent files transferred 100.00%}
22:52:24: INFO: ==============================================================
22:52:24: INFO: Files used and their paths
22:52:24: INFO: 1 'C:\Users\abbas\AppData\Roaming\Qualcomm\QFIL\COMPORT_10\port_trace.txt'
22:52:24: INFO: 2 'C:\Users\abbas\Desktop\boot_b_root__QPST\rawprogram_unsparse.xml'
22:52:24: INFO: 3 'C:\Users\abbas\Desktop\boot_b_root__QPST\boot.img'
22:52:24: INFO: _ (done)
22:52:24: INFO: | |
22:52:24: INFO: __| | ___ _ __ ___
22:52:24: INFO: / _` |/ _ \| '_ \ / _ \
22:52:24: INFO: | (_| | (_) | | | | __/
22:52:24: INFO: \__,_|\___/|_| |_|\___|
22:52:24: INFO: {All Finished Successfully}
22:52:24: INFO: Overall to target 1.657 seconds (28.84 MBps)
22:52:24: INFO: {percent files transferred 100.00%}
Writing log to 'C:\Users\abbas\AppData\Roaming\Qualcomm\QFIL\COMPORT_10\port_trace.txt', might take a minute
Log is 'C:\Users\abbas\AppData\Roaming\Qualcomm\QFIL\COMPORT_10\port_trace.txt'
***** Working Folder:C:\Users\abbas\AppData\Roaming\Qualcomm\QFIL\COMPORT_10
Base Version: 16.10.28.15.28
Binary build date: Oct 31 2016 @ 22:51:02
Incremental Build version: 16.10.31.22.51.02
22:52:27: INFO: FH_LOADER WAS CALLED EXACTLY LIKE THIS
************************************************
C:\Program Files (x86)\Qualcomm\QPST\bin\fh_loader.exe --port=\\.\COM10 --sendxml=patch0.xml --search_path=C:\Users\abbas\Desktop\boot_b_root__QPST --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=emmc
************************************************
22:52:27: INFO: Current working dir (cwd): C:\Users\abbas\AppData\Roaming\Qualcomm\QFIL\COMPORT_10\
22:52:27: INFO: Showing network mappings to allow debugging
22:52:28: INFO:
22:52:28: INFO: Trying to store 'patch0.xml' in string table
22:52:28: INFO: Looking for file 'patch0.xml'
_____
| ___|
| |__ _ __ _ __ ___ _ __
| __| '__| '__/ _ \| '__|
| |__| | | | | (_) | |
\____/_| |_| \___/|_|
22:52:28: {ERROR: XML packet not formed correctly. Ran out of room looking for TAG}
_____
| ___|
| |__ _ __ _ __ ___ _ __
| __| '__| '__/ _ \| '__|
| |__| | | | | (_) | |
\____/_| |_| \___/|_|
22:52:28: {ERROR: XML is not formatted correctly. Could not find closing />
}
Writing log to 'C:\Users\abbas\AppData\Roaming\Qualcomm\QFIL\COMPORT_10\port_trace.txt', might take a minute
Log is 'C:\Users\abbas\AppData\Roaming\Qualcomm\QFIL\COMPORT_10\port_trace.txt'
Download Fail:FireHose Fail:FHLoader Failrocess fail
Finish Download
Click to expand...
Click to collapse
Flash was fine.
look a post above . maybe thats also the solution for you

The root is good on my Upro, carved some space out on my Fat32 microSD to make Ext4 partition and it mounts with LinkSD Plus better then in Nougat where it was always little tricky. My next thing with Upro will be finding ways to extend the LTE bands, lots of threads on XDA about it to dig in.
https://drive.google.com/file/d/1MDw0itjMOznzbHDpRuHbOIFMPn0CVrXj/view?usp=sharing

skeleton1911 said:
Flash was fine.
look a post above . maybe thats also the solution for you
Click to expand...
Click to collapse
Finally done. I just reinstalled the OTA, installed Phyton 3.0.1 and voila, it is done. Thanks to everyone.

https://drive.google.com/file/d/1MDw0itjMOznzbHDpRuHbOIFMPn0CVrXj/view?usp=sharing[/QUOTE]
No Cache partition in Oreo? The storage shows the entire internal used for Cache.

Related

[INFO] ANDROID DEVICE PARTITIONS and FILESYSTEMS

NOTE:
I'm not a developer or something even near to that. I'm a newbie and will be, seems so. All information provided here is copied and compiled from different internet sources like this and many others.
This information is according to best of my knowledge and comprehension and is just for curious souls like me who want to understand things in quite simple words. It might be wrong and I will open-heartedly welcome any correction or addition from anyone.
I'm not responsible for any harm to you or your device resulting from this.
1. PARTITION TABLE
The Phone's Internal Memory (eMMC or UFS; not the SD card) is solid-state (flash) memory, aka NAND. Raw NAND, as it's called, is basically a pure flash memory dependent on CPU to control it. But in order to use flash memory just like a traditional hard drive (block device), NAND is equipped with an (embedded multimedia) micro-controller. It's called eMMC.
eMMC can be partitioned much like a hard drive on PC. PC's have traditionally been partitioned with BIOS compatible Master Boot Record (MBR) scheme in which first sector of disk contains the details of partitions called Partition Table. Limited size of boot sector (512 bytes) puts a limitation of at maximum 4 (primary) partitions listed in MBR. Extended partition has been used for 4+ partitions.
GUID Partition Table (GPT) was introduced with UEFI booting system which isn't dependent on first boot sector and hence may contain up to 128 partitions. GPT also does CRC check, has backup GPT, identifies partitions by GUID and partitions have a label.
Android devices use GPT. We can view and manipulate GPT using Linux tools such as parted and gdisk while fdisk is the traditional tool for MBR partitions.
To view partition table on internal memory:
Code:
~# parted /dev/block/mmcblk0
(parted) p free
~# gdisk -l /dev/block/mmcblk0
(The external SD Card can also be partitioned to include a section dedicated to storing user apps (like Link2SD does) or to create partitions for secondary or tertiary OS on Android device using some multiboot kernel and recovery system). Even we can put whole OS/ROM on an SD card.
2. BRIEF INTRO
Contents of Android partitions can be partially or completely modified by flashing an image (filesystem .img or executable binary or a flashable zip) to them. But we never need to modify most of them and whatever manufacturer wrote on them, resides there unmodified (read-only) for the whole of device life. A user uses only one partition /data to save personal data like photos, music etc. All the other are for device to run. There are typically in the range of 50 partitions on an Android device but only a few partitions are modified for the purpose of adding new features or upgrading the device. A custom ROM or minor upgrade is also limited to modify /boot, /system and /data partitions usually. Most of the partitions are almost intact, containing bootloaders, firmwares, settings etc. Here is a "summarized" detail to these partitions which matter to a common but interested user.
On most devices /system and /data are larger partitions (on some devices /custom or a similar partition too) covering almost 90% of eMMC. All others are smaller ones of a few KB's or MB's.
3. SoC / CHIPSET / PROCESSORS RELATED PARTITIONS
SoC is the first component when we start a PC or Mobile phone which initialzes hardware and processors and loads bootloaders in memory to bootstrap OS. It's an integrated chip containing multiple things e.g. CPU, GPU, modem, wifi etc. It varies for device manufacturers and SoC vendors (chipset plus processor).
Some partitions are specific to SoC, most of them are closed-source executable binary blobs (like aboot, sbl, rpm, tz, cmnlib, devcfg, keymaster, lksecapp and others on a Qualcomm device), loaded step-by-step by bootloaders.
MODEM or RADIO - the phone's radio
Also called baseband, it is responsible for signals and on older devices may control wifi, bluetooth, and GPS (on most newer devices, these are handled by the kernel and ROM). Upgrades are country dependent and may improve or diminish battery performance, network signal strength, and roaming capability. It is also sometimes required to have a minimum Baseband version to use a ROM so that the RIL will play nice with the Baseband.
Modem firmware is a mini-OS for the cellular radio chip which has its own processor. Firmware is a general term, firmware exists for a lot of things on phone. The wireless chip for WiFi, GPS, and Bluetooth often has a firmware as can the GPU core among other things. These firmware files are usually located inside the SYSTEM or VENDOR partition. The modem firmware is special because it has its own separate Baseband Processor (BP) so the firmware is left out of the system image in its own partition.
Modem is not an Android-specific partition. It is tied to the hardware of the phone, but the kernel has a code allowing Android to interact with the hardware. But the baseband processor (BP) - which runs modem and is responsible for all communication through mobile networks e.g. call, SMS and internet - is totally isolated from Application Processor (the one we call CPU) and is not governed by Android kernel; it runs an independent RTOS.
RIL/Radio Interface Layer
This is not a separate partition, but a part of the ROM and is like a driver for the Radio. RIL daemons provides telephony and cellular data i.e. adds phone to smartphone. There is a matching RIL for each Baseband version and you can flash it to match your Baseband after flashing a ROM. Having mismatched RIL and Baseband can range from having no effect at all, slight battery drain, loss of roaming, or even no connection to the cell network. Many ROMs keep their RIL updated to the latest. Job of the RIL is to translate all the telephony requests from the Android telephony framework and map them to the corresponding AT commands to the modem, and back again. AT set of commands is used to communicate with modem i.e. baseband processor (BP) which is a must have processor on Android devices in addition to normal CPU i.e. Application Processor (AP).
TZ (TrustZone) - used by ARM processors as an additional lock to security features. It combines user's encryption key with a hardware specific key generated by encryption processor (like TPM on Windows) to make security breaching more difficult. It can also be used to implement Trusted Execution Environment (TEE).
RPM (Resource/Power Management) which starts executing Primary/Primitive BootLoader (PBL) in BootROM - controls power to radio, modem etc.
DSP (Digital Signal Processor) - by Qualcomm to assist in things like smooth video playback (realtime media and sensors processor) as well as runs RTOS for modem
HYP (Hypervisor) - Virtual Machine Monitor, to enable Virtual Machine platform
4. BOOTLOADERS
Bootloaders - in many steps - hand over charge to kernel after loading in RAM. These are mostly standalone ELF executable files becuase at this stage no filesystem is loaded and only executable code may work. These are all closed source components on Android device, provided by SoC vendors - either built-in or as binary blobs.
SBL - Secondary bootloader loaded by SoC, loads ABOOT in memory, also provides (Emergency) Download Mode (EDL) on many devices, a Firmware Update Protocol.
ABOOT (bootloader.img or aboot.mbn file in Factory Firmware) - Applications Bootloader is the main bootloader responsible for loading kernel or recovey and fastboot - a Firmware Update Protocol - as well.
Kernelflinger is a similar bootloader on Intel devices.
Read ANDROID BOOT PROCESS to know more about bootloaders.
5. CORE AOSP PARTITIONS
BOOT - Kernel and initramfs (modern form of of ramdisk and ramfs/tmpfs)
A kernel is a layer of code that allows the OS and applications to interface with your phone's hardware. The degree to which you can access your phone's hardware features depends on the quality of code in the kernel. Several kernel code improvements give us additional features from our hardware that the stock kernel does not. When you flash a custom ROM, you automatically get a kernel. But you can also flash a standalone kernel on top of the existing one, effectively overwriting it. These days, the difference in custom kernels is less about new features and more about alternate configurations. Choosing a custom kernel is basically choosing one that works best with your ROM.
Device Tree Blob (DTB), along with hardware drivers, are baked with kernel source in boot.img. DTB is loaded by bootloader at boot time and passed to kernel so that it can discover hardware and create node points accordingly.
On a Linux system init along with scripts, binaries kernel drivers and modules (in initrd.img), kernel (vmlinuz executable) and bootloader configuration along with modules, they all reside on root or a separate partition (mounted) at /boot. While on Android, init along with a few binaries and configuration files and kernel reside in a separate partition named "boot" with a special filesystem. Boot.img is created using tools like mkbootimg after building kernel.
This is how kenrel and DTB are built:
vmlinux > Image > zImage / Image.gz > Image.gz-dtb
vmlinux: Large sized non-bootable Linux kernel (executable) with debug symbols, just an intermediate step to producing vmlinuz
vmlinux.bin: Same as vmlinux binary but with removed symbols, produced by 'objcopy'
vmlinuz: Compressed and bootable Linux kernel file; one of zImage or bzImage formats; compressed using zlib, LZMA, gzip or bzip2 etc.
zImage: Smaller format, for old kernels
bzImage: Big zImage
Image: vmlinux.bin of embedded devices
Image.gz: zImage or bzImage of embedded devices
.dts (multiple) < > .dtb (1 or more)
Converted using dtc (device tree compiler)
.dtb is appended to zImage / Image.gz i.e. zImage-dtb / Image.gz-dtb (simply concatenate)
zImage-dtb > dtb Can be extracted using split-appended-dtb
Packed as a part of kernel, "--dt" option is not needed when creating boot.img
mkbootimg --kernel *.Image.gz-dtb --ramdisk *.cpio.gz --base . . . --offset . . . --tag-address . . . --cmdline . . .
.dtb is extracted as a part of kernel by unpackbootimg
.dtb < > dtb.img
Converted using mkdtimg
dtb.img is for dtb partition or second stage of boot.img
boot.img is created by using --dt option:
mkbootimg --dt dt.img --kernel *.Image.gz --ramdisk *.cpio.gz --base . . . --offset . . . --tag-address . . . --cmdline . . .
dtb.img is extracted separately by unpackbootimg
Further Reading: Device Tree Overlays and Android Boot and Recovery Images
SYSTEM - ROM / OS
Contains system applications and libraries that have AOSP source code. During normal operation, this partition is mounted read-only; its contents change only during an OTA update or when flashing a new OS. Most ROM's don't allow root level (Admin rights in Windows) access by default. So, "rooting" is required to modify the contents of this partition. This is the actual User Interface we use on our phone i.e. system apps are installed on this partition on /system/app directory. Another important directory is /system/bin which contains executable binaries to perform each and every action by OS in background (as daemons) or by user in shell (bash) scripts or CLI (command line interface). These are native binaries (developed in C / C++ mostly) as opposed to Android apps which are developed in Java. A minimal form of Linux commands is also included in AOSP as toolbox or toybox (or user can add busybox or individual static binaries). /system/lib directory contains native libraries (shared by applications commonly) with .so extensions just like .dll on Windows.
VENDOR
This partition is replaced with a shortcut (symbolic link in fact) to /system/vendor directory. It contains system applications and libraries that do not have source code available on AOSP but added by vendors (OEM's). During normal operation, this partition is mounted read-only; its contents change only during an OTA update. It also contains SoC firmware images i.e. hardware specific libraries and binaries (OpenGL, ISP...).
Proprietary blobs (HALs) usually live in (/system)/vendor as shared libraries (.so files) which are loaded by Android binders when processes call a hardware component. HAL (hardware abstraction layer) is userspace alternative to traditional Linux's system calls for drivers and is a kind of Google's standardization for OEMs/hardware vendors, though being abandoned by mainstream Linux.
PROJECT TREBLE
In an ideal world, there should be a generic AOSP OS and a single kernel for all Android devices, not tied to hardware and vendors. But unfortunately it isn't so because unlike PC world, there is no standardization in mobile world. AOSP is heavily modified on silicon vendor (SoC) as well as phone vendor level. One of the worst outcome of this situation is almost no Long Term Support (LTS). There are delayed or none updates once the consumers have phone, making it vulnerable to security issues and missing new features. Project Treble (starting from Android-8) addresses this issue somewhat by creating a separation between hardware specific code and generic AOSP code.
Previously, phone vendors used to get AOSP code from Google, mixing it with their own cutomizations (UI, apps etc.) and the hardware specific code from SoC vendor. If a minor fix needed to be applied to AOSP code, the whole process had to be repeated because code was intermingled and fixing one thing broke the other. Google resolved this issue by specifying /vendor partition for hardware specific code, /system containing only generic code. Interaction with AOSP code will be through HIDL interfaces, thus making it possible to upgrade the both codes independently. /oem and /odm partitions were added previously for the same purpose.
USERDATA
User applications are installed in different folders under /data. Apps data (user and system) is stored in /data/data. User personal data and some apps data is stored in /data/media. /data/media is also emulated as internal SDCard at /storage/emulated and symlinked at /sdcard. Personalized and apps settings are also stored in this partition. A folder /data/dalvik contains, in simple words, extracted apps to boost loading process. Java bytecode of Android apps is converted to executable code (.odex) by Dalvik Virtual Machine, separate instance of which is launched by zygote (an Android init daemon) for every app.
This partition is not normally touched by the OTA update process. A Factory Reset wipes this partition, normally excluding /data/media i.e. personal data.
When you do a factory reset (AKA: wipe, hard reset, factory wipe, etc.), you are erasing the /data and /cache partitions. Note that a factory reset does NOT put your phone back to its factory state from an OS standpoint. OS upgrades will stay because the OS lives in /system, and that is not touched during a factory reset. So it's not a factory reset. It's a factory DATA reset actually.
RECOVERY
Holds alternate boot partition and the recovery program that lets the device boot into a recovery console for performing advanced recovery and maintenance operations. It contains a second complete Linux system i.e. independent OS, including a user-interface application, kernel and the special recovery binary that reads a package and uses its contents to update i.e. flash or wipe itself or any other partition particularly during OTA updates.
Recovery is also the most commonly used method to flash custom ROM's.
ADB sideload mode through PC is a replacement of flashing files (usually .zip) through Recovery. ADB works when phone is switched on in Recovery (or ROM). ADB/fastboot setup is to be made on PC to use this mode.
CACHE - cached (frequently accessed) data from OS usage and contains the firmware update package downloaded from server during OTA updates. Temporary holding area used by a few applications with the expectation that files can disappear at any time. Major use is by recovery and OTA updates. Recovery last_log is also written to this partition.
6. OTHER PARTITIONS
CUST - also CUSTOM or PRELOAD on some devices, it's used by stock ROM's, holding some preloaded system apps and regional settings which are installed on first use.
MISC - also FOTA on older devices
It's a tiny partition used by recovery to communicate with bootloader store away some information about what it's doing in case the device is restarted while the OTA package is being applied.
It is a boot mode selector used to pass data among various stages of the boot chain (boot into recovery mode, fastboot etc.). e.g. if it is empty (all zero), system boots normally. If it contains recovery mode selector, system boots into recovery mode.
It may also carry some necessarily required information in the form of switches to control hardware or settings related tasks such as CID (Carrier or Region ID) information and USB configurations etc.
PERSIST - contains data which shouldn't be changed after the device is shipped, e.g. DRM related files, sensor reg file (sns.reg) and calibration data of chips; wifi, bluetooth, camera etc.
Some package installers such as OpenGapps also make use of this partition to read configuration file.
EFS, MODEMST1, MODEMST2, FSG, BACKUP
These all are related to IMEI; a unique number used by GSM networks to identify and trace a mobile phone.
EFS may contain hardware info like configuration files, WiFi/BlueTooth MAC’s, IMEI (or ESN for a CDMA based device) etc.
EFS and MODEMST1 may be a single partition on some phones.
FSG (FileSystem Golden copy) and BACKUP are backups of MODEMST1 and MODEMST2 respectively. If MODEMST1 or MODEMST2 are erased (by wrong factory flashing say) and phone notices an invalid partition, FSG and BACKUP will be restored.
MODEMST1 and MODEMST2 also contains modem firmware files.
PARAM - stores a number of parameters, variables and settings of the hardware. It contains info whether MODEMST partitions are backed up or not. Also debug settings, custom ROMs flash count, current stage boot process etc.
OEM - like VENDOR, it incorporates OEM (Original Equipment Manufacturer i.e. hardware manufacturer or Mobile Phone brand) small customization (modifications) to original Android (AOSP) during OTA updates such as customized system properties values etc.
PAD - related to OEM
OTA, FOTA - OTA updates
DDR - Double Data Rate RAM
FSC - Modem FileSystem Cookies
SSD - Secure Software Download, a memory based file system for secure storage, stores some encrypted RSA keys
DEVINFO - device information including: is_unlocked (aboot), is_tampered, is_verified, charger_screen_enabled, display_panel, bootloader_version, radio_version etc. Contents of this partition are displayed by "fastboot oem device-info" command in human readable format. Before loading boot.img or recovery.img, bootloader verifies the locked state from this partition.
CONFIG/FRP/PDB - saves state of Factory Reset Protection (FRP), "Allow bootloader (OEM) unlocking" . (Developer Options), asks already associated account info. This partition is erased/reset if Factory Reset done from Settings.
DEVCFG - used by TZ for upgrades
LKSECAPP - "LK (Little Kernel) Security App", related to RPM, TZ online verification / update
LIMITS - Qualcomm Limits Management Hardware (LMh) driver in SBL writes the data in this partition to use for later reboots
SYSCFG - Qualcomm CPR (Core Power Reduction) Regulator for better performance and power saving of application processor by voltage control
DIP, MDTP - boot verification, use Qualcomm SafeSwitch technology to lock and track theft phones
CMNLIB, KEYMASTER - verified boot
SEC - contains fuse settings, mainly for secure boot (signing bootloaders for chain of trust) and oem setting
KEYSTORE - related to /data Full Disc Encryption (FDE)
MCFG - (Modem Configuration Framework) - on dual SIM devices, loads MBN (modem binary) files depending on SIM/carrier
SPLASH - splash image or boot logo which appears when device boots (at ABOOT stage).
CHGLOGO - charging screen that appears when charger is connected to powered off device.
MSADP, APDP, DPO - related to debug policies
GROW - empty for future expansion
7. FILESYSTEMS
Supported filesystems by your kernel can be viwewd by:
Code:
~# cat /proc/filesystems
Partitions with Mountable Filesystems
Following partitions are mounted during boot process:
system, vendor, odm, userdata (mounted at /data), cache, cust, persist (mounted at /persist or /mnt/vendor/persist), modem (mounted at /firmware or /vendor/firmware_mnt), dsp (mounted at /dsp or /vendor/dsp)
Modem is formatted as vfat while all others are usually ext4 or f2fs on newer devices.
All of these are listed in /fstab.* file which is processes by init. Starting with Android 8.0 (Treble release), fstab.* is moved to /vendor/etc/ and system, vendor and odm entries are included in dtb.
Other partitions don't contain a mountable filesystem. However, we may try to get an idea of the contents by reading smaller partitions e.g.:
Code:
~# cat /dev/block/bootdevice/by-name/config | strings
~# cat /dev/block/bootdevice/by-name/misc | strings
Pseudo / Virtual / in-Memory Filesystems (Kernel space)
These filesystems don't rely on a physical persistent storage but just live in RAM, to provide kernel services interfaces in user space.
rootfs (/) - mounted by kernel before calling init. More details here
sysfs (/sys) - information related to devices, populated by kernel
devpts (/dev/pts) - character device files representing slave side of pseudo terminal pairs
proc (/proc) - information related to all processes, updated as processes are started / killed
tmpfs (/dev) - all device nodes updated from sysfs, accessible from user space
configfs (/config) - intergrated with userspace sdcardfs, controls apps permissions to directories on internal/external sdcard by VOLume Daeomon, a replacement of fusefs
pstore (/sys/fs/pstore) - persistent storage, a replacement of /proc/last_kmsg, saves last kernel console messages on panic / crashes / sudden reboots, solution to volatile nature of pseudo filesystems
cgroup - cgroups manage hardware resources allocation to processes as per load
selinuxfs (/sys/fs/selinux) - implementation of Security-Enahanced Linux, a mandatory access controls (MAC) to manage file permissions, better than traditional Discretionary Access Control (DAC) mechanism (Read-Write-eXecute) of Linux
debugfs (/sys/kernel/debug) - to monitor and debug kernel space implementations from user space
tracefs (/sys/kernel/debug/tracing) - debugfs with better security
functionfs (/dev/usb-ffs/adb) - integrated with configfs, manages USB gadgets, ADB is implemented through functionfs on Android
FILESYSTEM TREE MOUNTED BY INIT: ANDROID vs. LINUX
8. Factory Firmware and Flashable ROMs:
When you flash a custom ROM, that ROM typically includes a kernel and an OS. That means the /boot and /system partitions will be modified at a minimum. Some ROMs require a clean install, so a format of the /data and /cache partitions is sometimes built into the .zip that you flash. This is essentially doing a Factory Reset.
Read here to know more about flashing partitions.
Factory Firmware contains original iamge files of almsot all important partitions. It's provided by OEM's, usually as a package which also incude a flasher software for PC. Or a general flasher software may be uses such as QFIL.
ROM Development
A ROM developer downloads AOSP source code from Google while device tree, driver binaries and kernel source code is provided by (ODM's through) OEM's, if they are generous enough. OEM's manufacture and sell devices themselves while ODM's sell to white-labelers who brand them under their own names. Original Android kernel tree is provided by Google which in turn is taken from Linux and then modified by Google for Android-specific needs.
RELATED:
An Introduction to Android Firmware
First off, don't need be like your never be a dev, lol you never know. Secondly it's a good share. Appreciated
Drivers Partition
What are partitions responsible on drivers like sound and camera,
I restored ROM using TWRP but now, Sound and Camera don't work,
any help?
saprey said:
What are partitions responsible on drivers like sound and camera,
I restored ROM using TWRP but now, Sound and Camera don't work,
any help?
Click to expand...
Click to collapse
Camera and sound are related to your rom i.e. system partition. Do factory data reset or clean install rom
Thanks, but why is my phone talking about a primary partition and a secondary partition?
Tia,
A real newbie
TommyWhite said:
Thanks, but why is my phone talking about a primary partition and a secondary partition?
Tia,
A real newbie
Click to expand...
Click to collapse
At what point talking about primary / secondary partitions? Are you creating new partitions or using some tool / app to view partitions?
Oh, I misunderstood.
It was about public storages (so whats accessible without root, right??).
It said
Public storage (primaire): /storage/emulated/0
Public storage (secondaire): /storage/94F1-34D8 (I didnt realise that was my sd card ...)
RootFs: /
System: /system
Like a said 'a real newbie'
TommyWhite said:
Oh, I misunderstood.
It was about public storages (so whats accessible without root, right??).
It said
Public storage (primaire): /storage/emulated/0
Public storage (secondaire): /storage/94F1-34D8 (I didnt realise that was my sd card ...)
RootFs: /
System: /system
Like a said 'a real newbie'
Click to expand...
Click to collapse
Something like this attachment?
mirfatif said:
Something like this attachment?
Click to expand...
Click to collapse
yes, sorry for the very late response.
While on some devices there is no bootloader partition at all and bootloader(s) resides on SoC.
Click to expand...
Click to collapse
Great post btw! With the bootloader section mentioning like the above, I have a question: I'm having a device with Snapdragon 810 SoC and wasn't able to find the bootloader partition (or at least I didn't know it has because I couldn't get it to boot into that mode). So does that mean the bootloader is on the SoC? How do I figure it out if it exists on the chip?
Hi @mirfatif , what a post! Hats off to you. By the way, where does the blobs/ HALs go when we flash a new ROM zip?
argon9898 said:
Great post btw! With the bootloader section mentioning like the above, I have a question: I'm having a device with Snapdragon 810 SoC and wasn't able to find the bootloader partition (or at least I didn't know it has because I couldn't get it to boot into that mode). So does that mean the bootloader is on the SoC? How do I figure it out if it exists on the chip?
Click to expand...
Click to collapse
Booting in bootloader (or it's equivalent; like fastboot) mode is dependent on the phone manufacturer. Though most of the hardware manufacturers allow users to access bootloader for repair/maintenance or modified boot chain, some may restrict this for Digital Rights Management or to gain forced customer loyalty , irrespective of where bootloader resides. On most phones it's a partition. You may check your partition table to know about all partitions.
azoksky said:
Hi @mirfatif , what a post! Hats off to you. By the way, where does the blobs/ HALs go when we flash a new ROM zip?
Click to expand...
Click to collapse
Thanks for mentioning. I have added this to my post. By "blolbs" you mean DTB or hardware drivers? Well AFAIK, the blobs are included in every ROM where "ROM" is boot.img and system.img at least.
A ROM developer downloads AOSP source code from Google while device tree (map of hardware components), driver binaries and kernel source code is provided by (ODM's through) OEM's, if they are generous enough. OEM's manufacture and sell devices themselves while ODM's sell to white-labelers who brand them under their own names. Original Android kernel tree is provided by Google which in turn is taken from Linux and then modified by Google for Android-specific needs. DTB and drivers are baked with kernel source in boot.img though DTB may live on a separate dtb partition as specified by AOSP (and was the proposed solution for ARM based embedded Linux devices before Android's birth) but I don't think that is widely practiced. DTB is loaded by bootloader at boot time and passed to kernel so that it can discover hardware and create node points accordingly. Proprietary blobs (HALs) usually live in (/system)/vendor as shared libraries (.so files) which are loaded by Android binders when processes call a hardware component. HAL is userspace alternative to traditional Linux's system calls for drivers and is a kind of Google's standardization for OEMs/hardware vendors.
Click to expand...
Click to collapse
Hello everyone. I tell you that one day flashing my oneplus 5 lost the wifi. The MAC address shows me the typical 02: 00: 00: 00: 00: 00 address. The way to fix it is updating the Oreo but I could never do it, it is always in bootloop, I read all the forums and there is no case, do what I always do the same. It happens in many oneplus 5. So I forgot to fix it in that way. The other thing I saw is hundreds of forums with that problem but I could not fix it either, I've been doing it for three months now. What I am trying now is to erase all the partitions except recovery or bootloader but the phone does not start anymore. What I want is to delete all the partitions associated with wifi, delete modem1, modem2, persist, fsg but nothing, I just managed to lose the imei that does not matter to me because I have back up of the efs folder and even the qcn file of the phone. I know it's a lot of work but if someone tells me that they control each partition, I could erase it, load everything from scratch and that's it. Would someone give me a hand so I can fix that damn wifi on the phone ?. Thank you.
--------------------------------------------------------------------------------------------------------------------------------------
drwxr-xr-x 2 root root 1440 1970-05-03 14:23 .
drwxr-xr-x 4 root root 1600 1970-05-03 14:23 ..
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 LOGO -> /dev/block/sde18
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 abl -> /dev/block/sde16
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 ablbak -> /dev/block/sde17
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 apdp -> /dev/block/sde31
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 bluetooth -> /dev/block/sde24
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 boot -> /dev/block/sde19
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 boot_aging -> /dev/block/sde20
lrwxrwxrwx 1 root root 15 1970-05-03 14:23 cache -> /dev/block/sda3
lrwxrwxrwx 1 root root 15 1970-05-03 14:23 cdt -> /dev/block/sdd2
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 cmnlib -> /dev/block/sde27
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 cmnlib64 -> /dev/block/sde29
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 cmnlib64bak -> /dev/block/sde30
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 cmnlibbak -> /dev/block/sde28
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 config -> /dev/block/sda12
lrwxrwxrwx 1 root root 15 1970-05-03 14:23 ddr -> /dev/block/sdd3
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 devcfg -> /dev/block/sde39
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 devinfo -> /dev/block/sde23
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 dip -> /dev/block/sde14
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 dpo -> /dev/block/sde33
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 dsp -> /dev/block/sde11
lrwxrwxrwx 1 root root 15 1970-05-03 14:23 frp -> /dev/block/sda6
lrwxrwxrwx 1 root root 15 1970-05-03 14:23 fsc -> /dev/block/sdf4
lrwxrwxrwx 1 root root 15 1970-05-03 14:23 fsg -> /dev/block/sdf3
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 fw_4g9n4 -> /dev/block/sde45
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 fw_4j1ed -> /dev/block/sde43
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 fw_4t0n8 -> /dev/block/sde46
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 fw_8v1ee -> /dev/block/sde44
lrwxrwxrwx 1 root root 15 1970-05-03 14:23 hyp -> /dev/block/sde5
lrwxrwxrwx 1 root root 15 1970-05-03 14:23 hypbak -> /dev/block/sde6
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 keymaster -> /dev/block/sde25
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 keymasterbak -> /dev/block/sde26
lrwxrwxrwx 1 root root 15 1970-05-03 14:23 keystore -> /dev/block/sda5
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 limits -> /dev/block/sde35
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 logdump -> /dev/block/sde40
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 logfs -> /dev/block/sde37
lrwxrwxrwx 1 root root 15 1970-05-03 14:23 md5 -> /dev/block/sdf5
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 mdtp -> /dev/block/sde15
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 mdtpsecapp -> /dev/block/sde12
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 mdtpsecappbak -> /dev/block/sde13
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 minidump -> /dev/block/sde47
lrwxrwxrwx 1 root root 15 1970-05-03 14:23 misc -> /dev/block/sda4
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 modem -> /dev/block/sde10
lrwxrwxrwx 1 root root 15 1970-05-03 14:23 modemst1 -> /dev/block/sdf1
lrwxrwxrwx 1 root root 15 1970-05-03 14:23 modemst2 -> /dev/block/sdf2
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 msadp -> /dev/block/sde32
lrwxrwxrwx 1 root root 15 1970-05-03 14:23 oem_dycnvbk -> /dev/block/sda7
lrwxrwxrwx 1 root root 15 1970-05-03 14:23 oem_stanvbk -> /dev/block/sda8
lrwxrwxrwx 1 root root 15 1970-05-03 14:23 param -> /dev/block/sda9
lrwxrwxrwx 1 root root 15 1970-05-03 14:23 persist -> /dev/block/sda2
lrwxrwxrwx 1 root root 15 1970-05-03 14:23 pmic -> /dev/block/sde8
lrwxrwxrwx 1 root root 15 1970-05-03 14:23 pmicbak -> /dev/block/sde9
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 recovery -> /dev/block/sde22
lrwxrwxrwx 1 root root 15 1970-05-03 14:23 reserve -> /dev/block/sdd1
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 reserve1 -> /dev/block/sda10
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 reserve2 -> /dev/block/sda11
lrwxrwxrwx 1 root root 15 1970-05-03 14:23 rpm -> /dev/block/sde1
lrwxrwxrwx 1 root root 15 1970-05-03 14:23 rpmbak -> /dev/block/sde2
lrwxrwxrwx 1 root root 15 1970-05-03 14:23 sec -> /dev/block/sde7
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 splash -> /dev/block/sde34
lrwxrwxrwx 1 root root 15 1970-05-03 14:23 ssd -> /dev/block/sda1
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 sti -> /dev/block/sde38
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 storsec -> /dev/block/sde41
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 storsecbak -> /dev/block/sde42
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 system -> /dev/block/sde21
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 toolsfv -> /dev/block/sde36
lrwxrwxrwx 1 root root 15 1970-05-03 14:23 tz -> /dev/block/sde3
lrwxrwxrwx 1 root root 15 1970-05-03 14:23 tzbak -> /dev/block/sde4
lrwxrwxrwx 1 root root 16 1970-05-03 14:23 userdata -> /dev/block/sda13
lrwxrwxrwx 1 root root 15 1970-05-03 14:23 xbl -> /dev/block/sdb1
lrwxrwxrwx 1 root root 15 1970-05-03 14:23 xblbak -> /dev/block/sdc1
thank you
This is one of the best posts that I've ever read. I'm a hobbyist and reverse engineer learn. My primary phones are Samsung S 6 7 and 8 and I've soft bricked phones them more times than I can count (but recovered) justifying it as a learning experience. Sort of like putting your hand in the fire several times and calling it a learning experience. your post opens up more questions which are great. I root all my phones and I have a fear of new security patches disguised as updates disabling what methods work last week so to speak
So if I understand finally there is a section in bootloaders which is the first bootloader that is static yet upgradable but not downgradable as you referred to like the BIOS on PCs which acts as a verification process so you can't flash downgradable security patches. Much like I've encountered with partcyborg great work on rooting the S8 snapdragon however once you upgraded to the bootloader 2 you couldn't go back to the bootloader one. This is in reference to the build, not the partition.
If someone does reply, I'd like to know can you mod a certain file and Odin in the bootloader section when flashing an update to ensure that you stay at a certain bootloader level while the other files such as AP CP and CSC remain intact from the sam mobile stock firmware.(which I assume the term combo firmware file originates)
My most recent encounters are the device and binary are not the same which I attribute to this problem.
In theory from what I understand the phone has a section that is not Factory resettable which is the NAND that contains read-only but system upgrade information? However, it can be modified by a power Superuser rooted? This obviously risking hard bricking a phone
When upgrading firmware specifically the bootloader file in Odin what file(s) {bin} are essential to the new modification patches and can those files be substituted?
Any comment is considered very helpful. Odin itself is coming out with different versions for structures (prince cosmey) for example.
I explore the system file structure often wondering what I could change or alter as simple as a 0 or 1 or a true or a false to enable or disable my ability to access what I feel I need to access.
I could buy the z3x Samprotools but it defeats my intentions to learn the details.
If you do have a suggestion on a GUI Windows-based tool it would be great. Don't know Linux just as a footnote
Once again what a great post and definition of the different sections of terminology it's just enough to educate me and confuse me at the same time keep doing what you're doing. Any tricks or tips will be very appreciated.
partitions
What are partitions responsible on drivers like sound and camera,
Curious Q.!
what about these two ?
Code:
rpm -> /dev/block/mmcblk0p2
rpmbak -> /dev/block/mmcblk0p11
my phone is MOTO-G5-PLUS (potter)
whole partition table is here:
Code:
←7←[r←[999;999H←[6n←8potter:/ # ls -l /dev/block/bootdevice/by-name
total 0
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 DDR -> /dev/block/mmcblk0p23
lrwxrwxrwx 1 root root 20 1970-08-28 23:29 aboot -> /dev/block/mmcblk0p5
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 abootbak -> /dev/block/mmcblk0p14
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 apdp -> /dev/block/mmcblk0p45
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 boot -> /dev/block/mmcblk0p37
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 cache -> /dev/block/mmcblk0p52
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 carrier -> /dev/block/mmcblk0p34
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 cid -> /dev/block/mmcblk0p32
lrwxrwxrwx 1 root root 20 1970-08-28 23:29 cmnlib -> /dev/block/mmcblk0p6
lrwxrwxrwx 1 root root 20 1970-08-28 23:29 cmnlib64 -> /dev/block/mmcblk0p7
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 cmnlib64bak -> /dev/block/mmcblk0p16
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 cmnlibbak -> /dev/block/mmcblk0p15
lrwxrwxrwx 1 root root 20 1970-08-28 23:29 devcfg -> /dev/block/mmcblk0p4
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 devcfgbak -> /dev/block/mmcblk0p13
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 dip -> /dev/block/mmcblk0p42
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 dpo -> /dev/block/mmcblk0p47
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 dsp -> /dev/block/mmcblk0p22
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 frp -> /dev/block/mmcblk0p31
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 fsc -> /dev/block/mmcblk0p20
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 fsg -> /dev/block/mmcblk0p29
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 hw -> /dev/block/mmcblk0p50
lrwxrwxrwx 1 root root 20 1970-08-28 23:29 keymaster -> /dev/block/mmcblk0p8
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 keymasterbak -> /dev/block/mmcblk0p17
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 kpan -> /dev/block/mmcblk0p36
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 limits -> /dev/block/mmcblk0p40
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 logo -> /dev/block/mmcblk0p33
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 logs -> /dev/block/mmcblk0p44
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 metadata -> /dev/block/mmcblk0p35
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 misc -> /dev/block/mmcblk0p39
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 modem -> /dev/block/mmcblk0p19
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 modemst1 -> /dev/block/mmcblk0p27
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 modemst2 -> /dev/block/mmcblk0p28
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 mota -> /dev/block/mmcblk0p41
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 msadp -> /dev/block/mmcblk0p46
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 oem -> /dev/block/mmcblk0p51
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 padA -> /dev/block/mmcblk0p48
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 persist -> /dev/block/mmcblk0p30
lrwxrwxrwx 1 root root 20 1970-08-28 23:29 prov -> /dev/block/mmcblk0p9
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 provbak -> /dev/block/mmcblk0p18
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 recovery -> /dev/block/mmcblk0p38
lrwxrwxrwx 1 root root 20 1970-08-28 23:29 rpm -> /dev/block/mmcblk0p2
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 rpmbak -> /dev/block/mmcblk0p11
lrwxrwxrwx 1 root root 20 1970-08-28 23:29 sbl1 -> /dev/block/mmcblk0p1
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 sbl1bak -> /dev/block/mmcblk0p10
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 sec -> /dev/block/mmcblk0p24
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 sp -> /dev/block/mmcblk0p49
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 ssd -> /dev/block/mmcblk0p21
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 syscfg -> /dev/block/mmcblk0p43
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 system -> /dev/block/mmcblk0p53
lrwxrwxrwx 1 root root 20 1970-08-28 23:29 tz -> /dev/block/mmcblk0p3
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 tzbak -> /dev/block/mmcblk0p12
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 userdata -> /dev/block/mmcblk0p54
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 utags -> /dev/block/mmcblk0p25
lrwxrwxrwx 1 root root 21 1970-08-28 23:29 utagsBackup -> /dev/block/mmcblk0p26
potter:/ #
GEEKOFIA said:
what about these two ?
Code:
rpm -> /dev/block/mmcblk0p2
rpmbak -> /dev/block/mmcblk0p11
my phone is MOTO-G5-PLUS (potter)
Click to expand...
Click to collapse
RPM (Resource/Power Management) or Primary BootLoader (PBL); controls power to radio, modem etc.
koler386 said:
What are partitions responsible on drivers like sound and camera,
Click to expand...
Click to collapse
Kernel and system
mirfatif said:
what about these two ?
RPM (Resource/Power Management) or Primary BootLoader (PBL); controls power to radio, modem etc.
Click to expand...
Click to collapse
I got a script from a xda thread in which OP mentioned that this script is for wiping dalvik/ART cache.
Before flashing it i decided to analyse it,what i found that it was erasing my RPM partition on mmcblk0p2.
Is it really for dalvik cache ?

[ADB | FASTBOOT | LINUX COMMANDS] BootLoader, Kernel, Recovery, ROM, Root, Backup

NOTE:
I'm not a developer or something even near to that. All information provided here is copied from different sources and according to the best of my knowledge.
I have tested this on different devices using Windows 8.1 & 10. I'll not be responsible for any harm to you or your device. It works perfectly for me. You may try it on your own risk.
Save / backup your data before performing any actions.
WHAT IS ADB/FASTBOOT
ADB and fastboot are different protocols used through PC to perform different command line operations on device through USB in ROM/Recovery and bootloader mode respectively.
Android Debugging Bridge is basically used by developers to identify and fix bugs in OS (ROM). ADB works in ROM and recovery both.
Fastboot works in bootloader mode even when phone is not switched on in Recovery or ROM or even if Android isn't installed on phone. In later case, bootloader can be accessed by certain button combination while powering on device; usually Power + Vol. Down. See here the booting process of Android devices.
Fastboot/ADB setup is to be made on PC to use this mode. ADB mode has more flexibility than fastboot as it supports more types of flashable files to be flashed. ADB also supports backing up Apps and Data. ADB/fastboot commands can be used to flash recovery and boot images. It can also flash ROMs and mods like rooting solutions and XPOSED by booting into recovery. And above all, it is the only way to unlock bootloader without which the device functionality is too limited. Read here why we need to unlock bootloader.
In bootloader mode, usually boot logo or fastboot logo appears on device screen.
SETUP
Enable USB Debugging in Settings > Developer Options. If not available, Dev. Options can be accessed by tapping 5 (or 7) times Build Number in Settings > About Phone.
Allow ADB root access in Dev. Options or SuperSU. Some commands need root.
Allow data transfer over ADB when prompted on device screen. Otherwise you might get errors like device unauthorized etc. So keep screen unlocked at first connect.
Disable MTP, PTP, UMS etc. from USB computer connection on device to avoid any interruptions.
Install Android SDK or simply install 15 Seconds ADB Setup 1.4.2. It works up to Android Lollipop (AOSP 5). Credits to Snoop05
Windows 8.1 users who got error installing this setup should first install Windows Update KB2917929.
You will have to navigate to adb folder each time you start cmd. Or setup adb to work globally. On your PC, go to System Properties > Advanced System Settings > Environment Variables. Click on New (User Variables). Variables Name: ADB ( Or anything you want). Variables Value: ;C:\adb (if installed 15 seconds setup) or ;C:\SDK\paltform-tools.
Install ADB USB Drivers for your Android Device. To do this automatically, download and run ADB Driver Installer. Connect device through USB cable and install drivers.
NOTE: Spaces in file paths don't work in adb commands. Non-English characters and languages don't work either. Also the commands are case-sensitive.
There is a long list of adb/fastboot commands to perform numerous operations. Here are a few of those being listed keeping in view certain tasks:
COMMON COMMANDS
On PC run Command Prompt as Administrator.
To check connected devices when ROM is running on phone:
Code:
adb devices
To boot into bootloader mode:
Code:
adb reboot bootloader
To check connected devices when in bootloader mode:
Code:
fastboot devices
To boot into ROM:
Code:
fastboot reboot
To boot into recovery:
Code:
fastboot reboot recovery
There are some common Linux commands which can be used in combination with these commands to perform certain operation. However, ADB | FASTBOOT is not necessarily required for these Linux commands. These can be run directly from Terminal Emulator in ROM or Custom Recovery. Some of them are given below.
UNLOCK BOOTLOADER
NOTE: Some newer devices don't allow unlocking of bootloader directly to ensure more security. Instead an official method is provided to unlock BL using PC.
Read here to know about the risks of BL unlocking.
To check the bootloader status:
Code:
fastboot oem device-info
“True” on unlocked status.
If "false", run the following to unlock:
Code:
fastboot oem unlock
However these are OEM specific commands and may differ or not work on all devices. Fastboot's own commands (which are part of AOSP source and) that can unlock bootloader allowing flashing of partitions:
Code:
fastboot flashing unlock
Allow flashing of bootloader related partitions too:
Code:
fastboot flashing unlock_critical
FORMAT DATA PARTITION
This will erase your data.
Code:
fastboot format:ext4 userdata
It can be performed on other flash partitions as well. A general syntax is 'fastboot format:FS PARTITION'
FLASH RECOVERY
Download recovery.img (specific for your device) to adb folder.
To test the recovery without permanently flashing, run the following:
Code:
fastboot boot recovery.img
On next reboot, recovery will be overwritten by previous recovery.
Or to permanently flash recovery, run:
Code:
fastboot flash recovery recovery.img
fastboot reboot recovery
Stock ROM's often tend to replace custom recovery with stock one on first reboot. That's why, booting into recovery is recommended before booting into ROM.
FLASH KERNEL
Download boot.img (specific for your device) to adb folder and run following:
Code:
fastboot flash boot boot.img
FLASH ROM
Download ROM.zip (for your device) created for fastboot i.e. with android-info.txt and android-product.txt.
To wipe your device and then to flash .zip:
Code:
fastboot -w
fastboot update </path/to/your/Rom.zip>
PASSING FASTBOOT ARGUMENTS
Fastboot supports passing options. For example, while booting a modified kernel image with FramBuffer Console support, console device and its font can be provided as option:
Code:
fastboot boot -c "console=tty0,115200 fbcon=font:VGA8x8" boot-fbcon.img
GAIN ROOT (Not recommended method. Better flash directly through custom recovery).
Root is required to modify the contents of /system. You can read here further.
Download (flashable) supersu.zip and custom or modified recovery.img (having support to flash .zip files) to adb folder and run the following:
Code:
fastboot boot recovery.img
Now once you are in recovery, adb will work instead of fastboot.
To copy files from PC to device and then to extract files, run the following:
Code:
adb push supersu.zip /tmp
adb shell /sbin/recovery --update_package=/tmp/supersu.zip
BACKUP / RESTORE APPS & DATA (From/To PC)
To backup and restore all apps and their data:
Code:
adb backup -apk -shared -all -system -f C:\backup.ab
adb restore C:\backup.ab
Read here for details.
COPY WHOLE PARTITION IMAGE (within device)
This method can be used to backup whole device e.g. to backup /data/ including /data/media/ i.e. Internal SD Card which isn't backed up by custom recovery (TWRP). Or you can get any partition image for development purpose. This method retains complete directory structure as well as file permissions, attributes and contexts.
To jump from windows command prompt to android device shell:
Code:
adb shell
These commands can also be given from Recovery Terminal instead of ADB.
To get SuperUser access (in ROM):
Code:
su
To list all available partitions or mount points on device:
Code:
cat /proc/partitions
Or go to "/dev/block/platform/" folder on device. Search for the folder having folder "by-name" inside it. It's msm_sdcc.1 (on Nokia X2). Run the following:
Code:
ls -al /dev/block/platform/*/by-name
Or simply use DiskInfo app to get partition name you want to copy. Say you want to copy /data (userdata) partition. On Nokia X2DS, it is mmcblk0p25.
To confirm:
Code:
readlink /dev/block/bootdevice/by-name/userdata
Run the following to copy partition:
Code:
dd if=/dev/block/mmcblk0p25 of=/sdcard/data.img
or
Code:
cat /dev/block/mmcblk0p25 > /sdcard/data.img
or
Code:
dd if=/dev/block/bootdevice/by-name/userdata of=/sdcard/data.img
data.img will be copied to your SD card.
It also works inversely (restore):
Code:
dd if=/sdcard/data.img of=/dev/block/mmcblk0p25
data.img from your SD card will be written to device.
Similarly you can copy system.img, boot.img or any other partition. However boot.img and other partitions may not be copied in ROM but in recovery mode only. So better use recovery for dd except if you're​ going to dd recovery partition itself. You can read here more about android partitions.
COPY WHOLE FOLDER (within device)
This method can be used to backup folders like /data/media/ which isn't backed up by custom recovery (TWRP).
To jump from windows command prompt to android device shell:
Code:
adb shell
These commands can also be given from Recovery Terminal.
To get SuperUser access (in ROM):
Code:
su
To copy from Internal Memory to SD Card:
Code:
cp -a /data/media/0/. /external_sd/internal_backup/
Or if you don't have SU permission:
Code:
cp -a /external_sd/. /sdcard/
To copy from SD Card to Internal Memory:
Code:
cp -a /external_sd/internal_backup/. /data/media/0/
However, if you are copying to an SD card with FAT32 file system, android permissions of files won't be retained and you would have to fix permissions yourself. In this case, you can use tar command to create archive of files along with their attributes ( permissions: mode & ownership + time-stamps) and security contexts etc. But FAT32 FS has also a limitations of 4GB maximum file size. You may use "split" command along with "tar" to split the archive in smaller blocks. Or use exFat or Ext4 filesystem for larger file support. Ext4 would give higher writing speed in Android but not supported in Windows i.e. SD card can't be mounted in Windows. MTP however works.
To jump from windows command prompt to android device shell:
Code:
adb shell
To get SuperUser access (in ROM):
Code:
su
To copy from Internal Memory to SD Card:
Code:
tar cvpf /external_sd/internal_backup/media.tar /data/media/0/
To extract from SD Card to Internal Memory (along with path):
Code:
tar -xvf /external_sd/internal_backup/media.tar
To extract from SD Card to some other location, use "-C":
Code:
tar -xvf /external_sd/internal_backup/media.tar -C /data/media/0/extracted_archive/
COPY WHOLE FOLDER (From/To PC)
This method can be used to backup folders like /data/media/ which isn't backed up by custom recovery (TWRP).
To copy from PC to device:
Code:
adb push \path\to\folder\on\PC\ /path/to/folder/on/device/
To copy from device to PC:
Code:
adb pull /path/to/folder/on/device/ \path\to\folder\on\PC\
After copying from PC to device's Internal Memory (/data/media/), you might get Permission Denied error e.g. apps can't write or even read from Internal Memory. It's because Android (Linux) and Windows have different file permissions system. To FIX PERMISSIONS, boot into recovery and run following commands:
(Credits to xak944 )
Code:
adb shell
To take ownership of whole "media" directory:
Code:
chown -R media_rw:media_rw /data/media/
To fix permissions of directories:
Code:
find /data/media/ -type d -exec chmod 775 '{}' ';'
To fix permissions of files:
Code:
find /data/media/ -type f -exec chmod 664 '{}' ';'
HELP PLEASE! Fastboot is acting funny for first time, Huawei Honor 6X
Okay, so I have a Huawei Honor 6X. This device has been rooted and and had custom roms of sorts flashed fine, and bootloader has been unlocked several times only to later have me flash the stock firmware back thus locking bootloader, etc. So this isn't my first rodeo. However, have never seen this. Basically, going from the Stock ROM, I had enabled USB DEBUGGING and approved the little allow always toast popup. Then using my command line in linux, I issued
Code:
adb devices
.... saw it was seeing the device. Then issued
Code:
adb reboot bootloader
. Fine. I see
PHONE locked FRP Unlocked
Click to expand...
Click to collapse
on my fastboot screen. So I know my bootloader is locked. Also, I had previously gotten my unlock code from Huawei as well. But please see the attached image attached belowe here for the real picture of things because once in my fastboot mode, issuing
Code:
fastboot devices
shows my Device ID. However when trying to issue the
Code:
fastboot oem unlock bootloader
code, it acts then like it can find the device or either the devices doesn't find the command? It just says waiting for devices as you can see... wtf? This is all at the same instance. Please see attached and any help, suggestions, etc. are appreciated!
i also have problem trying to issue some fastboot command
bootloader have been unlock
except fastboot reboot command, the rest of fastboot cannot be execute
the error were
...
FAILED (remote: Command not allowed)
finished. total time: 0.00s
can i issue fastboot command from twrp terminal
i want to enable charge reboot
on fastboot
fastboot oem off-mode-charge disable
how to issue comand from within twrp terminal?
ahhl said:
i also have problem trying to issue some fastboot command
bootloader have been unlock
except fastboot reboot command, the rest of fastboot cannot be execute
the error were
...
FAILED (remote: Command not allowed)
finished. total time: 0.00s
can i issue fastboot command from twrp terminal
i want to enable charge reboot
on fastboot
fastboot oem off-mode-charge disable
how to issue comand from within twrp terminal?
Click to expand...
Click to collapse
All vendors don't allow all fastboot commands. Despite of unlocked bootloader, some commands might not work or work differently on certain devices.
No you can't control fastboot from TWRP. Bootloader / fastboot come at lower level in boot process. Recovery itself is loaded by bootloader. We can't control fastboot from recovery. However a few adb commands work in TWRP as well.
Hi guys!
BACKUP / RESTORE APPS & DATA (From/To PC)
Is it still possible on Android Nougat/Oreo on last Samsung devices?
Thanks!
Sent from my SM-G950F using Tapatalk
PIRATA! said:
Hi guys!
BACKUP / RESTORE APPS & DATA (From/To PC)
Is it still possible on Android Nougat/Oreo on last Samsung devices?
Thanks!
Click to expand...
Click to collapse
It's related to adb which is same on Nougat/Oreo, I think. So it should work similarly.
ahhl said:
i also have problem trying to issue some fastboot command
bootloader have been unlock
except fastboot reboot command, the rest of fastboot cannot be execute
the error were
Click to expand...
Click to collapse
FRP locked?
---------- Post added at 11:43 AM ---------- Previous post was at 10:50 AM ----------
Very nice guide with detailed information.
Thanks
struggling with fastboot
Fastboot doesn't want to write out my unlock file???
I'm trying to unlock the bootloader on an old HTC wildfire S, and have followed all the steps listed on the official htcdev.com site to get the unlock token from HTC, but when I run
./fastboot flash unlocktoken Unlock_code.bin
I get
target didn't report max-download-size
sending 'unlocktoken' (0 KB)
but then it just sits these forever
all other fastboot commands seem to work fine, just the flash unlock thats not being written
I can find lots of posts from people with same problem, but no answers that get me any nearer.
enviro here is debian with latest android dev installed from the standard repositories, and fastboot 1:7.0.0+r33-1
phone is wildfire s
Marvel pvt ship s-on rl
hboot 1.09.0099
microp 0451
radio 7.57.39.10m
feb 8 2012,10:29.31
branded for the uk three network.
any help would be appreciated!
chris w
Try this with that Huawei. This should.unlock the oem
Go into settings . Go all the way to the bottom to about phone, then go find build number press at a bunch of times rapidly that'll take you into developer mode. Once in developer mode back into the main menu of settings scroll down to developer options. You should find OEM bootloader unlock about three or four down in that section click unlock and you should be good to go. Good luck oh and I didn't have to back mine up first so you should be good to go.....
theburrus1 said:
Okay, so I have a Huawei Honor 6X. This device has been rooted and and had custom roms of sorts flashed fine, and bootloader has been unlocked several times only to later have me flash the stock firmware back thus locking bootloader, etc. So this isn't my first rodeo. However, have never seen this. Basically, going from the Stock ROM, I had enabled USB DEBUGGING and approved the little allow always toast popup. Then using my command line in linux, I issued
Code:
adb devices
.... saw it was seeing the device. Then issued
Code:
adb reboot bootloader
. Fine. I see on my fastboot screen. So I know my bootloader is locked. Also, I had previously gotten my unlock code from Huawei as well. But please see the attached image attached belowe here for the real picture of things because once in my fastboot mode, issuing
Code:
fastboot devices
shows my Device ID. However when trying to issue the
Code:
fastboot oem unlock bootloader
code, it acts then like it can find the device or either the devices doesn't find the command? It just says waiting for devices as you can see... wtf? This is all at the same instance. Please see attached and any help, suggestions, etc. are appreciated!
Click to expand...
Click to collapse
unknown command while flashing through fastboot
i keep getting unknown command while trying to flash recovery images or firmware, please help me
whitehat15 said:
i keep getting unknown command while trying to flash recovery images or firmware, please help me
Click to expand...
Click to collapse
What commands are you trying and which phone/android version as command has changed since oreo
@mirfatif Do you know what the fastboot update command is doing under the hood? It's obviously flashing the images to the correct partitions but how does it know what image goes where? fastboot flash boot boot.img makes sense to me but running a fastboot command on a bunch of image files in a zip file doesn't. Thanks.
jd1639 said:
@mirfatif Do you know what the fastboot update command is doing under the hood? It's obviously flashing the images to the correct partitions but how does it know what image goes where? fastboot flash boot boot.img makes sense to me but running a fastboot command on a bunch of image files in a zip file doesn't. Thanks.
Click to expand...
Click to collapse
Can you give me example of such zip file? Fastboot protocol is provided by application bootloader (aboot) which knows very well the exact boundaries of partitions on device. When flashing images, we are telling fastboot what image it is or where it is to be written.
mirfatif said:
Can you give me example of such zip file? Fastboot protocol is provided by application bootloader (aboot) which knows very well the exact boundaries of partitions on device. When flashing images, we are telling fastboot what image it is or where it is to be written.
Click to expand...
Click to collapse
The Nexus and pixel phones have had a batch file in the factory image zip file that runs fastboot flashes for the bootloader and radio and then runs a command fastboot update xyz.zip. The xyz.zip is another zip file within the factory image zip. This zip contains all the other image files, i.e. system, modem, etc. Also, I have a pixel 3 and there is no aboot partition. The kernel and recovery images are also both contained in the boot.img. These phones are getting more difficult to deal with.
These are the partitions:
127|:/dev/block/bootdevice/by-name # ls -all
total 0
drwxr-xr-x 2 root root 1440 1970-05-03 01:39:00.159934065 -0500 .
drwxr-xr-x 3 root root 1580 1970-05-03 01:39:00.159934065 -0500 ..
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.146602064 -0500 ALIGN_TO_128K_1 -> /dev/block/sdd1
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.143269064 -0500 ALIGN_TO_128K_2 -> /dev/block/sdf1
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.139936063 -0500 ImageFv -> /dev/block/sdf14
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.149935064 -0500 abl_a -> /dev/block/sde4
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.153268065 -0500 abl_b -> /dev/block/sde16
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.153268065 -0500 aop_a -> /dev/block/sde1
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.153268065 -0500 aop_b -> /dev/block/sde13
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.143269064 -0500 apdp_a -> /dev/block/sda15
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.156601065 -0500 apdp_b -> /dev/block/sda16
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.159934065 -0500 boot_a -> /dev/block/sda11
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.143269064 -0500 boot_b -> /dev/block/sda12
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.146602064 -0500 cdt -> /dev/block/sdd2
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.153268065 -0500 cmnlib64_a -> /dev/block/sde7
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.139936063 -0500 cmnlib64_b -> /dev/block/sde19
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.153268065 -0500 cmnlib_a -> /dev/block/sde6
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.149935064 -0500 cmnlib_b -> /dev/block/sde18
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.146602064 -0500 ddr -> /dev/block/sdd3
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.139936063 -0500 devcfg_a -> /dev/block/sde8
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.149935064 -0500 devcfg_b -> /dev/block/sde20
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.139936063 -0500 devinfo -> /dev/block/sdf7
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.139936063 -0500 dip -> /dev/block/sdf8
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.143269064 -0500 dtbo_a -> /dev/block/sde11
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.149935064 -0500 dtbo_b -> /dev/block/sde23
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.153268065 -0500 frp -> /dev/block/sda4
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.139936063 -0500 fsc -> /dev/block/sdf6
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.146602064 -0500 fsg -> /dev/block/sdf5
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.149935064 -0500 hyp_a -> /dev/block/sde3
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.149935064 -0500 hyp_b -> /dev/block/sde15
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.139936063 -0500 keymaster_a -> /dev/block/sde5
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.139936063 -0500 keymaster_b -> /dev/block/sde17
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.156601065 -0500 keystore -> /dev/block/sda3
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.159934065 -0500 klog -> /dev/block/sda19
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.146602064 -0500 limits -> /dev/block/sdf10
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.143269064 -0500 logfs -> /dev/block/sdf12
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.156601065 -0500 metadata -> /dev/block/sda20
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.153268065 -0500 misc -> /dev/block/sda2
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.156601065 -0500 modem_a -> /dev/block/sda13
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.156601065 -0500 modem_b -> /dev/block/sda14
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.139936063 -0500 modemcal -> /dev/block/sdd4
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.143269064 -0500 modemst1 -> /dev/block/sdf3
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.146602064 -0500 modemst2 -> /dev/block/sdf4
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.143269064 -0500 msadp_a -> /dev/block/sda17
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.149935064 -0500 msadp_b -> /dev/block/sda18
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.146602064 -0500 persist -> /dev/block/sdf2
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.143269064 -0500 product_a -> /dev/block/sda7
lrwxrwxrwx 1 root root** 15 1970-05-03 01:38:59.939956043 -0500 product_b -> /dev/block/sda8
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.149935064 -0500 qupfw_a -> /dev/block/sde9
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.143269064 -0500 qupfw_b -> /dev/block/sde21
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.139936063 -0500 sec -> /dev/block/sdd6
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.139936063 -0500 splash -> /dev/block/sdf15
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.136603063 -0500 spunvm -> /dev/block/sdf9
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.143269064 -0500 ssd -> /dev/block/sda1
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.143269064 -0500 sti -> /dev/block/sdf13
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.146602064 -0500 storsec_a -> /dev/block/sde12
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.149935064 -0500 storsec_b -> /dev/block/sde24
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.153268065 -0500 system_a -> /dev/block/sda5
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.159934065 -0500 system_b -> /dev/block/sda6
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.146602064 -0500 toolsfv -> /dev/block/sdf11
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.139936063 -0500 tz_a -> /dev/block/sde2
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.139936063 -0500 tz_b -> /dev/block/sde14
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.149935064 -0500 uefivar -> /dev/block/sdd5
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.153268065 -0500 userdata -> /dev/block/sda21
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.153268065 -0500 vbmeta_a -> /dev/block/sde10
lrwxrwxrwx 1 root root** 16 1970-05-03 01:39:00.139936063 -0500 vbmeta_b -> /dev/block/sde22
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.143269064 -0500 vendor_a -> /dev/block/sda9
lrwxrwxrwx 1 root root** 16 1970-05-03 01:38:59.939956043 -0500 vendor_b -> /dev/block/sda10
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.139936063 -0500 xbl_a -> /dev/block/sdb1
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.149935064 -0500 xbl_b -> /dev/block/sdc1
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.146602064 -0500 xbl_config_a -> /dev/block/sdb2
lrwxrwxrwx 1 root root** 15 1970-05-03 01:39:00.149935064 -0500 xbl_config_b -> /dev/block/s
Sent from my [device_name] using XDA-Developers Legacy app
jd1639 said:
The xyz.zip is another zip file within the factory image zip. This zip contains all the other image files, i.e. system, modem, etc.
Click to expand...
Click to collapse
And it also contains rawprogram_unsparse.xml or something similar with all partitions listed?
Also, I have a pixel 3 and there is no aboot partition.
Click to expand...
Click to collapse
I haven't used a device so far with A/B partitioning scheme, so I'm not sure what nomenclature they use for partitions but I think abl_* is the application bootloader.
The kernel and recovery images are also both contained in the boot.img.
Click to expand...
Click to collapse
Yes. There is no recovery partition with A/B scheme.
mirfatif said:
And it also contains rawprogram_unsparse.xml or something similar with all partitions listed?
I haven't used a device so far with A/B partitioning scheme, so I'm not sure what nomenclature they use for partitions but I think abl_* is the application bootloader.
Yes. There is no recovery partition with A/B scheme.
Click to expand...
Click to collapse
There's nothing in the zip but image files. There's one text file but it just checks for latest bootloader. There's an image, xbl_config.img. I'm not sure what that does.
Sent from my [device_name] using XDA-Developers Legacy app
jd1639 said:
There's nothing in the zip but image files. There's one text file but it just checks for latest bootloader. There's an image, xbl_config.img. I'm not sure what that does.
Click to expand...
Click to collapse
Actaully rawprogram_unsparse.xml or similar files are used by Factory Flashers such as in Download Mode or ODIN etc. If the device is booted up to the stage of application bootloader (aboot), enough detail of partitions on eMMC is already loaded, including partition names (or labels) that are assigned at the time of creating GUID partition table (GPT). When we execute fastboot update xyz.zip, it flashes all images one by one very similar to fastboot flash boot boot.img, fastboot flash system system.img and so on. Here boot and system are partition names (part_name) while boot.img and system.img are image files (img_name) that should be found in OTA update zip file. Which image file is to be written to which partition is hard-coded in fastboot command's source code:
Code:
static struct {
const char* nickname;
const char* img_name;
const char* sig_name;
const char* part_name;
bool is_optional;
bool is_secondary;
} images[] = {
{ "boot", "boot.img", "boot.sig", "boot", false, false },
{ "system", "system.img", "system.sig", "system", false, false },
...
...
}
mirfatif said:
Actaully rawprogram_unsparse.xml or similar files are used by Factory Flashers such as in Download Mode or ODIN etc. If the device is booted up to the stage of application bootloader (aboot), enough detail of partitions on eMMC is already loaded, including partition names (or labels) that are assigned at the time of creating GUID partition table (GPT). When we execute fastboot update xyz.zip, it flashes all images one by one very similar to fastboot flash boot boot.img, fastboot flash system system.img and so on. Here boot and system are partition names (part_name) while boot.img and system.img are image files (img_name) that should be found in OTA update zip file. Which image file is to be written to which partition is hard-coded in fastboot command's source code:
Code:
static struct {
const char* nickname;
const char* img_name;
const char* sig_name;
const char* part_name;
bool is_optional;
bool is_secondary;
} images[] = {
{ "boot", "boot.img", "boot.sig", "boot", false, false },
{ "system", "system.img", "system.sig", "system", false, false },
...
...
}
Click to expand...
Click to collapse
This is great, especially the source code. It tells me a lot. I learned something new for the day!
how to use unlock oem command when no Volume button is available on car GPS T98 10 inches UNIT.?

[Recovery][OFFICIAL][UBL] TWRP 3.1.1 Touch Recovery for Xperia L

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
TWRP 3.1.x - Based upon Android 7.1 :
* Whole new TWRP 3 interface
* Flashable to FOTA for permanent recovery
* Bootable recovery image if required
OFFICIAL DOWNLOADS FOR TAOSHAN :
https://twrp.me/sony/sonyxperial.html
twrp-3.x.x-x-taoshan.img : Official TWRP image
How to install : All informations available on TWRP.me
You can download the recovery via Official TWRP App as well :
https://play.google.com/store/apps/details?id=me.twrp.twrpapp&hl=en
DEVELOPMENT DOWNLOADS FOR TAOSHAN :
https://mega.nz/#F!vYwXRRRa!PQgFIpUqjEjJoHVkwTWe0w
twrp-3.x.x-x-fota-taoshan.zip : Flashable TWRP 3 to FOTA installer [Flash this zip if you already have older TWRP installed]
twrp-3.x.x-x-boot-taoshan.img : Fastboot bootable TWRP 3 image
twrp-3.x.x-x-secondary-multirom-taoshan.zip : As secondary MultiROM (optional)
cleaner-fota-taoshan.zip : Flashable FOTA formatter (optional)
HOW TO INSTALL EASILY TO FOTA :
* Boot to recovery : Enter the existing recovery as usual
* Flash to FOTA : Install the TWRP FOTA zip to upgrade to latest TWRP
* (Optional) : Flash the ROM you want
HOW TO INSTALL MANUALLY TO FOTA :
* Bootimage : Download the TWRP bootimage you want to flash
* File storage : Adapt the path and push the file to the device this way :
Code:
adb root
adb wait-for-device
adb push FullPathToTheRecovery.img /tmp/twrp.img
* Flash : Extract the TWRP image to the FOTA partition
Code:
adb shell dd if=/tmp/twrp.img of=/dev/block/platform/msm_sdcc.1/by-name/FOTAKernel
* Reboot to recovery : adb reboot recovery
INFORMATIONS ABOUT TWRP 3 :
* Installation : Simply flash the zip with a working TWRP or CyanogenRecovery
* Known issues : No major issue remaining, but sources open to improvements
* Usage : Built for Nougat, works for Marshmallow, Lollipop based ROMs too
* More here : http://www.xda-developers.com/twrp-3-0-0-has-arrived/
ADDITIONAL LINKS :
* Easy ADB and Fastboot for unexperienced users :
http://forum.xda-developers.com/showthread.php?p=48915118
Thanks to @AdrianDC for big help in bring-up and thread template
Thanks to the TWRP Team for sources
​
Current local manifest of the TWRP build
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!-- https://github.com/STRYDER-007/twrp_development_sony -->
XDA:DevDB Information
[Recovery][OFFICIAL][UBL] TWRP 3.1.1 Touch Recovery for Xperia L, Tool/Utility for the Sony Xperia L
Contributors
STRYDER~007
Version Information
Status: Stable
Created 2017-10-02
Last Updated 2017-10-05
Nice work, but where can I download the zip file. Ready for testing. But I mis the link.
Btw nice work.
I was to early. They are here now
paul.coster said:
Nice work, but where can I download the zip file. Ready for testing. But I mis the link.
Btw nice work.
I was to early. They are here now
Click to expand...
Click to collapse
The link is up! Enjoy!
Is it just me, or does this recovery not work? Holding volUp to enter the recovery just turns the screen black; the screen flashes between the sony logo and the said black screen after that, and I have to remove the battery to get the phone working again.
I used both your method of installation, as well as mine, and none of them worked. The older official TWRP recovery (3.0.2-0) works just fine, though.
stuckbootloader said:
Is it just me, or does this recovery not work? Holding volUp to enter the recovery just turns the screen black; the screen flashes between the sony logo and the said black screen after that, and I have to remove the battery to get the phone working again.
I used both your method of installation, as well as mine, and none of them worked. The older official TWRP recovery (3.0.2-0) works just fine, though.
Click to expand...
Click to collapse
Can you mention the steps you performed as well as the scenario in which you're trying to flash it?
Btw you can simply flash twrp-3.x.x-x-fota-taoshan.zip from existing recovery to upgrade TWRP.
STRYDER~007 said:
Can you mention the steps you performed as well as the scenario in which you're trying to flash it?
Btw you can simply flash twrp-3.x.x-x-fota-taoshan.zip from existing recovery to upgrade TWRP.
Click to expand...
Click to collapse
Sorry for the late reply.
I transferred the twrp.img file to the root of the SD card, and ran this command through adb shell
dd if=/storage/36BD-1A02/twrp.img of=/dev/block/platform/msm_sdcc.1/by-name/FOTAKernel.
That worked with the older releases.
I also tried the commands in the description (pushing twrp.img /tmp/ and then moving it to FOTAKernel), and there was no difference.
Weirdly enough, flashing the .zip worked.
stuckbootloader said:
Sorry for the late reply.
I transferred the twrp.img file to the root of the SD card, and ran this command through adb shell
dd if=/storage/36BD-1A02/twrp.img of=/dev/block/platform/msm_sdcc.1/by-name/FOTAKernel.
That worked with the older releases.
I also tried the commands in the description (pushing twrp.img /tmp/ and then moving it to FOTAKernel), and there was no difference.
Weirdly enough, flashing the .zip worked.
Click to expand...
Click to collapse
Well there you go! IMO flashing zip to upgrade TWRP is the simplest so I'd always prefer that. Enjoy the new recovery! :highfive:
STRYDER~007 said:
Can you mention the steps you performed as well as the scenario in which you're trying to flash it?
Btw you can simply flash twrp-3.x.x-x-fota-taoshan.zip from existing recovery to upgrade TWRP.
Click to expand...
Click to collapse
Hi,
I have the same issue, on a Xperia L (white, C2105), tried with two possibilities now, using recovery image twrp.3.1.1-0-taoshan.img, two methods:
1) flashing via existing TWRP recovery (v 2.8.7.0): according to your description I selected install, image, with the aforementioned TWRP recovery image.
2) using the recovery installer app from corphish/StdBarbarossa (version 1.4 - dated 18 May 2016): selecting the menu option to install a custom recovery, to install the aforementioned TWRP recovery image.
Please note that the same recovery installer app from corphish/StdBarbarossa works perfectly to install the TWRP 2.8.7.0.
Therefore I would suggest that the latest TWRP image might need to be reviewed for side-effects by implemented changes. I will try with older versions, to identify if it works with older versions.
Please let me know in case you need any further details, either of the device or of the steps that I performed.
Cheers, Henning
---------- Post added at 10:39 PM ---------- Previous post was at 10:30 PM ----------
xleng said:
Hi,
I have the same issue, on a Xperia L (white, C2105), tried with two possibilities now, using recovery image twrp.3.1.1-0-taoshan.img, two methods:
1) flashing via existing TWRP recovery (v 2.8.7.0): according to your description I selected install, image, with the aforementioned TWRP recovery image.
2) using the recovery installer app from corphish/StdBarbarossa (version 1.4 - dated 18 May 2016): selecting the menu option to install a custom recovery, to install the aforementioned TWRP recovery image.
Please note that the same recovery installer app from corphish/StdBarbarossa works perfectly to install the TWRP 2.8.7.0.
Therefore I would suggest that the latest TWRP image might need to be reviewed for side-effects by implemented changes. I will try with older versions, to identify if it works with older versions.
Please let me know in case you need any further details, either of the device or of the steps that I performed.
Cheers, Henning
Click to expand...
Click to collapse
OK
Using the method to install TWRP v3 via the existing TWRP recovery version 2.8.7.0 (actually I'm not quite sure about the version, since the splash screen reported version 2.8.7.2, but the main application header reports 2.8.7.0, probably the latter version number was just not updated), finally was SUCCESSFUL with twrp-3.0.2-0-taoshan.img!
I didn't try the earlier ones, since I identified a TWRP version which should be functional.
I think probably something went wrong with the most recent update!?
Please let me know in case I could support troubleshooting somehow.
I have actually two Xperia L's, one as my primary smartphone, the second as spare, which I typically use to try out new things prior to messing around with the primary one.
Cheers
---------- Post added at 10:50 PM ---------- Previous post was at 10:39 PM ----------
STRYDER~007 said:
Well there you go! IMO flashing zip to upgrade TWRP is the simplest so I'd always prefer that. Enjoy the new recovery! :highfive:
Click to expand...
Click to collapse
Just noted that I should have read the thread more carefully first .... *doh*
Actually, where can I get the zip file? I only could download the img from the TWRP website.
Eventually I would also be interested to take a look to the sources, if possible (just out of curiosity).
Thanks in advance!
---------- Post added at 11:15 PM ---------- Previous post was at 10:50 PM ----------
xleng said:
Hi,
I have the same issue, on a Xperia L (white, C2105), tried with two possibilities now, using recovery image twrp.3.1.1-0-taoshan.img, two methods:
1) flashing via existing TWRP recovery (v 2.8.7.0): according to your description I selected install, image, with the aforementioned TWRP recovery image.
2) using the recovery installer app from corphish/StdBarbarossa (version 1.4 - dated 18 May 2016): selecting the menu option to install a custom recovery, to install the aforementioned TWRP recovery image.
Please note that the same recovery installer app from corphish/StdBarbarossa works perfectly to install the TWRP 2.8.7.0.
Therefore I would suggest that the latest TWRP image might need to be reviewed for side-effects by implemented changes. I will try with older versions, to identify if it works with older versions.
Please let me know in case you need any further details, either of the device or of the steps that I performed.
Cheers, Henning
---------- Post added at 10:39 PM ---------- Previous post was at 10:30 PM ----------
OK
Using the method to install TWRP v3 via the existing TWRP recovery version 2.8.7.0 (actually I'm not quite sure about the version, since the splash screen reported version 2.8.7.2, but the main application header reports 2.8.7.0, probably the latter version number was just not updated), finally was SUCCESSFUL with twrp-3.0.2-0-taoshan.img!
I didn't try the earlier ones, since I identified a TWRP version which should be functional.
I think probably something went wrong with the most recent update!?
Please let me know in case I could support troubleshooting somehow.
I have actually two Xperia L's, one as my primary smartphone, the second as spare, which I typically use to try out new things prior to messing around with the primary one.
Cheers
---------- Post added at 10:50 PM ---------- Previous post was at 10:39 PM ----------
Just noted that I should have read the thread more carefully first .... *doh*
Actually, where can I get the zip file? I only could download the img from the TWRP website.
Eventually I would also be interested to take a look to the sources, if possible (just out of curiosity).
Thanks in advance!
Click to expand...
Click to collapse
I found the zip file now. But actually it didn't work either.
I extracted the twrp.img from the twrp-3.1.1-20171005-fota-taoshan.zip.
Then I applied the following commands :
adb root
adb push twrp.img /tmp/twrp.img
adb shell dd if=/tmp/twrp.img of=/dev/block/platform/msm_sdcc.1/by-name/FOTAKernel
The result is a boot loop, looping between the SONY logo and a black screen.
Afterwards I successfully installed back TWRP-3.0.2-0 using the recovery installer app from corphish.
Cheers
xleng said:
The result is a boot loop, looping between the SONY logo and a black screen.
Afterwards I successfully installed back TWRP-3.0.2-0 using the recovery installer app from corphish.
Cheers
Click to expand...
Click to collapse
Flash that .zip through the 3.0.2-0 recovery now, it ought to work. I had the same flashing issue. Both the app and the .zip should work now, so it doesn't really matter which method you use.
xleng said:
Hi,
I have the same issue, on a Xperia L (white, C2105), tried with two possibilities now, using recovery image twrp.3.1.1-0-taoshan.img, two methods:
1) flashing via existing TWRP recovery (v 2.8.7.0): according to your description I selected install, image, with the aforementioned TWRP recovery image.
2) using the recovery installer app from corphish/StdBarbarossa (version 1.4 - dated 18 May 2016): selecting the menu option to install a custom recovery, to install the aforementioned TWRP recovery image.
Please note that the same recovery installer app from corphish/StdBarbarossa works perfectly to install the TWRP 2.8.7.0.
Therefore I would suggest that the latest TWRP image might need to be reviewed for side-effects by implemented changes. I will try with older versions, to identify if it works with older versions.
Please let me know in case you need any further details, either of the device or of the steps that I performed.
Cheers, Henning
---------- Post added at 10:39 PM ---------- Previous post was at 10:30 PM ----------
OK
Using the method to install TWRP v3 via the existing TWRP recovery version 2.8.7.0 (actually I'm not quite sure about the version, since the splash screen reported version 2.8.7.2, but the main application header reports 2.8.7.0, probably the latter version number was just not updated), finally was SUCCESSFUL with twrp-3.0.2-0-taoshan.img!
I didn't try the earlier ones, since I identified a TWRP version which should be functional.
I think probably something went wrong with the most recent update!?
Please let me know in case I could support troubleshooting somehow.
I have actually two Xperia L's, one as my primary smartphone, the second as spare, which I typically use to try out new things prior to messing around with the primary one.
Cheers
---------- Post added at 10:50 PM ---------- Previous post was at 10:39 PM ----------
Just noted that I should have read the thread more carefully first .... *doh*
Actually, where can I get the zip file? I only could download the img from the TWRP website.
Eventually I would also be interested to take a look to the sources, if possible (just out of curiosity).
Thanks in advance!
---------- Post added at 11:15 PM ---------- Previous post was at 10:50 PM ----------
I found the zip file now. But actually it didn't work either.
I extracted the twrp.img from the twrp-3.1.1-20171005-fota-taoshan.zip.
Then I applied the following commands :
adb root
adb push twrp.img /tmp/twrp.img
adb shell dd if=/tmp/twrp.img of=/dev/block/platform/msm_sdcc.1/by-name/FOTAKernel
The result is a boot loop, looping between the SONY logo and a black screen.
Afterwards I successfully installed back TWRP-3.0.2-0 using the recovery installer app from corphish.
Cheers
Click to expand...
Click to collapse
You can use official TWRP app from play store OR simply flash the twrp-3.1.1-DATE-fota-taoshan.zip using any existing recovery from HERE. That's all, simple!
stuckbootloader said:
Flash that .zip through the 3.0.2-0 recovery now, it ought to work. I had the same flashing issue. Both the app and the .zip should work now, so it doesn't really matter which method you use.
Click to expand...
Click to collapse
Hi!
Unfortunately it doesn't work for me.
I tried to flash the zip via the recovery, but ended in another boot loop after reboot with attempt to enter the recovery again.
Sent from my Xperia L using XDA-Developers Legacy app
Hi again,
I just installed the official twrp app (version 1.15, build 28) and tried to flash the twrp image 3.1.1-0.
Twrp reported successful flashing, butafter reboot the recovery was not entered, but instead I had a bootloop again.
Prior to flashing, I did a backup of the existing recovery (containing twrp-3.0.2), after re-flashing the recovery backup resulted in a functional installation of twrp3.0.2 again.
Any recommendation? I'm using the XperiaL, C2105, white version.
The device actually was returned from Sony, eg was shipped without any provider branding, because the initial phone (which did have provider branding) had issues with the camera, which therefore has been sent to Sony within the guarantee period. Sony however did not repair the phone, but rather sent back a new and original Sony device.
In case any other information might be of interest, please let me know.
Would be great to be able to install twrp3.1.1 + LineageOS 14.1!
Actually it's not clear to me if LOS14.1 could be flashed with twrp3.0.2, since errors have been reported?
Sent from my Xperia L using XDA-Developers Legacy app
xleng said:
Actually it's not clear to me if LOS14.1 could be flashed with twrp3.0.2, since errors have been reported?
Click to expand...
Click to collapse
I am not sure about your device, in my Xperia M, I use lineage 14.1 with twrp 3.0.2 with no problems. Even I tried cwm recovery, there was no problem again. So yeah you can try it.
xleng said:
Hi!
Unfortunately it doesn't work for me.
I tried to flash the zip via the recovery, but ended in another boot loop after reboot with attempt to enter the recovery again.
Sent from my Xperia L using XDA-Developers Legacy app
Click to expand...
Click to collapse
Make sure you're following the steps properly.
xleng said:
Hi again,
I just installed the official twrp app (version 1.15, build 28) and tried to flash the twrp image 3.1.1-0.
Twrp reported successful flashing, butafter reboot the recovery was not entered, but instead I had a bootloop again.
Prior to flashing, I did a backup of the existing recovery (containing twrp-3.0.2), after re-flashing the recovery backup resulted in a functional installation of twrp3.0.2 again.
Any recommendation? I'm using the XperiaL, C2105, white version.
The device actually was returned from Sony, eg was shipped without any provider branding, because the initial phone (which did have provider branding) had issues with the camera, which therefore has been sent to Sony within the guarantee period. Sony however did not repair the phone, but rather sent back a new and original Sony device.
In case any other information might be of interest, please let me know.
Would be great to be able to install twrp3.1.1 + LineageOS 14.1!
Actually it's not clear to me if LOS14.1 could be flashed with twrp3.0.2, since errors have been reported?
Sent from my Xperia L using XDA-Developers Legacy app
Click to expand...
Click to collapse
If you have working TWRP 3.0.2, you can simply flash the twrp-3.1.1-20171005-fota-taoshan.zip from HERE.
Hi again,
I try now another attempt. I take the "twrp-3.1.1-20171005-fota-taoshan.zip", saved in the SD card of the phone, which contains two items:
- folder "META-INF"
- file "twrp.img"
Using TWRP, version 3.0.2-0:
1) Menu Install
2) Select Storage -> Micro SDCard
3) Select twrp-3.1.1-20171005-fota-taoshan.zip
4) Swipe to confirm Flash
5) Adrian DC - TWRP Installer reports the following : "Flashing TWRP Recovery to FOTA... Done. Update Completed. script succeeded: result was [1.000000]; Update partition details...done"
6) Reboot system
7) Hit the vol-up during boot (especially during SONY logo)
8) Boot loop is entered.
I don't think that I have missed anything, did I?
Sorry to be a pain ....
xleng said:
Hi again,
I try now another attempt. I take the "twrp-3.1.1-20171005-fota-taoshan.zip", saved in the SD card of the phone, which contains two items:
- folder "META-INF"
- file "twrp.img"
Using TWRP, version 3.0.2-0:
1) Menu Install
2) Select Storage -> Micro SDCard
3) Select twrp-3.1.1-20171005-fota-taoshan.zip
4) Swipe to confirm Flash
5) Adrian DC - TWRP Installer reports the following : "Flashing TWRP Recovery to FOTA... Done. Update Completed. script succeeded: result was [1.000000]; Update partition details...done"
6) Reboot system
7) Hit the vol-up during boot (especially during SONY logo)
8) Boot loop is entered.
I don't think that I have missed anything, did I?
Sorry to be a pain ....
Click to expand...
Click to collapse
When you flash the zip, recovery log is generated. Can you give me that log? You can find it in "Advanced" tab.
If I read the log correctly, the dd command fails, because the ZIP is by 1 record too long for the partition.
At least the input record count is different than the output record count, which is strange.
I'm just thinking aloud if there could be a dependency with the host Maschine (at least with the ZIP file), so that the bit pattern might slightly differ due to differences in the file system types?
I believe this is the relevant part oft the log, though I can also send the complete log by PM:
==============================
==============================
| Adrian DC - TWRP Installer |
| Adrian DC - TWRP Installer |
==============================
==============================
- Flashing TWRP Recovery to FOTA...
- Flashing TWRP Recovery to FOTA...
about to run program [/sbin/dd] with 3 args
dd: writing '/dev/block/platform/msm_sdcc.1/by-name/FOTAKernel': No space left on device
32769+0 records in
32768+0 records out
16777216 bytes (16.0MB) copied, 2.417855 seconds, 6.6MB/s
run_program: child exited with status 1
Done.
Done.
Update Completed.
Update Completed.
script succeeded: result was [1.000000]I:Updater process ended with RC=0
I:Legacy property environment disabled.
Updating partition details...
...done
I:Set page: 'flash_done'
Iperation_end - status=0
I:Set page: 'clear_vars'
I:Set page: 'install'
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:Set page: 'advanced'
I:Set page: 'confirm_action'
I:Set page: 'action_page'
Iperation_start: 'Copy Log'
I:Copying file /tmp/recovery.log to /external_sd/recovery.log
xleng said:
If I read the log correctly, the dd command fails, because the ZIP is by 1 record too long for the partition.
At least the input record count is different than the output record count, which is strange.
I'm just thinking aloud if there could be a dependency with the host Maschine (at least with the ZIP file), so that the bit pattern might slightly differ due to differences in the file system types?
I believe this is the relevant part oft the log, though I can also send the complete log by PM:
==============================
==============================
| Adrian DC - TWRP Installer |
| Adrian DC - TWRP Installer |
==============================
==============================
- Flashing TWRP Recovery to FOTA...
- Flashing TWRP Recovery to FOTA...
about to run program [/sbin/dd] with 3 args
dd: writing '/dev/block/platform/msm_sdcc.1/by-name/FOTAKernel': No space left on device
32769+0 records in
32768+0 records out
16777216 bytes (16.0MB) copied, 2.417855 seconds, 6.6MB/s
run_program: child exited with status 1
Done.
Done.
Update Completed.
Update Completed.
script succeeded: result was [1.000000]I:Updater process ended with RC=0
I:Legacy property environment disabled.
Updating partition details...
...done
I:Set page: 'flash_done'
Iperation_end - status=0
I:Set page: 'clear_vars'
I:Set page: 'install'
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:Set page: 'advanced'
I:Set page: 'confirm_action'
I:Set page: 'action_page'
Iperation_start: 'Copy Log'
I:Copying file /tmp/recovery.log to /external_sd/recovery.log
Click to expand...
Click to collapse
Hi,
Thanks for the logs.
Something is not right here..
PHP:
16777216 bytes (16.0MB) copied, 2.417855 seconds, 6.6MB/s
Why 16 MB is getting copied while the recovery size is just 11.5-12 MB? This doesn't seem right.
If possible, can you run these command in device terminal? I need the output of these-
Code:
cat /proc/partitions
Code:
ls -al /dev/block/platform/msm_sdcc.1/by-name
You can upload the output on hastebin.com
Thanks and regards,
STRYDER~007
cat /proc/partitions:
[email protected]:/ # cat /proc/partitions
major minor #blocks name
254 0 262144 zram0
179 0 7634944 mmcblk0
179 1 2048 mmcblk0p1
179 2 256 mmcblk0p2
179 3 512 mmcblk0p3
179 4 512 mmcblk0p4
179 5 1024 mmcblk0p5
179 6 1024 mmcblk0p6
179 7 1024 mmcblk0p7
179 8 256 mmcblk0p8
179 9 512 mmcblk0p9
179 10 512 mmcblk0p10
179 11 1024 mmcblk0p11
179 12 1024 mmcblk0p12
179 13 1024 mmcblk0p13
179 14 1024 mmcblk0p14
179 15 1024 mmcblk0p15
179 16 3456 mmcblk0p16
179 17 16384 mmcblk0p17
179 18 8192 mmcblk0p18
179 19 8192 mmcblk0p19
179 20 16384 mmcblk0p20
179 21 8192 mmcblk0p21
179 22 8192 mmcblk0p22
179 23 65536 mmcblk0p23
179 24 19456 mmcblk0p24
179 25 5120 mmcblk0p25
179 26 8192 mmcblk0p26
179 27 16384 mmcblk0p27
179 28 1228800 mmcblk0p28
179 29 65536 mmcblk0p29
179 30 262144 mmcblk0p30
179 31 1671168 mmcblk0p31
179 32 4210671 mmcblk0p32
179 64 31472640 mmcblk1
179 65 31471616 mmcblk1p1
ls -al /dev/block/platform/msm_sdcc.1/by-name:
[email protected]:/ # ls -al /dev/block/platform/msm_sdcc.1/by-name
total 0
drwxr-xr-x 2 system root 680 2017-11-12 00:46 .
drwxr-xr-x 4 root root 740 2017-11-12 00:46 ..
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 FOTAKernel -> /dev/block/mmcblk0p27
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 LTALabel -> /dev/block/mmcblk0p20
lrwxrwxrwx 1 root root 20 2017-11-12 00:46 TA -> /dev/block/mmcblk0p1
lrwxrwxrwx 1 root root 20 2017-11-12 00:46 aboot -> /dev/block/mmcblk0p6
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 alt_aboot -> /dev/block/mmcblk0p12
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 alt_rpm -> /dev/block/mmcblk0p15
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 alt_s1sbl2 -> /dev/block/mmcblk0p10
lrwxrwxrwx 1 root root 20 2017-11-12 00:46 alt_sbl1 -> /dev/block/mmcblk0p8
lrwxrwxrwx 1 root root 20 2017-11-12 00:46 alt_sbl2 -> /dev/block/mmcblk0p9
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 alt_sbl3 -> /dev/block/mmcblk0p11
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 alt_tz -> /dev/block/mmcblk0p13
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 apps_log -> /dev/block/mmcblk0p26
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 boot -> /dev/block/mmcblk0p24
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 cache -> /dev/block/mmcblk0p30
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 fsg -> /dev/block/mmcblk0p19
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 ftma -> /dev/block/mmcblk0p29
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 ftmd -> /dev/block/mmcblk0p18
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 modem -> /dev/block/mmcblk0p23
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 modemst1 -> /dev/block/mmcblk0p21
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 modemst2 -> /dev/block/mmcblk0p22
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 persist -> /dev/block/mmcblk0p17
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 ramdump -> /dev/block/mmcblk0p25
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 rpm -> /dev/block/mmcblk0p14
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 rsv -> /dev/block/mmcblk0p16
lrwxrwxrwx 1 root root 20 2017-11-12 00:46 s1sbl2 -> /dev/block/mmcblk0p4
lrwxrwxrwx 1 root root 20 2017-11-12 00:46 sbl1 -> /dev/block/mmcblk0p2
lrwxrwxrwx 1 root root 20 2017-11-12 00:46 sbl2 -> /dev/block/mmcblk0p3
lrwxrwxrwx 1 root root 20 2017-11-12 00:46 sbl3 -> /dev/block/mmcblk0p5
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 sdcard -> /dev/block/mmcblk0p32
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 system -> /dev/block/mmcblk0p28
lrwxrwxrwx 1 root root 20 2017-11-12 00:46 tz -> /dev/block/mmcblk0p7
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 userdata -> /dev/block/mmcblk0p31
I think the partition layout is normal. I did not previously try any modifications to the partition scheme, e.g. as suggested by some "hacks" to provide more storage to user data. I consider these as high risk (also many hard bricks have ben reported), and modify "only" the recovery and ROM area.
Best regards
xleng said:
cat /proc/partitions:
[email protected]:/ # cat /proc/partitions
major minor #blocks name
254 0 262144 zram0
179 0 7634944 mmcblk0
179 1 2048 mmcblk0p1
179 2 256 mmcblk0p2
179 3 512 mmcblk0p3
179 4 512 mmcblk0p4
179 5 1024 mmcblk0p5
179 6 1024 mmcblk0p6
179 7 1024 mmcblk0p7
179 8 256 mmcblk0p8
179 9 512 mmcblk0p9
179 10 512 mmcblk0p10
179 11 1024 mmcblk0p11
179 12 1024 mmcblk0p12
179 13 1024 mmcblk0p13
179 14 1024 mmcblk0p14
179 15 1024 mmcblk0p15
179 16 3456 mmcblk0p16
179 17 16384 mmcblk0p17
179 18 8192 mmcblk0p18
179 19 8192 mmcblk0p19
179 20 16384 mmcblk0p20
179 21 8192 mmcblk0p21
179 22 8192 mmcblk0p22
179 23 65536 mmcblk0p23
179 24 19456 mmcblk0p24
179 25 5120 mmcblk0p25
179 26 8192 mmcblk0p26
179 27 16384 mmcblk0p27
179 28 1228800 mmcblk0p28
179 29 65536 mmcblk0p29
179 30 262144 mmcblk0p30
179 31 1671168 mmcblk0p31
179 32 4210671 mmcblk0p32
179 64 31472640 mmcblk1
179 65 31471616 mmcblk1p1
ls -al /dev/block/platform/msm_sdcc.1/by-name:
[email protected]:/ # ls -al /dev/block/platform/msm_sdcc.1/by-name
total 0
drwxr-xr-x 2 system root 680 2017-11-12 00:46 .
drwxr-xr-x 4 root root 740 2017-11-12 00:46 ..
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 FOTAKernel -> /dev/block/mmcblk0p27
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 LTALabel -> /dev/block/mmcblk0p20
lrwxrwxrwx 1 root root 20 2017-11-12 00:46 TA -> /dev/block/mmcblk0p1
lrwxrwxrwx 1 root root 20 2017-11-12 00:46 aboot -> /dev/block/mmcblk0p6
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 alt_aboot -> /dev/block/mmcblk0p12
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 alt_rpm -> /dev/block/mmcblk0p15
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 alt_s1sbl2 -> /dev/block/mmcblk0p10
lrwxrwxrwx 1 root root 20 2017-11-12 00:46 alt_sbl1 -> /dev/block/mmcblk0p8
lrwxrwxrwx 1 root root 20 2017-11-12 00:46 alt_sbl2 -> /dev/block/mmcblk0p9
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 alt_sbl3 -> /dev/block/mmcblk0p11
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 alt_tz -> /dev/block/mmcblk0p13
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 apps_log -> /dev/block/mmcblk0p26
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 boot -> /dev/block/mmcblk0p24
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 cache -> /dev/block/mmcblk0p30
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 fsg -> /dev/block/mmcblk0p19
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 ftma -> /dev/block/mmcblk0p29
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 ftmd -> /dev/block/mmcblk0p18
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 modem -> /dev/block/mmcblk0p23
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 modemst1 -> /dev/block/mmcblk0p21
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 modemst2 -> /dev/block/mmcblk0p22
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 persist -> /dev/block/mmcblk0p17
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 ramdump -> /dev/block/mmcblk0p25
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 rpm -> /dev/block/mmcblk0p14
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 rsv -> /dev/block/mmcblk0p16
lrwxrwxrwx 1 root root 20 2017-11-12 00:46 s1sbl2 -> /dev/block/mmcblk0p4
lrwxrwxrwx 1 root root 20 2017-11-12 00:46 sbl1 -> /dev/block/mmcblk0p2
lrwxrwxrwx 1 root root 20 2017-11-12 00:46 sbl2 -> /dev/block/mmcblk0p3
lrwxrwxrwx 1 root root 20 2017-11-12 00:46 sbl3 -> /dev/block/mmcblk0p5
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 sdcard -> /dev/block/mmcblk0p32
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 system -> /dev/block/mmcblk0p28
lrwxrwxrwx 1 root root 20 2017-11-12 00:46 tz -> /dev/block/mmcblk0p7
lrwxrwxrwx 1 root root 21 2017-11-12 00:46 userdata -> /dev/block/mmcblk0p31
I think the partition layout is normal. I did not previously try any modifications to the partition scheme, e.g. as suggested by some "hacks" to provide more storage to user data. I consider these as high risk (also many hard bricks have ben reported), and modify "only" the recovery and ROM area.
Best regards
Click to expand...
Click to collapse
Yes I was suspicious about that. It seems partitions are all fine. Okay, one last thing, can you follow these steps mentioned on official TWRP site and see if recovery installs properly?
https://dl.twrp.me/taoshan/twrp-3.1.1-0-taoshan.img.html
dd Install Method (Requires Root):
Download the latest image file (.img) from the download link above. Place it in the root of your /sdcard folder and rename it to twrp.img. Run the following commands via adb shell or a terminal emulator app:
su
dd if=/sdcard/twrp.img of=/dev/block/platform/msm_sdcc.1/by-name/FOTAKernel
Click to expand...
Click to collapse

[ROOT] - lafsploit - H918 (any version up to and including 20h) - now n00b friendly

WARNING​
This should go without saying, but you MUST have your bootloader unlocked (check OEM UNLOCK in developer options AND fastboot oem unlock).
If you don't, you WILL brick your phone.
If you don't know how to FULLY unlock your bootloader -- search. This thread is not here to educate you on unlocking your bootloader.
If your bootloader isn't unlocked, you will get a RED warning that your phone has been modified, and will refuse to boot.
If your bootloader IS unlocked, your will have a YELLOW warning even if you haven't modified your phone yet, and your phone will still boot. This is normal!
If you use this on any model V20 besides the H918, you will be stuck in a bootloop, and you will not be able to fix it since you will have wiped out download mode!
There is NO fixing this!
You must be on version H91810p or H91810q
This is now completely safe. It will either work or it won't, but it can NOT brick your phone if you meet the requirements listed above, and you follow the procedure exactly.
If it DOES brick your phone, I am not responsible.
If you deviate from this procedure, and think: "I can just skip a step, or I can do this on my own Linux install". Don't complain if you brick your phone.
This ONLY replaces download mode with TWRP. If you want to root, you can search for how to root. If you don't know how to use TWRP -- search.
PREREQUISITES:
If you aren't on 10p or 10q, grab the H918 10p KDZ: here.
This is NOT a guide for flashing KDZs -- there are plenty of those out there -- search.
You need to grab FWUL (version 2.7 or later) and burn it to a USB stick: link
Even if you have Linux, and you think you can install the dependencies, don't. I know this works from FWUL.
If you choose to press on in expert mode (using FWUL in a VM, using your own Linux install, using WSL, etc), don't get upset if I don't answer your questions.
For Windows you will need Rufus to burn FWUL onto a USB stick.
If you have questions about FWUL, please ask in the FWUL thread.
Installing TWRP
Again, this will ONLY install TWRP onto download mode. What you do with TWRP when it is done is up to you. Flash Magisk or SuperSU. Flash a ROM, or just make a backup of your phone. It is up to you.
I would suggest flashing TWRP onto recovery as well, otherwise you will need to use the vol up + USB cable method to get to TWRP. There is no key combination to get to download mode.
Boot from your FWUL USB stick.
Put your phone into download mode. With the phone powered off, hold vol up and plug in the USB cable. You do not need to touch the power button -- the phone will power on and enter download mode.
Once booted, login. The password is: linux
Double click the LG folder that is on the desktop
Double click on LG LAF (runningnak3d) icon and you will be at a terminal prompt.
The following are the commands that you enter into that terminal. You can copy / paste them if you like.
Code:
git pull
git checkout h918-miscwrte
./step1.sh
When you are told to, pull the USB cable, and the phone will power off. You now have TWRP on your laf partition.
It must be said again, flash TWRP onto recovery so you can easily get to TWRP.
OPTIONAL
If you would like to restore download mode onto your laf partition AFTER you have installed TWRP onto recovery:
Boot to TWRP that is on recovery
Flash this zip: laf_restore.zip
This can be done at any time after you are rooted. About the only reason you would want to flash laf back is if you use LG Backup.
TWRP has the ability to backup your phone, so I am not sure why someone would want this (maybe you are more comfortable with it?).
Also, flashing back to 100% unrooted stock can be accomplished by flashing a zip in TWRP, you don't NEED to flash a KDZ, but again, maybe you are more comfortable doing it that way.
The bottom line is TWRP on both laf and recovery is FAR FAR more useful than flashing laf back. You can test new versions of TWRP while keeping your old known working version (for example).
If you are having problems flashing a ROM, ask in the appropriate ROM thread.
If you are having problems with Magisk, ask in the Magisk thread.
If you are having problems with SuperSU, Lineage, or even TWRP itself, ask in the appropriate thread.
This thread is ONLY for problems if TWRP doesn't boot when you are done.
CREDITS:
Lekensteyn -- His base work on the G2 / G3 gave me a GREAT headstart!
@steadfasterX - He added some real nice features, great guy to bounce ideas off, and just testing crazy ideas because he wasn't afraid to brick his phone Also, for FWUL
tuxuser - Helping with my lacking in Python
@smitel - His original reverse engineering of LG UP. Great inspiration!
@me2151 - His original DirtySanta exploit. Without it, the V20 would probably still not be rooted.
-- Brian
XDA:DevDB Information
lafsploit, Tool/Utility for the LG V20
Contributors
runningnak3d
Source Code: https://gitlab.com/runningnak3d/lglaf
Version Information
Status: Stable
Current Stable Version: 1.1
Stable Release Date: 2018-07-15
Created 2018-04-05
Last Updated 2018-07-16
Congratulations for this amazing work I been follow your work on your original tread it's amazing !!! I current have the note 8 but I still have a v20 (from what i posting right now lol ) the first was. TMobile and right now I have a Verizon unlock v20 Wich I really enjoying Whit Xposed mode well anyway what I trying to said is you work make me pick up my v20 again and give me some inspiration to learn ... Keep going
UPDATE: I GET A TMOBILE V20 now I have root again, thanks again ?
Congrats been following your work since day 1 man the effort paid off. Thanks one man that took on the whole lg dev team.
Will there ever be a chance for the US998 (US Cellular) ?
Awesome can't wait to build lineage for the v20! Now that I have a spare device it'll make learning a lot easier. So now I can test on my current daily driver before adding the mods to my v20 builds. I can't even begin to describe how much this means to so many of us in the community! Especially myself.
That said I'll give it a try tomorrow after work assuming I have friday off & l'll report back asap.
If installing python 3 on windows 10 will the default install settings work? Just wanted to double check. & thanks again man. Amazingly awesome work!
Sent from my LG-D851 using XDA Labs
---------- Post added at 01:35 AM ---------- Previous post was at 01:32 AM ----------
KanBorges said:
Will there ever be a chance for the US998 (US Cellular) ?
Click to expand...
Click to collapse
He is also working on the locked bootloader devices. I'll let him explain most of the details if he has the time. However if you want to read up on the progress check this thread:
https://forum.xda-developers.com/v20/how-to/laf-download-mode-how-root-t3676011/page92
Sent from my LG-D851 using XDA Labs
omg, you sir are a God! [emoji122] [emoji122]
Sent from my LG-H918 using XDA-Developers Legacy app
KanBorges said:
Will there ever be a chance for the US998 (US Cellular) ?
Click to expand...
Click to collapse
Even though the US998 isn't officially unlockable yet, you can follow this: https://forum.xda-developers.com/lg-v30/how-to/us998-bootloader-unlock-achieved-t3743359
https://gist.github.com/zacharee/6aa5fcb56d0a42937869494b12d77da2
working link
Thanks @dudeawsome and @Zacharee1 I fixed the link.
using the instructions provided, I'm consistently getting a usb device not found runtime error, any advice?
If you are on Windows, did you install the LG drivers?
-- Brian
runningnak3d said:
WARNING to G5 and G6 users. I need a partition listing before you try this to make sure misc is in the same location. You can brick your phone if misc is in a different location than the V20.
I am splitting this off from the main laf thread because that thread really needs to be cleaned. It was supposed to just be for development, and now it is impossible to find some valuable info
I say this is for the H918 only, but it should work on the H830 (G5) and H872 (G6) as well. I don't have those devices, so I can't test it. The H830 has a TWRP build, but the H872 doesn't -- so someone would have to risk using the US997 build.
Anyway, if you aren't feint at heart....
Here is a much more detailed guide that @Zacharee1 put together: link.
Enjoy your now rooted H918...
If this scares anyone, I will make it easier, but for the hardcore people, I wanted to get it out there.
I will clean this up and make it prettier when I have the chance.
-- Brian
Click to expand...
Click to collapse
Code:
1|lucye:/ $ ls -l /dev/block/platform/soc/624000.ufshc/by-name/
total 0
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 aboot -> /dev/block/sde6
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 abootbak -> /dev/block/sde7
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 apdp -> /dev/block/sde26
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 boot -> /dev/block/sde1
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 cache -> /dev/block/sda17
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 cdt -> /dev/block/sdd3
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 cmnlib -> /dev/block/sde22
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 cmnlib64 -> /dev/block/sde24
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 cmnlib64bak -> /dev/block/sde25
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 cmnlibbak -> /dev/block/sde23
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 ddr -> /dev/block/sdd1
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 devcfg -> /dev/block/sde16
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 devcfgbak -> /dev/block/sde17
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 devinfo -> /dev/block/sdb6
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 dip -> /dev/block/sdb5
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 dpo -> /dev/block/sde28
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 drm -> /dev/block/sda4
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 eksst -> /dev/block/sda11
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 encrypt -> /dev/block/sda10
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 eri -> /dev/block/sda7
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 factory -> /dev/block/sda9
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 fota -> /dev/block/sdb3
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 fsc -> /dev/block/sdf3
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 fsg -> /dev/block/sdb4
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 grow -> /dev/block/sda19
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 grow2 -> /dev/block/sdb7
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 grow3 -> /dev/block/sdc3
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 grow4 -> /dev/block/sdd4
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 grow5 -> /dev/block/sde29
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 grow6 -> /dev/block/sdf4
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 grow7 -> /dev/block/sdg2
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 hyp -> /dev/block/sde12
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 hypbak -> /dev/block/sde13
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 keymaster -> /dev/block/sde20
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 keymasterbak -> /dev/block/sde21
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 keystore -> /dev/block/sda14
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 laf -> /dev/block/sda1
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 lafbak -> /dev/block/sda2
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 misc -> /dev/block/sda8
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 modem -> /dev/block/sde18
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 modemst1 -> /dev/block/sdf1
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 modemst2 -> /dev/block/sdf2
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 mpt -> /dev/block/sda3
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 msadp -> /dev/block/sde27
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 operatorlogging -> /dev/block/sda6
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 persist -> /dev/block/sda15
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 persistent -> /dev/block/sdg1
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 pmic -> /dev/block/sde14
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 pmicbak -> /dev/block/sde15
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 raw_resources -> /dev/block/sde8
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 raw_resourcesbak -> /dev/block/sde9
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 rct -> /dev/block/sda12
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 recovery -> /dev/block/sde2
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 recoverybak -> /dev/block/sde3
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 reserve -> /dev/block/sdd2
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 rpm -> /dev/block/sde10
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 rpmbak -> /dev/block/sde11
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 sec -> /dev/block/sde19
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 sns -> /dev/block/sda5
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 ssd -> /dev/block/sda13
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 system -> /dev/block/sda16
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 tz -> /dev/block/sde4
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 tzbak -> /dev/block/sde5
lrwxrwxrwx 1 root root 16 2018-01-16 19:40 userdata -> /dev/block/sda18
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 xbl -> /dev/block/sdb1
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 xbl2 -> /dev/block/sdc1
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 xbl2bak -> /dev/block/sdc2
lrwxrwxrwx 1 root root 15 2018-01-16 19:40 xblbak -> /dev/block/sdb2
I am trying to download source to build twrp for the g6 but I am on my backup dsl (762kb/s) which sucks majorly.
If you are in an IRC chan I will be more then happy to join and give you access to my device remotely if need be.
on windows 10, latest insider build, all drivers installed, v20 detected in normal boot, download and fastboot modes. I'm reinstalling ubuntu just in case something weird happened with it..
@KAsp3rd Join #lglaf on irc.freenode.net
What I need is the GPT -- start LBA / end LBA of misc.
You can get that by running ./partitions.py --list
-- Brian
So after entering Download/LAF Mode and plugging in to computer, I get the following error when running the first command in step 6 of @Zacharee1's guide:
Code:
C:\lglaf>partitions.py --dump laf.img laf
LAF Crypto failed to import!
Traceback (most recent call last):
File "C:\lglaf\partitions.py", line 459, in <module>
main()
File "C:\lglaf\partitions.py", line 406, in main
comm = lglaf.autodetect_device()
File "C:\lglaf\lglaf.py", line 441, in autodetect_device
return USBCommunication()
File "C:\lglaf\lglaf.py", line 297, in __init__
custom_match = self._match_device)
File "C:\Users\SMTB\AppData\Local\Programs\Python\Python36-32\lib\site-packages\usb\core.py", line 1263, in find
raise NoBackendError('No backend available')
usb.core.NoBackendError: No backend available
As I am a total n00b, I have no idea what this means. Any help appreciated!
(using Windows Python install)
You didn't pip install cryptography or PyUSB
-- Brian
Getting the same backend error. Trying to reinstall just throws up an already installed reply. Windows 8.1
That is, trying to run the ./ cmds and the already installed elements are pyusb and crypt
runningnak3d said:
You didn't pip install cryptography or PyUSB
-- Brian
Click to expand...
Click to collapse
Well I did install those. When I try running pip install cryptography/PyUSB again, I get:
Code:
C:\lglaf>pip install cryptography
Requirement already satisfied: cryptography in c:\users\smtb\appdata\local\programs\python\python36-32\lib\site-packages
Requirement already satisfied: idna>=2.1 in c:\users\smtb\appdata\local\programs\python\python36-32\lib\site-packages (from cryptography)
Requirement already satisfied: six>=1.4.1 in c:\users\smtb\appdata\local\programs\python\python36-32\lib\site-packages (from cryptography)
Requirement already satisfied: asn1crypto>=0.21.0 in c:\users\smtb\appdata\local\programs\python\python36-32\lib\site-packages (from cryptography)
Requirement already satisfied: cffi>=1.7; platform_python_implementation != "PyPy" in c:\users\smtb\appdata\local\programs\python\python36-32\lib\site-packages (from cryptography)
Requirement already satisfied: pycparser in c:\users\smtb\appdata\local\programs\python\python36-32\lib\site-packages (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography)
C:\lglaf>pip install PyUSB
Requirement already satisfied: PyUSB in c:\users\smtb\appdata\local\programs\python\python36-32\lib\site-packages
I take it you aren't on Windows 10 so you can't install Ubuntu from the app store?
I can see now why @steadfasterX pushes FWUL (a Linux VM) for things like this. WIndows is such a freaking PITA
Hopefully someone that has Windows can help you, otherwise I am going to grab FWUL tomorrow and maybe change the procedure for people that aren't on WIndows 10.
-- Brian
ok, just tried the whole procedure from start to finish exactly for the second time and am getting the same "usb device not found"
I also tried the non windows 10 method and ended up having the same issue that smtb1963 has, including the laf crypto failed to import message at the top and I do believe that when it says no backend available under usb lib, that these ar basically the same error, no usb communication. I think i am going to try this on a unbuntu virtual box install and see if I get the same error

MAGISK - How do i proceed in this situation?

Phone: TCL C5 with Android 8.1
i have tested mtk-su and it works
i can make a copy of the boot partition and everything
i have unlocked the bootloader
for some reason i have 2 boot files ( or more )
lrwxrwxrwx 1 root root 21 2020-12-03 16:24 boot -> /dev/block/mmcblk0p31
lrwxrwxrwx 1 root root 21 2020-12-03 16:24 boot2 -> /dev/block/mmcblk0p32
lrwxrwxrwx 1 root root 20 2020-12-03 16:24 boot_para -> /dev/block/mmcblk0p3
lrwxrwxrwx 1 root root 23 2020-12-03 16:24 preloader_a -> /dev/block/mmcblk0boot0
lrwxrwxrwx 1 root root 23 2020-12-03 16:24 preloader_b -> /dev/block/mmcblk0boot1
i don't know what is going on here but i can patch boot and boot2 with magisk
the files goes from 24 MB to 7.7 MB so i think this is kinda weird
i want to know how i can make a good backup of everything before trying to flash anything
so i can prevent bootloop
and i want to know if there is any way to test the boot.img before flashing it
if not i would like some help to backup everything before flashing it
i patch the boot.img and try doing "fastboot boot boot.img"
but the magisk manager doesn't show installed or anything so i don't think "fastboot boot" works in this situation
is there anything i can do to be sure before flashing?
Update: seems like i only need boot and boot2
maybe patching both and flashing it?
seems a little risky, they both are the same file with the same md5sum hash

Categories

Resources