[LG LEON]FIX: MIC Bad Quality&Volume+Headset+Panorama+Multithread *ROOT REQUIRED*

Have these FIXes worked for you?


  • Total voters
    14

leandeganis

Senior Member
Feb 4, 2012
300
169
0
Buenos AIres
"AUDIOVIDEOFIX"

Why does our LG LEON has such an awful quality sound in Whatsapp, audio recordings, and stuff? This is a mix between: Low gain for main mic, terrible noise reduction, and (for some apps like Whatsapp voice messages) low bitrate and frequency for the acc encoder.

So, the "AUDIOVIDEOFIX" will: put more gain (dB) to the main mic - set the min bitrate and frequency for the acc encoder higher, so apps like Whatsapp are forced to record in better quality (REALLY BETTER QUALITY). Cameras has also slightly higher video bitrate, which means less compression noise, and audio quality, for both frontal and main camera. Set volume a little higher for headset and speaker. Also, we will enable panorama mode and HDR for the main camera app.

How to do it?
- You need to be rooted
- Download attached AUDIOVIDEOFIX.zip file and unzip it
- Use root explorer or another file explorer that supports root and setting permissions to files
- Go to /system/etc and backup the original files before replacing them. You can copy them to your sdcard.
- Now replace those original 3 .xml with these you have downloaded from this thread.
- SET PERMISSIONS of those files as rw-r--r-- (If you don't do this, the phone might not boot again! bootloop warning)
- re-check, and be sure that the permissions are correct, same as any other file in the same folder, and everything is correct
- reboot and done!

If you are a whatsapp voice messages guy like me, smash that microphone icon and send a voice note. You will instantly notice the difference!

Camera sound quality workaround: After applying this patch, camera app will record with more volume, bitrate and frequency. But noise reduction will still be active. To avoid that, after applying this fix, download Open Camera from PlayStore and select default audio source ( should be the 3rd option in the list) in audio source, inside video recording settings. Use that new app to record videos.

---------------------------
"MULTITHREADFIX"

The "MULTITHREADFIX" will prevent the system to be SO agressive with background processes. Again using whatsapp as an example, if you put it on background while hearing some voice note, and you open other app, the audio may stop because of the process being killed by the system. LG setted up a REALLY TOO MUCH aggressive method for OOM. Also, zRam is setted too high in this device (half of physical RAM). That's why I made (thanks to the help of @Filip98 here) a FIX on init.lge.zramswap.sh located on /system/etc

How to fix?
PART A:
- You need to be rooted
- Go to /system and backup the file "build.prop" just in case of failure
- Now edit the build.prop under /system with root explorer OR use build prop editor from Play Store
Find these lines:
ro.sys.fw.mOomMinFree1=73728
ro.sys.fw.mOomMinFree2=92160
ro.sys.fw.mOomMinFree3=122880
ro.sys.fw.mOomMinFree4=204800
ro.sys.fw.mOomMinFree5=266240
ro.sys.fw.mOomMinFree6=327680
- Change them to:
ro.sys.fw.mOomMinFree1=10240
ro.sys.fw.mOomMinFree2=20480
ro.sys.fw.mOomMinFree3=40960
ro.sys.fw.mOomMinFree4=81920
ro.sys.fw.mOomMinFree5=122880
ro.sys.fw.mOomMinFree6=163840
- Save the file build.prop
- check that permissions has not changed and that you didn't mess up any other line in build prop.
- reboot and done!

PART B:
Stock zRam is setted to around 450Mb, half of instaled memory. That's why I made the attached MULTITHREADFIX, which will set zram to A THIRD of available memory (that will be 300MB actually) instead of 450MB.
- You need to be rooted
- Download attached MULTITHREADFIX.zip file and unzip it
- Use root explorer or another file explorer that supports root and setting permissions to files
- Go to /system/etc and backup original file before replacing it. You can copy the original one to your sdcard.
- Now replace the original .sh script with the one you have downloaded from this thread.
- SET PERMISSIONS as rw-r--r-- (If you don't do this, the phone might not boot again! bootloop warning)
- re-check, and be sure that the permissions are correct, same as any other file in the same folder, and everything is correct
- reboot and done!


DISCLAIMER: I'm not responsible of what you do with these fixes. Be careful. If you feel you don't really understand what you're doing, read, read read, and read. Follow instructions carefully. Tested on Leon LTE H340AR running stock Lillipop 5.0.1. But should work for all LG Leon and maybe others like Spirit. If it did, tell me.
 

Attachments

Last edited by a moderator:

Filip98

Senior Member
Mar 21, 2012
499
56
0
Nis
thank you for your work, i believe the following lines in the build.prop should be responsible for that;
lge.fm_gain_control_headset=0.53
lge.fm_gain_control_speaker=0.63
persist.audio.fluence.voicecall=true
persist.audio.fluence.voicerec=false
persist.audio.fluence.speaker=true
other fluence lines

is it alright if i use your work in a tweaks compilation thread?

edit;
in system\etc there iz a file called init.lge.zramswap.sh

'# Evaluate the zram size for swap
# sz_zram=$((((memtotal_kb/4) / ${nr_zramdev}) * 1024))
sz_zram=$((((memtotal_kb/2) / ${nr_zramdev}) * 1024))'

i believe this is what you've been looking for also ;p i might want to leave it at a higher proportion tho, like memtotal_kb/3
 
Last edited:
  • Like
Reactions: leandeganis

leandeganis

Senior Member
Feb 4, 2012
300
169
0
Buenos AIres
thank you for your work, i believe the following lines in the build.prop should be responsible for that;
lge.fm_gain_control_headset=0.53
lge.fm_gain_control_speaker=0.63
persist.audio.fluence.voicecall=true
persist.audio.fluence.voicerec=false
persist.audio.fluence.speaker=true
other fluence lines

is it alright if i use your work in a tweaks compilation thread?

edit;
in system\etc there iz a file called init.lge.zramswap.sh

'# Evaluate the zram size for swap
# sz_zram=$((((memtotal_kb/4) / ${nr_zramdev}) * 1024))
sz_zram=$((((memtotal_kb/2) / ${nr_zramdev}) * 1024))'

i believe this is what you've been looking for also ;p i might want to leave it at a higher proportion tho, like memtotal_kb/3
Yeah,if you put the link to this original thread, there s no problem.
Great! I'll check that, respecting zram
 

Filip98

Senior Member
Mar 21, 2012
499
56
0
Nis
Thanks :D
I've taken a closer look at your media_profiles and found
Code:
<!ATTLIST ImageEncoding quality (90|80|70|60|50|40) #REQUIRED>
on line 45
and
Code:
        <ImageEncoding quality="99" />
        <ImageEncoding quality="90" />
        <ImageEncoding quality="89" />
        <ImageDecoding memCap="20000000" />
on 272-275
&
Code:
        <ImageEncoding quality="99" />
        <ImageEncoding quality="95" />
        <ImageEncoding quality="90" />
        <ImageDecoding memCap="20000000" />
on 402-405

I think thease need to be defined in line 45 and I don't understand why did you put different encoding qualities for the rear and front camera?

also I've found mismatching bitrate settings for timelapsed and non-timelapsed versions of videos? maybe to keep the size in check?
and last, i don't think a 720p profile for the front camera is going to work well, but if it does then great :p
 
  • Like
Reactions: leandeganis

Chakapack

Member
Jan 26, 2013
28
4
0
Viejo, que cambios has notado con respecto a lo de la multitarea? A mi no se me cierra el whatsapp como dices vos por lo de escuchar audios pero si siento que mantiene muy pocas aplicaciones en segundo plano antes de que las tengas que volver a abrir. Por ejemplo, estas en Chrome, y cambias a Snapchat y zas, se te reinicia el Chrome.

Esos ajustes ayudan un poco con es? Gracias!
 

leandeganis

Senior Member
Feb 4, 2012
300
169
0
Buenos AIres
Viejo, que cambios has notado con respecto a lo de la multitarea? A mi no se me cierra el whatsapp como dices vos por lo de escuchar audios pero si siento que mantiene muy pocas aplicaciones en segundo plano antes de que las tengas que volver a abrir. Por ejemplo, estas en Chrome, y cambias a Snapchat y zas, se te reinicia el Chrome.

Esos ajustes ayudan un poco con es? Gracias!
Si, la parte de multithread fix es la que tenes que seguir.
Follow the multithreadfix part to fix that. Please write spanish and english, forum rules.
 

Chakapack

Member
Jan 26, 2013
28
4
0
Nope. There's a problem with this (at least, for me). If you change the build prop there is a improved for multitasking like change between snapchat and instagram for example or Chrome-snapchat-instagram but the problem comes with the opening apps. The apps take more time to boot.

I checked this with a before-after and yes, there a plus for multitasking but a minus for starting apps

This happen to me. Dont know if anyone is with the same problem
 

leandeganis

Senior Member
Feb 4, 2012
300
169
0
Buenos AIres
Nope. There's a problem with this (at least, for me). If you change the build prop there is a improved for multitasking like change between snapchat and instagram for example or Chrome-snapchat-instagram but the problem comes with the opening apps. The apps take more time to boot.

I checked this with a before-after and yes, there a plus for multitasking but a minus for starting apps

This happen to me. Dont know if anyone is with the same problem
You should try the zram part but living original too-aggressive killers on the build.prop.
We can improve it together.
For me, it works just fine, but maybe your use is different.
 

Titocaramelito

New member
Feb 12, 2016
1
0
0
Hey, leandeganis, do you know if is there any custom rom for the lg leon h320, because the original rom takes like 4.5gb and it would be great to have that space allowed to be used.
 

mario0318

Senior Member
Apr 11, 2015
91
38
48
Orlando
You should try the zram part but living original too-aggressive killers on the build.prop.
We can improve it together.
For me, it works just fine, but maybe your use is different.
My original build.prop settings were different from yours. I wonder if maybe that has to do with why your settings differ from Chakapack.

These were my values:
ro.sys.fw.mOomMinFree1=73728
ro.sys.fw.mOomMinFree2=92160
ro.sys.fw.mOomMinFree3=110592
ro.sys.fw.mOomMinFree4=153600
ro.sys.fw.mOomMinFree5=199680
ro.sys.fw.mOomMinFree6=245760


I have only done the zram multithread fix at first and noticed some improvement in speed but the apps did seem to continue to have to "relaunch" even if multitasking in another app for a few seconds. I went ahead and modified these values on build.prop and will report if there is noticeable improvements in multitasking with no other issues.
 

LGV_123

New member
Dec 28, 2015
2
2
0
I just did the "multithread fix" (both build.prop and zram tweaks) and the difference is brutal. For example, "Relay for reddit" used to reload all the goddamned time (seriously, I couldn't even switch apps without the phone killing it) and now it works like a charm. Same thing with Chrome. I didn't notice any difference in apps startup loading times, as mentioned by Chakapack. My build.prop settings were just like OP's (my LG Leon model is H340AR), if that's of any use to anyone. Great job, OP!!
 
Last edited:
  • Like
Reactions: leandeganis

leandeganis

Senior Member
Feb 4, 2012
300
169
0
Buenos AIres
I just did the "multithread fix" (both build.prop and zram tweaks) and the difference is brutal. For example, "Relay for reddit" used to reload all the goddamned time (seriously, I couldn't even switch apps without the phone killing it) and now it works like a charm. Same thing with Chrome. I didn't notice any difference in apps startup loading times, as mentioned by Chakapack. My build.prop settings were just like OP's (my LG Leon model is H340AR), if that's of any use to anyone. Great job, OP!!
Great to reaed it worked well for you! Same for me.
 

mika0056

Member
Oct 13, 2014
14
5
0
Problem with Panorama

Unfortunately for me, the panorama mode doesn't work on my phone. When I try to take a panorama, the app crashes. I tried using 3rd party apps but none seem to have the panorama mode. Is there any way to make it work or what can I do:confused: other than that everything else is flawless:D :good:
 

mr0n3

New member
May 13, 2014
1
0
0
Buenas! Como va Lean? Curiosamente me llamo igual jajaj! Che boludo, me pasa q ahora q aumenté los dB del mic, me pasa q con snapchat grabo un vid y sale RE saturada la música x ej, y es un pijjjjazo eso. Después todo joya, multithread no lo probé todavía, ahora en un toquesito lo voy a mandar.

Hi! I'm actually using the AUDIOVIDEOFIX, but now that I changed the dB's of main mic, when I record something in snapchat the sound is horrible, it gets really satured.
 

androidssuck

New member
May 2, 2016
1
0
0
So I've tried to unzip the file and can't, also tried to download root explorer and again can't. I have an lg leon and this isn't working. Please help!