[G4 General] steadfasterX:
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:

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:

sudo dmesg -c >> /dev/null

5. Connect your external sdcard to FWUL

6. Type this in the terminal:

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 mmcblk0

p1

we need only mmcblk0. If you see a sdc

1

or sdd

1

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:

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:

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:

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:

cd /tmp/extracteddz

LG G4 - ONLY - Flashing instructions for locked or official unlocked phone

(If you UsU'd your device skip this!)

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:

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.

,-