[LG G5 ROMs, Kernels, Recoveries, & Other Developme] warBeard_actual:
ORIGINAL THREAD HERE: https://xdaforums.com/axon-7/development/2-15-2017-axon-7-msm-8996-cpu-vm-ram-t3557392

This mod was originally created for the Axon 7, but due to several requests, I've modified a version for the G5, please see below, and post questions or comments in the original thread above. Please state you are a G5 user if you have feedback in that thread, to consolidate user feedback and speed up response time.

Custom tuning for a device is always a necessity. "Canned" settings will get you by, but they are certainly never optimized for a specific device. In fact, Linux typically takes a general approach to find harmonic balance in default settings that will, for the most part, work in an acceptable manner for just about any device. There are a lot of resources available on this device, so we should utilize it in a manner appropriate to squeeze out as much battery life and performance as possible without sacrificing much of those outputs, don't you think? This is going to fix that for you.

Here is what is required of you before you begin:

1. Must be rooted

2. Must have the G5 OR a device running the Snapdragon 820, as this modification is not so much device specific, but hardware specific. The important aspect being the snapdragon 820 and the RAM disk size.

3. Must have write protection disabled. If the G5 requires write protection to be disabled, see the code and instruction below:

Using adb shell:

adb reboot disemmcwp

Using Linux terminal (from your phone, for example):

reboot disemmcwp

Let's begin.

Getting right to it, here's what I've done:

- modified parameters of the interactive governor, and quite extensively at that (search some of my threads if you want a little bit of a breakdown of the general approach I take)

- reconfigured input_boost parameters

- reconfigured vm parameters (again, the device has a lot of RAM resource, this will utilize it and give you a far better user experience. Basically, I've adjusted dirty_ratio, dirty_background_ratio, swappiness, and other parameters of the virtual machine.)

- disabled zRAM for 6 GB variants (RAM compression, again, not needed on this device really, this mod will save you CPU cycles and power) this will not apply to G5 users, you will still have zRAM enabled.

- remapped minfree parameters for LMK (low memory killer) again only for 6 GB variants

- Tuned CFQ scheduler for flash storage devices

- Tuned "core_ctl" module (needs kernel support, I recommend freeza's latest version of BeastMode. For those wondering, yes, you can still use this mod with the stock kernel. It won't break anything.) again this will only apply to devices that support core_ctl at the kernel.

In a nutshell, that's what we're looking at here. I can guarantee you this will have a significantly positive impact on your device. Turbo time, homies.

How to install????

Easy. First, the file we are replacing is found in /system/etc... it is the "init.qcom.post_boot.sh" file - this file is basically shell scripts, which are applied at boot via this particular shell file.

All you have to do is download the file to your device, open up a file explorer (must have root capability), navigate to the /system/etc folder with said file explorer, mount your /system as RW (read write), delete your stock "init.qcom.post_boot.sh" file, and replace it with mine.

After you've successfully done this, change the new file's permissions to rw-r--r-- (0644), and then reboot!

Or, if you are brave, you can do it manually via a terminal app and get your fingers wet... if you choose to do that, see below:

Make sure the file is located on the root of your internal sdcard in /sdcard, open your terminal app (again, must have root) and type the following commands, hitting enter after each one (be careful to pay attention to the spacing).

su

cd /

mount -o remount,rw /system

cd /system/etc

rm init.qcom.post_boot.sh

cd /sdcard

mv init.qcom.post_boot.sh /system/etc

chmod 0644 /system/etc/init.qcom.post_boot.sh

I don't want credit, don't need you to give or offer donations, this is purely for the community in the spirit of Linux ideology. All I ask is for you to hit the thanks button :good:

That's pretty much it, guys. Enjoy!

DOWNLOAD: