Temporary Fix for LG G4 bootloop issue(lengthens life)

Did this for work for you?

  • Yes

    Votes: 4 100.0%
  • No

    Votes: 0 0.0%

  • Total voters
    4
  • Poll closed .

BIG_BADASS

Senior Member
Jan 5, 2015
273
61
0
19
find attached the patched boot image for your ROM version.
just to mention it again: the modded twrp image is highly recommended to flash as well bc TWRP will make use of all cores it can find when backing up/restore

when your device is unlocked AND you have fastboot access you can just do a

Code:
[COLOR="Blue"]fastboot flash boot boot_4cores.img
fastboot flash recovery twrp_4cores.img[/COLOR]
The download mode way I described in the OP is required when you cannot access fastboot and for locked devices. I will try to create a KDZ out of this but atm this is the way to go then.

I cannot say for sure that this way will soft brick locked devices or not. it should not but i cannot test it..!!
It mainly depends on the fact if the whole boot image gets verified or just the kernel + initrd.
afaik its not the whole boot partition... so it should work with the download mode way even on locked devices.

@XeniX_Force : attach the file and fastboot cmds to the OP as well pls.

.
So basically you reduced functionality by reducing the number of cores....
 

BIG_BADASS

Senior Member
Jan 5, 2015
273
61
0
19
Don't get me wrong, this may help extend the life of certain units. But as they say, it might be just a matter of time before the problem rears its ugly head once again.

https://www.reddit.com/r/lgg4/comme...boot_looping_g4_replaced_for/#bottom-comments

:D
Yes that is true, Bootloop or not, every device will come to an end one day somehow.... so enjoy it as much as you can while it lasts, don't disable cores and reduce functionality... it takes away from the fun.

I don't know why everyone's so fixated on this bootloop issue. Like, there's literally thousands other ways the phone can die, some which are far more likely than bootloop.

It's not a waste if you enjoyed it, and used it well. If my G4 died today, well then, so be it. I've made thousands of calls, SMS with it, taken literally thousands of photos, used all its features, rooted it, installed TWRP, installed bash, used it for pen-testing, etc.

Thank you, LG G4, you have served me very well, given me a trouble-free experience.
 
Last edited:

marek.ns

Senior Member
Mar 13, 2011
114
5
0
Hello, thanks for this thread!
Please, how can I restore a backup created in B) version of OP´s guide?

---------- Post added at 11:13 AM ---------- Previous post was at 11:08 AM ----------

Thanks for this thread!
Please, how can I restore a backup created in B) version of OP´s guide?
 

XeniX_Force

Senior Member
Dec 21, 2013
483
70
0
20
karachi
Hello, thanks for this thread!
Please, how can I restore a backup created in B) version of OP´s guide?

---------- Post added at 11:13 AM ---------- Previous post was at 11:08 AM ----------

Thanks for this thread!
Please, how can I restore a backup created in B) version of OP´s guide?
rest of the guide completed?
 

marco.deluxe

Senior Member
May 19, 2015
70
15
8
Somewhere in southern Germany
My LG G4 (H815) has also today adopted after 21 months.
So far it ran without problems and I am very satisfied with this device.
Since yesterday, however, it has always started again and has then hung up.
First I have suspected software problems, because I have updated some apps in the Playstore yesterday.
Then I discovered however in the Internet the bootloop topic.
My device is very hot at the place where the defective board is installed.
Today I have informed my mobile phone provider and tomorrow my device will be picked up for repair.
I am already very curious how long the repair lasts and when I get the device back.
Hopefully the device will work as good as before.
 
  • Like
Reactions: XeniX_Force

steadfasterX

Recognized Developer
Nov 13, 2013
5,593
14,810
263
Hello, thanks for this thread!
Please, how can I restore a backup created in B) version of OP´s guide?

---------- Post added at 11:13 AM ---------- Previous post was at 11:08 AM ----------

Thanks for this thread!
Please, how can I restore a backup created in B) version of OP´s guide?
A) to restore a FULL backup (including all partitions you backed up before) (overrides all partitions depending on which method u choosen for the backup!)

within download mode:

Code:
dd if=/storage/external_SD/fulldump.img of=/dev/block/mmcblk0 bs=8192
B) restore just a part of the backup

you need to find out the start sector first on your PC (FWUL is highly recommended!).

Example: You want to restore just the boot partition:

Code:
gdisk -l fulldump.img
you will see something like that:

Code:
Number  Start (sector)    End (sector)  Size       Code  Name
[..... (some other output) ..... ]
  38          [B][COLOR="Red"]491520[/COLOR][/B]          573439   40.0 MiB    FFFF  [B]boot[/B]
[..... (some other output) ..... ]
In this case 491520 is the start sector and 573439 the end sector of the boot partition.
This values can be different on your device depending on model and firmware level.

Now you have 2 ways: an easy and a hard one.

1) the easy way: use an already extracted boot.img for your current running firmware
2) the hard way: extract the boot partition from your backup

the hard way
(replace YOURSTARTSECTOR with the start sector found as described above):

Your count value is what you get from the above output plus 1 so this is the generic description:

1) YOURENDSECTOR + 1
2) result of 1) - YOURSTARTSECTOR

Code:
dd if=fulldump.img of=boot.img [B]skip[/B]=[I]YOURSTARTSECTOR[/I] bs=512 count=[I]YOURENDSECTOR+1-YOURSTARTSECTOR[/I]
And taken from the above example your calculated count will be:

1) 573439 + 1 = 573440
2) 573440 - 491520 = 81920

Code:
dd if=fulldump.img of=boot.img [B]skip[/B]=491520 bs=512 count=81920
(easy right :laugh: ?)

now: proceed with the easy way

the easy way:

put the boot.img to your sdcard and boot into download mode

Code:
mount -t ext4 /dev/block/mmcblk1p1 /storage/external_SD
Remember the above gdisk command? Now we need the output - especially the start sector:
Code:
dd if=/storage/external_SD/boot.img of=/dev/block/mmcblk0 skip=[I]YOURSTARTSECTOR[/I] bs=512
Example with the above output:
Code:
dd if=/storage/external_SD/boot.img of=/dev/block/mmcblk0 skip=491520 bs=512
done.


.
@alitanveer : please add a link(!) to this post in the OP (then i can adjust something if required)




.
 

shaq89

Member
Oct 20, 2007
21
5
0
Hi,
My LG G4 (H815) is SEA version (Singapore(ARROW)) which cannot be unlocked.
"Unfortunately, your device(Singapore, (ARROW(SINGAPORE)) )does not support unlocking the bootloader"
Is there any other options to enter fastboot?

Thanks
 

steadfasterX

Recognized Developer
Nov 13, 2013
5,593
14,810
263
I am sorry, failed at last step of backup - dd said "permission denied"
Do you really think that I can help you with such a "detailed" report?
What command? Send screenshots/pics of the failure and your commands you taken successful or not. Provide as much details as possible.


.

Sent from my LG-H815 using XDA Labs
 

marek.ns

Senior Member
Mar 13, 2011
114
5
0
I successfully reproduced steps 1-7 of your Guide version B. At step 8 I used option B so I entered given command than just "dd: permission denied" answer and nothing happened, no backup. The end. It seems like I should be rooted for this command, I dont know.

Later my device got hot at charger and booted for few hours eventually so I made backup within the device.
I would like to know what was the problem with dd but it is not so important anymore.

Thank you for your effort end help!
 

steadfasterX

Recognized Developer
Nov 13, 2013
5,593
14,810
263
I successfully reproduced steps 1-7 of your Guide version B. At step 8 I used option B so I entered given command than just "dd: permission denied" answer and nothing happened, no backup. The end. It seems like I should be rooted for this command, I dont know.

Later my device got hot at charger and booted for few hours eventually so I made backup within the device.
I would like to know what was the problem with dd but it is not so important anymore.

Thank you for your effort end help!
No this does not require root.. Hm. Strange. If you want to test it again some day let me know. I wanna know some details then.


.

Sent from my LG-H815 using XDA Labs
 

Undeleteme

New member
Aug 3, 2017
2
1
0
No this does not require root.. Hm. Strange. If you want to test it again some day let me know. I wanna know some details then.
steadfasterX, I have an example of the same scenario that marek.ns encountered, and I can provide details of what happens.
(You responded a couple of days ago under my other thread so this will sound familiar to you. Am re-posting details for thoroughness here.)
I have an LG G4 Verizon / VS986 running marshmallow 6.0 and VS9862BA, and I accidentally deleted the folder containing all my photos and videos.
I'm trying to figure out possible ways to recover them (LG G4 Verizon (VS986) - Recovering deleted photos/videos from internal memory on 6.0), but right now it's looking like the only possibility is to try to take a backup of the entire internal memory and then follow these instructions: [GUIDE] Internal Memory Data Recovery - Yes We Can! by Wartickler.

- I stuck in my 64GB SDXC card, and then, using the very lovely FWUL, I can boot the G4 into download mode and connect to it with LG LAF (auth).
- The SD card was initially formatted EXFAT, so I could not mount it with the -t ext4 switch (I believe it told me "No CSI structure available" ... can re-reformat my SD card and confirm if you'd like to see for sure), and I couldn't figure out any switch to use to mount that filesystem type (is there a switch that will work to mount an EXFAT sdcard?).
- Took the card out, connected it directly to machine running FWUL, deleted the partition and created a new partition (using the fdisk inside FWUL), then mkfs.ext4 on the new partition. I mounted the ext4 partition inside FWUL to make sure it was writable (I wrote a test file to it).
- SD card in phone again, restarted G4 in DL mode with LG LAF (auth). Now I can mount the ext4 partition, but I cannot still cannot write to it (tried dd and touch). Details here:

# uname -a
Linux localhost 3.10.84-g2d76c81-00004-g509e2f1 #1 SMP PREEMPT Thu May 25 11:00:52 CST 2017 aarch64
# ls /dev/block/mmc* (just looking at what's there, and noticed all the "Permission denied")
/dev/block/mmcblk0p1: Permission denied
/dev/block/mmcblk0p11: Permission denied
/dev/block/mmcblk0p21: Permission denied
/dev/block/mmcblk0p23: Permission denied
/dev/block/mmcblk0p24: Permission denied
/dev/block/mmcblk0p25: Permission denied
/dev/block/mmcblk0p26: Permission denied
/dev/block/mmcblk0p27: Permission denied
/dev/block/mmcblk0p28: Permission denied
/dev/block/mmcblk0p3: Permission denied
/dev/block/mmcblk0p35: Permission denied
/dev/block/mmcblk0p38: Permission denied
/dev/block/mmcblk0p39: Permission denied
/dev/block/mmcblk0p4: Permission denied
/dev/block/mmcblk0p41: Permission denied
/dev/block/mmcblk0p42: Permission denied
/dev/block/mmcblk0p43: Permission denied
/dev/block/mmcblk0p46: Permission denied
/dev/block/mmcblk0p47: Permission denied
/dev/block/mmcblk0p53: Permission denied
/dev/block/mmcblk0p7: Permission denied
/dev/block/mmcblk0p8: Permission denied
/dev/block/mmcblk0rpmb: Permission denied
/dev/block/mmcblk1: Permission denied
/dev/block/mmcblk1p1: Permission denied
/dev/block/mmcblk0
/dev/block/mmcblk0p10
/dev/block/mmcblk0p12
/dev/block/mmcblk0p13
/dev/block/mmcblk0p14
[etc ... there are several more mmcblk0p* partition listings that do not return "Permission denied" to ls]

# mount -t ext4 /dev/block/mmcblk1p1 /storage/external_SD (note, no errors)
# ls /storage/external_SD (test123 is from when I had it mounted under FWUL)
lost+found
test123
# touch /storage/external_SD/mytest
touch: '/storage/external_SD/mytest': Permission denied
# ls -la /storage/external_SD
drwx------ root root 2017-08-08 20:55 lost+found
-rw-r--r-- root root 11 2017-08-08 20:58 test123
# ls -la /storage
drwxrwxrwx root root 2017-08-08 20:58 external_SD
#

And of course without the ability to write to the filesystem, dd fails as well:

# dd if=/dev/block/mmcblk0 of=/storage/external_SD/fulldump.img bs=1024
dd: /storage/external_SD/fulldump.img: Permission denied
#

Just in case there was something weird with ext4, I also performed the same thing with ext2, and no luck -- Permission denied.
Any suggestions?
Is there perhaps a way for the connected computer to present storage over the USB connection and to mount it?
Or, is there perhaps a way through this shell to enable the wireless NIC, and mount a CIFS/SMB share? (yes I know, a far shot in the dark)
Again, additional thanks and PayPal reward for anything that helps me recover my photos and videos.
 
  • Like
Reactions: steadfasterX

steadfasterX

Recognized Developer
Nov 13, 2013
5,593
14,810
263
[....]
# mount -t ext4 /dev/block/mmcblk1p1 /storage/external_SD (note, no errors)
# ls /storage/external_SD (test123 is from when I had it mounted under FWUL)
lost+found
test123
# touch /storage/external_SD/mytest
touch: '/storage/external_SD/mytest': Permission denied
# ls -la /storage/external_SD
drwx------ root root 2017-08-08 20:55 lost+found
-rw-r--r-- root root 11 2017-08-08 20:58 test123
# ls -la /storage
drwxrwxrwx root root 2017-08-08 20:58 external_SD
#

And of course without the ability to write to the filesystem, dd fails as well:

# dd if=/dev/block/mmcblk0 of=/storage/external_SD/fulldump.img bs=1024
dd: /storage/external_SD/fulldump.img: Permission denied
#

Just in case there was something weird with ext4, I also performed the same thing with ext2, and no luck -- Permission denied.
Any suggestions?
Is there perhaps a way for the connected computer to present storage over the USB connection and to mount it?
Or, is there perhaps a way through this shell to enable the wireless NIC, and mount a CIFS/SMB share? (yes I know, a far shot in the dark)
Again, additional thanks and PayPal reward for anything that helps me recover my photos and videos.
First of all: donating with thx clicks is totally enough! ;)
Second: /dev/block/mmcblk0pX: Permission denied --> Those are normal and ok. The only important one here is: /dev/block/mmcblk0 where u have read and write permissions to.

This one here is interesting:
/dev/block/mmcblk1p1: Permission denied
as it shouldnt happen. Even more interesting is that u are able to mount it ?!

Besides this please try the following:
boot into Download mode without the external SD.
Insert the sdcard once the dl mode is fully up and then exec the following:

ls -la /dev/block/mmcblk1*
mount -t ext4 /dev/block/mmcblk1p1 /storage/external_SD

(you could mount exfat/vfat formatted sdcards with mount -t vfat /dev/block/mmcblk1p1 /storage/external_SD but ext4 is recommended)
touch /storage/external_SD/mytest
if it fails..
chmod 777 /dev/block/mmcblk1p1
touch /storage/external_SD/mytest



please consider to join me on IRC which is much easier for troubleshooting.. See the OP for the details.

.
 

owlery_hk

Member
Dec 9, 2016
39
16
8
I wish I saw this before sending my G4 in for repair.....
My G4 serial number 609 started bootlooping yesterday.
Bloody marvelous, as one might think that LG would have rectified the problems for boards manufactured AFTER they admitted the hardware issue.
 

rustybronnco

Member
Dec 26, 2014
19
11
0
I wish I saw this before sending my G4 in for repair.....
My G4 serial number 609 started bootlooping yesterday.
Bloody marvelous, as one might think that LG would have rectified the problems for boards manufactured AFTER they admitted the hardware issue.
Sorry for the issue you are seeing. I think it's important to back up ANY device you have with important data on it. Laptops, tablets, cell phones- the lot of them. It's not just LG devices, anything can fail at anytime.