[LG V30 ROMs, Kernels, Recoveries, & Other Developm] zacharias.maladroit:
initial thread here, further clarifications in recently added posts below OP/1st post

Lunar-Kernels

tl;dr - too long didn't read / first things first

Stock ROM kernels are attached in posts #1-4 or link to Google Drive

AOSP/LineageOS kernels are attached in post #5 or folder

simply dropping the folder with kernels here (Stock ROM):

https://drive.google.com/open?id=1xL5gEiG-fjzTuSGM_kUDsrOKy-jTtGr1

Description: 3 sub-folders (thus kernels) available:

"old" shouldn't really be used, this is a very bare to LG stock source kernel and (probably) using outdated ramdisks which prevent FM Radio, Mirrorlink, etc. from working

"stable" stable has gotten more testing (or more recent fixes) and is deemed fit for daily driver usage

"bleeding edge" is newest branch, very experimental changes/fixes or just the very latest kernel (if those don't end up in "stable" already)

Stable and bleeding edge are the

Further notes for "eas":

From the tests so far - it has turned out that power consumption ALWAYS was higher compared to HMP and/or the default shipped LG kernel (tweaked HMP)

So the best results up until now was to underclock CPU, underclock GPU (or keep at lowest 1-2 levels) and add tweaks to shut phy power source off for display, this is similar results like anandtech with Exynos EAS/HMP tests: https://www.anandtech.com/show/12620/improving-the-exynos-9810-galaxy-s9-part-2/3

Meaning: NO EAS kernels until further notice - only HMP kernels will be developed/provided right now

Usage case:

[outdated]

"old": should work pretty reliable, everything is built conservatively & close to stock one of the first kernels

"stable": probably great daily driver material - FM Radio & MirrorLink, etc. still broken

"bleeding edge": just the latest and greatest from upstream, security, tuning, etc. - features might break in the process

eas [attached here]: daily driver, long running for lots of reading, lots of watching videos, high SOT demand ; suitability for gaming has yet to be evaluated

NOT working and probably will NOT in the near future

(or at all): [outdated]

- FM Radio (broken with "old", "stable" kernels - those use v300 ramdisk)

- MobiCore - thus MirrorLink, etc. (broken with "old", "stable" kernels - those use v300 ramdisk)

- FM Radio & MirrorLink currently works with bleeding edge kernels

Notes (Kernel)

:

This kernel is built first and foremost FOR ME and shared with the community to benefit from that work,

you don't owe me anything and I don't owe you anything

like with Sony (yeah, even Sony !) and other vendors with their modified, proprietary non-AOSP ROMs - kernel development is extremely bothersome, each few commits kernel doesn't boot or compilation fails, so don't expect e.g. 4.4.137 kernel or catchup with latest codeaurora changes since that takes simply too much time and work (time, effort, nerves, etc.)

tested on H930 (Europe) V30 ONLY, test at your own risk on H930DS (dual SIM) or other devices; ramdisks and device configs WILL differ (global defconfig used - so compatiblity should be higher, limitations/compatibility issues with US, Korea and other models possible)

You need to have knowledge how this device behaves in case of flashing broken kernels, filesystem corruption and other worst-case scenarios

You must:

stay calm all of the time while flashing and must NOT do anything rash or chaotic

know how to get into bootloader/fastboot mode via USB-cable (when device is off) OR via adb command from a running system

know how to force the device to turn off (it will turn on again but that might help in certain cases) - this way you easily can get into fastboot/bootloader again

know and/or have a basic understanding that the device will settle most issues on its own

have your device charged to a battery level AT LEAST to 50-60% in case boot loops take longer (it is caught in boot loop) and you can't quickly turn the device off anymore

know/expect that flashing Magisk and other mods most certainly will lead the device too boot several times ("artificial bootloop") and might get you uneasy or confused, we need to figure out how to speed up the process that it finally boots into the ROM

potential issues & potential remedies/fixes: [up-to-date]

might have high load unless rctd disabler is flashed (root detection tool) => flash rctd

might not boot unless no-verity is flashed, custom ROM => flash no-verity

might not boot or work with encrypted phone or encrypted anything => should be self-explanatory, don't use LG encryption on custom ROMs/mods

some security functionality might not work => TEE/qseecom/lgecrypto_module might not work, encryption safe, folder encryption, etc. might be broken (if applicable)

might not boot or bootloop microSD with exfat is cause of LOT of trouble => in doubt remove microSD before flashing custom Kernels or ROM mods to avoid having additional trouble-maker to troubleshoot

phone boot-"loops" several times => seems to be default bootloader behavior for LG V30 (and/or other LG phone)

phone boot-"loops" several times => might need a few times to "settle" to boot the ROM up

booting up takes long => might actually rebuild dalvik cache or do some filesystem checking

SIM PIN isn't request and WiFi is dead as well => several reboots might fix it;

SIM PIN isn't request and WiFi is dead as well => permission corruption might have occurred, (need root) try to fix via: https://stackoverflow.com/questions...acct-uid-10064-read-only-file-system-in-emula

after flashing (custom) Kernel or (custom) ROM phone (re)boots into fastboot => "no OS" , Kernel might not actually be bootable , kernel issue, system partition issue

after flashing (custom) Kernel or (custom) ROM phone (re)boots into fastboot => might have incompatible ramdisk, no-verity was not flashed

after flashing (custom) Kernel or (custom) ROM phone (re)boots into fastboot => Kernel might be broken (totally not work or be compiled with non-compatible features)

after flashing (custom) Kernel or (custom) ROM phone (re)boots into fastboot => OS/Android might be broken (filesystem corrupted, etc.)

Flashing rctd & no-verity/verity-disabler is only necessary for LG Stock-based ROMs !

Not necessary for AOSP, LineageOS, etc. !

prepare kernel for flashing : [up-to-date]

rename the zip-file to 7z (file size limit)

extract the 7z (needs 7z that support PPMd compression)

rename it into boot.img

suggested flash : [up-to-date]

Get into fastboot mode (turn off => connect cable end to phone => hold VOL down => connect PC end of cable)

fastboot flash boot boot.img

fastboot boot TWRP.img (keep USB cable connected ALL of the time)

flash rctd disabler

flash no-verity

(optional) flash Magisk

disconnect USB cable

(optional) wipe /cache

(optional) dalvik cache

reboot system

Help:

Forcing the device to reset usually is done via Power + VOL DOWN - keep both pressed for several seconds, then the screen should turn off

the device is set up to (re)boot again - so have the USB cable, a PC/phone [on the go] with fastboot ready to connect the cable immediately when it was off

.

If you plan on using the microSD more extensively and are on non-Stock (e.g. AOSP, LineageOS, dot os, etc.) - [backup your data !] then format the microSD to ext4 in TWRP, that should give you 2x the write performance of exfat and also somewhat faster read performance

As a bonus of using ext4 on the microSD - access to your files should be available when flashing/trying out the GSIs (Project Treble)

Kernel boot test (DEVs):

[Kernel testing or if you want to try] I usually do a fastboot boot boot.img first to see if the bootanimation is successful (boots into bootanimation [non-Stock] or it boots into the ROM itself with reduced functionality [Stock ROM])

After that I do a real flash of the kernel via fastboot flash boot boot.img

Quirks (V30* phones compared to others & bootloader/boot(loop) behavior):

After first flashing - the kernel might fail at 1st boot, then reboot device and properly boot into the ROM

with Magisk it can be more reboots (I counted at least 3-4).

.

.

If the bootlooping is much longer - force reset the device (Power + VOL DOWN), that should usually allow the device to recover after 1-3 (re)boots

.

If that still doesn't help - remove the microSD - until you've successfully booted the kernel up, the exfat driver is known to cause trouble and make things much less predictable and irritating

To make things more predictable (and exclusively using AOSP/LineageOS-based ROMs) - you can format the microSD to ext4, that might help a bit with the amount of (re)boots during flashing)

FIXME:

additional notes, warnings, guides, etc.

(theory) while the device seems to bootloop after flashing Magisk or other "bigger" modifications - occasionally press the volume down button while you see the LG V30 ThinQ logo (boot splash/image) to speed up booting (input = boosting = quicker everything ?)

Kernel Source:

android_kernel_lge_msm8998/branches

lunar-kernel_II_WIP5_boot-work [current "bleeding edge"]

other/older kernels are earlier states of latest bleeding edge branch

Kudos

:

Linus Torvalds, Linux Kernel devs

Greg Kroah-Hartman our favorite upstream Kernel LTS maintainer <3

Google kernel & other Android devs

codeaurora, linaro & all other devs working on qualcomm goodies

LG kernel & other devs

nathanchance for his kernel, toolchain and other reference work

sonyxperiadev & devs

sultanxda

freak07

franciscofranco

andip71

frap129

GreyLeshy

SGCMarkus

the XDA , 4PDA and all other android communities

all other devs & folks to be mentioned

last edited:

28.06.2018, add attachment: specifically built kernel for ls998, US sprint V30 model (US firmware,

US998

)

28.06.2018, add attachment: uploaded II_EAS_I_stable , EAS kernel on early ported EAS state, should be pretty efficient, deemed stable material, read notes: at its announcement post

06.07.2018: updated text for bleeding-edge added link to it https://xdaforums.com/showpost.php?p=76996622&postcount=88

12.07.2018: attached latest HMP kernel to OP (1st post), removed EAS kernels since those had a bug with frequency being stuck at max frequency

26.10.2018: removed older attached HMP kernels, newer ones are in posts below