nyuuzyou/wikis huggingface dataset:
LG K4 2016 (lg-k130f)

== Contributors ==
* Brunothedev
* Mark
== Users owning this device ==
== How to enter fastboot ==
Press Volume Down on your device and then plug the cable, you now can use fastboot commands
== How to unlock the bootloader ==
Install mtkclient run:
mtk e userdata
after that:
mtk da seccfg unlock
== Development ==
The device bootloops, fixing that
== UART setup and soldering guide ==
Connecting UART will require you to solder two wires: one wire to ground and the second wire to the transmit pad on the motherboard. Additionally, you will need a USB to TTL module.
To solder the wire successfully, especially for a soldering beginner, it's recommended to find some scrap electronic board to train soldering on and try to solder a wire to the smallest solder pad you can find on the board. To solder a wire to the small UART transmit pad, you will need a small tip for the soldering iron, solder, and a microscope (it doesn't need to be expensive). Flux is also good to have to help the solder flow, but it's possible to solder without it.
Next, find a small wire and strip the wire end open with a knife to reveal strands of small wires inside. Leave just one strand of wire for soldering, and once you have done that, fill the strand with solder.
Once you have tinned the strand with solder, then proceed to solder the strand of wire to the transmit pad, TX0. Take your time to solder; no rush. 
When you have successfully soldered the strand of wire to transmit pad (TX0), then connect that wire or also solder the wire to the receive pad (RX) on your USB to TTL module.
Also remember to solder the ground wire :).
For me, the writer for this UART setup and soldering guide section, I used CH341A v1.7 programmer with a voltage selection switch. I used the 1.8V setting.
For further documentation or troubleshooting, refer to the postmarketOS serial debugging wiki: https://wiki.postmarketos.org/wiki/Serial_debugging#Plugging_in_the_cable
== See also ==
* lg-k130f Development branch and repository
* Firmware page and download
* Stock boot.img
LG K7 (lg-m1)

== Contributors ==
* bug
== What works ==
* compiling
* flashing
* booting
* ssh
* display
== What does not work ==
* Touchscreen
* Everything else
== Additional Info ==
I'm using the T-Mobile LG-K330 variant of the M1 with TheOddTaco kernel. There are a bunch of variants and a bunch of kernels and it's unclear to me how they're all related
== How to enter flash mode ==
* run "adb reboot bootloader" from a terminal
== See also ==
* aport progress
* Bughora kernel
* EdwinMoq kernel
* TheOddTaco kernel
* culots kernel
* FenomenalMOD kernel (only MS3030 variant tested)
* FenomenalMOD xda kernel thread
* LG source
LG L70 (lg-w5)

== Contributors ==
* Paakke
== Installation ==
At the moment flashing is not working, so it is necessary to install to sdcard and then live boot from fastboot.
Installing to sdcard works with the command
# Replace /dev/sdX with the device for your sdcard
$ pmbootstrap install --sdcard /dev/sdX
Now place the sdcard into the phone. Assuming that the bootloader is unlocked, it is possible to get to fastboot by following steps
# Disconnect and reconnect the battery.
# Hold volume up while connecting phone to computer with a usb cable.
Now it is possible to live boot.
$ pmbootstrap flasher boot
The screen doesn't work yet, so for now the only way to find out if it booted is by usb networking or the maximum attention hook.
Category:Devices
LG L90 (lg-w7)

== Contributors ==
MelronTorkin
== Users owning this device ==
== How to enter flash mode ==
Instructions are shared between this device and others from the same manufacturer (LG). The detailed steps can be found here https://wiki.postmarketos.org/wiki/LG_G3_Europe_(lg-d855).
Booting using pmbootstrap flasher boot does succesfully boot the device, allowing ssh connection via USB.
== Installation ==
At the moment flashing is not working, so it is necessary to install to sdcard and then live boot from fastboot.
Installing to sdcard works with the command
# Replace /dev/sdX with the device for your sdcard
$ pmbootstrap install --sdcard /dev/sdX
Now place the sdcard into the phone. Assuming that the bootloader is unlocked, it is possible to get to fastboot by following steps
Disconnect and reconnect the battery.
Hold volume up while connecting phone to computer with a usb cable.
Now it is possible to live boot.
$ pmbootstrap flasher boot
== Photos ==
|
== See also ==
LG L Fino (lg-d295)

Don't work at all yet
== Contributors ==
* Begs
== Maintainer(s) ==
== Users owning this device ==
== How to enter flash mode ==
This device has ununlockable bootloader and requires exploiting the vunerability in bnr_recovery, also couldn't even boot to bootloader, so most likely flashing is impossible.
You can zero out laf, as on LG_G3_Europe_(lg-d855), but it will do nothing but removing the laf download mode.
== Installation ==
Installation_from_recovery_mode
=== TWRP installation ===
Use PurpleDrake to get temproot (but permaroot doesn't work so ^C after that), then `adb push` twrp image and aboot into /temp and then dd them as in twrp installation instructions from adb shell)
== See also ==
* TWRP
* Older TWRP (get aboot.bin from there because link to d295 aboot in newer TWRP is dead
LG Leon LTE (lg-c50)

__NOTOC__
== Contributors ==
* Jenneron
== Users owning this device ==
== Preparation ==
Some modifications of this device require unlocking bootloader
== How to enter flash mode ==
* lk2nd Fastboot: Power on the device. After it vibrates, hold .
* lk2nd Recovery: Power on the device. After it vibrates, hold .
== Installation ==
Download lk2nd from https://github.com/msm8916-mainline/lk2nd and flash it to the device.
Follow Qualcomm_Snapdragon_410/412_(MSM8916)#Installation.
LG Optimus 4X HD (lg-p880)

== How to enter flash mode ==
adb reboot oem-unlock
fastboot oem unlock
flash twrp 3.0.3
reboot to recovery (Vol + and Power)
== Installation ==
See Nvidia_Tegra_armv7_(nvidia-tegra-armv7)
== Unbricking ==
Device boots 
1)normal 
2)APX mode 
3)Diagnostic mode (S/W Upgrade)
if bootloop try reset battery and go to recovery or fastboot (+ and power; - and power)
if its not working:
without battery hold + and - volume and plug usb (if not detect as Nvidia APX try again)
when detects insert battery
in APX mode using nvflash from here not patched
other files from here 
some bat command flash encrypted ABL and phone now 
in S/W Upgrade
next in Windows system (VM or not) restarts in Disable driver signing enforcement mode 
install lg drivers form here or here
go to http://csmg.lgmobile.com:9002/csmg/b2c/client/auth_model_check2.jsp?esn=XXXXXXXXXXXXXXX replace XX to phone imei; remember region
download from here last kdz for your region
download 3pack.zip
open kdz_fw and windows_enabler and make windows_enabler on
by clicking select CDMA, Emergency, KDZ file and launch
phone starts with android
flash twrp 3.0.3
== Contributors ==
* SL-TX''
== Users owning this device ==
== See also ==
* Initial merge request
LG Optimus L3 II (lg-vee3e)

== Contributors ==
* LegoLivesMatter
== Maintainer(s) ==
* LegoLivesMatter
== Users owning this device ==
== How to enter flash mode ==
While the device is off, hold Volume Up (for fastboot) / Volume Down (for recovery) + Home + Power until the screen turns on. When it turns on, release the power button, but keep pressing the other buttons until the device boots into fastboot (it will stay on the LG splashscreen, but will be visible with "fastboot devices") or recovery (will be obvious).
== Installation ==
Only the boot image can be flashed using fastboot (requires flash:raw instead of flash, otherwise you will get a "Couldn't parse partition size '0x'" error), the rootfs must be flashed using an Android recovery zip.
== WiFi ==
Firmware can be found here. It should be put in /lib/firmware/postmarketos/wlan/volans.
The steps to get it working manually are roughly:
* Make sure network services like NetworkManager and wpa_supplicant are disabled (doesn't work with them)
* Write 1 to /sys/devices/platform/msm_sdcc.2/polling
* Modprobe the wlan module
* Write 0 to /sys/devices/platform/msm_sdcc.2/polling (this might not be strictly necessary, but the Android init.rc script does that)
* Create config for wpa_supplicant and run it
* Run dhclient wlan0 (dhcpcd doesn't work)
The support is not packaged yet. Also, it would be nice to get it working with NetworkManager (currently it goes into a connect-disconnect loop).
== Modem ==
Firmware has been extracted from an unofficial CM11 ROM, and the files are the following:
* yamato_pm4.fw
* yamato_pfp.fw
 These firmware files appear to be kgsl/downstream 3D related, at least according to GNUtoo on #replicant. This entire section might be invalid.
When tested with oFono, the following worked:
* Enabling and setting modem online
* Detecting and configuring SIM card
* Scanning for operators
* Sending USSD codes (I tested the one for balance)
However, SMSes initially do seem to work, but the receiving party never gets the SMS. Judging by the balance, the SMS never got sent in the first place or it failed to send. If you successfully send an SMS, please contact me on GitLab or Matrix and make sure to include the exact procedure you used to send the SMS (including whether or not you added/removed one or more firmware files or perhaps used another modem service, such as ModemManager.
== Known issues ==
* Xorg triggers a lot of FBIOPUTCMAP: Invalid argument errors, reason is still unknown. Xfce crashes the system when started by LightDM, but works when started with startxfce4. MATE and Sxmo can be started by LightDM/TinyDM without any issues, except the FBIOPUTCMAP: Invalid argument spam.
== See also ==
* GSMArena page
* Initial merge request
* 
*
LG Optimus L5 (lg-e610)

== Contributors ==
* Nimayer
== Maintainer(s) ==
* Nimayer
== Users owning this device ==
== How to enter flash mode ==
From off state, press and hold , then release and hold the other two.
The phone will stay on the LG logo and show a black log screen once you connect the USB cable.
== Internal memory Installation ==
Both pmbootstrap flasher flash_rootfs and pmbootstrap flasher flash_rootfs --partition userdata
fail with:
 [12:50:20] (native) flash rootfs image
 target didn't report max-download-size
 Sending 'userdata' (464896 KB)...
 FAILED (remote: data too large)
You can flash by recovery zip or SD card.
== SD card Installation ==
Build image (on your computer) and prepare the installation as usual
$ pmbootstrap init
$ pmbootstrap build device-lg-e610
$ pmbootstrap install --sdcard=/dev/mmcblk0
Put the phone in Fastboot mode and connect it to your computer
$ pmbootstrap flasher flash_kernel 
== Issues ==
* LightDM doesn't show up on the screen by default. To fix this you need to add logind-check-graphical=false in /etc/lightdm/lightdm.conf. See Display_manager#CanGraphical_issue for more info.
* PulseAudio reboots the device. This is particularly problematic in Xfce, since it launches PulseAudio at startup. To make Xfce usable, you may want to uninstall the pulseaudio package or delete the /usr/bin/pulseaudio binary. (apparently Samsung Galaxy Young (samsung-royss) also has this problem?)
* console and fbkeyboard user interfaces don't show the actual console.It might be because CONFIG_FRAMEBUFFER_CONSOLE is disabled. But rebuilding the kernel with this option enabled causes a kernel panic.
* Loading module blobs doesn't seem to work when the kernel is compiled with gcc-6. Downgrading to gcc-4 sort of fixes the issue, but WiFi fails to load anyway.
== See also ==
* Initial merge request
* 
*
LG Optimus L7 (lg-p700)

== Contributors ==
* Heylouiz
== Maintainer(s) ==
* Heylouiz
== Users owning this device ==
== How to enter flash mode ==
From off state, press and hold , then release and hold the other two.
The phone will stay on the LG logo.
== Installation ==
Only tested flashing by recovery zip, works either from a zip file in the internal storage or sideload.
twrp can be found on :
https://xdaforums.com/t/recovery-twrp-3-0-2-0-for-l7-p700-p705-p708.3333001/post-89396031
thanks to gravitos
== See also ==
* LG Optimus L5 (Similar device)
* initial MR
* 
*
LG Optimus L7 II (lg-vee7e)

== Contributors ==
== Users owning this device ==
== How to enter flash mode ==
If you have a custom recovery hold ++extra button until you start to boot.
== Installation ==
Use pmbootstrap flasher --method=adb sideload or pmbootstrap export and then adb sideload using your systems version of adb, or copy the zip to the SD-card and install with your recovery
== Partition Map ==
Keep in mind that the contents in here are not necessarily representative of the factory state of the device
fdisk -l /dev/mmcblk0
Disk /dev/mmcblk0: 3.64 GiB, 3909091328 bytes, 7634944 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 * 1 40 40 20K 4d QNX4.x #Bootloader shenanigans
/dev/mmcblk0p2 41 2088 2048 1M 45 unknown #Bootloader shenanigans
/dev/mmcblk0p3 2089 10280 8192 4M 46 unknown #Bootloader shenanigans related to the "emergency mode !!" screen
/dev/mmcblk0p4 10281 7512064 7501784 3.6G 5 Extended #Just the extended partition that houses all the other ones
/dev/mmcblk0p5 131072 139263 8192 4M 47 unknown #TWRP claims it is IMEI, but it actually has lk in there
/dev/mmcblk0p6 139264 147455 8192 4M 2c unknown #no clue
/dev/mmcblk0p7 147456 155647 8192 4M 58 unknown #no clue
/dev/mmcblk0p8 155648 204799 49152 24M 77 unknown #/misc 
/dev/mmcblk0p9 204800 229375 24576 12M 48 unknown #Boot (as in boot.img, not pmos_boot)
/dev/mmcblk0p10 229376 237567 8192 4M 4a unknown #no clue
/dev/mmcblk0p11 237568 245759 8192 4M 4b unknown #no clue
/dev/mmcblk0p12 245760 303103 57344 28M 49 unknown #Modem things of some kind
/dev/mmcblk0p13 303104 360447 57344 28M 6c unknown #Slightly different modem things
/dev/mmcblk0p14 360448 3145727 2785280 1.3G 83 Linux #System, by default postmarketOS gets installed here
/dev/mmcblk0p15 3145728 3170303 24576 12M 83 Linux #This partition snitches on you for rooting your phone :D
/dev/mmcblk0p16 3170304 3481599 311296 152M 83 Linux #Cache
/dev/mmcblk0p17 3481600 3506175 24576 12M 60 unknown #Recovery boot.img
/dev/mmcblk0p18 3506176 3522559 16384 8M 83 Linux #Firmware?
/dev/mmcblk0p19 3522560 3547135 24576 12M 6b unknown #aboot, lk
/dev/mmcblk0p20 3547136 7340031 3792896 1.8G 83 Linux #Data
/dev/mmcblk0p21 7340032 7348223 8192 4M ff BBT #13 A5 84 51 E2 34 A2 84 03 and then a veritable mountain of zeros
/dev/mmcblk0p22 7348224 7356415 8192 4M ff BBT #0x56F1 Bytes of data, then zeros like above
/dev/mmcblk0p23 7356416 7389183 32768 16M 83 Linux #Firmware?
/dev/mmcblk0p24 7389184 7397375 8192 4M ff BBT #Just zeros this time
/dev/mmcblk0p25 7397376 7503871 106496 52M 83 Linux #A file "readme" content:"This binary does not use cupss overlay mechanism" ???
/dev/mmcblk0p26 7503872 7512063 8192 4M ff BBT #9D D4 10 00 FF FF FF FF ... to 0x1FFF, zeros to the end of the partition
/dev/mmcblk0p27 7512064 7520255 8192 4M ff BBT #'strings mmcblk0p27.img' => 'BANGSIRI' ... what???
== See also ==
* Initial merge request
* Modernize aport
* Update architecture
LG Spirit 4G LTE (lg-c70n)

== Contributors ==
* StandaSK
* Retrir
== Maintainer(s) ==
== Users owning this device ==
* Retrir
== H440N, H445 vs H420 ==
This page is for the Snapdragon 410 based models of the LG Spirit (H440N and H445), the H420 version is based on MediaTek MT6582 and will require a separate port.
== How to unlock bootloader ==
Follow LG K10 instructions, but use aboot from here and twrp from here. NOTE: if you want to use TWRP, you must not boot into Android after flashing it to recovery! When you boot Android, twrp is replaced with the stock recovery.
== How to enter flash mode ==
You should use fastboot from a correctly patched lk2nd, flash it same as you did with aboot and recovery.
Note that LG seems to have their own built-in fastboot, but it uses some weird text mode for display, and no commands seem to work. 
== Installation ==
With the correct msm8916-mainline kernel patches and pmaports patches applied, you should be able to use https://wiki.postmarketos.org/wiki/Qualcomm_Snapdragon_410/412_(MSM8916)#Installation and https://wiki.postmarketos.org/wiki/Installation_guide, but you should build the patched kernel with envkernel.sh so it is used.
== See also ==
* Specs on GSMArena.com
LG Stylo 3 Plus (lg-sf340n)

== Contributors ==
* Lost-Entrepreneur439
* LG-SD4XX
== Maintainer(s) ==
* Lost-Entrepreneur439
== Users owning this device ==
== Bootloader Unlocking ==
Unlike most LG devices, the Stylo 3 Plus does not need an unlock key, you just have to enable OEM Unlocking in Developer Options, then run fastboot oem unlock in Fastboot mode.
== Key combinations for entering Recovery/Fastboot ==
=== Recovery ===
* Turn the phone off
* Hold down power and volume down for 3 seconds, then quickly release power and press it again
* Use volume down to scroll down to yes, then press power button to press yes
* Press yes again
* Hold down power and volume down again for 2 seconds, release and press power after two seconds
=== Fastboot ===
* Turn the phone off
* Hold down volume down
* Connect a MicroUSB cable to the phone
== Installation ==
Installation guide. You have to use TWRP to install, fastboot does not work due to LG's limited fastboot. If TWRP gives you the error "chroot: can't execute '/bin/busybox': No such file or directory", flash this TWRP: https://drive.google.com/file/d/1zsxlNkePh7T8zCVuaRmq4fNVHqZuolqJ/view
LG V20 (lg-us996)

The codename for the LG V20 is "elsa", but LG only provides bootloader unlocking support for the us996 variant (sold by US Cellular).
== Maintainer(s) ==
Uclydde
== Users owning this device ==
== Display Cutout ==
Unlike most smartphones with display cutouts (aka "the notch"), the LG V20's touchscreen does not register input underneath it. Until there is better support for display cutouts, it may be a good idea to simply not use that row of the display. This could possibly be done by changing the screen dimensions, and panning.
See this LineageOS commit disabling the section of the screen next to the cutout
== Mainline Kernel ==
The SoC, msm8996, has support in the mainline kernel. Since this phone has a removable battery and a decent amount of ram & storage, this phone could be usable in the long-term, making it a prime candidate for mainlining. 
Obstacles:
* The display panel, made by LG, uses display stream compression, or DSC. While the mainline kernel does support DSC *for the sdm845 SoC*, it does not support it yet for the msm8996 (as of 12/28/2021). Additionally, the simple framebuffer approach cannot be used for display output, because the panel is command-mode - not video-mode, and the bootloader disables autorefresh.
== See also ==
* Initial merge request
* Snapdragon 820 / msm8996
* Downstream kernel source
* msm8996-mainline a common near-mainline kernel tree for MSM8996 devices
LG V35 ThinQ (lg-judyp)

== Contributors ==
* Jenneron
== Users owning this device ==
== Preparation ==
Android fresh update (Android 10 Q: for example, Korean version) is expected. No luck to load the pmOS kernel with the Android 8 Oreo due to some Oreo's bootloader-specific board-id requirement that is not implemented. 
== Installation ==
$ fastboot erase dtbo_b # you can use dtbo_a for a slot
$ pmbootstrap init
$ pmbootstrap install --sdcard=/dev/sdX # where /dev/sdX is your SD card
$ # boot into fastboot mode
$ pmbootstrap flasher flash_kernel --partition boot_b # or boot_a
== See also ==
* Close to mainline kernel with device-specific patches
LG V500 (lg-v500)

== Contributors ==
* Thomasdhale
== Maintainer(s) ==
* Thomasdhale
== What works ==
Downstream kernel compile, Telnet iniramfs works to fix a partition issue (pmboostrap install selects wrong partition UUID), then process freeze later.
== What does not work ==
== How to enter flash mode ==
=== Factory reset/enter recovery ===
LG default recovery can be entered thanks to `adb reboot recovery`. Those step can be used to go into a custom recovery like TWRP !
# Push and maintain `power` and `volume down` buttons
# When LG bootscreen appears release the buttons
# Push `power`, `volume up` and `volume down` buttons
# The screen should display "Factory hard reset", release the buttons
# There are two confirmation, press power twice to confirm
# Custom recovery will launch
=== Download mode ===
This mode can be used with "LG mobile support tool" in order to restore factory software. It seems to be proprietary protocol
# Shut down the tablet, disconnect USB cable
# Push and maintain `volume up` button
# Connect to the computer
# Release the volume button
# The screen should display "Download mode" in a white square, the blacklight seems to be at minimum so it might be difficult to read in bright light
== boot.img signature ==
While boot.img are not really signed, a magic word needs to be appended to it for the device to boot without complaining about "Secure booting error".
Someone kindly created a tool called Open Bump to easily add this magic word the bootloader is looking for. An updated Python 3 version is available from here, then it is as easy as:
# Executing `./open_bump.py boot.img`
# Flashing the resulting `boot_bumped.img` to the phone thanks to `dd` or TWRP install image feature.
== Installation ==
== Users owning this device ==
== See also ==
LG Wine Smart 2015 (lg-h410)

== Contributors ==
* Hacker420
* Illen
== Users owning this device ==
== How to enter flash mode ==
With lk2nd use the volume down button to boot into fastboot.
== Unlocking the bootloader ==
Use this package https://androidfilehost.com/?fid=14655340768118474751 (original source at 4PDA: https://4pda.to/forum/index.php?showtopic=682101&st=120#entry45253481). Note that the installed recovery is in Russian, you can grab an English recovery here: https://4pda.to/forum/dl/post/7096443/recovery.img
== Display ==
The framebuffer is 24 bits per pixel, which seems to break splash and phoc based DEs. You need to run fastboot oem display-auto-refresh after every reboot in lk2nd before you boot the kernel if you want to have a working display.
== Hardware ==
Status	Hardware 	Info
Y 	Power 	PM8916 PMIC, charging works, battery percentage is off compared to downstream.
N 	Display panel 	In my case it's the Tianma ILI9488. Needs MDP3 support in mainline as it's a DSI panel.
P 	Display backlight 	TI LM3530, works if you echo raw values to it, doesn't seem to show up in XFCE4.
N 	Touchscreen 	LeadingUI LU2020 (pulled from the dts, not sure if it's 100% accurate to what's in it). No driver in mainline.
N 	Keypad 	Uses a PP2106 IC, downstream driver code is included in the fork, doesn't work though.
Y 	USB 	Gadget mode works, pretty sure the phone doesn't have OTG. Uses pm8916_charger for USB detection.
Y 	SD card 	Works fine with card detect.
Y 	WiFi 	WCN3620, seems to work fine but sometimes can hang the SSH connection if you connect over it but eventually recovers.
Y 	GPIO keys 	Lid Hall sensor is detected, as are the power key GPIO and volume keys.
P 	Vibration 	pm8916_vib, works with fftest. Untested with feedbackd.
P 	RGB LED 	TI LP5521, works when manually controlled, needs hooking up to feedbackd to work with it.
P 	Bluetooth 	WCN3620, detects devices but connection is failing. Needs further testing.
N 	Sound 	Untested.
P 	Proximity and light sensor	APDS9130, works with the mainline driver. Likely needs this MR for the proximity sensor part to work with iio-sensor-proxy: https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/merge_requests/373. Does not seem to report any values using iio-sensor-proxy. Raw values can be read.
P 	Accelerometer 	Reported as K2HH by the device, works with the ST LIS2HH12 driver. Does not seem to report any values using iio-sensor-proxy. Raw values can be read from both cat and hwtest. Mount matrix not fully tested.
N 	Cameras 	Needs research into what they are.
N 	Modem 	Snapdragon X5, doesn't seem to work properly yet.
N 	GPS 	Untested.
== See also ==
* lk2nd sources.
* Kernel fork.