[Kernel][11.15.2020][4.14.205][F2FS] Dragonfly for LG G8 Korean / US

Search This thread

quantan

Senior Member
Jan 26, 2011
334
152
Dragonfly Kernel v1.5 for the LG G8 Korean / US

Introduce

First of all, I'd like to thank Metaphysics team for giving the first custom kernel of G8 USA. Unfortunately I'm using G8 - Korean and they haven't released version for the Korean variant yet. I had to learn how to build a kernel for myself based on their kernel source. However, I want to learn more so I decided to compile the kernel from LGE open source. Now, my kernel is quite stable to be released and shared to the G8 community. You can call it the Dragonfly kernel.


Main Features:
- Based on LGE open source LMG820N_Android_Q_v20r: http://opensource.lge.com/osSch/list?types=NAME&search=g820n
- Linux-Stable-Upstream included to latest 4.14.205
- Next-Gen CAF-Tag LA.UM.8.11.r1-02600-NICOBAR.0 merged
- Regular CAF-Tag for SD855 merged LA.UM.8.1.r1-16200-sm8150.0
- Compiled by ProtonClang 12.0.0 with -O3 speed optimizations
- No VLAs
- Magisk included
- F2FS support


EAS related features:
- EAS implementation patched up to latest CAF state
- Disable autogroups and use cgroups for more efficient task placement
- CPU input boost

File System related features:
- Include rapid GC by @arter97

Network related features:
- Wireguard Support (Details)
- Add new TCP congestion algorithm: BBR2, agilesd

Memory related features:
- Include zstd

Wakelock Blocker:
- Add Boeffla Wakelock Blocker v1.1.0
- The most common and safe wakelocks are blocked by default: qcom_rx_wakelock;wlan;wlan_wow_wl;wlan_extscan_wl;netmgr_wl;NETLINK

How to flash the Kernel:
- You can flash the kernel zip file via TWRP or Magisk
- You can also extract the new_boot.img to flash it via fastboot mode

Known bugs:
- You tell me

DOWNLOAD:
Download is located always in
https://github.com/anht3889/LGE_G820_Kernel_Caf/releases

Important: Read after Download
Be sure to turn off Secure start-up before flash this kernel


Credits:
- Metaphysics kernel team: https://github.com/KamioRinn/Metaphysics_LGE_G820_Kernel
- SGCMarkus for his guide of building kernel and TWRP
- Erick G for bringing new TWRP to G8 which supports F2FS
- Jean Carlos Bencosme for adding / picking kernel features
- Kirisakura for his great kernels
- Sultanxda for his simple_lmk
- LGE for the kernel open source
- All other great kernel devs

Contributors
quantan

Source Code: https://github.com/anht3889/LGE_G820_Kernel_Caf

XDA:DevDB Information
Dragonfly, Kernel for the LG G8

Contributors
quantan
Kernel Special Features:

Version Information
Status: Stable

Created 2020-09-16
Last Updated 2020-11-14
 
Last edited:

quantan

Senior Member
Jan 26, 2011
334
152
Previous versions, e.g. v1.4, don't work with the new TWRP 3.4. Therefore, I use Anykernel from v1.5. I recommend you follow the steps below:
1. Install magisk patched stock boot.img
2. Install new TWRP 3.4 from Magisk Manager
3. Reboot to TWRP
4. Install Magisk and reboot to TWRP
5. Install Disable Verity zip file and reboot to TWRP
6. Install my kernel Dragonfly v1.5
For newer version, i.e. v1.6, you don't need to repeat all steps above. You just want to flash thew newest Dragonfly.

And good news to you guys, TWRP 3.4 supports F2FS so I decided to enable F2FS support in my kernel as well. To make F2FS, please follow these steps:
1. Install my kernel v1.5
2 .Reboot to TWRP 3.4
3. Change file system of /data to F2FS
4. Replace the attached modified fstab to support F2FS of /data
5. Reboot
Note: You will lose your data.

In case you don't know:
- TWRP-3.4.0.0-G820N.zip and fstab.alphaplus for G8 Korean
- TWRP-3.4.0.0-G820UM.zip and fstab.alphalm for G8 US

Give credits to Erick G and @SGCMarkus for bringing TWRP to our phones.
 
Last edited:

quantan

Senior Member
Jan 26, 2011
334
152
Changelog:
v1.5:
- Fix touch issues for TWRP
- Add Kcal
- Add KLapse v5.0
- Update to 4.14.205
- Update lze and add lzo-lre for Zram
- Use Anykernel
v1.4:
- Import LGE v20r open source changes
- Upstream to linux-stable v4.14.203
- Upstream CAF LA.UM.8.1.r1-16200-sm8150.0
- Fix audio and OK Google hot word issues
- Improve schedutil
- Power saving workingqueues enabled by default
- Change various drivers ( MM, audio) to user power efficient workingqueues. Thanks to @Freak07 's commits
- Update sdcardfs
v1.3:
- Merge tag 'LA.UM.8.11.r1-04300-NICOBAR.0'
- Add ntfs and exfat support
v1.1 - v1.2 - Intial kernel
 
Last edited:
  • Like
Reactions: lefttobleed

tron1

Senior Member
Aug 24, 2005
187
164
Stuttgart
Good work ...mostly. Huge showstopper is the missing support for exfat/ntfs with sdcard. With USB exfat is working. Only fat32 formatted sdcards are working. But this is a nogo with files > 4GB
 

quantan

Senior Member
Jan 26, 2011
334
152
Hi Guys. The new v1.4 is just released. I have been quite busy due to family and work stuff. Here is the changelog:
- Import LGE v20r open source changes
- Upstream to linux-stable v4.14.203
- Upstream CAF LA.UM.8.1.r1-16200-sm8150.0
- Fix audio and OK Google hot word issues
- Improve schedutil
- Power saving workingqueues enabled by default
- Change various drivers ( MM, audio) to user power efficient workingqueues. Thanks to @Freak07 's commits
- Update sdcardfs
 

quantan

Senior Member
Jan 26, 2011
334
152
@quantan Could you make it compatible with LG G8s models? LM-G810 is the model code
I'll check if I can make a version for LG G8s tomorrow. However, I can't guarantee that it will work for G8s or not since I don't have that phone. @Eduxki Give me your model, e.g. LMG810EA, and your operator / country as well. Is Android 10 available for your phone now since this kernel is for Android 10
 
Last edited:

kimba99

Senior Member
Mar 17, 2013
291
104
Hi Guys. The new v1.4 is just released. I have been quite busy due to family and work stuff. Here is the changelog:
- Import LGE v20r open source changes
-...

thanks for your hard work! i just installed it on my G820N with latest 20s-fw... seems to be working fine so far.

PS: installed it via TWRP, and had twrp re-inject itself into the boot-img afterwards again.... => would be nice if your prepared installer zip-file would not just include magisk, but also twrp ;) (just as a safety-measure to not loose twrp when installing your kernel.

PPS: after your src rebase/update to that 20r kernel source drop, "dragonfly" is working with my 20s-fw image again!! your previous version with only 20a kernel src only worked until 20m (march sec-patch) firmware, neither 20o nor 20s could run stable on that 20a-kernel. gui hung, apps didn't respond etc... thankful that 20s-fw finally runs stable so far on those 20r-kernel updated version.
 

quantan

Senior Member
Jan 26, 2011
334
152
thanks for your hard work! i just installed it on my G820N with latest 20s-fw... seems to be working fine so far.

PS: installed it via TWRP, and had twrp re-inject itself into the boot-img afterwards again.... => would be nice if your prepared installer zip-file would not just include magisk, but also twrp ;) (just as a safety-measure to not loose twrp when installing your kernel.

PPS: after your src rebase/update to that 20r kernel source drop, "dragonfly" is working with my 20s-fw image again!! your previous version with only 20a kernel src only worked until 20m (march sec-patch) firmware, neither 20o nor 20s could run stable on that 20a-kernel. gui hung, apps didn't respond etc... thankful that 20s-fw finally runs stable so far on those 20r-kernel updated version.
Thank you for your feedback. Actually in Dragonfly v1.3 I did lots of changes to schedultil based on Pixel 4 XL kernel. However it didn't work well. Sorry about that. In the v1.4, I revert the changes and make other improvement to schedutil gov.
I'll look into the TWRP injection and hopefully it will be available in v1.5 or 1.6. Any other features you guys want, please let me know.
 

kimba99

Senior Member
Mar 17, 2013
291
104
Thank you for your feedback. Actually in Dragonfly v1.3 I did lots of changes to schedultil based on Pixel 4 XL kernel. However it didn't work well. Sorry about that. In the v1.4, I revert the changes and make other improvement to schedutil gov.
I'll look into the TWRP injection and hopefully it will be available in v1.5 or 1.6. Any other features you guys want, please let me know.

as for TWRP integration: keep in mind that there are also separate versions for INTL vs KOR edition of TWRP, just like with the kernel itself!

further ideas? :cyclops: ... fix touchscreen in recovery => code fixes already exist, check here:

https://github.com/ErickG233/LMV500-sm8150_kernel/commit/1b5b93d72ec87054ef2d80c8d955dcdaa40d4332

if i come up with additional ideas i'll let u know.



PS: it's been a while since i last modded/hacked/upgraded android kernels :good::cool:

PPS: maybe sth like the ooooold "crossbreeder" mod =>
https://github.com/f1vefour/CrossBreeder ... but i'm unsure if this is still relevant and or working on "10"... as the original code is rather... dated :eek:
 
Last edited:

quantan

Senior Member
Jan 26, 2011
334
152
as for TWRP integration: keep in mind that there are also separate versions for INTL vs KOR edition of TWRP, just like with the kernel itself!

further ideas? :cyclops: ... fix touchscreen in recovery => code fixes already exist, check here:

https://github.com/ErickG233/LMV500-sm8150_kernel/commit/1b5b93d72ec87054ef2d80c8d955dcdaa40d4332

if i come up with additional ideas i'll let u know.



PS: it's been a while since i last modded/hacked/upgraded android kernels :good::cool:

PPS: maybe sth like the ooooold "crossbreeder" mod =>
https://github.com/f1vefour/CrossBreeder ... but i'm unsure if this is still relevant and or working on "10"... as the original code is rather... dated :eek:
- The fix for touchscreen in recovery is added to my kernel.
- I currently have no idea about TWRP. I have ramdisk with TWRP but no magisk. Can you install TWRP and Magisk then export boot.img and give it me? I will extract ramdisk from it then integrate the ramdisk to my kernel.

Thank you for your efforts. Is there a GSI suitable for g820?
Havoc, Bliss, Lineageos GSI should be good.
 

lufan

Member
Oct 10, 2006
9
2
OnePlus 8T
- The fix for touchscreen in recovery is added to my kernel.
- I currently have no idea about TWRP. I have ramdisk with TWRP but no magisk. Can you install TWRP and Magisk then export boot.img and give it me? I will extract ramdisk from it then integrate the ramdisk to my kernel.


Havoc, Bliss, Lineageos GSI should be good.

It can be used, but it can't double-click the wake-up screen, the display after the screen is not turned off, and the vibration intensity is not adjustable. I backup the g820 boot through twrp, which contains magisk. I hope you can use it
https://drive.google.com/file/d/17I-m9QdmOzn7CXH3hOl-c04Jnvd7GC3P/view?usp=sharing
 

kimba99

Senior Member
Mar 17, 2013
291
104
wrote you a PM quantan, with my backup stuff in it likewise.

cheers and best regards =)
 

quantan

Senior Member
Jan 26, 2011
334
152
It can be used, but it can't double-click the wake-up screen, the display after the screen is not turned off, and the vibration intensity is not adjustable. I backup the g820 boot through twrp, which contains magisk. I hope you can use it
https://drive.google.com/file/d/17I-m9QdmOzn7CXH3hOl-c04Jnvd7GC3P/view?usp=sharing
wrote you a PM quantan, with my backup stuff in it likewise.

cheers and best regards =)
Could you guys test the kernel v1.5 with TWRP to make sure it work. Thank you.
https://github.com/anht3889/LGE_G820_Kernel_Caf/releases/tag/v1.5-test
 
  • Like
Reactions: blaze2051

quantan

Senior Member
Jan 26, 2011
334
152
@lufan Have you tried it. If not please try it to double check. The ramdisk from KR boot is working.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    Dragonfly Kernel v1.5 for the LG G8 Korean / US

    Introduce

    First of all, I'd like to thank Metaphysics team for giving the first custom kernel of G8 USA. Unfortunately I'm using G8 - Korean and they haven't released version for the Korean variant yet. I had to learn how to build a kernel for myself based on their kernel source. However, I want to learn more so I decided to compile the kernel from LGE open source. Now, my kernel is quite stable to be released and shared to the G8 community. You can call it the Dragonfly kernel.


    Main Features:
    - Based on LGE open source LMG820N_Android_Q_v20r: http://opensource.lge.com/osSch/list?types=NAME&search=g820n
    - Linux-Stable-Upstream included to latest 4.14.205
    - Next-Gen CAF-Tag LA.UM.8.11.r1-02600-NICOBAR.0 merged
    - Regular CAF-Tag for SD855 merged LA.UM.8.1.r1-16200-sm8150.0
    - Compiled by ProtonClang 12.0.0 with -O3 speed optimizations
    - No VLAs
    - Magisk included
    - F2FS support


    EAS related features:
    - EAS implementation patched up to latest CAF state
    - Disable autogroups and use cgroups for more efficient task placement
    - CPU input boost

    File System related features:
    - Include rapid GC by @arter97

    Network related features:
    - Wireguard Support (Details)
    - Add new TCP congestion algorithm: BBR2, agilesd

    Memory related features:
    - Include zstd

    Wakelock Blocker:
    - Add Boeffla Wakelock Blocker v1.1.0
    - The most common and safe wakelocks are blocked by default: qcom_rx_wakelock;wlan;wlan_wow_wl;wlan_extscan_wl;netmgr_wl;NETLINK

    How to flash the Kernel:
    - You can flash the kernel zip file via TWRP or Magisk
    - You can also extract the new_boot.img to flash it via fastboot mode

    Known bugs:
    - You tell me

    DOWNLOAD:
    Download is located always in
    https://github.com/anht3889/LGE_G820_Kernel_Caf/releases

    Important: Read after Download
    Be sure to turn off Secure start-up before flash this kernel


    Credits:
    - Metaphysics kernel team: https://github.com/KamioRinn/Metaphysics_LGE_G820_Kernel
    - SGCMarkus for his guide of building kernel and TWRP
    - Erick G for bringing new TWRP to G8 which supports F2FS
    - Jean Carlos Bencosme for adding / picking kernel features
    - Kirisakura for his great kernels
    - Sultanxda for his simple_lmk
    - LGE for the kernel open source
    - All other great kernel devs

    Contributors
    quantan

    Source Code: https://github.com/anht3889/LGE_G820_Kernel_Caf

    XDA:DevDB Information
    Dragonfly, Kernel for the LG G8

    Contributors
    quantan
    Kernel Special Features:

    Version Information
    Status: Stable

    Created 2020-09-16
    Last Updated 2020-11-14
    2
    Previous versions, e.g. v1.4, don't work with the new TWRP 3.4. Therefore, I use Anykernel from v1.5. I recommend you follow the steps below:
    1. Install magisk patched stock boot.img
    2. Install new TWRP 3.4 from Magisk Manager
    3. Reboot to TWRP
    4. Install Magisk and reboot to TWRP
    5. Install Disable Verity zip file and reboot to TWRP
    6. Install my kernel Dragonfly v1.5
    For newer version, i.e. v1.6, you don't need to repeat all steps above. You just want to flash thew newest Dragonfly.

    And good news to you guys, TWRP 3.4 supports F2FS so I decided to enable F2FS support in my kernel as well. To make F2FS, please follow these steps:
    1. Install my kernel v1.5
    2 .Reboot to TWRP 3.4
    3. Change file system of /data to F2FS
    4. Replace the attached modified fstab to support F2FS of /data
    5. Reboot
    Note: You will lose your data.

    In case you don't know:
    - TWRP-3.4.0.0-G820N.zip and fstab.alphaplus for G8 Korean
    - TWRP-3.4.0.0-G820UM.zip and fstab.alphalm for G8 US

    Give credits to Erick G and @SGCMarkus for bringing TWRP to our phones.
    1
    Changelog:
    v1.5:
    - Fix touch issues for TWRP
    - Add Kcal
    - Add KLapse v5.0
    - Update to 4.14.205
    - Update lze and add lzo-lre for Zram
    - Use Anykernel
    v1.4:
    - Import LGE v20r open source changes
    - Upstream to linux-stable v4.14.203
    - Upstream CAF LA.UM.8.1.r1-16200-sm8150.0
    - Fix audio and OK Google hot word issues
    - Improve schedutil
    - Power saving workingqueues enabled by default
    - Change various drivers ( MM, audio) to user power efficient workingqueues. Thanks to @Freak07 's commits
    - Update sdcardfs
    v1.3:
    - Merge tag 'LA.UM.8.11.r1-04300-NICOBAR.0'
    - Add ntfs and exfat support
    v1.1 - v1.2 - Intial kernel
    1
    Good work ...mostly. Huge showstopper is the missing support for exfat/ntfs with sdcard. With USB exfat is working. Only fat32 formatted sdcards are working. But this is a nogo with files > 4GB
    Thank your for pointing it out. I just add exfat and ntfs support to v1.3. Enjoy it :D
    1
    It can be used, but it can't double-click the wake-up screen, the display after the screen is not turned off, and the vibration intensity is not adjustable. I backup the g820 boot through twrp, which contains magisk. I hope you can use it
    https://drive.google.com/file/d/17I-m9QdmOzn7CXH3hOl-c04Jnvd7GC3P/view?usp=sharing
    wrote you a PM quantan, with my backup stuff in it likewise.

    cheers and best regards =)
    Could you guys test the kernel v1.5 with TWRP to make sure it work. Thank you.
    https://github.com/anht3889/LGE_G820_Kernel_Caf/releases/tag/v1.5-test