[G4 Q&A, Help & Troubleshooting] electricfield:
The battery of a rooted, UsUed LG G4 running LineageOS 14.1 was accidentally allowed to drain to zero. After re-charging above 50%, the device failed to boot. The LOS boot screen "bubble on a string" animation would continue indefinitely.

The phone still booted to TWRP, download mode, and fastboot mode.

Originally, it was suspected that this was ILAPO. However, this suspicion was incorrect.

After extensive work creating a boot sector that would allow logging and a ton of help from @steadfasterX, it was discovered that various files in /data/system had been corrupted and had sizes of zero. Android would try to read values from these files, fail, and repeat.

First, a full TWRP backup of the phone was made and copied off-device. Then, I made a second backup of /data/system. Next, I deleted the following zero-byte files from /data/system using TWRP (or ADB after launching TWRP).

packages.list

packages.xml

profiles.xml

netpolicy.xml

notification_policy.xml

If this doesn't work, I would have considered deleting other zero-byte files in /data/system. I used "ls -laS" to get a size-ordered list of files in my current directory.

After a reboot, android re-created the files and booted to the lockscreen.

All of the apps in /data/data had already been cleared. Otherwise, Android would probably have choked on the differences between the user IDs that it wanted to assign to apps and the ownership of the various app folders.

The following links suggest ways to restore some apps from previously created backups

GitHub - joshuabragge/twrp-manual-restore: Automate individual app restores from an android TWRP backup

Automate individual app restores from an android TWRP backup - joshuabragge/twrp-manual-restore

github.com

https://www.semipol.de/posts/2016/07/android-manually-restoring-apps-from-a-twrp-backup/

(Permanent archive: https://web.archive.org/web/2019083.../android-restoring-apps-from-twrp-backup.html)

There is no warranty on this solution. It was a makeshift effort created by an amateur. If you choose to duplicate it, you do so at your own risk. You may permanently destroy your phone.

Old post below:

I'm trying to understand whether a particular G4 (H815) has ILAPO. Its been sneezing, has a sore throat, and now can't taste anything^H^H oops, I mean:

- Previously, the phone would get hot during use.

- The phone has been UsUed.

- The battery was accidentally allowed to discharge to zero.

- After the battery was recharged, the phone was unable to boot past the Lineageos "bubble on a string" animation. The animation simply continues forever.

- The phone can boot to TWRP, fasboot, download mode, etc.

Attempts to fix:

- Tried renaming /sdcard/Android to /sdcard/Android.old but this had no effect.

- Tried clearing cache and dalvik cache but this had no effect

- (NEW) Tried attaching to computer and launching "adb logcat" during animation. Device is never found. If I remember correctly, "USB debugging" was off when the device died. (ADB does work in TWRP.)

- (NEW) Tried creating a custom 4-core (2 core for boot) boot image using the instructions here https://xdaforums.com/t/guide-any-u...tom-x-cores-boot-image-ilapo-tempfix.3718389/ and used "fastboot flash boot boot.img" to flash it. This doesn't seem to work.

-- If I reboot into TWRP after a long period of waiting for the lineageos splash screen, I get a CPU temperature of 46 C. I don't know what temperature was generated in the same situation the modified boot image was installed.

Most of the info on ILAPO suggests that phones with it can't get past the LG logo. That is not the case here. Is this ILAPO or something different? Does anyone have ideas as to what might be an appropriate fix?

Is it possible to retrieve boot logs using TWRP in order to figure out when/where/why the boot hangs?