[Miscellaneous Android Development] Filip98:
I've been working on some tweaks to make our Leon's work better :D

Please make a backup before modifying anything, i will provide the default files in the attachments

thease are all system tweaks, I don't think there is a need to talk about lowering brightness, disabling auto-sync, etc xD

i'll include the modified files as a whole, but I recommend editing thease files with notepad ++ or some other editor, be sure to set rw r r permissions:

Build.prop

ro.wifi.channels=13 (was 11) for 13 wifi channels, Europian standard, it seems to work

ro.lge.lcd_default_brightness=100 (was 171, reduces default brightness, better battery life by default)

dalvik.vm.heapstartsize=5m (was 8, should reduce ram usage)

dalvik.vm.heapgrowthlimit=90m (was 96, more free ram in compensation for eventual performance :P)

dalvik.vm.heapsize=180m (was 256, more free ram in compensation for eventual performance :P )

ro.sys.fw.mOomMinFree1=8192 (was 73728(really aggressive app killing), doesn't kill perceptible apps until they literally dry the device out of ram)

ro.sys.fw.mOomMinFree2=16384 (was 92160, really better multitasking e.g playing music while playing HD Games is possible)

ro.sys.fw.mOomMinFree3=184320 (was 122880, saves ram)

ro.sys.fw.mOomMinFree4=202752 (was 204800)

I've left the last 2 to be at stock values to keep more free ram

thease ones are to be added:

Disables data collection and logging, less cpu processing:

ro.config.nocheckin=1

profiler.force_disable_err_rpt=1

profiler.force_disable_ulog=1

logcat.live=disable

ro.kernel.android.checkjni=0

ro.kernel.checkjni=0

debugtool.anrhistory=0

profiler.debugmonitor=false

profiler.launch=false

profiler.hung.dumpdobugreport=false

rendering tweaks:

debug.fb.rgb565=1 (enables 16 bit)

debug.composition.type=gpu

persist.sys.ui.hw=1

force_hw_ui=true

debug.overlayui.enable=1

persist.sys.use_16bpp_alpha=1 (Smother scrolling)

persist.service.lgospd.enable=0

persist.service.pcsync.enable=0

everyone should know thease but why not:

persist.sys.purgeable_assets=1

wifi.supplicant_scan_interval=180

windowsmgr.max_events_per_sec=90

system/etc

thermal-engine-8916.conf

this is the file which controls how our device reacts to temperature, the default settings are somewhat unfair so this is what I did(rather cheap demonstration):

to

the default settings already begin to take action at 38 degrees cpu temperature, some people are fine with 50 degrees :rolleyes: I bumped it all up by 2 degrees

and delayed the gpu throttling so that games wouldn't lag, I also increased the LCD dimming value so that it makes sense, by default it was capped at 78% for maximum temperature reduction, I put it to 60

init.qcom.post_boot.sh

this is the file where a bunch of stuff is controlled, including the cpu frequency

LG put the minimum frequency at 800 MHZ for some reason and set it so that

the phone never goes into deep sleep.

head down to about line 459:

case "$target" in
"msm8916")

echo 533333 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq (I found 400000 to cause lag but that's a vaild option too)

echo "25000 1152000:50000"> /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay (this will allow the cpu frequency to jump higher faster in case there is a demand, useful for Games)

echo "70 800000:80 998400:90 1152000:95" > /sys/devices/system/cpu/cpufreq/interactive/target_loads (LG's settings just didn't make any sense to me but this should let the phone go into deep sleep and save battery while allowing it to draw out performance faster)

init.lge.zramswap.sh

Our device uses half of it's ram as ZRAM, this simulates having more ram by

compressing ram, this is a generally good thing but our devices use too much ram for this and the cpu has to constantly work to decompress it and compress it, losing resources and wasting the battery life, around line 31:

sz_zram=$((((memtotal_kb/3) / ${nr_zramdev}) * 1024)) , the changed part is memtotal_kb/3 where by default it is memtotal_kb/2. you may also use memtotal_kb/4, 4 uses around 220 mb for zram, and 3 310,

choose your pick, with the increase in zram amount there is a drop in battery life and cpu resourcefulness but more available ram and vice versa

in this file is also the value for swappiness, and it is set to 80, this means that the OS will aggressively swap ram when it's not yet needed... lower it to something like 50, 60.

line 61,

swappiness_new=60

camera_config.xml

this is really just a simple hack to enable panorama mode in the default camera app

around the first lines, change

<item name="mode_rear_supported">
mode_normal
</item>

to

<item name="mode_rear_supported">
mode_normal,
mode_panorama
</item>

com.lge.music

one more cheap demonstration but in a nutshell it will allow audio effects and better audio quality in the default music application

media_profiles.xml

to be honest I was lazy for this, but my pal over here:http://xdaforums.com/android/development/fix-low-mic-volume-bad-quality-headset-t3270558 covered it up and gave me permission for use :D

mixer_paths.xml

I was lazy for this too, see here:http://xdaforums.com/android/development/fix-low-mic-volume-bad-quality-headset-t3270558, the file from tweaks.zip is his modification

anyone is free to correct me if i'm wrong :P

To-Do:

-LCD Density tweak

-ADJ Entries

-gps

-Explain Odexing