Jump to content

LG G5 (lg-h850): Difference between revisions

From postmarketOS Wiki
Sporos (talk | contribs)
Contributors: created device page for lg g5
Tags: mobile edit mobile web edit
 
Sporos (talk | contribs)
Add info for bootloader unlocking
 
(13 intermediate revisions by 5 users not shown)
Line 6: Line 6:
| imagecaption = lg g5
| imagecaption = lg g5
| releaseyear = 2016
| releaseyear = 2016
| originalsoftware = Android 6.0 "Marshmallow"
| originalsoftware = Android
| chipset = Qualcomm MSM8996 Snapdragon 820
| originalversion = 6 (Linux 3.18)
| chipset = Qualcomm Snapdragon 820 (MSM8996)
| cpu =  Quad-core (2x2.15 GHz Kryo & 2x1.6 GHz Kryo)
| cpu =  Quad-core (2x2.15 GHz Kryo & 2x1.6 GHz Kryo)
| gpu = Adreno 530
| gpu = Adreno 530
Line 14: Line 15:
| memory = 4 GB
| memory = 4 GB
| architecture = aarch64
| architecture = aarch64
| type = Handset
| status_usbnet = <!-- USB networking does work? then put Y here and delete this comment -->
| status_usbnet = <!-- USB networking does work? then put Y here and delete this comment -->
| status_flashing = <!-- Flashing with "pmbootstrap flasher" works? Put Y here. It works the same for everything coming below. -->
| status_flashing = <!-- Flashing with "pmbootstrap flasher" works? Put Y here. It works the same for everything coming below. -->
Line 37: Line 39:
<!-- you can also use these lines if you need to:
<!-- you can also use these lines if you need to:
if the device haven't originally ran Android OS, e.g. Nokia N900
if the device haven't originally ran Android OS, e.g. Nokia N900
| n-android =  ✔
Version of the kernel that pmos is running
Version of the kernel that pmos is running
| pmoskernel = 3.x.x
| pmoskernel = 3.x.x
Line 46: Line 47:
-->
-->
}}
}}
=== Unlocking ===
Unfortunately, LG ended their official bootloader unlock program after they stopped making phones in 2021. As of writing there is no way to fully unlock the bootloader on the H850 or RS988 global variants without this service.
There are kernel exploits that can be used on some of the carrier-branded variants to gain root, such as [https://github.com/HonestlyAnnoying/DirtySanta-Boot DirtySanta] which reportedly works on the LS992 version from Sprint.
With this method, you can modify the boot and system partitions by disabling dm-verity signature verification. However if any of the other firmware is modified the device will stop booting and you may need to flash back to stock in download mode using the LGUP tool, which requires a ton of setup and a Windows PC.
=== Flashing ===
[https://github.com/msm8916-mainline/lk2nd lk2nd] is supported on the LG G5's H850 (EU) and RS988 (US) variants. Be mindful that there are several variants of the G5, one of them with a completely different SOC. Be sure you know which one you have before proceeding with anything:
https://www.phonemore.com/models/lg/g5/
Build [https://github.com/msm8916-mainline/lk2nd lk2nd] for target MSM8996 and flash it to the boot partition.
=== Partition Map ===
<pre>
h1:/ # ls -la /dev/block/bootdevice/by-name                                                                                                                                                                                                                                                                 
total 0
drwxr-xr-x 2 root root 1400 1969-12-31 20:12 .
drwxr-xr-x 3 root root 1560 1969-12-31 20:12 ..
lrwxrwxrwx 1 root root  16 1969-12-31 20:12 OP -> /dev/block/sda16
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 aboot -> /dev/block/sde6
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 abootbak -> /dev/block/sde7
lrwxrwxrwx 1 root root  16 1969-12-31 20:12 apdp -> /dev/block/sde26
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 boot -> /dev/block/sde1
lrwxrwxrwx 1 root root  16 1969-12-31 20:12 cache -> /dev/block/sda14
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 cdt -> /dev/block/sdd3
lrwxrwxrwx 1 root root  16 1969-12-31 20:12 cmnlib -> /dev/block/sde22
lrwxrwxrwx 1 root root  16 1969-12-31 20:12 cmnlib64 -> /dev/block/sde24
lrwxrwxrwx 1 root root  16 1969-12-31 20:12 cmnlib64bak -> /dev/block/sde25
lrwxrwxrwx 1 root root  16 1969-12-31 20:12 cmnlibbak -> /dev/block/sde23
lrwxrwxrwx 1 root root  16 1969-12-31 20:12 cust -> /dev/block/sda15
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 ddr -> /dev/block/sdd1
lrwxrwxrwx 1 root root  16 1969-12-31 20:12 devcfg -> /dev/block/sde16
lrwxrwxrwx 1 root root  16 1969-12-31 20:12 devcfgbak -> /dev/block/sde17
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 devinfo -> /dev/block/sdb7
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 dip -> /dev/block/sdb6
lrwxrwxrwx 1 root root  16 1969-12-31 20:12 dpo -> /dev/block/sde28
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 drm -> /dev/block/sda3
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 eksst -> /dev/block/sda8
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 encrypt -> /dev/block/sda7
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 factory -> /dev/block/sda6
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 fota -> /dev/block/sdb3
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 fsc -> /dev/block/sdf3
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 fsg -> /dev/block/sdb5
lrwxrwxrwx 1 root root  16 1969-12-31 20:12 grow -> /dev/block/sda18
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 grow2 -> /dev/block/sdb8
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 grow3 -> /dev/block/sdc3
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 grow4 -> /dev/block/sdd4
lrwxrwxrwx 1 root root  16 1969-12-31 20:12 grow5 -> /dev/block/sde29
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 grow6 -> /dev/block/sdf4
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 grow7 -> /dev/block/sdg2
lrwxrwxrwx 1 root root  16 1969-12-31 20:12 hyp -> /dev/block/sde12
lrwxrwxrwx 1 root root  16 1969-12-31 20:12 hypbak -> /dev/block/sde13
lrwxrwxrwx 1 root root  16 1969-12-31 20:12 keymaster -> /dev/block/sde20
lrwxrwxrwx 1 root root  16 1969-12-31 20:12 keymasterbak -> /dev/block/sde21
lrwxrwxrwx 1 root root  16 1969-12-31 20:12 keystore -> /dev/block/sda11
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 laf -> /dev/block/sda1
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 misc -> /dev/block/sda5
lrwxrwxrwx 1 root root  16 1969-12-31 20:12 modem -> /dev/block/sde18
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 modemst1 -> /dev/block/sdf1
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 modemst2 -> /dev/block/sdf2
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 mpt -> /dev/block/sda2
lrwxrwxrwx 1 root root  16 1969-12-31 20:12 msadp -> /dev/block/sde27
lrwxrwxrwx 1 root root  16 1969-12-31 20:12 persist -> /dev/block/sda12
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 persistent -> /dev/block/sdg1
lrwxrwxrwx 1 root root  16 1969-12-31 20:12 pmic -> /dev/block/sde14
lrwxrwxrwx 1 root root  16 1969-12-31 20:12 pmicbak -> /dev/block/sde15
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 raw_resources -> /dev/block/sde8
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 raw_resourcesbak -> /dev/block/sde9
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 rct -> /dev/block/sda9
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 recovery -> /dev/block/sde2
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 recoverybak -> /dev/block/sde3
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 reserve -> /dev/block/sdd2
lrwxrwxrwx 1 root root  16 1969-12-31 20:12 rpm -> /dev/block/sde10
lrwxrwxrwx 1 root root  16 1969-12-31 20:12 rpmbak -> /dev/block/sde11
lrwxrwxrwx 1 root root  16 1969-12-31 20:12 sec -> /dev/block/sde19
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 sns -> /dev/block/sda4
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 spare1 -> /dev/block/sdb4
lrwxrwxrwx 1 root root  16 1969-12-31 20:12 ssd -> /dev/block/sda10
lrwxrwxrwx 1 root root  16 1969-12-31 20:12 system -> /dev/block/sda13
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 tz -> /dev/block/sde4
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 tzbak -> /dev/block/sde5
lrwxrwxrwx 1 root root  16 1969-12-31 20:12 userdata -> /dev/block/sda17
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 xbl -> /dev/block/sdb1
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 xbl2 -> /dev/block/sdc1
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 xbl2bak -> /dev/block/sdc2
lrwxrwxrwx 1 root root  15 1969-12-31 20:12 xblbak -> /dev/block/sdb2
</pre>


== Contributors ==
== Contributors ==
* CHANGE_ME (put your username here!)
* [[User:Sporos|Sporos]]


== Maintainer(s) ==
== Maintainer(s) ==
Line 55: Line 148:


== Users owning this device ==
== Users owning this device ==
* [[User:Sporos|Sporos]] (lgg5/RS988/H850)
{{Device owners}}
{{Device owners}}
<!-- autogenerated, use {{Owns device|devicepage|notes}} on your profile page -->
<!-- autogenerated, use {{Owns device|devicepage|notes}} on your profile page -->

Latest revision as of 15:54, 13 March 2025

This device is marked as not booting.
LG G5
lg g5
lg g5
Manufacturer LG
Name G5
Codename lg-h850
Released 2016
Type handset
Hardware
Chipset Qualcomm Snapdragon 820 (MSM8996)
CPU Quad-core (2x2.15 GHz Kryo & 2x1.6 GHz Kryo)
GPU Adreno 530
Display 1440 x 2560 IPS LCD
Storage 32 GB
Memory 4 GB
Architecture aarch64
Software
Original software Android
Original version 6 (Linux 3.18)
postmarketOS
Category testing
Pre-built images no


Unlocking

Unfortunately, LG ended their official bootloader unlock program after they stopped making phones in 2021. As of writing there is no way to fully unlock the bootloader on the H850 or RS988 global variants without this service.

There are kernel exploits that can be used on some of the carrier-branded variants to gain root, such as DirtySanta which reportedly works on the LS992 version from Sprint.

With this method, you can modify the boot and system partitions by disabling dm-verity signature verification. However if any of the other firmware is modified the device will stop booting and you may need to flash back to stock in download mode using the LGUP tool, which requires a ton of setup and a Windows PC.

Flashing

lk2nd is supported on the LG G5's H850 (EU) and RS988 (US) variants. Be mindful that there are several variants of the G5, one of them with a completely different SOC. Be sure you know which one you have before proceeding with anything: https://www.phonemore.com/models/lg/g5/

Build lk2nd for target MSM8996 and flash it to the boot partition.

Partition Map

h1:/ # ls -la /dev/block/bootdevice/by-name                                                                                                                                                                                                                                                                   
total 0
drwxr-xr-x 2 root root 1400 1969-12-31 20:12 .
drwxr-xr-x 3 root root 1560 1969-12-31 20:12 ..
lrwxrwxrwx 1 root root   16 1969-12-31 20:12 OP -> /dev/block/sda16
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 aboot -> /dev/block/sde6
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 abootbak -> /dev/block/sde7
lrwxrwxrwx 1 root root   16 1969-12-31 20:12 apdp -> /dev/block/sde26
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 boot -> /dev/block/sde1
lrwxrwxrwx 1 root root   16 1969-12-31 20:12 cache -> /dev/block/sda14
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 cdt -> /dev/block/sdd3
lrwxrwxrwx 1 root root   16 1969-12-31 20:12 cmnlib -> /dev/block/sde22
lrwxrwxrwx 1 root root   16 1969-12-31 20:12 cmnlib64 -> /dev/block/sde24
lrwxrwxrwx 1 root root   16 1969-12-31 20:12 cmnlib64bak -> /dev/block/sde25
lrwxrwxrwx 1 root root   16 1969-12-31 20:12 cmnlibbak -> /dev/block/sde23
lrwxrwxrwx 1 root root   16 1969-12-31 20:12 cust -> /dev/block/sda15
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 ddr -> /dev/block/sdd1
lrwxrwxrwx 1 root root   16 1969-12-31 20:12 devcfg -> /dev/block/sde16
lrwxrwxrwx 1 root root   16 1969-12-31 20:12 devcfgbak -> /dev/block/sde17
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 devinfo -> /dev/block/sdb7
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 dip -> /dev/block/sdb6
lrwxrwxrwx 1 root root   16 1969-12-31 20:12 dpo -> /dev/block/sde28
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 drm -> /dev/block/sda3
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 eksst -> /dev/block/sda8
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 encrypt -> /dev/block/sda7
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 factory -> /dev/block/sda6
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 fota -> /dev/block/sdb3
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 fsc -> /dev/block/sdf3
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 fsg -> /dev/block/sdb5
lrwxrwxrwx 1 root root   16 1969-12-31 20:12 grow -> /dev/block/sda18
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 grow2 -> /dev/block/sdb8
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 grow3 -> /dev/block/sdc3
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 grow4 -> /dev/block/sdd4
lrwxrwxrwx 1 root root   16 1969-12-31 20:12 grow5 -> /dev/block/sde29
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 grow6 -> /dev/block/sdf4
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 grow7 -> /dev/block/sdg2
lrwxrwxrwx 1 root root   16 1969-12-31 20:12 hyp -> /dev/block/sde12
lrwxrwxrwx 1 root root   16 1969-12-31 20:12 hypbak -> /dev/block/sde13
lrwxrwxrwx 1 root root   16 1969-12-31 20:12 keymaster -> /dev/block/sde20
lrwxrwxrwx 1 root root   16 1969-12-31 20:12 keymasterbak -> /dev/block/sde21
lrwxrwxrwx 1 root root   16 1969-12-31 20:12 keystore -> /dev/block/sda11
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 laf -> /dev/block/sda1
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 misc -> /dev/block/sda5
lrwxrwxrwx 1 root root   16 1969-12-31 20:12 modem -> /dev/block/sde18
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 modemst1 -> /dev/block/sdf1
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 modemst2 -> /dev/block/sdf2
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 mpt -> /dev/block/sda2
lrwxrwxrwx 1 root root   16 1969-12-31 20:12 msadp -> /dev/block/sde27
lrwxrwxrwx 1 root root   16 1969-12-31 20:12 persist -> /dev/block/sda12
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 persistent -> /dev/block/sdg1
lrwxrwxrwx 1 root root   16 1969-12-31 20:12 pmic -> /dev/block/sde14
lrwxrwxrwx 1 root root   16 1969-12-31 20:12 pmicbak -> /dev/block/sde15
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 raw_resources -> /dev/block/sde8
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 raw_resourcesbak -> /dev/block/sde9
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 rct -> /dev/block/sda9
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 recovery -> /dev/block/sde2
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 recoverybak -> /dev/block/sde3
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 reserve -> /dev/block/sdd2
lrwxrwxrwx 1 root root   16 1969-12-31 20:12 rpm -> /dev/block/sde10
lrwxrwxrwx 1 root root   16 1969-12-31 20:12 rpmbak -> /dev/block/sde11
lrwxrwxrwx 1 root root   16 1969-12-31 20:12 sec -> /dev/block/sde19
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 sns -> /dev/block/sda4
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 spare1 -> /dev/block/sdb4
lrwxrwxrwx 1 root root   16 1969-12-31 20:12 ssd -> /dev/block/sda10
lrwxrwxrwx 1 root root   16 1969-12-31 20:12 system -> /dev/block/sda13
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 tz -> /dev/block/sde4
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 tzbak -> /dev/block/sde5
lrwxrwxrwx 1 root root   16 1969-12-31 20:12 userdata -> /dev/block/sda17
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 xbl -> /dev/block/sdb1
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 xbl2 -> /dev/block/sdc1
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 xbl2bak -> /dev/block/sdc2
lrwxrwxrwx 1 root root   15 1969-12-31 20:12 xblbak -> /dev/block/sdb2

Contributors

Maintainer(s)

Users owning this device


  • Athyfr (Notes: Not yet functional. AT&T (H820) model.)
  • Sporos (Notes: Would like to get mainline booting)


How to enter flash mode

Installation

See also