[Tutorial] Full Flash Backup And Restore - LG G8 Guides, News, & Discussion

This tutorial shows how to make a full backup of the phone flash and how to restore it. Codes fit LG G8 which with some minor modifications they can be used for any other Qualcomm based devices. If you provide me the "PartitionsList.xml" of other SDM855 devices maybe I'll modify codes for them too.
Be aware I'm not responsible if the phone gets harmed or backups get corrupted or harmful or any other jinx happens to the phone. You can just use the manual way to create backup, with the help of "partition manager".
Note 1: Phone must be in EDL mode. This is up to you to figure that out and get the phone into EDL mode. There are information in type of tubes and posts that tell how to do this.
Note 2: We can make backup of individual partitions or LUNs. In the process of restoring backup, the former can prove more efficient and I'd prepare such codes if OP partition didn't vary from one carrier/KDZ to another. So, thinking of a universal method, it will be concluded in making backup of LUNs. Since, some partitions are vital I prepared additional codes to create backup of them.
Note 3: There are 7 LUNs numbered from 0 to 6. The last LUN keeps FRP data and so is hidden; Qfil does not show any of this LUN. Be careful with that . There are some alignments and 4 other hidden partitions that are not shown in "partition manager". DevInfo and Limits in LUN4 whereas DDR and CDT in LUN3 are hidden. LUN3 itself is also completely hidden like LUN6. Anyway, in partition manager you can see what other LUNs are keeping. The provided codes make backup of all alignments and hidden partitions too.
Note 4: User data partition is not getting backed up due to the large size and yet not being necessary.
Note 5: The partition on the computer where QPST is installed should have at least 25GB free space.
Requisites
QPST and Qualcomm USB Driver (get)
LGE SM8150 Firehose (get)
Preparation
1. Install QPST and Qualcomm USB Driver.
Steps A
1. Open QFIL.
2. Change "Storage Type" to UFS.
3. Select "Flat Build".
4. Browse for "LGE SM8150 Firehose" and pick it.
5. Now, connect the phone to PC and boot into EDL mode.
6. Open "Select Port" and select the phone, press OK.
7. In "Tools" open the "Partition Manager". Keep the "Partition Manager" for the entire process.
Note 6: To dump partitions we use fh_loader which requires the "partition manager" to be opened so do not close it until after all get done, otherwise the phone may become bricked.
Note 7: In the following codes you need to add the port number of the phone right after "fh_loader.exe --port=\\.\COM". If yours is 3 then it should become "fh_loader.exe --port=\\.\COM3"
Steps B (Using fh_loader)
1. Go to QPST installation folder then go to bin folder.
2. Open CMD there.
3. In "partition manager" hit on "save partition file".
4. Go to "C:\Users\YOUR_USER_NAME\AppData\Roaming\Qualcomm\QFIL".
5. Open file named "COM#_PartitionsList.xml". (# is your phone port number)
6. Find the phrase "userdata" using search tool.
7. In this line, find "start_sector". There is a number in front of it, subtract 1 from this number and put it in place of "???????" in the code for LUN0.
For example: In VRZ a10, we see the number in front of "userdata" is 5285640 which we subtract 1 from it. The result will be 5285639 which we use in place of "???????" in LUN0 Code.
8. Put the following codes in CMD (make sure your phone's port number is added to codes).
Creating LUNs Backup
Spoiler
LUN 0
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN0_Complete.bin --start_sector=0 --lun=0 --num_sectors=??????? --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
LUN1
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN1_Complete.bin --start_sector=0 --lun=1 --num_sectors=2048 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
LUN2
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN2_Complete.bin --start_sector=0 --lun=2 --num_sectors=2048 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
LUN3
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN3_Complete.bin --start_sector=0 --lun=3 --num_sectors=2048 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
LUN4
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN4_Complete.bin --start_sector=0 --lun=4 --num_sectors=383995 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
LUN5
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN5_Complete.bin --start_sector=0 --lun=5 --num_sectors=3072 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
LUN6
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN6_Complete.bin --start_sector=0 --lun=6 --num_sectors=1024 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
Note 8: Restoration process is the same as the making backup process, in preparation and all other stuff. All backup files should be placed in bin folder of QPST installation folder before running codes.
Restoring LUNs Backup
Spoiler
LUN0
fh_loader.exe --port=\\.\COM --sendimage=LUN0_Complete.bin --start_sector=0 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
LUN1
fh_loader.exe --port=\\.\COM --sendimage=LUN1_Complete.bin --start_sector=0 --lun=1 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
LUN2
fh_loader.exe --port=\\.\COM --sendimage=LUN2_Complete.bin --start_sector=0 --lun=2 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
LUN3
fh_loader.exe --port=\\.\COM --sendimage=LUN3_Complete.bin --start_sector=0 --lun=3 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
LUN4
fh_loader.exe --port=\\.\COM --sendimage=LUN4_Complete.bin --start_sector=0 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
LUN5
fh_loader.exe --port=\\.\COM --sendimage=LUN5_Complete.bin --start_sector=0 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
LUN6
fh_loader.exe --port=\\.\COM --sendimage=LUN6_Complete.bin --start_sector=0 --lun=6 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
Creating Backup of Vital Partitions (FTM, Modemst1, Modemst2, FSG, FSC)
Spoiler
FTM
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=ftm.bin --start_sector=23816 --lun=0 --num_sectors=8192 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
Modemst1
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=modemst1.bin --start_sector=32 --lun=5 --num_sectors=512 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
Modemst2
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=modemst2.bin --start_sector=544 --lun=5 --num_sectors=512 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
FSG
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=fsg.bin --start_sector=1056 --lun=5 --num_sectors=512 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
FSC
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=fsc.bin --start_sector=1568 --lun=5 --num_sectors=32 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
Restoring Partitions
Spoiler
FTM
fh_loader.exe --port=\\.\COM --sendimage=ftm.bin --start_sector=23816 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
Modemst1
fh_loader.exe --port=\\.\COM --sendimage=modemst1.bin --start_sector=32 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
Modemst2
fh_loader.exe --port=\\.\COM --sendimage=modemst2.bin --start_sector=544 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
FSG
fh_loader.exe --port=\\.\COM --sendimage=fsg.bin --start_sector=1056 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
FSC
fh_loader.exe --port=\\.\COM --sendimage=fsc.bin --start_sector=1568 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
Note 9: Where are the backup files stored? QPST installation folder/bin.
Note10: Can I restore my phone's backup to my friend's phone? Yes, but do not expect it to cure IMEI problems of the second phone.
And, that's it =)
I'll see you around

Use the following codes to create backup of LG V60. You need more than 60GB of free space on the drive Qfil is installed.
Spoiler
LUN0
fh_loader.exe --port=\\.\COM8 --convertprogram2read --sendimage=LUN0_Complete.bin --start_sector=0 --lun=0 --num_sectors=5910055 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
LUN1
fh_loader.exe --port=\\.\COM8 --convertprogram2read --sendimage=LUN1_Complete.bin --start_sector=0 --lun=1 --num_sectors=2048 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
LUN2
fh_loader.exe --port=\\.\COM8 --convertprogram2read --sendimage=LUN2_Complete.bin --start_sector=0 --lun=2 --num_sectors=2048 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
LUN3
fh_loader.exe --port=\\.\COM8 --convertprogram2read --sendimage=LUN3_Complete.bin --start_sector=0 --lun=3 --num_sectors=2048 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
LUN4
fh_loader.exe --port=\\.\COM8 --convertprogram2read --sendimage=LUN4_Complete.bin --start_sector=0 --lun=4 --num_sectors=383995 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
LUN5
fh_loader.exe --port=\\.\COM8 --convertprogram2read --sendimage=LUN5_Complete.bin --start_sector=0 --lun=5 --num_sectors=4096 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

reserved

Great write up Netmsm, I'm sure others will benefit from it. Well done and very clear, thnx!

If I only load all my backups in partition manager I can restore to the factory carrier ROM?

mpena said:
If I only load all my backups in partition manager I can restore to the factory carrier ROM?
Click to expand...
Click to collapse
Yes.

Is this method safe for large partitions like 20GB, will they be corrupted ?

JigsawMobile said:
Is this method safe for large partitions like 20GB, will they be corrupted ?
Click to expand...
Click to collapse
There's no technical risk but one may encounter some environmental risk such as bad sectors on the flash or computer disk as well as malfunctioning USB port, hub or cable, etc.
I've made backups with even more than 20GB size and restore successfully.

netmsm said:
Yes.
Click to expand...
Click to collapse
I try but the phone didn't boot. Only logo and reboot. I gonna try later. Erasing and loading the backup files. I do manually the process by the way

mpena said:
I try but the phone didn't boot. Only logo and reboot. I gonna try later. Erasing and loading the backup files. I do manually the process by the way
Click to expand...
Click to collapse
Erase user data partition or factory reset

JigsawMobile said:
Erase user data partition or factory reset
Click to expand...
Click to collapse
I can confirm, now is working. thanks

Do you know command how to erase partition that can be used while eg. restoring backup, before croosflash..?

JigsawMobile said:
Do you know command how to erase partition that can be used while eg. restoring backup, before croosflash..?
Click to expand...
Click to collapse
I don't know the command, if there is any, but remaining of previous data will not be functioning and are like null after restoring.

Netmsm,​Hello, dear! Tell me, this is the meaning "--lun = 4 --num_sectors = 383995" For LG V40 where can I get? Thanks

lexih said:
Netmsm,​Hello, dear! Tell me, this is the meaning "--lun = 4 --num_sectors = 383995" For LG V40 where can I get? Thanks
Click to expand...
Click to collapse
Hello friend =) I'm sorry, I didn't get it! Would you explain please?

netmsm said:
Hello friend =) I'm sorry, I didn't get it! Would you explain please?
Click to expand...
Click to collapse
How to determine this number "num_sectors = 383995"? Or is it identical and on LG V40?

lexih said:
How to determine this number "num_sectors = 383995"? Or is it identical and on LG V40?
Click to expand...
Click to collapse
On partition manager window there's an option to save partition file. It gives all you need in a file on the address of USER\AppData\Roaming\Qualcomm\QFIL.

netmsm said:
On partition manager window there's an option to save partition file. It gives all you need in a file on the address of USER\AppData\Roaming\Qualcomm\QFIL.
Click to expand...
Click to collapse
Ok,thanks

Can you some kind soul please send me a backup of their Sprint LG G8 files?
I've screwed the pooch and should have read this thread before diving into the deep end.

RaskloP said:
Can you some kind soul please send me a backup of their Sprint LG G8 files?
I've screwed the pooch and should have read this thread before diving into the deep end.
Click to expand...
Click to collapse
What have you done exactly?

Related

[Q] Stuck in clockworkmod

i cant get passed clockword mod after i did a factory reset. i tried to restore decraped and the stock rom. it says restore complete then it loads the phone vibrate then the lg symbol shows up then it goes back to clockworkmod. i tried booting system in advanced restore and regular restore
---------- Post added at 05:25 AM ---------- Previous post was at 05:04 AM ----------
i just remembered that i also deleted all files on my internal memory before i tried to install the new rom. maybe that the problem, if it is, how do i get those files back on my internal memory?
try flashingent to stock rom
what are the steps for that process?
Download the stock root rom I'm development. Place it in external sd.clockworkwod.backup. go to backup and restore and select advamted restore and restore system from the stock rom
Sent from my VS910 4G using Tapatalk
i already did that, i was on revolt 1.3 then i went back to stock because im selling my phone, when i went back to stock, i wiped cache and erase data, went to advanced restore then i selected system, after that the phone said restore complete, but it boots up the lg symbol shows us and the phone goes back to clockworkmod. i also found a note in the clorkwork mod folder saying this, "Starting recovery on Thu Sep 22 04:38:02 2011
framebuffer: fd 4 (480 x 800)
ClockworkMod Recovery v4.0.0.2
recovery filesystem table
=========================
0 /tmp ramdisk (null) (null)
1 /boot emmc /dev/block/mmcblk0p9 (null)
2 /cache ext3 /dev/block/mmcblk0p6 (null)
3 /data ext3 /dev/block/mmcblk0p13 (null)
4 /recovery emmc /dev/block/mmcblk0p14 (null)
5 /sdcard vfat /dev/block/mmcblk1p1 (null)
6 /system ext3 /dev/block/mmcblk0p12 (null)
7 /sd-ext ext4 /dev/block/mmcblk1p2 (null)
8 /emmc vfat /dev/block/mmcblk0p15 (null)
I:Completed outputting fstab.
Irocessing arguments.
I:Checking arguments.
I:device_recovery_start()
Command: "/sbin/recovery"
ro.secure=0
ro.allow.mock.location=1
ro.debuggable=1
persist.service.adb.enable=1
ro.build.id=GINGERBREAD
ro.build.display.id=full_revolution-eng 2.3.4 GINGERBREAD eng.root.20110613.235937 test-keys
ro.build.version.incremental=eng.root.20110613.235937
ro.build.version.sdk=10
ro.build.version.codename=REL
ro.build.version.release=2.3.4
ro.build.date=Tue Jun 14 00:00:02 PDT 2011
ro.build.date.utc=0
ro.build.type=eng
ro.build.user=root
ro.build.host=thinserver
ro.build.tags=test-keys
ro.product.model=Full Android on Emulator
ro.product.brand=Android
ro.product.name=full_revolution
ro.product.device=revolution
ro.product.board=revolution
ro.product.cpu.abi=armeabi
ro.product.manufacturer=unknown
ro.product.locale.language=en
ro.product.locale.region=US
ro.wifi.channels=
ro.board.platform=unknown
ro.build.product=revolution
ro.build.description=full_revolution-eng 2.3.4 GINGERBREAD eng.root.20110613.235937 test-keys
ro.build.fingerprint=Android/full_revolution/revolution:2.3.4/GINGERBREAD/eng.root.20110613.235937:eng/test-keys
keyguard.no_require_sim=true
ro.ril.hsxpa=1
ro.ril.gprsclass=10
ro.config.notification_sound=OnTheHunt.ogg
ro.config.alarm_alert=Alarm_Classic.ogg
ro.kernel.android.checkjni=1
ro.setupwizard.mode=OPTIONAL
net.bt.name=Android
net.change=net.bt.name
dalvik.vm.stack-trace-file=/data/anr/traces.txt
ro.factorytest=0
ro.serialno=
ro.bootmode=unknown
ro.baseband=unknown
ro.carrier=unknown
ro.bootloader=unknown
ro.hardware=qcom
ro.revision=0
init.svc.recovery=running
init.svc.adbd=running
I:Checking for extendedcommand...
I:Skipping execution of extendedcommand, file not found...
No files found.
No files found.
No files found.
No files found.
-- Installing: /sdcard/update.zip
Finding update package...
I:Update location: /sdcard/update.zip
Opening update package...
E:Can't open /sdcard/update.zip
(No such file or directory)
Installation aborted.
That last post is interesting. But to get out of clockwork you need to flash the exitrecovery.zip found in the stuck in clockwork thread in the dev section.
Sent from my VS910 4G using xda premium
hey, mtmichaelson can u give me the link please
http://forum.xda-developers.com/showthread.php?t=1161537
mtmichaelson said:
That last post is interesting. But to get out of clockwork you need to flash the exitrecovery.zip found in the stuck in clockwork thread in the dev section.
Sent from my VS910 4G using xda premium
Click to expand...
Click to collapse
thanks it worked
---------- Post added at 09:25 PM ---------- Previous post was at 09:24 PM ----------
thanks for the link
---------- Post added at 09:25 PM ---------- Previous post was at 09:25 PM ----------
deftonesmw said:
http://forum.xda-developers.com/showthread.php?t=1161537
Click to expand...
Click to collapse
thanks for the link

e: failed to mount /efs (Invalid argument)

Yesterday I upgraded to JB, everything was fine until I got the idea how to reset the odin counter with terminal emulator.
I rebooted and then came back the wizard and it was in Russian, if I tried to do it crashed.
The baseband has been lost (although I have recovered)
NOW
If I try to flash jb or any other rom:
--Copyng media file:
E:Failed to mount /efs (Invalid argument)
--Appling multi csc
e: failed to mount /efs (Invalid argument)
e: multi_csc:Can't mount /efs
Click to expand...
Click to collapse
my phone displays the name and imei no problems, the baseband I recovered by flashing the stock rom samsung
I have a backup of EFS folder
(I had done it long ago with root explorer, just that I did not make a binary copy but a tar archive)
but even if you put it back with root explorer disappears and returns a folder with a lot less efs file
Content of my TAR backup of /efs
Il volume nell'unit… D Š Doc - Prog
Numero di serie del volume: 86DA-7FA3
Directory di D:\Administrator\Desktop\efs
14/02/2013 02:15 <DIR> .
14/02/2013 02:15 <DIR> ..
14/02/2013 02:12 <DIR> .files
31/12/2011 16:00 1 .nv_state
14/02/2013 02:12 <DIR> bluetooth
20/11/2012 14:01 6 calibration_data
01/01/2012 01:05 9 cryptprop_applied_result
03/01/2013 17:40 10 cryptprop_lockscreen.lockoutattemptdeadline
03/01/2013 17:52 6 cryptprop_lockscreen.password_type
03/01/2013 16:59 5 cryptprop_lockscreen.patterneverchosen
03/01/2013 17:52 6 cryptprop_lock_pattern_autolock
03/01/2013 16:59 5 cryptprop_lock_pattern_tactile_feedback_enabled
03/01/2013 16:59 5 cryptprop_lock_pattern_visible_pattern
13/01/2013 00:37 5 cryptprop_onetimeboot
01/01/2012 01:06 3 cryptprop_persist.sys.language
04/01/2013 12:46 12 cryptprop_persist.sys.timezone
01/01/2012 01:00 1 cryptprop_rebootMode
13/01/2013 00:37 3 cryptprop_securewipedata
14/02/2013 02:12 <DIR> dmp
01/01/2012 01:01 1 essiv
14/02/2013 02:12 <DIR> FactoryApp
10/08/2012 17:57 0 GUARDFIL
14/02/2013 02:12 <DIR> imei
14/02/2013 02:15 0 lista.txr
31/12/2011 16:00 217 nv.log
31/12/2011 16:00 0 nv_data.bin.md5
14/02/2013 02:12 <DIR> RFHAL
14/02/2013 02:12 <DIR> RFHAL.DEF
14/02/2013 02:12 <DIR> wifi
19 File 295 byte
10 Directory 239.271.510.016 byte disponibili
Click to expand...
Click to collapse
How can i fix it?
UP =(
KiraHack said:
UP =(
Click to expand...
Click to collapse
up
Up
Одг: e: failed to mount /efs (Invalid argument)
KiraHack said:
Up
Click to expand...
Click to collapse
Maybe you should flash it with Odin, but I am not sure. And if somebody know he will already answer you.
Sent from Galaxy S Advance
Try to mount efs partition as rw and ext4 type, then try to extract your backup again
Sent from my GT-I9070 using xda app-developers app
frapeti said:
Try to mount efs partition as rw and ext4 type, then try to extract your backup again
Sent from my GT-I9070 using xda app-developers app
Click to expand...
Click to collapse
The partition can not be mount =(

[Q] Htc One Bricked [SOLVED]

I bricked my phone trying to install some costum ROM.
I cant enter my recovery or boot the device.
Only thing i can enter is HBOOT 1.54.0000
If i try to go in recovery from it, it resets and it says over the htc logo at the start that it is entering recovery, and then for like a fraction of a second i see my CWM recovery and then it restarts again.
My bootloader is relocked. I cant do anything, any help?
Unlock your bootloader first and then flash a recovery. Then using adb sidelow of adb push send a Rom over to your phone and flash it. You should be fine
Sent from my HTC One using Tapatalk
How do i re-unlock my bootloader?
Search ?
Via HTCDev. The first you unlocked you got an unlock ticket in bin format.
Sent from my HTC One using Tapatalk
pavo122 said:
then for like a fraction of a second i see my CWM recovery and then it restarts again.
Click to expand...
Click to collapse
"fastboot erase cache" would solve that part ^^
pavo122 said:
How do i re-unlock my bootloader?
Click to expand...
Click to collapse
Are you s-on or s-off?
Found it!
But it says my device is not connected, i have htc drivers installed and everything.
Its connected via usb cable and in fastboot usb mode.
I have s-on
pavo122 said:
Found it!
But it says my device is not connected, i have htc drivers installed and everything.
Its connected via usb cable and in fastboot usb mode.
I have s-on
Click to expand...
Click to collapse
hboot 1.54, and s-on, and no rooted ROM ---> you need to unlock using HTCdev
nkk71 said:
hboot 1.54, and s-on, and no rooted ROM ---> you need to unlock using HTCdev
Click to expand...
Click to collapse
Just did, now im downloading CM 10.2 ROM for my phone. I tried to restore my ROM from CWM recovery but it cant "Can't mount /sdcard"
Probably because i cleared cache.
pavo122 said:
it cant "Can't mount /sdcard"
Probably because i cleared cache.
Click to expand...
Click to collapse
cant mount /sdcard
clearing the cache gives you this output:
Code:
E: Can't mount /cache/recovery/command
E: Can't mount /cache/recovery/log
E: Can't open /cache/recovery/log
E: Can't mount /cache/recovery/last_log
E: Can't open /cache/recovery/last_log
nothing to do with /sdcard.
nkk71 said:
cant mount /sdcard
clearing the cache gives you this output:
Code:
E: Can't mount /cache/recovery/command
E: Can't mount /cache/recovery/log
E: Can't open /cache/recovery/log
E: Can't mount /cache/recovery/last_log
E: Can't open /cache/recovery/last_log
nothing to do with /sdcard.
Click to expand...
Click to collapse
Yeah, but when i try to access my sdcart to install costum ROM i cant access it, can i install a ROM via fastboot command?
pavo122 said:
Yeah, but when i try to access my sdcart to install costum ROM i cant access it, can i install a ROM via fastboot command?
Click to expand...
Click to collapse
no only ruu.zip in fastboot ruu mode, but that won't work unless s-off.
i need a little more info please:
1- go to bootloader/FASTBOOT USB, and post a "fastboot getvar all" (remove IMEI and s/n before posting)
2- go to CWM recovery again, and open a shell "adb shell" then "~# mount"
EDIT: 3- you can try adb sideload
nkk71 said:
no only ruu.zip in fastboot ruu mode, but that won't work unless s-off.
i need a little more info please:
1- go to bootloader/FASTBOOT USB, and post a "fastboot getvar all" (remove IMEI and s/n before posting)
2- go to CWM recovery again, and open a shell "adb shell" then "~# mount"
EDIT: 3- you can try adb sideload
Click to expand...
Click to collapse
INFOversion: 0.5
INFOversion-bootloader: 1.54.0000
INFOversion-baseband: 4A.17.3250.14
INFOversion-cpld: None
INFOversion-microp: None
INFOversion-main: 2.24.401.8
INFOversion-misc: PVT SHIP S-ON
INFOmeid: 00000000000000
INFOproduct: m7_ul
INFOplatform: HBOOT-8064
INFOmodelid: PN0710000
INFOcidnum: HTC__032
INFObattery-status: good
INFObattery-voltage: 3894mV
INFOpartition-layout: Generic
INFOsecurity: on
INFObuild-mode: SHIP
INFOboot-mode: FASTBOOT
INFOcommitno-bootloader: dirty-d959c75800
INFOhbootpreupdate: 11
INFOgencheckpt: 0
I tryed adb shell, it gives me this http://prntscr.com/270h5i
pavo122 said:
INFOversion-bootloader: 1.54.0000
INFOversion-main: 2.24.401.8
INFOversion-misc: PVT SHIP S-ON
INFOproduct: m7_ul
INFOmodelid: PN0710000
INFOcidnum: HTC__032
I tryed adb shell, it gives me this http://prntscr.com/270h5i
Click to expand...
Click to collapse
ok /data is not mounted, not nice!!
in the shell can you check if it's corrupt:
~# e2fsck -n -v -f /dev/block/mmcblk0p37
example:
Code:
~ # e2fsck -n -v -f /dev/block/mmcblk0p37
e2fsck -n -v -f /dev/block/mmcblk0p37
e2fsck 1.41.14 (22-Dec-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
39356 inodes used (2.31%)
350 non-contiguous files (0.9%)
31 non-contiguous directories (0.1%)
# of inodes with ind/dind/tind blocks: 0/0/0
Extent depth histogram: 38933/54
4696398 blocks used (68.91%)
0 bad blocks
1 large file
36560 regular files
2426 directories
0 character device files
0 block device files
0 fifos
0 links
357 symbolic links (357 fast symbolic links)
4 sockets
--------
39347 files
~ #
don't repair anything just yet, let me know the output. also please copy/paste command prompt (preferred over screenshots)
Code:
~ # e2fsck -n -v -f /dev/block/mmcblk0p37
e2fsck -n -v -f /dev/block/mmcblk0p37
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/block/mmcblk0p
37
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
Even i can see that im screwed
pavo122 said:
Code:
~ # e2fsck -n -v -f /dev/block/mmcblk0p37
e2fsck -n -v -f /dev/block/mmcblk0p37
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/block/mmcblk0p
37
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
Even i can see that im screwed
Click to expand...
Click to collapse
hold on, be back in a few minutes, we're gonna "real" format your partition, and hope it's not a hardware fault!! gimme 5 mins or so...
nkk71 said:
hold on, be back in a few minutes, we're gonna "real" format your partition, and hope it's not a hardware fault!! gimme 5 mins or so...
Click to expand...
Click to collapse
ok, I'll wait! Thanks for helping bro, just have to point it out!
Try something before nkk71 gets your do some mounting and fixing...
http://d-h.st/9xX recovery 2.24.401.8.img - download and rename to recovery.img
Make sure you're in the bootloader go into fastboot and make sure the downloaded image is in the same folder as your fastboot.
fastboot flash recovery recovery.img
fastboot erase cache
fastboot reboot-bootloader
Go into bootloader and then choose Factory Reset - let that finish running
Phone will go out and start bootlooping. Now power off and go back to bootloader mode:
Go into fastboot
fastboot flash recovery <custom recovery>.img
fastboot erase cache
fastboot reboot-bootloader
Now you can go into recovery and see if you have the same error?
pavo122 said:
ok, I'll wait! Thanks for helping bro, just have to point it out!
Click to expand...
Click to collapse
Dont worry hes good, Helped me back fully stock.. :good::good::good: @nkk71
pavo122 said:
ok, I'll wait! Thanks for helping bro, just have to point it out!
Click to expand...
Click to collapse
okay, so let's do this one step at a time shall we, no rushing into things, no panicking,
1- if it software ----> we can fix it
2- if it's hardware problem, no matter how much we try it's hardware
let's hope for number 1, and here we go:
in the shell
~ # cat /proc/emmc
Code:
~ # [B]cat /proc/emmc[/B]
cat /proc/emmc
dev: size erasesize name
mmcblk0p19: 000ffa00 00000200 "misc"
mmcblk0p34: 00fffe00 00000200 "recovery"
mmcblk0p33: 01000000 00000200 "boot"
[B]mmcblk0p35: 73fffc00 00000200 "system" <-- we're gonna check this[/B]
mmcblk0p26: 00140200 00000200 "local"
[B]mmcblk0p36: 27fffe00 00000200 "cache" <-- we're gonna check this[/B]
[B]mmcblk0p37: 680000000 00000200 "userdata" <-- we're gonna check this[/B]
mmcblk0p22: 01400000 00000200 "devlog"
mmcblk0p24: 00040000 00000200 "pdata"
mmcblk0p27: 00010000 00000200 "extra"
mmcblk0p31: 04b00200 00000200 "radio"
mmcblk0p16: 03c00400 00000200 "adsp"
mmcblk0p15: 00100000 00000200 "dsps"
mmcblk0p17: 007ffa00 00000200 "radio_config"
mmcblk0p20: 00400000 00000200 "modem_st1"
mmcblk0p21: 00400000 00000200 "modem_st2"
mmcblk0p28: 00100000 00000200 "cdma_record"
mmcblk0p18: 02000000 00000200 "reserve_1"
mmcblk0p30: 034ffa00 00000200 "reserve_2"
mmcblk0p32: 05fffc00 00000200 "reserve_3"
mmcblk0p29: 06069e00 00000200 "reserve"
cache seems so me still mounted so:
~# umount /cache <-- (no "n"; it umount not unmount)
~# e2fsck -n -v -f /dev/block/mmcblk0p35
~# e2fsck -n -v -f /dev/block/mmcblk0p36
~# e2fsck -n -v -f /dev/block/mmcblk0p37 <- we know this is corrupt, but let's check the other too
post back and we'll take it from there...
---------- Post added at 08:08 PM ---------- Previous post was at 08:07 PM ----------
mctodd said:
Dont worry hes good, Helped me back fully stock.. :good::good::good: @nkk71
Click to expand...
Click to collapse
thanks for the vote of confidence, have you seen my SuperGuide (LOL, shameless advertising): http://forum.xda-developers.com/showthread.php?t=2541082

QFIL Partition Manager Working!

I started working to get QFIL to work with the Sprint OnePlus 7 Pro 5G as soon as I got the MSMDownloadTool for it.
I accomplished getting the partition manager working, which allows us to flash individual (SIGNED) partitions. We can now try flashing individual international partitions to gain unlocked bootloaders WITHOUT MSM and the need to flash entirely different variants. Plus, 5G users will keep their 5G modems! I need somebody with an international version to join me in TeamView or something, in order to pull the Bootloader and other Partitions.
If another dev here can help me in getting this to work, we could be on the road to bootloader unlocks without SIM unlocks.
jthein1989 said:
I started working to get QFIL to work with the Sprint OnePlus 7 Pro 5G as soon as I got the MSMDownloadTool for it.
I accomplished getting the partition manager working, which allows us to flash individual (SIGNED) partitions. We can now try flashing individual international partitions to gain unlocked bootloaders WITHOUT MSM and the need to flash entirely different variants. Plus, 5G users will keep their 5G modems! I need somebody with an international version to join me in TeamView or something, in order to pull the Bootloader and other Partitions.
If another dev here can help me in getting this to work, we could be on the road to bootloader unlocks without SIM unlocks.
Click to expand...
Click to collapse
Wow, you did it?
I saw the first thread you made where you were talking about extracting .xml files and firehose from OPS file for OP7P 5G for single partition backup/restore via qfil, but oneplus didn't provide you msm tool for 5g variant because "they didn't have it" (which is a lie, becuse if you watch a video from linus tech tips on how he visited oneplus quality test thing back in oneplus 6t days, you would have seen a section where they use THE SAME TOOL, in the firmware flashing section)
Could you provide a full list of files you got from .ops file? Did you get everything that is needed for flashing?
It would be nice if you could do something like this for oneplus 7 pro regular one, so we don't have to have our phones factory reset and BL locked after msm tool flash.
jthein1989 said:
I started working to get QFIL to work with the Sprint OnePlus 7 Pro 5G as soon as I got the MSMDownloadTool for it.
Click to expand...
Click to collapse
I've gotten to around the same point as you have, however I'm having a little bit a trouble getting QFIL to flash a partition. I think it has to do with me missing the proper rawprogram and patch0 XML files. Did you need these at all? If so, how did you obtain them? Appreciate the effort by the way, this ain't easy stuff.
---------- Post added at 09:46 PM ---------- Previous post was at 09:42 PM ----------
Xenos7 said:
Wow, you did it?
I saw the first thread you made where you were talking about extracting .xml files and firehose from OPS file for OP7P 5G for single partition backup/restore via qfil, but oneplus didn't provide you msm tool for 5g variant because "they didn't have it" (which is a lie, becuse if you watch a video from linus tech tips on how he visited oneplus quality test thing back in oneplus 6t days, you would have seen a section where they use THE SAME TOOL, in the firmware flashing section)
Could you provide a full list of files you got from .ops file? Did you get everything that is needed for flashing?
It would be nice if you could do something like this for oneplus 7 pro regular one, so we don't have to have our phones factory reset and BL locked after msm tool flash.
Click to expand...
Click to collapse
He was actually able to obtain the MSM tool from OnePlus. There's a thread on this forum for the download somewhere.
I've also been able to somewhat decrypt and extract files from OPS, but all I was able to obtain was the Firehose binary and an XML file, which contains program and patch commands. There's more to extract but I'm not completely sure how he did it to be honest.
Xenos7 said:
Wow, you did it?
I saw the first thread you made where you were talking about extracting .xml files and firehose from OPS file for OP7P 5G for single partition backup/restore via qfil, but oneplus didn't provide you msm tool for 5g variant because "they didn't have it" (which is a lie, becuse if you watch a video from linus tech tips on how he visited oneplus quality test thing back in oneplus 6t days, you would have seen a section where they use THE SAME TOOL, in the firmware flashing section)
Could you provide a full list of files you got from .ops file? Did you get everything that is needed for flashing?
It would be nice if you could do something like this for oneplus 7 pro regular one, so we don't have to have our phones factory reset and BL locked after msm tool flash.
Click to expand...
Click to collapse
I finally got the MSM for the Sprint variant. You can find that in my other post.
It's actually quite easy to pull partitions from the phone. As a matter of fact you can use both QFIL or MSM to do it. I haven't created a guide to do it through QFIL, yet... You can find my MSM guide in my Sprint MSM post.
To flash through QFIL you use partition manager to read and write individual partitions because the xmls aren't needed, partition manager maps out the UFS through Sahara.
And I must state. DO NOT use provision xmls to download, only to open Partition Manager.
You can only decrypt the firehose and provisioning xml from ops, not the partitions unfortunately. But you can pull every partition through MSM if you really want them. In my personal opinion, you only need a couple really. Except in the case of 5G phones, you need more for those.
Guy50570 said:
I've gotten to around the same point as you have, however I'm having a little bit a trouble getting QFIL to flash a partition. I think it has to do with me missing the proper rawprogram and patch0 XML files. Did you need these at all? If so, how did you obtain them? Appreciate the effort by the way, this ain't easy stuff.
---------- Post added at 09:46 PM ---------- Previous post was at 09:42 PM ----------
He was actually able to obtain the MSM tool from OnePlus. There's a thread on this forum for the download somewhere.
I've also been able to somewhat decrypt and extract files from OPS, but all I was able to obtain was the Firehose binary and an XML file, which contains program and patch commands. There's more to extract but I'm not completely sure how he did it to be honest.
Click to expand...
Click to collapse
You shouldn't need the RawProgram or Patch XMLs to write through partition manager. The partition manager already knows where they are located.
Provisioning XMLs are used by QFIL to map out LUNs, which are just virtual drives on the UFS. RawProgram and Patch XMLs are used by QFIL to map the partitions in the LUNs. Which in this case aren't needed. (MSMDownloadTool maps both LUNs and Partitions, but doesn't have the ability to flash single partitions).
Edit: Sorry, I didn't see the other question. In order to get RawProgram and Patch XMLs, you have to decrypt the GPT partitions. I have the scripts to make them, but it's a headache, and they shouldn't be needed.
jthein1989 said:
You shouldn't need the RawProgram or Patch XMLs to write through partition manager. The partition manager already knows where they are located.
Provisioning XMLs are used by QFIL to map out LUNs, which are just virtual drives on the UFS. RawProgram and Patch XMLs are used by QFIL to map the partitions in the LUNs. Which in this case aren't needed. (MSMDownloadTool maps both LUNs and Partitions, but doesn't have the ability to flash single partitions).
Edit: Sorry, I didn't see the other question. In order to get RawProgram and Patch XMLs, you have to decrypt the GPT partitions. I have the scripts to make them, but it's a headache, and they shouldn't be needed.
Click to expand...
Click to collapse
So those 2 xmls are generated from PrimaryGPT and BackupGPT, and they are used to generate partition table of the device, and to point qfil to which partitions to flash different images correct?
If that's the case then it's logical they are not needed for single partition flashing.
Single partition flashing is done with only using sahara comunication with the device (and firehose?) correct?
And what is counted in as a "signed" image for flashing. Can we just take a dd of an image and flash it with qfil later, or do we need to use msm tool readback to do so? Those should be fine right?
If not then only ones which should work are ones in .ops, and there is a little bit of a problem when it comes to obtaining them.
Edit: When I said what is counted in as signed, dd or msm dump, I meant if they are unchanged, and all official, will they still be counted as signed, or recognized as official?
Xenos7 said:
So those 2 xmls are generated from PrimaryGPT and BackupGPT, and they are used to generate partition table of the device, and to point qfil to which partitions to flash different images correct?
If that's the case then it's logical they are not needed for single partition flashing.
Single partition flashing is done with only using sahara comunication with the device (and firehose?) correct?
And what is counted in as a "signed" image for flashing. Can we just take a dd of an image and flash it with qfil later, or do we need to use msm tool readback to do so? Those should be fine right?
If not then only ones which should work are ones in .ops, and there is a little bit of a problem when it comes to obtaining them.
Click to expand...
Click to collapse
You bring up a great point. I'm not sure if you can write partitions gained from MSM's ReadBack functionality in QFIL? I'm sure, no I'm positive you can write partitions read from QFIL though. I'm not aware of any way to extract partitions from an ops in order to even attempt to write them.
That is why I needed somebody with an unlocked phone to ReadBack through MSM or Read from QFIL their partitions. In order to attempt to write them individually through QFIL.
jthein1989 said:
You shouldn't need the RawProgram or Patch XMLs to write through partition manager. The partition manager already knows where they are located.
Provisioning XMLs are used by QFIL to map out LUNs, which are just virtual drives on the UFS. RawProgram and Patch XMLs are used by QFIL to map the partitions in the LUNs. Which in this case aren't needed. (MSMDownloadTool maps both LUNs and Partitions, but doesn't have the ability to flash single partitions).
Edit: Sorry, I didn't see the other question. In order to get RawProgram and Patch XMLs, you have to decrypt the GPT partitions. I have the scripts to make them, but it's a headache, and they shouldn't be needed.
Click to expand...
Click to collapse
Hm, I see. Wonder why I'm getting this error then.
Code:
09:42:54: {ERROR: program FAILED - Please see log}
Writing log to 'C:\Users\{username}\AppData\Roaming\Qualcomm\QFIL\COMPORT_5\port_trace.txt', might take a minute
Log is 'C:\Users\{username}\AppData\Roaming\Qualcomm\QFIL\COMPORT_5\port_trace.txt'
Send Image Fail:FireHose Fail:FHLoader Fail:Process fail
Finish Send Image
Everything else before this point seems to work just fine so, slightly confused here as to what I need.
Guy50570 said:
Hm, I see. Wonder why I'm getting this error then.
Everything else before this point seems to work just fine so, slightly confused here as to what I need.
Click to expand...
Click to collapse
I will try to look. Sundays are a busy day for me. I'll let you know.
jthein1989 said:
I will try to look. Sundays are a busy day for me. I'll let you know.
Click to expand...
Click to collapse
Hey, no worries, I'm not in any rush, just trying to help out the best I can.
Any update?
Flashing a single partition is not hard, you do need the payload and the patch both xml, not to mention loader,
Below is an example from a ZTE: Zmax Pro:
rawprogram0.xml
Code:
<?xml version="1.0" ?>
<data>
<!--NOTE: This is an ** Autogenerated file **-->
<!--NOTE: Sector size is 512bytes-->
<program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="recovery.img" label="recovery" num_partition_sectors="98304" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="49152.0" sparse="false" start_byte_hex="0x15000000" start_sector="688128"/>
</data>
patch0.xml:
Code:
<?xml version="1.0" ?>
<patches>
<!--NOTE: This is an ** Autogenerated file **-->
<!--NOTE: Patching is in little endian format, i.e. 0xAABBCCDD will look like DD CC BB AA in the file or on disk-->
<!--NOTE: This file is used by Trace32 - So make sure to add decimals, i.e. 0x10-10=0, *but* 0x10-10.=6.-->
<patch SECTOR_SIZE_IN_BYTES="512" byte_offset="168" filename="gpt_main0.bin" physical_partition_number="0" size_in_bytes="8" start_sector="11" value="NUM_DISK_SECTORS-34." what="Update last partition 38 'userdata' with actual size in Primary Header."/>
<patch SECTOR_SIZE_IN_BYTES="512" byte_offset="168" filename="DISK" physical_partition_number="0" size_in_bytes="8" start_sector="11" value="NUM_DISK_SECTORS-34." what="Update last partition 38 'userdata' with actual size in Primary Header."/>
<patch SECTOR_SIZE_IN_BYTES="512" byte_offset="168" filename="gpt_backup0.bin" physical_partition_number="0" size_in_bytes="8" start_sector="9" value="NUM_DISK_SECTORS-34." what="Update last partition 38 'userdata' with actual size in Backup Header."/>
<patch SECTOR_SIZE_IN_BYTES="512" byte_offset="168" filename="DISK" physical_partition_number="0" size_in_bytes="8" start_sector="NUM_DISK_SECTORS-24." value="NUM_DISK_SECTORS-34." what="Update last partition 38 'userdata' with actual size in Backup Header."/>
<patch SECTOR_SIZE_IN_BYTES="512" byte_offset="48" filename="gpt_main0.bin" physical_partition_number="0" size_in_bytes="8" start_sector="1" value="NUM_DISK_SECTORS-34." what="Update Primary Header with LastUseableLBA."/>
<patch SECTOR_SIZE_IN_BYTES="512" byte_offset="48" filename="DISK" physical_partition_number="0" size_in_bytes="8" start_sector="1" value="NUM_DISK_SECTORS-34." what="Update Primary Header with LastUseableLBA."/>
<patch SECTOR_SIZE_IN_BYTES="512" byte_offset="48" filename="gpt_backup0.bin" physical_partition_number="0" size_in_bytes="8" start_sector="32" value="NUM_DISK_SECTORS-34." what="Update Backup Header with LastUseableLBA."/>
<patch SECTOR_SIZE_IN_BYTES="512" byte_offset="48" filename="DISK" physical_partition_number="0" size_in_bytes="8" start_sector="NUM_DISK_SECTORS-1." value="NUM_DISK_SECTORS-34." what="Update Backup Header with LastUseableLBA."/>
<patch SECTOR_SIZE_IN_BYTES="512" byte_offset="32" filename="gpt_main0.bin" physical_partition_number="0" size_in_bytes="8" start_sector="1" value="NUM_DISK_SECTORS-1." what="Update Primary Header with BackupGPT Header Location."/>
<patch SECTOR_SIZE_IN_BYTES="512" byte_offset="32" filename="DISK" physical_partition_number="0" size_in_bytes="8" start_sector="1" value="NUM_DISK_SECTORS-1." what="Update Primary Header with BackupGPT Header Location."/>
<patch SECTOR_SIZE_IN_BYTES="512" byte_offset="24" filename="gpt_backup0.bin" physical_partition_number="0" size_in_bytes="8" start_sector="32" value="NUM_DISK_SECTORS-1." what="Update Backup Header with CurrentLBA."/>
<patch SECTOR_SIZE_IN_BYTES="512" byte_offset="24" filename="DISK" physical_partition_number="0" size_in_bytes="8" start_sector="NUM_DISK_SECTORS-1." value="NUM_DISK_SECTORS-1." what="Update Backup Header with CurrentLBA."/>
<patch SECTOR_SIZE_IN_BYTES="512" byte_offset="72" filename="gpt_backup0.bin" physical_partition_number="0" size_in_bytes="8" start_sector="32" value="NUM_DISK_SECTORS-33." what="Update Backup Header with Partition Array Location."/>
<patch SECTOR_SIZE_IN_BYTES="512" byte_offset="72" filename="DISK" physical_partition_number="0" size_in_bytes="8" start_sector="NUM_DISK_SECTORS-1" value="NUM_DISK_SECTORS-33." what="Update Backup Header with Partition Array Location."/>
<patch SECTOR_SIZE_IN_BYTES="512" byte_offset="88" filename="gpt_main0.bin" physical_partition_number="0" size_in_bytes="4" start_sector="1" value="CRC32(2,5120)" what="Update Primary Header with CRC of Partition Array."/>
<patch SECTOR_SIZE_IN_BYTES="512" byte_offset="88" filename="DISK" physical_partition_number="0" size_in_bytes="4" start_sector="1" value="CRC32(2,5120)" what="Update Primary Header with CRC of Partition Array."/>
<patch SECTOR_SIZE_IN_BYTES="512" byte_offset="88" filename="gpt_backup0.bin" physical_partition_number="0" size_in_bytes="4" start_sector="32" value="CRC32(0,5120)" what="Update Backup Header with CRC of Partition Array."/>
<patch SECTOR_SIZE_IN_BYTES="512" byte_offset="88" filename="DISK" physical_partition_number="0" size_in_bytes="4" start_sector="NUM_DISK_SECTORS-1." value="CRC32(NUM_DISK_SECTORS-33.,5120)" what="Update Backup Header with CRC of Partition Array."/>
<patch SECTOR_SIZE_IN_BYTES="512" byte_offset="16" filename="gpt_main0.bin" physical_partition_number="0" size_in_bytes="4" start_sector="1" value="0" what="Zero Out Header CRC in Primary Header."/>
<patch SECTOR_SIZE_IN_BYTES="512" byte_offset="16" filename="gpt_main0.bin" physical_partition_number="0" size_in_bytes="4" start_sector="1" value="CRC32(1,92)" what="Update Primary Header with CRC of Primary Header."/>
<patch SECTOR_SIZE_IN_BYTES="512" byte_offset="16" filename="DISK" physical_partition_number="0" size_in_bytes="4" start_sector="1" value="0" what="Zero Out Header CRC in Primary Header."/>
<patch SECTOR_SIZE_IN_BYTES="512" byte_offset="16" filename="DISK" physical_partition_number="0" size_in_bytes="4" start_sector="1" value="CRC32(1,92)" what="Update Primary Header with CRC of Primary Header."/>
<patch SECTOR_SIZE_IN_BYTES="512" byte_offset="16" filename="gpt_backup0.bin" physical_partition_number="0" size_in_bytes="4" start_sector="32" value="0" what="Zero Out Header CRC in Backup Header."/>
<patch SECTOR_SIZE_IN_BYTES="512" byte_offset="16" filename="gpt_backup0.bin" physical_partition_number="0" size_in_bytes="4" start_sector="32" value="CRC32(32,92)" what="Update Backup Header with CRC of Backup Header."/>
<patch SECTOR_SIZE_IN_BYTES="512" byte_offset="16" filename="DISK" physical_partition_number="0" size_in_bytes="4" start_sector="NUM_DISK_SECTORS-1." value="0" what="Zero Out Header CRC in Backup Header."/>
<patch SECTOR_SIZE_IN_BYTES="512" byte_offset="16" filename="DISK" physical_partition_number="0" size_in_bytes="4" start_sector="NUM_DISK_SECTORS-1." value="CRC32(NUM_DISK_SECTORS-1.,92)" what="Update Backup Header with CRC of Backup Header."/>
</patches>
Now you see the idea?
Have there been any developments on the Sprint OP7Pro 5g? I was gifted one this holiday and practically have no use for it until bootloader unlock is available.
jthein1989 said:
I started working to get QFIL to work with the Sprint OnePlus 7 Pro 5G as soon as I got the MSMDownloadTool for it.
I accomplished getting the partition manager working, which allows us to flash individual (SIGNED) partitions. We can now try flashing individual international partitions to gain unlocked bootloaders WITHOUT MSM and the need to flash entirely different variants. Plus, 5G users will keep their 5G modems! I need somebody with an international version to join me in TeamView or something, in order to pull the Bootloader and other Partitions.
If another dev here can help me in getting this to work, we could be on the road to bootloader unlocks without SIM unlocks.
Click to expand...
Click to collapse
What would you like from my 7Pro?
I'm running 10.3 though.
Del
I have to give a big shout out and I just want to thank everyone for their hard work on figuring the procedures out for unlocking the bootloader, and flashing the these phones.
The tutorial for unlocking the bootloader for the Sprint Oneplus 7 Pro 5G work flawlessly if you follow the tutoralial:
https://forum.xda-developers.com/on...otloader-unlock-sprint-oneplus-7-pro-t4042145
When I first received my phone I bought off eBay I went ahead and set the phone up and upgraded the phone over OTA to
android OS to v10.0.2. This was so I could use the TWRP for Q (10) during the bootloder unlock setup to fix the issues with it
rebooting back into the bootloader. One thing I did learn during the process that it might try to boot into system and
get stuck on the Sprint 5G boot animation. So to force it to power cycle press (VOLUME UP + POWER) buttons and hold them
until it does reboot and then quickly press and hold the (VOLUME UP + VOLUME DOWN + POWER) buttons to boot back into bootloader and
run the FIX instructions again.
Once the bootloader was unlocked I used this tutorial to cross flash the firmware to the OnePlus 7 Pro 5G European. Then went through
the phone setup process and then installed the Oxegen Updater APK to downloaded the firmware to forced it to update to the latest 10.0.6 firmware by manually installing
it through the System Update under the gear Local update. Tutorial found here:
https://forum.xda-developers.com/oneplus-7-pro/how-to/discussion-oneplus-7-pro-5g-rom-gsi-t4042583
Then I followed the tutorial to installing TWRP for Q (10) and to root installing Magisk:
https://forums.oneplus.com/threads/...magisk-twrp-oneplus-7-pro-android-10.1178410/
I found out during the process of flashing and updating to the Oxegen 10.0.6 European firmware the bootloader had re-locked.
So I had to follow the steps once again to unlock the bootloader and then followed the guide of rooting the Sprint OnePlus 7 Pro
5G.
Now to the part I have run into trouble trying to remove the SIM LOCK on the phone to Sprint:
I tried to follow the tutorial of SIM UNLOCKING the T-Mobile OnePlus 7 Pro:
https://forum.xda-developers.com/oneplus-6t/how-to/guide-sim-unlock-t-mobile-version-type-t3915269
Fist I did back up my phone in TWRP. However, when you run these two fastboot commands from the bootloader it will FAIL:
fastboot erase modemst1
fastboot erase modemst2
The Error messages are:
Erasing 'modemst1' FAILED (remote: 'Erase is not allowed for Critical Partitions')
fastboot: error: Command failed
Erasing 'modemst1' FAILED (remote: 'Erase is not allowed for Critical Partitions')
fastboot: error: Command failed
So after doing some research and running this fastboot command I found out that not everything unlocked:
fastboot oem device-info
And it's output:
(bootloader) Verity mode: true
(bootloader) Device unlocked: true
(bootloader) Device critical unlocked: false
(bootloader) Charger screen enabled: true
(bootloader) enable_dm_verity: true
(bootloader) have_console: false
(bootloader) selinux_type: SELINUX_TYPE_INVALID
(bootloader) boot_mode: NORMAL_MODE
(bootloader) kmemleak_detect: false
(bootloader) force_training: 0
(bootloader) mount_tempfs: 0
(bootloader) op_abl_version: 0x31
(bootloader) cal_rebootcount: 0x31
OKAY [ 0.064s]
Finished. Total time: 0.071s
As you can see the Device critical unlocked is: false. So you cannot write to those partitions.
I tried the fastboot commands:
fastboot flashing unlock_critical
fastboot oem unlock_critical
Both with same message:
FAILED (remote: ' Device already : unlocked!')
fastboot: error: Command failed
I even tried the shell commands to overwrite the two partitions from TWRP and from command prompt using
adb from platform tools:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst1
dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst2
And it's output:
/system/bin/sh: adb: inaccessible or not found
Modemst1, modemst2 and zero do exist but being bootloader critial locked you still cannot write to the partitions even with root.
So next I looked into using QPST package and erasing the partitions using Partition Manager from QFIL utility but need the firehose
file for SM8150 chipset and the following site does not have it listed:
https://forum.hovatek.com/thread-25696.html
Good tutorial on using the QFIL and updating partition:
https://www.youtube.com/watch?v=MdknZvaTwl4
So finding this thread it was said you extract the firehose file from the MsmDownloadTool OPS file. I tried using the python script github to dump the OPS file
but I could never get crypto to compile correctly on my windows box for python and used another branch said not a WIN32 file error for crypto. Found here:
https://github.com/bkerler/oppo_decrypt
So my question is how do you extract the firehose file from the MsmDownloadTool OPS file so we can possibly enable writing to the critical partitions so you can make other updates
such as modifying the apns-conf.xml because you cannot write to critical partitions even with root privileges.
Thanks in advance for any advice and help!
Hi pulled with oppo_decrypt..
joecowboy said:
I have to give a big shout out and I just want to thank everyone for their hard work on figuring the procedures out for unlocking the bootloader, and flashing the these phones.
The tutorial for unlocking the bootloader for the Sprint Oneplus 7 Pro 5G work flawlessly if you follow the tutoralial:
https://forum.xda-developers.com/on...otloader-unlock-sprint-oneplus-7-pro-t4042145
When I first received my phone I bought off eBay I went ahead and set the phone up and upgraded the phone over OTA to
android OS to v10.0.2. This was so I could use the TWRP for Q (10) during the bootloder unlock setup to fix the issues with it
rebooting back into the bootloader. One thing I did learn during the process that it might try to boot into system and
get stuck on the Sprint 5G boot animation. So to force it to power cycle press (VOLUME UP + POWER) buttons and hold them
until it does reboot and then quickly press and hold the (VOLUME UP + VOLUME DOWN + POWER) buttons to boot back into bootloader and
run the FIX instructions again.
Once the bootloader was unlocked I used this tutorial to cross flash the firmware to the OnePlus 7 Pro 5G European. Then went through
the phone setup process and then installed the Oxegen Updater APK to downloaded the firmware to forced it to update to the latest 10.0.6 firmware by manually installing
it through the System Update under the gear Local update. Tutorial found here:
https://forum.xda-developers.com/oneplus-7-pro/how-to/discussion-oneplus-7-pro-5g-rom-gsi-t4042583
Then I followed the tutorial to installing TWRP for Q (10) and to root installing Magisk:
https://forums.oneplus.com/threads/...magisk-twrp-oneplus-7-pro-android-10.1178410/
I found out during the process of flashing and updating to the Oxegen 10.0.6 European firmware the bootloader had re-locked.
So I had to follow the steps once again to unlock the bootloader and then followed the guide of rooting the Sprint OnePlus 7 Pro
5G.
Now to the part I have run into trouble trying to remove the SIM LOCK on the phone to Sprint:
I tried to follow the tutorial of SIM UNLOCKING the T-Mobile OnePlus 7 Pro:
https://forum.xda-developers.com/oneplus-6t/how-to/guide-sim-unlock-t-mobile-version-type-t3915269
Fist I did back up my phone in TWRP. However, when you run these two fastboot commands from the bootloader it will FAIL:
fastboot erase modemst1
fastboot erase modemst2
The Error messages are:
Erasing 'modemst1' FAILED (remote: 'Erase is not allowed for Critical Partitions')
fastboot: error: Command failed
Erasing 'modemst1' FAILED (remote: 'Erase is not allowed for Critical Partitions')
fastboot: error: Command failed
So after doing some research and running this fastboot command I found out that not everything unlocked:
fastboot oem device-info
And it's output:
(bootloader) Verity mode: true
(bootloader) Device unlocked: true
(bootloader) Device critical unlocked: false
(bootloader) Charger screen enabled: true
(bootloader) enable_dm_verity: true
(bootloader) have_console: false
(bootloader) selinux_type: SELINUX_TYPE_INVALID
(bootloader) boot_mode: NORMAL_MODE
(bootloader) kmemleak_detect: false
(bootloader) force_training: 0
(bootloader) mount_tempfs: 0
(bootloader) op_abl_version: 0x31
(bootloader) cal_rebootcount: 0x31
OKAY [ 0.064s]
Finished. Total time: 0.071s
As you can see the Device critical unlocked is: false. So you cannot write to those partitions.
I tried the fastboot commands:
fastboot flashing unlock_critical
fastboot oem unlock_critical
Both with same message:
FAILED (remote: ' Device already : unlocked!')
fastboot: error: Command failed
I even tried the shell commands to overwrite the two partitions from TWRP and from command prompt using
adb from platform tools:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst1
dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst2
And it's output:
/system/bin/sh: adb: inaccessible or not found
Modemst1, modemst2 and zero do exist but being bootloader critial locked you still cannot write to the partitions even with root.
So next I looked into using QPST package and erasing the partitions using Partition Manager from QFIL utility but need the firehose
file for SM8150 chipset and the following site does not have it listed:
https://forum.hovatek.com/thread-25696.html
Good tutorial on using the QFIL and updating partition:
So finding this thread it was said you extract the firehose file from the MsmDownloadTool OPS file. I tried using the python script github to dump the OPS file
but I could never get crypto to compile correctly on my windows box for python and used another branch said not a WIN32 file error for crypto. Found here:
https://github.com/bkerler/oppo_decrypt
So my question is how do you extract the firehose file from the MsmDownloadTool OPS file so we can possibly enable writing to the critical partitions so you can make other updates
such as modifying the apns-conf.xml because you cannot write to critical partitions even with root privileges.
Thanks in advance for any advice and help!
Click to expand...
Click to collapse
I pulled the firehose for the T-Mobile. It's uploaded on my sim unlock post
Awesome, I will have to do some more testing! I love this phone. Thank you!
joecowboy said:
Awesome, I will have to do some more testing! I love this phone. Thank you!
Click to expand...
Click to collapse
I have been testing like crazy.i just confurmed the lock is 100% in the modemst1 and modemst2. But they are encrypted so that the sim info has to pass through them .so that if deleted there no way to get the sims to work.we need a programmer this is way over my head.

[Tutorial] Rescue From HARD BRICK

Don't worry!
Everything's gonna be alright
You may accidentally erase all partitions and GPT on your phone. Nothing is shown in "Partition Manager". Since there's no Rawprogram XML file we need an alternative method to get the phone back on again.
This tutorial shows how to recover from a hard brick state. Be aware that identity data of the phone are stored in LUN5 (modemst1, modemst2, fsg and fsc) and are incapable of recovering. So, you need to repair IMEI.
Except using IMEI repair tool box, there is only one possible way to rewrite IMEI but as far as I know the phone will throw an error that this phone is permanently locked.
On the SDM855 flash we have 7 LUNs. Each Lun is devided into several partitions where data are stored. Some of the partitions are necessary in order that phone can turn on. They are in LUN0, LUN1 and LUN4. If you have no backup you need to extract the necessary or all partitions from a KDZ. So, do a search for how to extract the new KDZ files, learn and do it. There are some difficulties with extracting OP partition so make sure you do it correctly. Since, it's been explained in this forum I'm not gonna re-explain anything.
So, let's get started =)
For other models than LG G8 please read post #2.
Requisites
QPST and Qualcomm USB Driver (get)
LGE SM8150 Firehose (get)
Other Downloads
Sprint dumped ROM (get) [optional]
Necessary files for LG G8X (get from this post) thanks to @davembg [optional]
LG V50 GPT files (get) [optional]
Preparation
1. Install QPST and Qualcomm USB Driver.
Basic Steps
1. Open QFIL.
2. Change "Storage Type" to UFS.
3. Select "Flat Build".
4. Browse for "LGE SM8150 Firehose" and pick it.
5. Now, connect the phone to PC and boot into EDL mode.
6. Open "Select Port" and select the phone, press OK.
7. In "Tools" open the "Partition Manager". Keep the "Partition Manager" for the entire process.
A) I have a backup.
1. Download GPT files (get).
2. Flash GPT files using FH_Loader (Part C).
3. Flash the necessary partitions using FH_Loader (Part D) or restore partitions using "Partition Manager". ONLY USE YOUR BACKUP FILES.
4. Close "Partition Manager" wait for about 5 seconds then press and hold Vol- and Power for 10 seconds.
5. After restart quickly release buttons and press and hold Vol+ to get into "Download Mode".
6. Flash any KDZ but use instruction in this thread (Part C) to avoid "OPID Mismatched Error".
B) I have no backup.
Ba) I was not on Sprint or ATT last time before hard brick.
1. Download GPT files (get).
2. Flash GPT files using FH_Loader (Part C).
3. Flash the necessary partitions using FH_Loader (Part D). You need to extract and use the necessary partitions from the same KDZ which you had flashed on the phone last time before hard brick or it may not work.
4. Close "Partition Manager" wait for about 5 seconds then press and hold Vol- and Power for 10 seconds.
5. After restart quickly release buttons and press and hold Vol+ to get into "Download Mode".
6. Flash any KDZ but use instruction in this thread (Part C) to avoid "OPID Mismatched Error".
Bb) I was on Sprint or ATT last time right before hard brick.
1. Download GPT files (get).
2. Flash GPT files using FH_Loader (Part C).
3. Flash all the partitions using FH_Loader, just side a, extracted from any KDZ (Part E). To test your luck, extract and use the necessary partitions of an A10 KDZ.
4. Close "Partition Manager" wait for about 5 seconds then press and hold Vol- and Power for 10 seconds.
5. After restart quickly release buttons and press and hold Vol+ to get into "Download Mode".
6. Flash any KDZ but use instruction in this thread (Part C) to avoid "OPID Mismatched Error".
C) Flashing GPT Files.
1. Move GPT files to the "bin" folder in QPST installation folder.
2. While you are in "bin" folder, open CMD there.
Note: Remember you need to have "Partition Manager" opened.
3. Find the port number of the phone from "Device Manager".
4. Add the the number (port number) right after "fh_loader.exe --port=\\.\com" in the following codes.
4.1. For example, mine is "3" so it would be "fh_loader.exe --port=\\.\com3".
Spoiler
fh_loader.exe --port=\\.\com --sendimage=LUN0.bin --start_sector=0 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=LUN1.bin --start_sector=0 --lun=1 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=LUN2.bin --start_sector=0 --lun=2 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=LUN3.bin --start_sector=0 --lun=3 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=LUN4.bin --start_sector=0 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=LUN5.bin --start_sector=0 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=LUN6.bin --start_sector=0 --lun=6 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
5. Modify the codes and use them in the CMD.
6. If anything goes wrong you may get the "error" message instead of "done" message.
D) Flash The Necessary Partitions.
Note: Necessary partitions are the ones that make the phone capable of turning on and going to Download Mode.
Spoiler
abl_a
akmu_a
aop_a
cmnlib_a
cmnlib64_a
devcfg_a
dsp_a
dtbo_a
hyp_a
keymaster_a
laf_a
power
tz_a
uefisecapp_a
vbmeta_a
xbl_a
xbl_config_a
1. Move files to the "bin" folder in QPST installation folder.
2. While you are in "bin" folder, open CMD there.
Note: Remember you need to have "Partition Manager" opened.
3. Find the port number of the phone from "Device Manager".
4. Add the the number (port number) right after "fh_loader.exe --port=\\.\com" in the following codes.
4.1. For example, mine is "3" so it would be "fh_loader.exe --port=\\.\com3".
Spoiler
fh_loader.exe --port=\\.\com --sendimage=power.img --start_sector=32008 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=xbl_a.img --start_sector=6 --lun=1 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=xbl_config_a.img --start_sector=902 --lun=1 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=aop_a.img --start_sector=6 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=tz_a.img --start_sector=134 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=abl_a.img --start_sector=66826 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=dsp_a.img --start_sector=67082 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=keymaster_a.img --start_sector=83466 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=akmu_a.img --start_sector=83594 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=cmnlib_a.img --start_sector=108298 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=cmnlib64_a.img --start_sector=108426 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=devcfg_a.img --start_sector=108554 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=laf_a.img --start_sector=108606 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=vbmeta_a.img --start_sector=120894 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=dtbo_a.img --start_sector=120910 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=uefisecapp_a.img --start_sector=127054 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
5. Modify the codes and use them in the CMD.
6. If anything goes wrong you may get the "error" message instead of "done" message.
E) Flash All Partitions.
1. Move files to the "bin" folder in QPST installation folder.
2. While you are in "bin" folder, open CMD there.
Note: Remember you need to have "Partition Manager" opened.
3. Find the port number of the phone from "Device Manager".
4. Add the the number (port number) right after "fh_loader.exe --port=\\.\com" in the following codes.
4.1. For example, mine is "3" so it would be "fh_loader.exe --port=\\.\com3".
Spoiler
fh_loader.exe --port=\\.\com --sendimage=mpt.img --start_sector=6 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=drm.img --start_sector=8198 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=p_persist_lg.img --start_sector=11782 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=sns.img --start_sector=11782 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=ssd.img --start_sector=15366 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=persist.img --start_sector=15368 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=misc.img --start_sector=23560 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=ftm.img --start_sector=23816 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=power.img --start_sector=32008 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=encrypt.img --start_sector=43272 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=eksst.img --start_sector=43400 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=rct.img --start_sector=43528 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=fota.img --start_sector=43656 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=srtc.img --start_sector=46216 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=pstore.img --start_sector=48264 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=els.img --start_sector=48776 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=operatorlogging.img --start_sector=52872 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=eri.img --start_sector=56968 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=carrier.img --start_sector=59016 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=persdata.img --start_sector=71304 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=metadata.img --start_sector=87688 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=vendor_a.img --start_sector=91784 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=system_a.img --start_sector=962184 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=product_a.img --start_sector=2926216 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=OP_a.img --start_sector=3974792 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
---------------------LUN1
fh_loader.exe --port=\\.\com --sendimage=xbl_a.img --start_sector=6 --lun=1 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=xbl_config_a.img --start_sector=902 --lun=1 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
---------------------LUN4
fh_loader.exe --port=\\.\com --sendimage=aop_a.img --start_sector=6 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=tz_a.img --start_sector=134 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=hyp_a.img --start_sector=1158 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=modem_a.img --start_sector=1290 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=mdtpsecapp_a.img --start_sector=57610 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=mdtp_a.img --start_sector=58634 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=abl_a.img --start_sector=66826 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=dsp_a.img --start_sector=67082 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=keymaster_a.img --start_sector=83466 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=akmu_a.img --start_sector=83594 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=boot_a.img --start_sector=83722 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=cmnlib_a.img --start_sector=108298 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=cmnlib64_a.img --start_sector=108426 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=devcfg_a.img --start_sector=108554 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=qupfw_a.img --start_sector=108586 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=laf_a.img --start_sector=108606 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=vbmeta_a.img --start_sector=120894 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=dtbo_a.img --start_sector=120910 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=uefisecapp_a.img --start_sector=127054 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=imagefv_a.img --start_sector=127566 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=raw_resources_a.img --start_sector=128078 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=core_nhlos_a.img --start_sector=130126 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=sid_a.img --start_sector=173646 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
---------------------Common
fh_loader.exe --port=\\.\com --sendimage=secdata.img --start_sector=347542 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=devinfo.img --start_sector=347549 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=dip.img --start_sector=347550 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=apdp.img --start_sector=347806 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=msadp.img --start_sector=347870 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=spunvm.img --start_sector=347934 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=splash.img --start_sector=349982 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=toolsfv.img --start_sector=358339 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=logfs.img --start_sector=358595 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=cateloader.img --start_sector=360643 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=logdump.img --start_sector=361155 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=storsec.img --start_sector=377539 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=multiimgoem.img --start_sector=377571 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=multiimgqti.img --start_sector=377579 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=uefivarstore.img --start_sector=377587 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=catefv.img --start_sector=377715 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=catecontentfv.img --start_sector=377843 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=last_parti_after_catecontentfv.img --start_sector=378099 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
5. Modify the codes and use them in the CMD.
6. If anything goes wrong you may get the "error" message instead of "done" message.
Note: LUN files I provide have ".bin" extension and other files should have ".img" extension, otherwise you need to modify the codes.
These codes are modified to work on LG V60, according to LG V60 PartitionList.xml provided by rifay78.
It is assumed that G8's and V60's necessary partitions are the same but in different locations.
Before using these codes make a full backup of your device.
Spoiler: LG V60, Flash The Necessary Partitions
fh_loader.exe --port=\\.\com --sendimage=power.img --start_sector=32008 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=xbl_a.img --start_sector=6 --lun=1 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=xbl_config_a.img --start_sector=902 --lun=1 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=aop_a.img --start_sector=6 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=tz_a.img --start_sector=134 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=abl_a.img --start_sector=100742 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=dsp_a.img --start_sector=100998 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=keymaster_a.img --start_sector=117382 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=akmu_a.img --start_sector=117510 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=cmnlib_a.img --start_sector=142214 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=cmnlib64_a.img --start_sector=142342 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=devcfg_a.img --start_sector=142470 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=laf_a.img --start_sector=142522 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=vbmeta_a.img --start_sector=167098 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=dtbo_a.img --start_sector=167114 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
fh_loader.exe --port=\\.\com --sendimage=uefisecapp_a.img --start_sector=173258 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
For LG V50S go this post thanks to @Zenozero.
GPT or LUN files for LG v50 are attached.
GPT files for G850X added.
Nice write up. Pretty sure the partitions which carry imei / s/n are ftm, fsg, modem, modemst1 and modemst2.
Those are the partitions they indicate on v40 tele group anyway, last I looked.
cheers
AsItLies said:
the partitions which carry imei / s/n are ftm, fsg, modem, modemst1 and modemst2.
Click to expand...
Click to collapse
FTM is a temp place and its data are regenerated after flashing the phone. Changing IMEI in FTM will not change the phone IMEI.
FSG is the backup of Modemsts. Repairing IMEI process can alter Modemsts but not FSG.
LG has put a new lock in NVM to prevent identity data from getting changed. In addition, the bridge to Modemsts is Modem partition which carry another lock called IMEIPROT.
When we erase all partitions, NVM is cleared but IMEIPROT still exists in Modem. The only way to rewrite IMEI is to modify Modem by removing IMEIPROT. However, losing NVM will awake another lock which prevents Modem from detecting Sim, resulting in the error "this phone is permanently locked" even after rewriting IMEI.
it appears this error:
17:14:55: INFO: 3. Calling fopen('C:\Program Files (x86)\Qualcomm\QPST\bin\port_trace.txt') with AccessMode='w'
_____
| ___|
| |__ _ __ _ __ ___ _ __
| __| '__| '__/ _ \| '__|
| |__| | | | | (_) | |
\____/_| |_| \___/|_|
17:14:55: {ERROR: Calling fopen with with access mode 'w' on 'C:\Program Files (x86)\Qualcomm\QPST\bin\port_trace.txt was NOT successful' }
ERROR: Could not append to 'port_trace.txt'
Log is 'C:\Program Files (x86)\Qualcomm\QPST\bin\port_trace.txt'
SORRY FIXED I HAVE TO GIVE ADMIN ACCESS IN PROPERTIES
EXACTLY I HAVE TO PUT .\fh_loader.exe
So, I bricked my LM-850UM...yeah, I know.
I downloaded (3) different KDZ files, extracted them and the DZ files.....
I did not find the files needed to restore to "download" mode - and my partitions don't "line up" any longer.
Does anyone have, or know how to retrieve, the partition imgs noted in the "Spoiler" for Step D?
abl_a, akmu_a, aop_a.....etc
Update - I did find the files I needed...they are attached. Phone is now it download mode.
Is this warning normal?
11:25:16: WARNING: User specified --num_sectors=1024 but file only has 6 sectors. **Ignoring --num_sectors
davembg said:
Is this warning normal?
11:25:16: WARNING: User specified --num_sectors=1024 but file only has 6 sectors. **Ignoring --num_sectors
Click to expand...
Click to collapse
I don't think so!
Where do you get this?
netmsm said:
I don't think so!
Where do you get this?
Click to expand...
Click to collapse
Trying to restore the GPT layouts with:
fh_loader.exe --port=\\.\com --sendimage=LUN6.bin --start_sector=0 --lun=6 --num_sectors=1024 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
COM port configured correctly, of course.
All the LUN files throw with warning, using QFIL 2.0.3.5 (linked above as QPST_QFIL_2.7.496)
davembg said:
Trying to restore the GPT layouts with:
fh_loader.exe --port=\\.\com --sendimage=LUN6.bin --start_sector=0 --lun=6 --num_sectors=1024 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
COM port configured correctly, of course.
All the LUN files throw with warning, using QFIL 2.0.3.5 (linked above as QPST_QFIL_2.7.496)
Click to expand...
Click to collapse
My bad! Sorry, but it won't harm.
This is because of number of sectors that should be 6 for GPT files, all of them.
I'll correct them, thanks.
I was JUST gonna ask you if I could/should try that. I have a "burner" LG8x that I'm abusing for "educational" purposes.
davembg said:
I was JUST gonna ask you if I could/should try that. I have a "burner" LG8x that I'm abusing for "educational" purposes.
Click to expand...
Click to collapse
Just dissect it like a lab rat
I did this to one G8 =)) it would take a revenge if it could've
netmsm said:
Just dissect it like a lab rat
I did this to one G8 =)) it would take a revenge if it could've
Click to expand...
Click to collapse
Maybe 5 is the magic number? or SEVEN, SEVEN's the magic number! (name that 80's movie)
12:45:37: WARNING: main:4533 User specified --num_sectors=6 but file only has 6 sectors. **Ignoring --num_sectors
davembg said:
Maybe 5 is the magic number? or SEVEN, SEVEN's the magic number! (name that 80's movie)
12:45:37: WARNING: main:4533 User specified --num_sectors=6 but file only has 6 sectors. **Ignoring --num_sectors
Click to expand...
Click to collapse
update; i removed the num_sectors and no warnings....seems like that should be ok.
@netmsm - out of curiosity, what did you use to make the LUN layouts?
@davembg It's just a warning message saying it is ignored so no need to worry. I should check and find out about it.
LUNs can be dumped like other info/partitions and extracted from a KDZ.
If you wanna dump them, modify the restoring code by adding "--convertprogram2read" after port number. The next is to add "--num_sectors=6" after the number of LUN. The latter tells the program how many sector it should read.
For LUN0 it would become like this:
fh_loader.exe --port=\\.\com# --convertprogram2read --sendimage=LUN0.bin --start_sector=0 --lun=0 --num_sectors=6 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
Now I got it; Idiot Meisam! In restoring, there is no need to specify how long the file is and so you did correctly by removing "num_sectors".
I followed the guide and am having the same issue. The screen flashes the boot logo for a quarter of a second before shutting off for about a second and repeating that until the battery dies. Any ideas would be appreciated, because I am at my wits end. if it helps I have the T-Mobile unlocked version. Also, in LGUP, it says the version is G820UM20j. The kdz I have tried flashing is G820TM20j. Thank you for your help!
Zayveeo5e said:
I followed the guide and am having the same issue. The screen flashes the boot logo for a quarter of a second before shutting off for about a second and repeating that until the battery dies. Any ideas would be appreciated, because I am at my wits end. if it helps I have the T-Mobile unlocked version. Also, in LGUP, it says the version is G820UM20j. The kdz I have tried flashing is G820TM20j. Thank you for your help!
Click to expand...
Click to collapse
Did you try to get into download mode?
For now just restore FTM.
netmsm said:
Did you try to get into download mode?
For now just restore FTM.
Click to expand...
Click to collapse
I can get into download mode, and flash a kdz. I still can't get past the flashing boot logo though. I have tried restoring the partition backups, but that didn't help either.

Categories

Resources