[GUIDE][9008][EDL|QDL][QUALCOMM ONLY] Unbrick via external sdcard (no QFIL!)

Search This thread

steadfasterX

Recognized Developer
Nov 13, 2013
6,260
15,493
127.0.0.1
OnePlus 7T Pro
How to unbrick by sdcard from 9008 without QFIL

This method works ONLY for qualcomm devices (ANY non-UFS!!) which are already in QDL/EDL/9008 mode!

This method does *not* work for:
  • Samsung devices in general.
    Details:
    Samsung is doing things completely different while ofc a qcom based Samsung works with the same principal as "normal" devices. Just the process of building an hnbrick sdcard is different as you can get the pit (partition list) by heimdall but not a flashable gpt. Instead search for "sboot sdcard unbrick" or "sboot sdcard <your model>" . The important part here is "sboot" as that one will be loaded by the iROM when flashed properly (+other stuff).

  • UFS devices (so not for the G5 or later).
    Details:
    9008 bricks are not fixable on UFS NAND devices by booting from an SD card. The boot path is stored in QFPROM (on the CPU) and it is something like /dev/block/sdb or /dev/block/sde. On eMMC devices, the boot path is /dev/block/mmcblk0. If you have a 9008 brick, the SD card is seen as /dev/block/mmcblk0 so the phone will boot from it on an eMMC device since that IS the boot path. There is no way to make the SD card appear as /dev/block/sdX. And there is no way to change the boot path once you have a 9008 brick without a firehose. If you have a signed firehose, then you can fix your phone without needing an SD card As for cross flashing. I checked the RSA signature for the H930, H932, H933, and US998 and they are all different. If you flash any of the signed firmware (xbl, abl, hyp, modem, etc) from one of those devices, then you have a 9008 brick and no way to fix it yourself.I didn't bother checking the Verizon or Sprint models since they are even more locked down than the H932 is, but it appears from reading this thread that they have the same key as the US998 (I am not going to waste my time checking).-- Brian

If your device is connected and not detected like that the external sdcard method will NOT work for you.
On the LG G4 you can force the sdcard mode by following post #2 . I guess every device has a way to force that mode so google is your friend.

Hint --> If you have no sdcard and own a H815 device (only then) you can make use of these validated QFIL process here

Requirements

  • 1) Ok first of all what you need is Linux. I highly recommend FWUL ( https://bit.do/FWULatXDA ) but any Linux is sufficient if you can handle it.

  • 2) LG models only: you need the latest SALT version ( https://bit.do/SALTatXDA ) which is already included since FWUL v2.5 (one of the reasons why I recommend FWUL).
    If you decide to use FWUL and start SALT it should prompt you when an updated SALT version is available. To be sure: just click the Update button in SALT once started.

  • 3) you need an external sdcard which is (to be sure) bigger then your internal storage (the sdcard must have the same size of your internal storage! so in theory a 32GB card should work fine but some cards are sold as 32GB but the real size is less , i.e. 29 GB). Thats the most critical part here as the GPT will be invalid if it does not fit with the sdcard. you can't edit the GPT though as then internal checksum may fail and so it will not work to boot from the sdcard. so ensure you have a bigger sized sdcard to workaround any issues related to this.

  • 4) Another important requirement for that external sdcard is: speed! If you want to ensure that you do not struggle ensure it is at least a class 10 card with UHS. It MIGHT work without UHS and it MIGHT work even on slower cards down to class 4 but when the storage is too slow the device rejects to boot from it as it ran into timeouts and so marking the sdcard as "not good enough" to boot from it.
    Of course you can first try a lower speed sdcard but if you encounter issues here then it is likely related to the speed of the sdcard.

  • 5) you need a 100% matching firmware (e.g a KDZ on LG's) for your device model - and very important: with a matching ARB of your current installed firmware!
    If your current installed firmware has a higher ARB then the one you flash on the sdcard it will NOT work!
    Find out what ARB means here https://bit.do/antirollg4



Steps

  • 1. Boot FWUL (or ur personal Linux)

  • 2. LG models only: Start SALT - ensure that it is v3.5 or higher

  • 3. Extract the firmware file (e.g KDZ) but usually not all partitions are needed - just the bootloader stack
    (depends on your device - the following is for any LG G4 model):
    • Primary GPT
    • sbl1
    • aboot
    • pmic
    • rpm
    • tz
    • laf
    • sdi
    • hyp

    If you have not all or any of these (first check the note about UFS above) then you must identify your bootloader stack first.
    A good start for this is here: https://lineageos.org/engineering/Qualcomm-Firmware but you may have to just try and error here.
    For a quick & dirty try: flash every partition which is smaller then 150 MB (i.e. leave out system, cache, userdata and such).

  • 4. Clean dmesg by opening a terminal and type:
    Code:
    sudo dmesg -c >> /dev/null

  • 5. Connect your external sdcard to FWUL

  • 6. Type this in the terminal:
    Code:
    dmesg
    and find the connect messages there pointing to the device name. usually you see something like "mmcblk0" but sometimes it's different named like sdc or sdd or similar.
    We do not need the pXX here. So if you see mmcblk0p1 we need only mmcblk0. If you see a sdc1 or sdd1 we just need sdc or sdd without the number.

  • 7. The device name is needed now! Ensure it has the correct size by typing this in the terminal:
    Code:
    sudo fdisk -l /dev/mmcblk0
    (replace mmcblk0 if you your device is named different in step 6).
    This is important because the next step will erase your sdcard completely!
    All your data get lost!
    So if you choose the wrong one you may overwrite your PC storage in worst case! So double check this before proceeding.
    You can do so by disconnecting the sdcard and if the command in this step gives a message about the device cannot be found - connect device again and re-do the above command. if it shows then again your device all is fine

  • 8. Now flash the GPT (partition table) to your device in a terminal:

    Change into the folder where you extracted the backup. If you leaved the default on SALT it's /tmp/extracteddz:

    Code:
    cd /tmp/extracteddz 
    sudo -s 
    dd if=PrimaryGPT.gpt of=/dev/mmcblk0 (replace mmcblk0 if you your device is named different in step 6)
    sync
    hint: do not close the terminal

  • 9. Disconnect the sdcard and connect it again

  • 10. Now flash the rest in a terminal:

    First check if the GPT has been flashed fine:
    Code:
    ls -la /dev/disk/by-partlabel/

    if you get nothing as a result or an error message something went wrong. Go back to step 4!

    Move to the folder where you extracted the backup. If you leaved the default on SALT it's /tmp/extracteddz:

    Code:
    cd /tmp/extracteddz

    LG G4 - ONLY - Flashing instructions for locked or official unlocked phone (If you UsU'd your device skip this!)
    Code:
    dd if=sbl1.bin of=/dev/disk/by-partlabel/sbl1 
    dd if=aboot.bin of=/dev/disk/by-partlabel/aboot 
    dd if=hyp.bin of=/dev/disk/by-partlabel/hyp
    dd if=pmic.bin of=/dev/disk/by-partlabel/pmic 
    dd if=rpm.bin of=/dev/disk/by-partlabel/rpm 
    dd if=tz.bin of=/dev/disk/by-partlabel/tz 
    dd if=laf.bin of=/dev/disk/by-partlabel/laf 
    dd if=sdi.bin of=/dev/disk/by-partlabel/sdi
    
    [B][COLOR="Red"][SIZE="4"]sync[/SIZE][/COLOR][/B] 
    
    Do [B][U]not forget[/U][/B] that last ("sync") command!! Otherwise it will very likely not work!

    LG G4 - ONLY - Flashing instructions for an UsU'd device
    Besides the KDZ extract you also need to grab the UsU unlock zip of your device model first then do this:
    Code:
    dd if=sbl1.bin of=/dev/disk/by-partlabel/sbl1 
    dd if=hyp.bin of=/dev/disk/by-partlabel/hyp
    dd if=pmic.bin of=/dev/disk/by-partlabel/pmic 
    dd if=rpm.bin of=/dev/disk/by-partlabel/rpm 
    dd if=tz.bin of=/dev/disk/by-partlabel/tz 
    dd if=sdi.bin of=/dev/disk/by-partlabel/sdi
    dd if=laf_UsU.img of=/dev/disk/by-partlabel/laf
    dd if=aboot_UsU.img of=/dev/disk/by-partlabel/aboot 
    dd if=rawres_UsU.img of=/dev/disk/by-partlabel/raw_resources 
    
    [B][COLOR="Red"][SIZE="4"]sync[/SIZE][/COLOR][/B]
    
    Do [B][U]not forget[/U][/B] that last  ("sync") command!! Otherwise it will very likely not work!

  • 11. Now everything is prepared. Take out your sdcard. Take out the battery and disconnect cable. Plugin the external sdcard. Put battery back.
    Start the device in fastboot mode and use fastboot flash partition imagename.img

    If there is no fastboot possible open the download mode.

    For example on the LG G4:
    Press volume up (only this) and keep it pressed.
    Then connect USB cable while still keep the pressure on volume up for 20 seconds.
    The download mode should come up.

    Congrats you can now use e.g. LGup (or for Samsung, ODIN etc) for unbricking by flashing a regular firmware on it (beware of the ARB again).


Have fun! :highfive:

Support / TG group

Of course in this thread but also by Telegram. I have created a generic group for all stuff around Android : here.

Note:
be polite, don't ask to ask, be patient(!), respect the timezones, help others.


,-
 
Last edited:

steadfasterX

Recognized Developer
Nov 13, 2013
6,260
15,493
127.0.0.1
OnePlus 7T Pro
Force SDCARD boot

How-To force booting from sdcard (LG G4 only)
(e.g. when the device is NOT in 9008 / QDL mode)

The easiest method these days is using SALT as here you can simply press a button but if that is not working or not an option here is the physical way:

You may know the 2-pin-bridge method which can enforce the 9008/QDL mode (on the back of the main board which is shown when disassembling the back cover).
Now you may think: you can enforce that mode by bridging these pins and then you could boot from sdcard as this guide here says 9008 mode is a requirement.

The answer is: NO. This will NOT work!

But there seems to be a way (which I personally never have tested!) to force that sdcard boot by doing the following.

Be aware: You do this on your own risk! Do not cry if something is failing/destroyed/whatever. Its totally up to you to proceed or not but its on your own risk like always when following guides.


  • prepare the sdcard as described in the above guide
  • insert the sdcard in the device
  • remove battery of the device
  • unplug usb cable
  • disassemble the back cover by loosen all screws
  • disassembling the mainboard like described here: fixit guide
  • on the FRONT of the mainboard find 5 (DAT0) and 6 (GND) as shown in the picture:
    ground_pin-5-and-6.jpeg
  • bridge these both and while bridging plugin the usb cable - WITHOUT TOUCHING anything with your fingers/body/soul on the mainboard!!!!
  • Keep thumbs pressed.. it may work if you flashed the correct files, with a matching ARB, in a correct way and [fill-on-on-whoever-u-believe-in] is with you
 
Last edited:

steadfasterX

Recognized Developer
Nov 13, 2013
6,260
15,493
127.0.0.1
OnePlus 7T Pro

birry

Senior Member
Dec 31, 2013
54
4
Hi, I have an H811 bricked this way, as it is bricked, I cannot check antirollback on phone's android.

On the rear label (the one with serial number near to battery) I can see model (H811) and it says H/W 1.0, S/W V10d

I search and saw that there is not V10d kdz for H811, is that data useful? Which kdz will be the best choice to use?
 

steadfasterX

Recognized Developer
Nov 13, 2013
6,260
15,493
127.0.0.1
OnePlus 7T Pro
Hi, I have an H811 bricked this way, as it is bricked, I cannot check antirollback on phone's android.

On the rear label (the one with serial number near to battery) I can see model (H811) and it says H/W 1.0, S/W V10d

I search and saw that there is not V10d kdz for H811, is that data useful? Which kdz will be the best choice to use?
do you remember at least if you had installed Android marshmallow or lollipop? Any chance that you have made a TWRP backup in the past? Or did you never unlocked your device?

Sent from my LG-H815 using XDA Labs
 

birry

Senior Member
Dec 31, 2013
54
4
do you remember at least if you had installed Android marshmallow or lollipop? Any chance that you have made a TWRP backup in the past? Or did you never unlocked your device?

Sent from my LG-H815 using XDA Labs
Never upgraded Android, I guess it was lollipop. No backups or unlock also, it just bootlooped and I bricked it trying to install a H812 image with lgup (I know which image I tried if it is useful, I remember editing a value because lgup was refusing to install h812 image on the h811, I didn't find h811 image for lgup bootloop flashing fix).

This was my reference when I destroyed the phone [emoji14]

https://www.reddit.com/r/lgg4/comments/45gfg2/dae_g4_series_msm_big_core_disable_tool_guide/
 

steadfasterX

Recognized Developer
Nov 13, 2013
6,260
15,493
127.0.0.1
OnePlus 7T Pro
Never upgraded Android, I guess it was lollipop. No backups or unlock also, it just bootlooped and I bricked it trying to install a H812 image with lgup (I know which image I tried if it is useful, I remember editing a value because lgup was refusing to install h812 image on the h811, I didn't find h811 image for lgup bootloop flashing fix).

This was my reference when I destroyed the phone [emoji14]

https://www.reddit.com/r/lgg4/comments/45gfg2/dae_g4_series_msm_big_core_disable_tool_guide/

well..omg..
ok so the h812 has no ARB. The h811 has. Here is the reason for your hard brick. Do not cross flash random files without knowing what you do really.

Start with 10h which is ARB 1 for the h811: http://downloads.codefi.re/autoprime/LG/LG_G4/H811/H81110H
download the single files or the KDZ and use SALT to extract. then follow the rest of the guide above.

if that fails to boot go on with ARB 2 : http://downloads.codefi.re/autoprime/LG/LG_G4/H811/H81110N

I would not recommend to go further then that as u otherwise will increase your ARB for sure.

The next step if that all above still fails would be to use QFIL with proper files for the h811 but beware: there are QFIL files marked as h811/h815/... which in fact are converting your device to a ls991. Best is to search XDA for other users reports which files gave them a good result.

Last but not least if your device is ARB 3 or higher all the above will fail (including the QFIL method) and your only chance to bring back life is the sdcard method described here but using ARB 3 or higher files.

.
 

Vishnuisgod

Senior Member
Nov 5, 2012
112
20
named after a queen
I hate to say it but Im here....

LGG4 - 815eur - new frankenphone (new to me, chinese refurb) - received jan
never had a sim in it. only kept it on to see how long the battery would last in idle mode (airplane mode on, no wifi active)(14 days!) - LGUP to MM
still stock - no google play services installed yet, I was waiting for the UsU (woohoo steadfasterX!!, where do I send my bounty contribution?)

I was downloading all the required files for FWUL / Virtual Box last night, I was going to spend the afternoon getting to know the process/Arch linux, before attempting to mess with my phone... I was adjusting the pull down notification settings and it froze.
I waited till this AM, hoping maybe it would sort itself out. NOPE. Battery at 0.

Im at the logo bootloop with pulsing blue LED.


I have read the entire thread, I wanted to make sure that this workaround is the proper "fix" for this type of bootloop.
I was at v20k IIRC and I know for a fact my ARB was 0.

Im not sure where to dl the required files from several sources Ive tried, dont leave me feeling confident its a trusted source.

Any thoughts on what may have happened?

cheers
ac
 

birry

Senior Member
Dec 31, 2013
54
4
well..omg..
ok so the h812 has no ARB. The h811 has. Here is the reason for your hard brick. Do not cross flash random files without knowing what you do really.

Start with 10h which is ARB 1 for the h811: http://downloads.codefi.re/autoprime/LG/LG_G4/H811/H81110H
download the single files or the KDZ and use SALT to extract. then follow the rest of the guide above.

if that fails to boot go on with ARB 2 : http://downloads.codefi.re/autoprime/LG/LG_G4/H811/H81110N

I would not recommend to go further then that as u otherwise will increase your ARB for sure.

The next step if that all above still fails would be to use QFIL with proper files for the h811 but beware: there are QFIL files marked as h811/h815/... which in fact are converting your device to a ls991. Best is to search XDA for other users reports which files gave them a good result.

Last but not least if your device is ARB 3 or higher all the above will fail (including the QFIL method) and your only chance to bring back life is the sdcard method described here but using ARB 3 or higher files.

.

Cool!! It worked like a charm with H81110H file :laugh::laugh::laugh:

Now I can run it into download mode and I could see that info on SALT:

Device model: LG-H811
Firmware (laf): H81120v
Firmware (system): LGH811AT-01-V20v-310-260-APR-25-2017-ARB03+0
Carrier: TMO
Country: US
UsU: no
GPT compatibility: H811
LAF protocol: 1000001
AntiRollBack: 3

I don't want to make a mistake so now that it boots in download mode I will wait for options, which is the best choice now? Updating it with a .tot with LGUP (for the bootloop) or installing other rom (perhaps one with bootloop workaround)

Thanks for your great work!
 

steadfasterX

Recognized Developer
Nov 13, 2013
6,260
15,493
127.0.0.1
OnePlus 7T Pro
I hate to say it but Im here....

LGG4 - 815eur - new frankenphone (new to me, chinese refurb) - received jan
never had a sim in it. only kept it on to see how long the battery would last in idle mode (airplane mode on, no wifi active)(14 days!) - LGUP to MM
still stock - no google play services installed yet, I was waiting for the UsU (woohoo steadfasterX!!, where do I send my bounty contribution?)

I was downloading all the required files for FWUL / Virtual Box last night, I was going to spend the afternoon getting to know the process/Arch linux, before attempting to mess with my phone... I was adjusting the pull down notification settings and it froze.
I waited till this AM, hoping maybe it would sort itself out. NOPE. Battery at 0.

Im at the logo bootloop with pulsing blue LED.

I have read the entire thread, I wanted to make sure that this workaround is the proper "fix" for this type of bootloop.
I was at v20k IIRC and I know for a fact my ARB was 0.

Im not sure where to dl the required files from several sources Ive tried, dont leave me feeling confident its a trusted source.

Any thoughts on what may have happened?

cheers
ac
This unbrick will work only when you bricked your phone. It's not an ilapo fix and your description sounds like one. Your best chance is using a modded boot image with just 4 cores enabled. That requires an unlocked phone though.. There is a guide from me to create such boot images here on XDA.

Cool!! It worked like a charm with H81110H file :laugh::laugh::laugh:

Now I can run it into download mode and I could see that info on SALT:

Device model: LG-H811
Firmware (laf): H81120v
Firmware (system): LGH811AT-01-V20v-310-260-APR-25-2017-ARB03+0
Carrier: TMO
Country: US
UsU: no
GPT compatibility: H811
LAF protocol: 1000001
AntiRollBack: 3

I don't want to make a mistake so now that it boots in download mode I will wait for options, which is the best choice now? Updating it with a .tot with LGUP (for the bootloop) or installing other rom (perhaps one with bootloop workaround)

Thanks for your great work!

You're referring to what TOT? The one containing just the aboot?




Sent from my LG-H815 using XDA Labs
 

birry

Senior Member
Dec 31, 2013
54
4
This unbrick will work only when you bricked your phone. It's not an ilapo fix and your description sounds like one. Your best chance is using a modded boot image with just 4 cores enabled. That requires an unlocked phone though.. There is a guide from me to create such boot images here on XDA.



You're referring to what TOT? The one containing just the aboot?




Sent from my LG-H815 using XDA Labs
Yes, anything that patches the bootloop. I am a bit confused with partition structure, the cpu workaround is done editing something in the aboot partition?

I just would like to patch the bootloop (I prefer to have the four tiny cores enabled instead of just one as it normally does and installing stock Rom).
 

steadfasterX

Recognized Developer
Nov 13, 2013
6,260
15,493
127.0.0.1
OnePlus 7T Pro
Yes, anything that patches the bootloop. I am a bit confused with partition structure, the cpu workaround is done editing something in the aboot partition?

I just would like to patch the bootloop (I prefer to have the four tiny cores enable instead of just one as it normally does and installing stock Rom
There are 2 patches available. The one with tot and the boot image one.

The TOT one which is something between 4 and 10 MB contains just the aboot one and disables the cores in the aboot itself.

The boot image one is made in the kernel cmdline

Both have the same effect.

The difference : the TOT aboot fixes it permanently (as long as you don't reflash a kdz/tot again). So you can flash custom ROMs without needing to care about it.

The boot image adjustment instead does not touch your aboot but needs to be done on ever new boot image you want to use.




Sent from my LG-H815 using XDA Labs
 

birry

Senior Member
Dec 31, 2013
54
4
So then I have the patch that just contains the aboot partition (files are of exactly 4mb)

Downloaded from here: https://www.reddit.com/r/lgg4/...m_big_core_disable_tool_guide/

The problem is that there are several models in the file that I downloaded from there but H811 is missing, I cannot find a tot with just aboot for H811, is this really available? I would prefer to write a tot with just aboot that leaves all cores enabled and the faulty ones disabled, not just one core enabled as those tots does.
 

steadfasterX

Recognized Developer
Nov 13, 2013
6,260
15,493
127.0.0.1
OnePlus 7T Pro
So then I have the patch that just contains the aboot partition (files are of exactly 4mb)

Downloaded from here: https://www.reddit.com/r/lgg4/...m_big_core_disable_tool_guide/

The problem is that there are several models in the file that I downloaded from there but H811 is missing, I cannot find a tot with just aboot for H811, is this really available? I would prefer to write a tot with just aboot that leaves all cores enabled and the faulty ones disabled, not just one core enabled as those tots does.

Afaik there is none for the h811 and I highly recommend to not use any of the others to avoid bricking your phone again. So it seems you're stuck with modifying boot images





Sent from my LG-H815 using XDA Labs
 
  • Like
Reactions: cowsngrass

Top Liked Posts

  • There are no posts matching your filters.
  • 25
    How to unbrick by sdcard from 9008 without QFIL

    This method works ONLY for qualcomm devices (ANY non-UFS!!) which are already in QDL/EDL/9008 mode!

    This method does *not* work for:
    • Samsung devices in general.
      Details:
      Samsung is doing things completely different while ofc a qcom based Samsung works with the same principal as "normal" devices. Just the process of building an hnbrick sdcard is different as you can get the pit (partition list) by heimdall but not a flashable gpt. Instead search for "sboot sdcard unbrick" or "sboot sdcard <your model>" . The important part here is "sboot" as that one will be loaded by the iROM when flashed properly (+other stuff).

    • UFS devices (so not for the G5 or later).
      Details:
      9008 bricks are not fixable on UFS NAND devices by booting from an SD card. The boot path is stored in QFPROM (on the CPU) and it is something like /dev/block/sdb or /dev/block/sde. On eMMC devices, the boot path is /dev/block/mmcblk0. If you have a 9008 brick, the SD card is seen as /dev/block/mmcblk0 so the phone will boot from it on an eMMC device since that IS the boot path. There is no way to make the SD card appear as /dev/block/sdX. And there is no way to change the boot path once you have a 9008 brick without a firehose. If you have a signed firehose, then you can fix your phone without needing an SD card As for cross flashing. I checked the RSA signature for the H930, H932, H933, and US998 and they are all different. If you flash any of the signed firmware (xbl, abl, hyp, modem, etc) from one of those devices, then you have a 9008 brick and no way to fix it yourself.I didn't bother checking the Verizon or Sprint models since they are even more locked down than the H932 is, but it appears from reading this thread that they have the same key as the US998 (I am not going to waste my time checking).-- Brian

    If your device is connected and not detected like that the external sdcard method will NOT work for you.
    On the LG G4 you can force the sdcard mode by following post #2 . I guess every device has a way to force that mode so google is your friend.

    Hint --> If you have no sdcard and own a H815 device (only then) you can make use of these validated QFIL process here

    Requirements

    • 1) Ok first of all what you need is Linux. I highly recommend FWUL ( https://bit.do/FWULatXDA ) but any Linux is sufficient if you can handle it.

    • 2) LG models only: you need the latest SALT version ( https://bit.do/SALTatXDA ) which is already included since FWUL v2.5 (one of the reasons why I recommend FWUL).
      If you decide to use FWUL and start SALT it should prompt you when an updated SALT version is available. To be sure: just click the Update button in SALT once started.

    • 3) you need an external sdcard which is (to be sure) bigger then your internal storage (the sdcard must have the same size of your internal storage! so in theory a 32GB card should work fine but some cards are sold as 32GB but the real size is less , i.e. 29 GB). Thats the most critical part here as the GPT will be invalid if it does not fit with the sdcard. you can't edit the GPT though as then internal checksum may fail and so it will not work to boot from the sdcard. so ensure you have a bigger sized sdcard to workaround any issues related to this.

    • 4) Another important requirement for that external sdcard is: speed! If you want to ensure that you do not struggle ensure it is at least a class 10 card with UHS. It MIGHT work without UHS and it MIGHT work even on slower cards down to class 4 but when the storage is too slow the device rejects to boot from it as it ran into timeouts and so marking the sdcard as "not good enough" to boot from it.
      Of course you can first try a lower speed sdcard but if you encounter issues here then it is likely related to the speed of the sdcard.

    • 5) you need a 100% matching firmware (e.g a KDZ on LG's) for your device model - and very important: with a matching ARB of your current installed firmware!
      If your current installed firmware has a higher ARB then the one you flash on the sdcard it will NOT work!
      Find out what ARB means here https://bit.do/antirollg4



    Steps

    • 1. Boot FWUL (or ur personal Linux)

    • 2. LG models only: Start SALT - ensure that it is v3.5 or higher

    • 3. Extract the firmware file (e.g KDZ) but usually not all partitions are needed - just the bootloader stack
      (depends on your device - the following is for any LG G4 model):
      • Primary GPT
      • sbl1
      • aboot
      • pmic
      • rpm
      • tz
      • laf
      • sdi
      • hyp

      If you have not all or any of these (first check the note about UFS above) then you must identify your bootloader stack first.
      A good start for this is here: https://lineageos.org/engineering/Qualcomm-Firmware but you may have to just try and error here.
      For a quick & dirty try: flash every partition which is smaller then 150 MB (i.e. leave out system, cache, userdata and such).

    • 4. Clean dmesg by opening a terminal and type:
      Code:
      sudo dmesg -c >> /dev/null

    • 5. Connect your external sdcard to FWUL

    • 6. Type this in the terminal:
      Code:
      dmesg
      and find the connect messages there pointing to the device name. usually you see something like "mmcblk0" but sometimes it's different named like sdc or sdd or similar.
      We do not need the pXX here. So if you see mmcblk0p1 we need only mmcblk0. If you see a sdc1 or sdd1 we just need sdc or sdd without the number.

    • 7. The device name is needed now! Ensure it has the correct size by typing this in the terminal:
      Code:
      sudo fdisk -l /dev/mmcblk0
      (replace mmcblk0 if you your device is named different in step 6).
      This is important because the next step will erase your sdcard completely!
      All your data get lost!
      So if you choose the wrong one you may overwrite your PC storage in worst case! So double check this before proceeding.
      You can do so by disconnecting the sdcard and if the command in this step gives a message about the device cannot be found - connect device again and re-do the above command. if it shows then again your device all is fine

    • 8. Now flash the GPT (partition table) to your device in a terminal:

      Change into the folder where you extracted the backup. If you leaved the default on SALT it's /tmp/extracteddz:

      Code:
      cd /tmp/extracteddz 
      sudo -s 
      dd if=PrimaryGPT.gpt of=/dev/mmcblk0 (replace mmcblk0 if you your device is named different in step 6)
      sync
      hint: do not close the terminal

    • 9. Disconnect the sdcard and connect it again

    • 10. Now flash the rest in a terminal:

      First check if the GPT has been flashed fine:
      Code:
      ls -la /dev/disk/by-partlabel/

      if you get nothing as a result or an error message something went wrong. Go back to step 4!

      Move to the folder where you extracted the backup. If you leaved the default on SALT it's /tmp/extracteddz:

      Code:
      cd /tmp/extracteddz

      LG G4 - ONLY - Flashing instructions for locked or official unlocked phone (If you UsU'd your device skip this!)
      Code:
      dd if=sbl1.bin of=/dev/disk/by-partlabel/sbl1 
      dd if=aboot.bin of=/dev/disk/by-partlabel/aboot 
      dd if=hyp.bin of=/dev/disk/by-partlabel/hyp
      dd if=pmic.bin of=/dev/disk/by-partlabel/pmic 
      dd if=rpm.bin of=/dev/disk/by-partlabel/rpm 
      dd if=tz.bin of=/dev/disk/by-partlabel/tz 
      dd if=laf.bin of=/dev/disk/by-partlabel/laf 
      dd if=sdi.bin of=/dev/disk/by-partlabel/sdi
      
      [B][COLOR="Red"][SIZE="4"]sync[/SIZE][/COLOR][/B] 
      
      Do [B][U]not forget[/U][/B] that last ("sync") command!! Otherwise it will very likely not work!

      LG G4 - ONLY - Flashing instructions for an UsU'd device
      Besides the KDZ extract you also need to grab the UsU unlock zip of your device model first then do this:
      Code:
      dd if=sbl1.bin of=/dev/disk/by-partlabel/sbl1 
      dd if=hyp.bin of=/dev/disk/by-partlabel/hyp
      dd if=pmic.bin of=/dev/disk/by-partlabel/pmic 
      dd if=rpm.bin of=/dev/disk/by-partlabel/rpm 
      dd if=tz.bin of=/dev/disk/by-partlabel/tz 
      dd if=sdi.bin of=/dev/disk/by-partlabel/sdi
      dd if=laf_UsU.img of=/dev/disk/by-partlabel/laf
      dd if=aboot_UsU.img of=/dev/disk/by-partlabel/aboot 
      dd if=rawres_UsU.img of=/dev/disk/by-partlabel/raw_resources 
      
      [B][COLOR="Red"][SIZE="4"]sync[/SIZE][/COLOR][/B]
      
      Do [B][U]not forget[/U][/B] that last  ("sync") command!! Otherwise it will very likely not work!

    • 11. Now everything is prepared. Take out your sdcard. Take out the battery and disconnect cable. Plugin the external sdcard. Put battery back.
      Start the device in fastboot mode and use fastboot flash partition imagename.img

      If there is no fastboot possible open the download mode.

      For example on the LG G4:
      Press volume up (only this) and keep it pressed.
      Then connect USB cable while still keep the pressure on volume up for 20 seconds.
      The download mode should come up.

      Congrats you can now use e.g. LGup (or for Samsung, ODIN etc) for unbricking by flashing a regular firmware on it (beware of the ARB again).


    Have fun! :highfive:

    Support / TG group

    Of course in this thread but also by Telegram. I have created a generic group for all stuff around Android : here.

    Note:
    be polite, don't ask to ask, be patient(!), respect the timezones, help others.


    ,-
    8
    Force SDCARD boot

    How-To force booting from sdcard (LG G4 only)
    (e.g. when the device is NOT in 9008 / QDL mode)

    The easiest method these days is using SALT as here you can simply press a button but if that is not working or not an option here is the physical way:

    You may know the 2-pin-bridge method which can enforce the 9008/QDL mode (on the back of the main board which is shown when disassembling the back cover).
    Now you may think: you can enforce that mode by bridging these pins and then you could boot from sdcard as this guide here says 9008 mode is a requirement.

    The answer is: NO. This will NOT work!

    But there seems to be a way (which I personally never have tested!) to force that sdcard boot by doing the following.

    Be aware: You do this on your own risk! Do not cry if something is failing/destroyed/whatever. Its totally up to you to proceed or not but its on your own risk like always when following guides.


    • prepare the sdcard as described in the above guide
    • insert the sdcard in the device
    • remove battery of the device
    • unplug usb cable
    • disassemble the back cover by loosen all screws
    • disassembling the mainboard like described here: fixit guide
    • on the FRONT of the mainboard find 5 (DAT0) and 6 (GND) as shown in the picture:
      ground_pin-5-and-6.jpeg
    • bridge these both and while bridging plugin the usb cable - WITHOUT TOUCHING anything with your fingers/body/soul on the mainboard!!!!
    • Keep thumbs pressed.. it may work if you flashed the correct files, with a matching ARB, in a correct way and [fill-on-on-whoever-u-believe-in] is with you
    3
    https://bpaste.net/show/eebc27d1975e
    it's happens with all sd, they are 16gb and 32gb class 10 extreme kingstone, i also created with gparted a partition and i made the process but nothing happens
    Keep in mind that there is a thanks button. Anyways you are using a 16GB SD card which I explained will not work please read the OP again

    Sent from my LG-H815 using XDA Labs
    3
    it seems either ubuntu 17.10 messes something up or salt 3.6-6 stable can't find partitions and i've downloaded two different h812 kdz.

    This is happening to me too?

    upload the log after extracting a KDZ:
    advanced menu -> Logfile -> upload button -> share the link
    2
    marzsalim said:
    5. Connect sdcard with mobile ? Or sdcard just connect to pc? Please reply to me

    Like I wrote to FWUL so yes to your PC where FWUL is running





    Sent from my LG-H815 using XDA Labs