[MOD] Changing the brightness curve in stock JellyBean - RAZR i General

Ok, so with instructions from this thread - [MOD]Lower Auto-Brightness levels to save battery we can change the brightness curve without using 3rd party tools running on top.
Note: Seems like the output values need to be one more entry than the autoBrightnessLevels arrays.
And now the following lines contain the tweaked settings that make more sense for our cellphone. We need to extend the following arrays first.
Code:
<integer-array name="config_autoBrightnessLevels">
<item>5</item>
<item>20</item>
<item>50</item>
<item>100</item>
<item>400</item>
<item>800</item>
<item>1500</item>
<item>3000</item>
<item>6000</item>
<item>9000</item>
<item>15000</item>
</integer-array>
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>3</item>
<item>3</item>
<item>7</item>
<item>13</item>
<item>23</item>
<item>63</item>
<item>93</item>
<item>131</item>
<item>191</item>
<item>241</item>
<item>255</item>
<item>255</item>
</integer-array>
<integer-array name="config_autoBrightnessLcdBacklightValuesPowerSave">
<item>1</item>
<item>1</item>
<item>5</item>
<item>13</item>
<item>23</item>
<item>63</item>
<item>93</item>
<item>131</item>
<item>191</item>
<item>241</item>
<item>255</item>
<item>255</item>
</integer-array>
The following lines should be changed too to the following:
Code:
<integer-array name="config_displayTempThresholdValues">
<item>1000</item>
</integer-array>
<integer-array name="config_displayTempHysteresisValues">
<item>200</item>
</integer-array>
<integer-array name="config_displayProtectionCapValues">
<item>0</item>
</integer-array>
And to finish it seems like we need to drop down the minimum backlight brightness level too in order to make use of our new curve. This can be changed in 'res/values/integers.xml', the stock value is 20,
Code:
res/values/integers.xml: <integer name="config_screenBrightnessDim">20</integer>
I personally just use a value of four and a warmup of zero.
Code:
res/values/integers.xml: <integer name="config_screenBrightnessDim">2</integer>
res/values/integers.xml: <integer name="config_lightSensorWarmupTime">0</integer>
Note: Once done, sign with the old signature of the file and then zipalign or you will bootloop after every /data wipe procedure!

Omar-Avelar said:
So I can see that the device by itself can really output dimmer backlight levels on the device. I can control that at will by doing the following as root:
Code:
echo 2 > /sys/class/backlight/psb-bl/brightness
The backlight really gets DIMM, which is insanely good for using the phone at night.
Question: Does anyone know a way or has an idea to change the way android registers the minimum backlight setting and also change the brightness curve? This would be for the stock JB firmware.
Click to expand...
Click to collapse
I use velis auto brightness set as amoled bright and high sensitivity with the stock dim and auto brightness switched off

<Updated original post with the relevant information since this is not a question anymore>

Updated the last line in order to be able to get lower brightness values.

Hi
I tried the mod on the JB Retail.EU homemade fastboot version. And so far so good it seems to work great.
Will see on the long term if I can see the improvement on the backlight
Thanks

Le_Poilu said:
Hi
I tried the mod on the JB Retail.EU homemade fastboot version. And so far so good it seems to work great.
Will see on the long term if I can see the improvement on the backlight
Thanks
Click to expand...
Click to collapse
Did you try the Brasil mod on the EU rom, or did you modify your own framework file?

arman68 said:
Did you try the Brasil mod on the EU rom, or did you modify your own framework file?
Click to expand...
Click to collapse
I downloaded the mod here, the BR one, with no modification at all.

Code:
<integer-array name="config_displayTempThresholdValues">
<item>100</item>
</integer-array>
<integer-array name="config_displayTempHysteresisValues">
<item>2000</item>
</integer-array>
<integer-array name="config_displayProtectionCapValues">
<item>20</item>
</integer-array>
What do the above settings do, and why did you change them?

arman68 said:
Code:
<integer-array name="config_displayTempThresholdValues">
<item>100</item>
</integer-array>
<integer-array name="config_displayTempHysteresisValues">
<item>2000</item>
</integer-array>
<integer-array name="config_displayProtectionCapValues">
<item>20</item>
</integer-array>
What do the above settings do, and why did you change them?
Click to expand...
Click to collapse
The first one is which value to stop holding hysteresis for (if a 100 lux change is present or more), the second one is a timer/ticker on for how long to wait for the hysteresis curves before doing a fast change in the brightness levels.
I have no idea on the last one so I just played with it and haven't had much complains personally.

Bootloop
Hello,
I did the procedure and I am in booloop, can someone help me, please?

matheusgallo said:
Hello,
I did the procedure and I am in booloop, can someone help me, please?
Click to expand...
Click to collapse
I got a bootloop to. Downloaded the EU Version. Currently i have the Homemade Version 91.2.260001.XT890.Retail.en.EU Version installed.
Wipe-Cache does not help..

Solution for bootloop
Hello,
I did the downgrade to ICS and used the unbrick.
Now, my device is ON! =D

Better brightness curves
I don't quite understand why, but I have been experimenting with config_displayTempThresholdValues, config_displayTempHysteresisValues and config_displayProtectionCapValues, and your settings make it much smoothier and less jittery than the default ones; therefore I will use those.
However, I am not so sure about your brightness curve. I agree the default one is far too bright, but I find yours too dark and scaling up too slowly. I have been experimenting with multiple curves, and I think I have finally found one I am happy with:
Code:
<integer-array name="config_autoBrightnessLevels">
<item>3</item>
<item>20</item>
<item>50</item>
<item>100</item>
<item>200</item>
<item>350</item>
<item>600</item>
<item>1000</item>
<item>1600</item>
<item>2500</item>
<item>4000</item>
<item>6400</item>
<item>10000</item>
</integer-array>
Code:
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>4</item> <!-- 0 to 2 -->
<item>12</item> <!-- 3 to 19 -->
<item>23</item> <!-- 20 to 49 -->
<item>35</item> <!-- 50 to 99 -->
<item>48</item> <!-- 100 to 199 -->
<item>64</item> <!-- 200 to 349 -->
<item>81</item> <!-- 350 to 599 -->
<item>99</item> <!-- 600 to 999 -->
<item>119</item> <!-- 1000 to 1599 -->
<item>142</item> <!-- 1600 to 2499 -->
<item>166</item> <!-- 2500 to 3999 -->
<item>193</item> <!-- 4000 to 6399 -->
<item>223</item> <!-- 6400 to 9999 -->
<item>255</item> <!-- 10000 to 65535-->
</integer-array>
Code:
<integer-array name="config_autoBrightnessLcdBacklightValuesPowerSave">
<item>4</item> <!-- 0 to 2 -->
<item>10</item> <!-- 3 to 19 -->
<item>17</item> <!-- 20 to 49 -->
<item>25</item> <!-- 50 to 99 -->
<item>35</item> <!-- 100 to 199 -->
<item>47</item> <!-- 200 to 349 -->
<item>61</item> <!-- 350 to 599 -->
<item>78</item> <!-- 600 to 999 -->
<item>97</item> <!-- 1000 to 1599 -->
<item>119</item> <!-- 1600 to 2499 -->
<item>146</item> <!-- 2500 to 3999 -->
<item>177</item> <!-- 4000 to 6399 -->
<item>213</item> <!-- 6400 to 9999 -->
<item>255</item> <!-- 10000 to 65535-->
</integer-array>
I am not sure yet if we can go lower than 4 as a minimum value, and I am going to check it next.
Logarithmic curves to show low light behaviour:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Linear curves to show mid to bright light behaviour:

I have been doing some more testing, and I find a minimum brightness setting of 1 instead of 4 (default is 20) is even better.
I have adjusted the brightness curves to take this into account, with some wider difference between automatic and power saver, while trying to keep the power saver mode usable. I need to use the phone a bit longer, in different light conditions, including reading books in the dark, and when satisfied I will post my new settings.

arman68 said:
I have been doing some more testing, and I find a minimum brightness setting of 1 instead of 4 (default is 20) is even better.
I have adjusted the brightness curves to take this into account, with some wider difference between automatic and power saver, while trying to keep the power saver mode usable. I need to use the phone a bit longer, in different light conditions, including reading books in the dark, and when satisfied I will post my new settings.
Click to expand...
Click to collapse
Awesome! and yeah. I had to bump up the middle-low values the other day because it was not ramping up fast enough. It was a first approach -- but eventually we will get it good, I think 10-12 steps is pretty good too btw .
Oh, and for everyone I actually decided to take out the pre-modded framework files offline as depending on deodexed or odexed ROM's it was causing people to bootloop. I think it will be better to just include the curves on something more distributable!

Omar-Avelar said:
I had to bump up the middle-low values the other day because it was not ramping up fast enough.
Click to expand...
Click to collapse
Yes, my new curve is a bit too dark. I will have to do adjust the polynomial formula for faster ramping in the low-mid values as well, and do some more testing.

Could anyone provide the res.apk for a stock Rom (guess that would be odexed)?
Regards,
prometh

Omar-Avelar said:
Ok, so with instructions from this thread - [MOD]Lower Auto-Brightness levels to save battery we can change the brightness curve without using 3rd party tools running on top.
Note: Seems like the output values need to be one more entry than the autoBrightnessLevels arrays.
And now the following lines contain the tweaked settings that make more sense for our cellphone. We need to extend the following arrays first.
Code:
<integer-array name="config_autoBrightnessLevels">
<item>5</item>
<item>20</item>
<item>50</item>
<item>100</item>
<item>400</item>
<item>800</item>
<item>1500</item>
<item>3000</item>
<item>6000</item>
<item>9000</item>
<item>15000</item>
</integer-array>
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>7</item>
<item>13</item>
<item>20</item>
<item>29</item>
<item>39</item>
<item>54</item>
<item>79</item>
<item>107</item>
<item>161</item>
<item>199</item>
<item>241</item>
<item>255</item>
</integer-array>
<integer-array name="config_autoBrightnessLcdBacklightValuesPowerSave">
<item>5</item>
<item>10</item>
<item>17</item>
<item>25</item>
<item>35</item>
<item>47</item>
<item>71</item>
<item>97</item>
<item>137</item>
<item>186</item>
<item>221</item>
<item>255</item>
</integer-array>
The following lines should be changed too to the following:
Code:
<integer-array name="config_displayTempThresholdValues">
<item>40</item>
</integer-array>
<integer-array name="config_displayTempHysteresisValues">
<item>2000</item>
</integer-array>
<integer-array name="config_displayProtectionCapValues">
<item>40</item>
</integer-array>
And to finish it seems like we need to drop down the minimum backlight brightness level too in order to make use of our new curve. This can be changed in 'res/values/integers.xml', the stock value is 20,
Code:
res/values/integers.xml: <integer name="config_screenBrightnessDim">20</integer>
I personally just use a value of four.
Code:
res/values/integers.xml: <integer name="config_screenBrightnessDim">4</integer>
Note: Once done, sign with the old signature of the file and then zipalign or you will bootloop after every /data wipe procedure!
Click to expand...
Click to collapse
Thai omar,can put this in cmw zip to flash for us.Thk.

Le_Poilu said:
I downloaded the mod here, the BR one, with no modification at all.
Click to expand...
Click to collapse
Dear Le_Poilu, You mean u have framework done dime brightness for GB rom, can u post here for us.Thanks.

Daniel 9999 said:
Dear Le_Poilu, You mean u have framework done dime brightness for GB rom, can u post here for us.Thanks.
Click to expand...
Click to collapse
Sorry
I don't get what you're expecting from me...
Envoyé depuis mon Nexus 7 avec Tapatalk

Related

[HowTo]JMLPanex (example with new JMLLibrary and JMLToday)[for all JMLToday-Versions]

Hi 2 All,
here like promised the Example how to use JMLPanex for your Plugin - and at the same time an Explanation of some Titanium-Fuctions, you perhaps don't know - and a new JMLToday-Skin... and a new JMLLibrary from me later on.
So something which could also make JMLToday-Skinner gives the Infos to make powerful Skins... because I only explain the Basics... you will see, there's much more possibilities then (especially with JMLToday 5.4 together with JMLLibrary 0.3)
Everything I will explain - is based upon
JMLPanex 0.98...2.10 and above ( http://forum.xda-developers.com/showthread.php?t=552373 )
JMLToday: *klick here*
JMLLibrary: *klick here*
You can have each Titanium-Plugin with workable Buttons!!! And that's easy! Also as User - but easpecially the Plugin-Makers will recognize the use of this revolutionary Extension for our Titaniums!
The most of my Explanations will run already - for some things you must wait for the cab for JMLLibrary 0.3 (still testing it) und JMLToday 5.4 (beause of the notifications) - but it's good to have a future glimpse
The main reason is the integration of JMLPanex - which is important for all Plugins and JMLToday at the same time.
Will begin in Post #2 - here only some remarks - like FAQs to JMLs:
- The workable Buttons must be (0.98) inside the slider! Outside of it a tab wouldn't be recognized - indifferent if it's defined in .pnx or not
- It works with all Skins which uses TitaniumListView - it won't work with BronzeresListView!!! To know, if you have the correct format (TitaniumListView) and not the old one, which was originally made for Smartphones - ony look inside your .cpr - you will see it in the first 10 lines.
Or look on your Screen - if you have Space above your Top-Panel - it's TitaniumListView - if your Slider is not centered on all plugins - you have BronzeListView
- JMLPanex is Beta - and please report in JMLPanex-Thread any Bugs - not here!!! Also Integration in your ROM - it would be better in the JML-PanexThread than here - I could add some things later as HowTo. Here's the description and you can discuss about Styling Tipps / Skinning and so on
- It's written in C++ - and it doesn't need an additional process on your device! So no Battery Drainage or slowing down system like a running process! (and especially of course no 24/7-Mortscript which has side effects on your Titanium, and much more Battery Drainage and Performance-Loss than other processes)
So you can use JMLPanex in your ROM, too
Go on in Post #2
Micha
Let's start - and don't forget - i use JMLToday and JMLLibrary only as example - if you are making your own Plugin - it will work exact the same - and I would wish I would have each Plugin on my Handy with workable Buttons:
Let's have a look on our example - I made a new Skin for JMLToday:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
All quite the same you know?
No - everything on the Slider are Buttons!
With a tab on SMS you go into Messages, tap on phone to Phone History, tap on Wifi will toggle it on and off, tab#1 onBluetooth will switch it on, tap#2 will make it visible, tab#3 will switch it off again !
You can put EACH executeable File into JMLPanex and associate it with each Graphic- or Text-Item on your Slider! On each Plugin, you have installed
Let's have a look how it works - you know it from CHome-Editor - but we look direct in the Skin-File - it's in Titanium something with suffix ".plg" - mostlyb"default.plg" - in JMLToday it's <name of the skin>.plg
a little part of it:
Code:
<Layer ID="Page" Clip="False">
<!-- JMLToday : meteo Page1 -->
<Image ID="BGA" Left="64" Top="-170" Width="150" Height="150" ScaleStyle="Fit" Opacity="0.9"/>
<Image ID="HA" Left="64" Top="-170" Width="150" Height="150" ScaleStyle="Fit" Opacity="1.0"/>
<Image ID="MA" Left="64" Top="-170" Width="150" Height="150" ScaleStyle="Fit" Opacity="1.0"/>
<Image ID="BGAO" Left="274" Top="-170" Width="150" Height="150" ScaleStyle="Fit" Opacity="0.9"/>
<Image ID="HAO" Left="274" Top="-170" Width="150" Height="150" ScaleStyle="Fit" Opacity="1.0"/>
<Image ID="MAO" Left="274" Top="-170" Width="150" Height="150" ScaleStyle="Fit" Opacity="1.0"/>
<Image ID="CalPNG" Left="44" Top="-25" Width="390" Height="35" VerticalAlignment="Top" ScaleStyle="Stretch" Opacity="0.5" />
<Image ID="BattPNG" Left="10" Top="-185" Width="48" Height="52" ScaleStyle="Fit" />
<Image ID="[B]SmsPNG[/B]" Left="392" Top="30" Width="84" Height="72" ScaleStyle="Fit" Opacity="0.8" />
<Image ID="[B]TelPNG[/B]" Left="19" Top="24" Width="84" Height="72" ScaleStyle="Fit" Opacity="0.8" />
<Image ID="Icon" Left="152" Top="-70" Width="190" Height="190" ScaleStyle="Fit" />
<Image ID="AlarmPNG" Left="12" Top="112" Width="26" Height="26" Opacity="0.8"/>
<Image ID="AlarmPNG" Left="12" Top="112" Width="26" Height="26" Opacity="0.8"/>
<Text ID="Alarm" Left="42" Top="115" Width="340" Height="80" FontFamily="Tahoma" FontSize="6" FontStyle="Regular" Wrap="True" HorizontalAlignment="Left" VerticalAlignment="Top"/>
<Image ID="[B]WiFiPNG[/B]" Left="105" Top="45" Width="60" Height="60" Opacity="1.0"/>
<Image ID="[B]BlueToothPNG[/B]" Left="325" Top="45" Width="55" Height="55" Opacity="1.0"/>
<Image ID="EmailPNG" Left="212" Top="40" Width="80" Height="72" Opacity="1.0"/>
<Text ID="OperatorName" Left="152" Top="92" Width="120" Height="40" FontFamily="Tahoma" FontSize="7" FontStyle="Regular" Wrap="False" HorizontalAlignment="Right" VerticalAlignment="Middle">
<TextStage TextOffsetType="TextOffsetDropBottomRight" Color="#00000000" TextOffset="0" BlurFactor="0" Alpha="1.0"/>
<TextStage TextOffsetType="TextOffsetNone" Color="#FFFFFFFF"/>
</Text>
Some of them I marked bold. The .plg-File will be added to your .cpr-File of Titanium.
That's the Names of the Text or Graphic-Items - you can use. If you look into CHome-Editor on Page1 - you will find exactly this Names. With a path to the Graphic-File or a text entry.
And now - we look into the .pnx-File for JMLToday - so it's JMLToday.pnx and is to find in JMLPanex-Path:
Code:
[Page1]
default=%PROGRAMFILES%\JMLToday\JMLAction.exe
AlarmPNG=%WINDOWS%\ctlpnl.exe;cplmain.cpl,16,1
BG=%WINDOWS%\ctlpnl.exe;cplmain.cpl,16,0
BGA=%WINDOWS%\ctlpnl.exe;cplmain.cpl,16,0
EmailPNG=%WINDOWS%\tmail.exe;-service "ActiveSync"
SmsPNG=%WINDOWS%\tmail.exe;-service "SMS"
TelPNG=%PROGRAMFILES%\JMLToday\CallHistory.exe
BattPNG=%WINDOWS%\ctlpnl.exe;cplmain.cpl,3
WiFiPNG=%PROGRAMFILES%\JMLLibrary\JMLLib_toggleWIFI.mscr
BlueToothPNG=%PROGRAMFILES%\JMLLibrary\JMLLib_toggleBluetooth.mscr
Alarm=%PROGRAMFILES%\ageeye\G-Alarm\GAlarm.exe
OperatorName=%PROGRAMFILES%\JMLLibrary\JMLLib_restartRadio.mscr
You see all the Names - but linked with an application.
And that's all, what you have to do - look into your .cpr-File andyou know each Name of the Graphics - and your device will know this as Buttons - if ou actived JMLPanex.
The Activation is a simple Start of a Mortscript in JMLPanex-Installation-Path:
JMLPanexForPlugin.mscr
Start it - choose the Plugin, which you want - e.g. "FavoritePeople" - choose "All Pages" - and if you have made a FavoritePeople.pnx - then each Item will be associated with your personal wish, what you want to call!
Go on in #3
The way youcall, with or without Parameters - everything is already explained in JMLPanex-Thread:
It's explained in http://forum.xda-developers.com/showthread.php?t=552373 - Post #1 and #2 - so I mustn't repeat it.
I will only show you now some possibilities which you can do now - for this examples with JMLToday you will need the JMLLibrary 0.3 - because it's heavily expaned to use the Butons. In JMLToday the external calls to use from the Skinners are as Standard to make it easier in JMLLibrary.
Some of you will know the Weatherbackgroundchanger (http://forum.xda-developers.com/showthread.php?t=541434) from the Library, which changes your backgroundaccording to the current weather, or "isNight" which makes the Skinner easily able to make a day or night clock or so.
But in 0.3 there will be all to switch on Wifi,BT,GPRS,Phone-Toggle,... and also some more nice things.
It uses some free little apps - 2 credits I want to give at this place (in JMLLibrary-Download-Post for 0.3 then bigger ) :
- vj555 for VJVolublis and
- APBilbo for his little free standalone Tools from ThrottleLauncher
Thank you!
and of course some things are written mostly by me, JMHL or other members: *Wishlist for JMLToday/Library
Here's a possibility:
Hmm - you don't see something special?
The right picture shows the same PAge after pressing on one of the forecast-Icons - so you have easily a weather panel - which later on perhaps with the long version of weather - on one Page! Buttons make it possible
Only added some JMLLibrary-Functions in .pnx:
Code:
[Page2]
default=%PROGRAMFILES%\JMLToday\JMLMeteo.mscr
Icon1=%PROGRAMFILES%\JMLLibrary\JMLLib_forecastGlimpseDay1.mscr
Icon2=%PROGRAMFILES%\JMLLibrary\JMLLib_forecastGlimpseDay2.mscr
Icon3=%PROGRAMFILES%\JMLLibrary\JMLLib_forecastGlimpseDay3.mscr
Icon4=%PROGRAMFILES%\JMLLibrary\JMLLib_forecastGlimpseDay4.mscr
In 0.98 it's not ossible to all Mortscripts with Parameters - because Mortscript has a little strange way to be called - but we will see in next Verisons perhaps. But duplicating Mortscripts is the same as Parameters.
The Library only changes for 5 Seconds the Registry-Values of "IconA","TextA"... with "Icon1","Text1",...
Here's the main code for Switch for Day 2
Code:
# Made by MichelDiamond, 26.08.09
# Version 1.0
# Description:
# If you press a Forecast-Icon on Page2 - it will put the informations for 5 Seconds in the Main-Area - then switch it back
# Buttons must be correct linked with JMLPanex:
# following pathes are still the same - no need to change it if you make your own Library-Script - each script in /<Program-Path</JMLLibrary
LibraryPath = SystemPath( "ScriptPath" )
CommonGraphicPath = RegRead("HKLM", "Software\Microsoft\CHome\JMLToday","CommonGraphicPath")
EssentialGraphicPath = LibraryPath&"\Graphics\essential"
RegWriteDword("HKLM","Software\Microsoft\CHome\JMLToday","Updated","0")
glimpseday=2
# save entries for switching back
mainIconA=RegRead ("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","IconA")
mainTempA=RegRead ("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","TempA")
mainTextA=RegRead ("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","TextA")
mainDate2=RegRead ("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","Date2")
# and switch
rein=RegRead("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","Icon"&glimpseday)
RegWriteString("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","IconA", rein)
rein=RegRead("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","Temp"&glimpseday)
RegWriteString("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","TempA", rein)
rein=RegRead("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","Text"&glimpseday)
RegWriteString("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","TextA", rein)
rein=RegRead("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","Jour"&glimpseday)
RegWriteString("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","Date2", rein)
RegWriteDword("HKLM","Software\Microsoft\CHome\JMLToday","Updated","1")
Sleep(5000)
RegWriteDword("HKLM","Software\Microsoft\CHome\JMLToday","Updated","0")
# and back again
RegWriteString("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","IconA", mainIconA)
RegWriteString("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","TempA", mainTempA)
RegWriteString("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","TextA", mainTextA)
RegWriteString("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","Date2", mainDate2)
RegWriteDword("HKLM","Software\Microsoft\CHome\JMLToday","Updated","1")
exit
Simple, ey?
But let's go to #4
only one more example - very interesting also for the JMLToday-Users and Skinners.
Sorry I only had less time to make the new Library and the Example (busied with TitaniumRSS - had to break Beta-Finalisation for 3 days) and so I want to apologize for the Button-Graphics... 'm sure that some Skinners will make them much nicer than a developer
Here's a JMLLibrary 0.3-Function which wil add Page3 to JMLToday... SMS as Example :
If somebody knows, where the contact pictures are to find in device - please tell me - I don't had time to search.
And some nicer Buttons, too
You have counted?
Right!
That's more than 20 Images in this JMLToday-Skin - the Titanium-Limit.
(at this place at first thanks to
drkfngthdragnlrd and our conversation and his great findings.
In TitaniumRSS I will use some more great things... be surprised perhaps... but now - how to overcome this 20-ITem-Limit?
A .plg (Skin-File) has nothing which describes the Page- it's indifferent for it - the more top an item is listed, the more below it's in display level... but PAges? No. Now have a look into CHome-Editor:
Left you see the Value "tempA" of Page2 - on the Right the Value "tempA" of Page3
In .plg - they are both the same! Compare Screenshots from Page2 (Weather) with (SMS-)Page3 - do you see it?
Each Icons are on the same place - but they have completely different Values.
so only add to .pnx:
Code:
[Page3]
default=%PROGRAMFILES%\JMLLibrary\JMLLib_SMS_Exit.mscr
Icon1=%PROGRAMFILES%\JMLLibrary\JMLLib_SMS_Next_Page3.mscr
Icon2=%PROGRAMFILES%\JMLLibrary\JMLLib_SMS_Previous_Page3.mscr
Icon3=%PROGRAMFILES%\JMLLibrary\JMLLib_SMS_Reply.mscr
Icon4=%PROGRAMFILES%\JMLLibrary\JMLLib_SMS_Refresh_Page3.mscr
And The Titanium-Limit with 20 Text and 20 Image-Items is because of the .plg. But not in Page... In Page4 Email , in Page5 System-Info? No Problem - if you use the same Positions and the Icons of the plg (I could also use the items you have seen in Page1 and Page2 all together ) - so if you are creative (and Skinners are creative ) - you can make extraordinary Skins - and the Pages3,4,5,... are supplied by JMLLibrary-Functions, which you can choose - or make a new one and I will add it...
And then there's no need to change system-variables of Titanium, making crazy cab-Files.. and as Skinner - no need to know how Programs work - only call it
In JMLToday 5.4. each notification like SMS,Bluetooth, Phone, Wifi, Time,Weather, ... will have an interface to a Script, which a USer (or Skinner) can choose. Here - the JMLLIbr_SMS_Refresh.mscr in JMLLibrary wil be called from a new SMS-notifcation and will update automatically.
But in 5.3 you can already use it - but with manual refresh.
And back to JMLPanex - each Page can have it own Buttons... and this is Page3 - same Names, but different Page - and therefore JMLPanex is a real Killerapp! drkfngdrglrd and me had almost the same idea (*here*), but it's essential to be done - and JMHL made it in a very special and easy way - with no system performance loss or additional battery drain.
Thanx JMHL!!!
I hope some people find this HowTo helpful
Micha
ok-finished for the first time
OH - I've forgotten to say,that all from this example is uploaded in JMLLibrary - also with the sample .pnx and the JMLToday-Skin:
*click here*
And Thank you for saying Thank you for this HowTo and developing the Example
Micha
Thanks Micha! Just been a bit occupied and forgot to comment. This is a very useful guide, I am hoping to experiment more with the new functions when I get a chance, but thanks again, this is a big help to all developers/skinners.
You guys rock! Thanx I've got to see if I can get it working
10 mins later ...... it is awesome!
Looking good, will hopefully have time soon to update NeoTitanium & add JMLPanex & JMLToday includes some libraries. My question is though, it looks as though the button has to reside within the Focus Rectangle from what I understand for the ActionURL to be launched on tap. Am I correct with this? If so, maybe there's a way to add a OnAction to the <Layer ID="Page" tag of the expanded layout to "bind the whole layer to the Focus ActionURL. Since that is a value built it defined action, maybe we can bind it there. Then, we make the <Layer ID="Page" cover the entire Plugin if it falls outside the Focus.
Example (Based on my NeoTitanium);
Code:
<Layer ID="Page" [COLOR="Blue"]Left="45" Top="-114" Width="195" Height="268"[/COLOR] Clip="False" OnAction="[COLOR="Red"][B](Binding:HomeNav,FocusAction)?!?!?[/B][/COLOR]" >
In NeoTitanium the HavNav & Focus is only the left 45 pixels of the screen. My thought is something like this "might" give the rest of the screen the Focus action & therefore launching ActionURL outside of the Focus area. Will need to play with the OnAction Code to see if it will work & what is the correct code to use.
I hope you don't have overseen it: http://forum.xda-developers.com/showpost.php?p=4465671&postcount=47
@sleepyxda, jumba: Thank you
And what's good to know:You mustn't use Titanium_....cpr - - works with each other cpr, too. Tested it a little bit with Panex+Library
MichelDiamond said:
I hope you don't have overseen it: http://forum.xda-developers.com/showpost.php?p=4465671&postcount=47
@sleepyxda, jumba: Thank you
And what's good to know:You mustn't use Titanium_....cpr - - works with each other cpr, too. Tested it a little bit with Panex+Library
Click to expand...
Click to collapse
I saw, still trying, just a matter of figuring out what the process is called. It is a deffined action so should be possible.
Only remark for JMLToday V5.5. - it still works in the same way to skin Appointments and SMS (Post #4)
Cheers
Micha

[DISCUSSION] Autobrightness

It seems like this is a constant issue among most of us. Here are some workarounds and/or fixes. We could use this thread to discuss auto-brightness and whatnot:
Guhrasoh said:
If it isn't working edit /system/etc/hw_config.sh and change this line:
Code:
echo i2c > /sys/devices/platform/i2c-adapter/i2c-0/0-0036/mode # i2c, pwm, i2c_pwm, als, pwm_als, i2c_pwm_als, i2_als
into this:
Code:
echo i2c[B]_als[/B] > /sys/devices/platform/i2c-adapter/i2c-0/0-0036/mode # i2c, pwm, i2c_pwm, als, pwm_als, i2c_pwm_als, i2_als
It's working here, do you have the latest version of it?
Click to expand...
Click to collapse
porio said:
AFAIU, the brightness controlling chip or driver in our X8 has three modes. als, if enabled, reads the light sensor and sets the brightness according to it. In other words, is a hardware based auto brightness. i2c and pwm are the other two modes, for direct brightness control but I don't understand the difference between them. If two or three modes are enabled, the output (brightness) is a mixture of all.
So, if you set something like als_pwm or i2c_als or i2c_als_pwm, you will have auto-brightness even if you don't set it in your device; it will work like in a hardware layer (so to speak). The best setting for me is to enable i2c_als_pwm and set the brightness to something like 40 or 50%. For some reason it didn't work well in GDX 006 but in 007 is working OK. It also help if you set the line
Code:
echo 512 > /sys/devices... ...0036/als::avg-t # 32,....
The lower the value, more flicker you will have. 512 seems to be reasonable.
BTW I this I learned this here: http://www.national.com/pf/LM/LM3530.html#Overview
The pdf datasheet has lots of info.
Regards
Click to expand...
Click to collapse
Some useful settings if you don't want to edit the lines:
mr-tical said:
Code:
0 25
2000 35
4000 40
5500 50
7000 60
8500 70
10100 80
20100 90
30100 100
40100 120
50100 150
60100 180
70100 210
80100 240
90100 255
102000 255
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
With these levels i think display lighting and dimming is smoother, but i got one more guestion - how can i force to read faster the light value form sensor for guicker adjusting the display changing display levels, i mean, if he can do it faster?
Click to expand...
Click to collapse
Ok, so this is hw_config.sh sensor configuration for X8 (one of the most decent ones), I believe it was enhanced by the user alfasamsung.
Code:
# lm3530 LMU configuration
echo linear > /sys/devices/platform/i2c-adapter/i2c-0/0-0036/br::mapping # linear exp
echo 32768 > /sys/devices/platform/i2c-adapter/i2c-0/0-0036/br::rate::up # 8, 1024, 2048, 4096, 8192, 16384, 32768, 65538
echo 32768 > /sys/devices/platform/i2c-adapter/i2c-0/0-0036/br::rate::down # 8, 1024, 2048, 4096, 8192, 16384, 32768, 65538
echo 250 > /sys/devices/platform/i2c-adapter/i2c-0/0-0036/br::limit # 0 - 255
echo 12.0 > /sys/devices/platform/i2c-adapter/i2c-0/0-0036/br::fsc # 5.0, 8.5, 12.0, 15.5, 19.0, 22.5, 26.0, 29.5
echo 4,16,64,250 > /sys/devices/platform/i2c-adapter/i2c-0/0-0036/curve::borders
echo 47,75,114,164,226 > /sys/devices/platform/i2c-adapter/i2c-0/0-0036/curve::targets
echo high-z > /sys/devices/platform/i2c-adapter/i2c-0/0-0036/als::r1 # high-z, 9360, 5560 .. 677.6 (see chip mnual)
echo high-z > /sys/devices/platform/i2c-adapter/i2c-0/0-0036/als::r2 # high-z, 9360, 5560 .. 677.6 (see chip mnual)
echo [COLOR="Red"]1024[/COLOR] > /sys/devices/platform/i2c-adapter/i2c-0/0-0036/als::avg-t # 32, 63, 128, 256, 512, 1024, 2048, 4096
echo i2c_pwm > /sys/devices/platform/i2c-adapter/i2c-0/0-0036/mode # i2c, pwm, i2c_pwm, als, pwm_als, i2c_pwm_als, i2_als
what are the suggestions, besides changing the number in red to 512???
what if we try changing the last line to:
Code:
echo [B][COLOR="Green"]i2c_pwm_als[/COLOR][/B] > /sys/devices/platform/i2c-adapter/i2c-0/0-0036/mode # i2c, pwm, i2c_pwm, als, pwm_als, i2c_pwm_als, i2_als
When i used i2c_pwm_als my phone become unstable. Its hard to wake it up and causes reboot. I dont know with others.
What about CyanogenMOD settings ->Display - > Automatic Backlight?
There a lot settings to play with there..
Dare-Devil Inside said:
What about CyanogenMOD settings ->Display - > Automatic Backlight?
There a lot settings to play with there..
Click to expand...
Click to collapse
It will not work
Sent from X8 using XDA Premium app and running GingerDX
This is my understanding of the values and how it works.
We have two modes to choose from in hw_config.sh :/sys/devices/platform/i2c-adapter/i2c-0/0-0036/mode
i2c or i2c_als.i2c just enables the sensor and i2c_als means that the sensor controlls the brightness in automatic mode(hardware layer)
In cm roms I recomend using i2c mode and let the framework controll the brightness.Only problem here is that we have to set the values in the framework.The standard setting is not for the x8 sensor,they are way of.We need to go to cm setting>display>Aut. backlight>tick use custom and allow light decrease>edit levels and put in somethin like this(see pictures)
Back too the values in hw_config:
i2c mode:
-br::rate::up and down -how long it takes to change the light from one step to anoter.this is a value in ms.high value the light will change slow.low value it goes fast
- br::fsc -this is the max current the screen can use. higer value will give brighter screen at max value.
i2c_als mode:
-br::limit -this is max brightness
-curve::borders -these are the borders in your light curve
-curve::targets -targets for the light curve.Here you sett the lovest and higest brightness values (in a curve)
-als::avg-t -how often the sensor updates the screen in mseconds.It sets the screen to the average value in this time period.Has no inpact on i2c mode.
This is my current config:
Code:
echo linear > /sys/devices/platform/i2c-adapter/i2c-0/0-0036/br::mapping # linear exp
echo [B]8192[/B] > /sys/devices/platform/i2c-adapter/i2c-0/0-0036/br::rate::up # 8, 1024, 2048, 4096, 8192, 16384, 32768, 65538
echo [B]65538[/B] > /sys/devices/platform/i2c-adapter/i2c-0/0-0036/br::rate::down # 8, 1024, 2048, 4096, 8192, 16384, 32768, 65538
echo 250 > /sys/devices/platform/i2c-adapter/i2c-0/0-0036/br::limit # 0 - 255
echo [B]19.0[/B] > /sys/devices/platform/i2c-adapter/i2c-0/0-0036/br::fsc # 5.0, 8.5, 12.0, 15.5, 19.0, 22.5, 26.0, 29.5
echo 30,70,110,150 > /sys/devices/platform/i2c-adapter/i2c-0/0-0036/curve::borders
echo 10,75,120,164,254 > /sys/devices/platform/i2c-adapter/i2c-0/0-0036/curve::targets
echo high-z > /sys/devices/platform/i2c-adapter/i2c-0/0-0036/als::r1 # high-z, 9360, 5560 .. 677.6 (see chip mnual)
echo high-z > /sys/devices/platform/i2c-adapter/i2c-0/0-0036/als::r2 # high-z, 9360, 5560 .. 677.6 (see chip mnual)
echo 1024 > /sys/devices/platform/i2c-adapter/i2c-0/0-0036/als::avg-t # 32, 63, 128, 256, 512, 1024, 2048, 4096
echo [B]i2c[/B] > /sys/devices/platform/i2c-adapter/i2c-0/0-0036/mode # i2c, pwm, i2c_pwm, als, pwm_als, i2c_pwm_als, i2_als
with the correct settings in cm settings this works great.
You can check that your sensor works by going to cm settings.........edit other levels and there you see the value of the sensor in the top.
Puh this was a long post
Forgot the pwm mode:this is for external input.
Rom builders please change the array in the framework-res.> res\values\arrays.
Update: Added a very nice picture trying to explain borders and targets in i2c_als mode
@alfsamsung , i applied this change in attached hw_config.sh and replace it
i think it shold be true but again AutoBrightness works wrongly
please if you can take a look on it ,thanks
EDIT : guys u can use the attached hw_config.sh for GingerDX v007
alfsamsung confirmed it and it works well
EDIT 2 : here for GDX 007
X1111 said:
@alfsamsung , i applied this change in attached hw_config.sh and replace it
i think it shold be true but again AutoBrightness works wrongly
please if you can take a look on it ,thanks
Click to expand...
Click to collapse
The hw_config.sh looks good. Did you edit the settings in cmSettings>Automatic backlight? Do you see any values in the Edit other leves.. when you put the phone under some light?
alfsamsung said:
The hw_config.sh looks good. Did you edit the settings in cmSettings>Automatic backlight? Do you see any values in the Edit other leves.. when you put the phone under some light?
Click to expand...
Click to collapse
no ,do i this setting like this picture you mean ? or what setting must i change please ?
thanks for response
X1111 said:
no ,do i this setting like this picture you mean ?
thanks for response
Click to expand...
Click to collapse
Yes.Just change the values on the left side to something similiar with the picture.Play with the values to you get it to your liking.
alfsamsung said:
Yes.Just change the values on the left side to something similiar with the picture.Play with the values to you get it to your liking.
Click to expand...
Click to collapse
oh ,seems work ,thanks man
and how many levels need to have for best setting ?
EDIT : what amounts must be in screen column ? i cant change them similar to the picture
X1111 said:
oh ,seems work ,thanks man
and how many levels need to have for best setting ?
Click to expand...
Click to collapse
Don't know.Again you need to play with these settings and find what you like.I have 14.To many the backlight will change to often.There is a problem with the levels on the right side.You can't enter a value under 20.I had to rebuild the framework to get my settings.
@alfsamsung, how do you change the value of screen on CM automatic backlight settings ???
Ps: on that screen of configurations of custom levels, My screen on the top of page shows disabled.
biscoitu said:
@alfsamsung, how do you change the value of screen on CM automatic backlight settings ???
Ps: on that screen of configurations of custom levels, My screen on the top of page shows disabled.
Click to expand...
Click to collapse
for change the value of screen you must change from bottom
change the lowest to 255
X1111 said:
for change the value of screen you must change from bottom
change the lowest to 255
Click to expand...
Click to collapse
hmmm, I will try it , let´s have fun with this features
biscoitu said:
hmmm, I will try it , let´s have fun with this features
Click to expand...
Click to collapse
i adjust it according the pic and light sensor is working much better than befor
all thanks refers to alfsamsung
biscoitu said:
@alfsamsung, how do you change the value of screen on CM automatic backlight settings ???
Ps: on that screen of configurations of custom levels, My screen on the top of page shows disabled.
Click to expand...
Click to collapse
If the value is disabled you need to turn on automatic brightness in the android screen settings. Or if you are on i2c_als mode you need to change hw_config to i2c
I got it working, but I´m confused . It lights up when in light, but it doesn´t return to the original bright when I cover the sensor . There it shows that is filtering, but my screen stills brighter :/
Edit: I´m already enabled and trying set many values there. Only one information at the cm settings menu, what do you put on Reset Threshold, Window Lenght and Sample Interval??
biscoitu said:
I got it working, but I´m confuse . It lights up when in light, but it doesn´t return to the original bright when I cover the sensor . There it shows that is filtering, but my screen stills brighter :/
Click to expand...
Click to collapse
You need to enable allow light decrease.One screen back from the values
alfsamsung ,
i tested it at sunshine and brightness went into 255 ,and then at darkness it went into lowest value
but it seems increasing acts better than decreasing...

Fix low speaker/call volume and whatsapp delay in CM 12

Notable Issues and Fixes​1. Whatsapp notification delay : You might have noticed whatsapp notification doesn't show up that fast, the same might happen to other custom ROMs too.
Fix: Search and install "PNF Root" from google play store. It will ask for root accept it, then set these two parameters in settings as follows "Mobile heartbeat interval 6 minutes" "Wifi heartbeat interval 5 minutes". This will fix the delay issue with notification on whatsapp or maybe other applications too!
2. Low speaker/ earpiece volume: sound volume seems to be always low when it comes to cyanogen mod you can fix it without installing any kernels! Its simple and easy and will give you amazing sound output.
Fix: The fix is scattered in this thread but for others who might be having the same issue I will post it here with details.
Search and install "Ex File Explorer" from google play. Once you open it tap "menu" then navigate to "Root explorer" and turn it on" Then a new window will pop-up now tap on "Mount R/W". Then tap the radio button that says "RW" on path and system. We need to make it R/W to edit the sound file that will change the volume settings"
After doing that, navigate to the following location /device/etc/sound/t03g. Tap the file and open it as "text" now select "ES Note Editor" and locate the following lines in the text file.
we need to change two values. Scroll down a few times until you see this
</path>
<device name="speaker">
<path name="on">
There a few lines down you can see <ctl name="Speaker Volume" val="57"/>
Now just change the value to "63" so that the line will look like <ctl name="Speaker Volume" val="63"/> I found out that 63 is the maximum value. You could use 60 if that is way too louder for you.
Now we need to scroll down a little more down and locate this line <device name="earpiece"> now locate this line <ctl name="Output Volume" val= "62"/> edit the value to 62, if you have any lower value in there. I also changed <ctl name="AIF1 Boost Volume" val ="2"/> and <ctl name="AIF2 Boost Volume" val ="2"/>
After doing the above steps save the t03g file and go back to the es explorer/ root explorer settings and change back the values in Mount R/W to "RO" for both path and system.
Now tap okay and restart your phone. You will have amazing sound volume for speakers and call. Even better than Stock!!
Disclaimer : I am not responsible for any speaker malfunctioning that may cause if you follow the above step, I just stated what I found to be useful. Use these at your own risk..
Nice
encrypter87 said:
Notable Issues and Fixes​1. Whatsapp notification delay : You might have noticed whatsapp notification doesn't show up that fast, the same might happen to other custom ROMs too.
Fix: Search and install "PNF Root" from google play store. It will ask for root accept it, then set these two parameters in settings as follows "Mobile heartbeat interval 6 minutes" "Wifi heartbeat interval 5 minutes". This will fix the delay issue with notification on whatsapp or maybe other applications too!
2. Low speaker/ earpiece volume: sound volume seems to be always low when it comes to cyanogen mod you can fix it without installing any kernels! Its simple and easy and will give you amazing sound output.
Fix: The fix is scattered in this thread but for others who might be having the same issue I will post it here with details.
Search and install "Ex File Explorer" from google play. Once you open it tap "menu" then navigate to "Root explorer" and turn it on" Then a new window will pop-up now tap on "Mount R/W". Then tap the radio button that says "RW" on path and system. We need to make it R/W to edit the sound file that will change the volume settings"
After doing that, navigate to the following location /device/etc/sound/t03g. Tap the file and open it as "text" now select "ES Note Editor" and locate the following lines in the text file.
we need to change two values. Scroll down a few times until you see this
</path>
<device name="speaker">
<path name="on">
There a few lines down you can see <ctl name="Speaker Volume" val="57"/>
Now just change the value to "63" so that the line will look like <ctl name="Speaker Volume" val="63"/> I found out that 63 is the maximum value. You could use 60 if that is way too louder for you.
Now we need to scroll down a little more down and locate this line <device name="earpiece"> now locate this line <ctl name="Output Volume" val= "62"/> edit the value to 62, if you have any lower value in there. I also changed <ctl name="AIF1 Boost Volume" val ="2"/> and <ctl name="AIF2 Boost Volume" val ="2"/>
After doing the above steps save the t03g file and go back to the es explorer/ root explorer settings and change back the values in Mount R/W to "RO" for both path and system.
Now tap okay and restart your phone. You will have amazing sound volume for speakers and call. Even better than Stock!!
Disclaimer : I am not responsible for any speaker malfunctioning that may cause if you follow the above step, I just stated what I found to be useful. Use these at your own risk..
Click to expand...
Click to collapse
Hi there is no T03g file in the said path.... please guide
And what about low mic volume when recording a voice note? Do you know how to fix? Thanks
dragongreen said:
And what about low mic volume when recording a voice note? Do you know how to fix? Thanks
Click to expand...
Click to collapse
Did you solve this issue? I'm in the same situation. Help!
sebastiandg7 said:
Did you solve this issue? I'm in the same situation. Help!
Click to expand...
Click to collapse
Nop, I didn't solve this problem. This problem is in the source code (all cm). I am using an external app for recording
I can't find the "sound" folder inside "etc" -.- what can i do?
Can someone help me? how i can decrease mic gain? Mic gain is too much and i have to speak far from phone.
Thanks
Thanks for the excellent post & solutions. You seem to have mistyped the file locations which I've fixed in this post which is underlined in italics. Hope you can correct your original post making this one redundant. Thanks.
encrypter87 said:
Notable Issues and Fixes​1. Whatsapp notification delay : You might have noticed whatsapp notification doesn't show up that fast, the same might happen to other custom ROMs too.
Fix: Search and install "PNF Root" from google play store. It will ask for root accept it, then set these two parameters in settings as follows "Mobile heartbeat interval 6 minutes" "Wifi heartbeat interval 5 minutes". This will fix the delay issue with notification on whatsapp or maybe other applications too!
2. Low speaker/ earpiece volume: sound volume seems to be always low when it comes to cyanogen mod you can fix it without installing any kernels! Its simple and easy and will give you amazing sound output.
Fix: The fix is scattered in this thread but for others who might be having the same issue I will post it here with details.
Search and install "Ex File Explorer" from google play. Once you open it tap "menu" then navigate to "Root explorer" and turn it on" Then a new window will pop-up now tap on "Mount R/W". Then tap the radio button that says "RW" on path and system. We need to make it R/W to edit the sound file that will change the volume settings"
After doing that, navigate to the following location /system/etc/sound/t03g or /etc/sound/t03g. Tap the file and open it as "text" now select "ES Note Editor" and locate the following lines in the text file.
we need to change two values. Scroll down a few times until you see this
</path>
<device name="speaker">
<path name="on">
There a few lines down you can see <ctl name="Speaker Volume" val="57"/>
Now just change the value to "63" so that the line will look like <ctl name="Speaker Volume" val="63"/> I found out that 63 is the maximum value. You could use 60 if that is way too louder for you.
Now we need to scroll down a little more down and locate this line <device name="earpiece"> now locate this line <ctl name="Output Volume" val= "62"/> edit the value to 62, if you have any lower value in there. I also changed <ctl name="AIF1 Boost Volume" val ="2"/> and <ctl name="AIF2 Boost Volume" val ="2"/>
After doing the above steps save the t03g file and go back to the es explorer/ root explorer settings and change back the values in Mount R/W to "RO" for both path and system.
Now tap okay and restart your phone. You will have amazing sound volume for speakers and call. Even better than Stock!!
Disclaimer : I am not responsible for any speaker malfunctioning that may cause if you follow the above step, I just stated what I found to be useful. Use these at your own risk..
Click to expand...
Click to collapse

Possible Fix For Touchscreen Issues/Misses (Updated 08/29)

SEE UPDATE BELOW
After doing some more digging on surfaceflinger, atd, and their related libs, I found some interesting entries in a "strings" analysis of libinputflinger.so. Loads of stuff on touch calibration. I noticed some repeated strings that looked like they're assigned to different properties. You can see this clearly by entering:
Code:
strings /system/lib/libinputflinger.so | grep -iE '(^touch\.|[ ][ ]touch\.)'| sed -e 's/^[ \t]*//' | sort -n | uniq
The terminal returns
Code:
touch.coverage.calibration
touch.coverage.calibration: box
touch.coverage.calibration: none
touch.deviceType
touch.distance.calibration
touch.distance.calibration: none
touch.distance.calibration: scaled
touch.distance.scale
touch.distance.scale: %0.3f
touch.gestureMode
touch.orientation.calibration
touch.orientation.calibration: interpolated
touch.orientation.calibration: none
touch.orientation.calibration: vector
touch.orientationAware
touch.pressure.calibration
touch.pressure.calibration: amplitude
touch.pressure.calibration: none
touch.pressure.calibration: physical
touch.pressure.scale
touch.pressure.scale: %0.3f
touch.size.bias
touch.size.bias: %0.3f
touch.size.calibration
touch.size.calibration: area
touch.size.calibration: box
touch.size.calibration: diameter
touch.size.calibration: geometric
touch.size.calibration: none
touch.size.isSummed
touch.size.isSummed: %s
touch.size.scale
touch.size.scale: %0.3f
touch.wake
I looked up some of strings on the net, and lo and behold, they're build.prop entries! You can see the props above that have different strings to assign to them. The ones with a "%0.3f" refer to a number value, and the one with "%s" is a boolean 0/1.
I've only done a little testing, but I found a baseline of improvement values to make our touch screens more responsive. Some of the properties I couldn't find info on, so I'm testing some values like touch.distance.scale. I feel like I have definitely noticed improvements though. I'm no longer so pissed off using my phone, and the frequency of misses overall seems significantly lower. It's acceptable now. Here's what I'm using now at the end of my build.prop:
Code:
##### touch ######
touch.deviceType=touchScreen
# (geometric, diameter, box, area)
touch.size.calibration=geometric
touch.size.scale=100
# (amplitude, physical, none)
touch.pressure.calibration=amplitude
touch.pressure.scale=0.1
touch.gestureMode=pointer
# (interpolated, vector, none)
touch.orientation.calibration=interpolated
# (box, none)
touch.coverage.calibration=box
For detailed information on these touch properties, read here(search for the property you're interested in; the page is pretty long). Some are self-explanatory and others we'll just need to test more. Check them out and see if any calibration values make a significant change. Just copy the above code and paste to the bottom of /system/build.prop with a nice file manager like Solid Explorer. Warning: Adding these entries in the build.prop will change the default touch properties. You can always change them back to stock by removing or commenting the entries from build.prop. I assume most values are aafe, but I can't be sure.
Also worth noting. I found some additional build.prop values to make Android snappier. The fling/swipe velocity make a big difference. Not sure what the others correlate to.
Code:
##### touch related #####
view.touch_slop=2
view.scroll_friction=1.5
view.minimum_fling_velocity=25
ro.max.fling_velocity=12000
ro.min.fling_velocity=8000
ro.min_pointer_dur=8
windowsmgr.max_events_per_sec=200
EDIT: For detailed information on these touch properties, read here.
I'm gonna add some "profiles" of touch settings to use down here.
This one is for a Nexus 4 I believe. I'm trying it out now, and it seems pretty good. My goal is to emulate the touch experience I had with that phone.
Code:
##### touch ######
touch.deviceType=touchScreen
touch.orientationAware=1
# (geometric, diameter, box, area)
touch.size.calibration=diameter
touch.size.scale=10
touch.size.bias=0
touch.size.isSummed=0
# (amplitude, physical, none)
touch.pressure.calibration=amplitude
touch.pressure.scale=0.005
touch.gestureMode=pointer
# (interpolated, vector, none)
touch.orientation.calibration=none
UPDATE
Hey guys, so here's an update to what I've found out about the touch screen and its issues. I apologize for my low activity on xda. I've been real busy working on some linux projects.
First, in order for the touch.* settings to work, they need to be put in an .idc (input device configuration) file with the name of the device. For the G4, that is: /system/usr/idc/touch_dev.idc.
If you have another phone or want to check, you can get the name of your touch screen device with the terminal command:
Code:
for i in /dev/input/event*; do j="$(getevent -i $i | grep -i touch)"; j=${j#*name: }; [[ -z $j ]] || echo ${j//\"/}; done
Before you go try out the .idc file, I want to warn you that certain settings will disable the touch screen. If this happens, you'll need to use adb to delete or move /system/usr/idc/touch_dev.idc somewhere else so that it doesn't get loaded when the phone boots. These are some settings you must NOT change in the .idc file:
Code:
touch.deviceType = touchScreen
touch.coverage.calibration = box
These are the settings I'm currently using:
Code:
touch.deviceType = touchScreen
touch.orientationAware = 1
touch.size.calibration = diameter
touch.size.scale = 1
touch.size.bias = 0
touch.size.isSummed = 0
touch.pressure.calibration = physical
touch.pressure.scale = 0.001
touch.orientation.calibration = none
touch.distance.calibration = none
touch.distance.scale = 0
touch.coverage.calibration = box
touch.gestureMode = spots
MultitouchSettleInterval = 1ms
MultitouchMinDistance = 1px
TapInterval = 1ms
TapSlop = 1px
I'm not sure if the Multitouch* and Tap* settings work or if adding more values from libinputflinger will work. There's little documentation on using settings that don't begin with "touch." You might have to do some experimentation and try other entries in the "strings /system/lib/libinputflinger.so" readout. I would also try using the first settings I posted if these don't seem to help.
Another thing I found out is that this phone performs better with low entropy. You can monitor your current entropy level in the terminal:
Code:
watch "cat /proc/sys/kernel/random/entropy_avail"
It's usually around 2000+ and peaks at 4096 with high activity which is where I think lag comes in. I found that lowering it to under 1000 average cut out the lag spikes I was getting:
Code:
echo 16 > /proc/sys/kernel/random/read_wakeup_threshold
echo 16 > /proc/sys/kernel/random/write_wakeup_threshold
I went ahead and added that to an init.d script. This doesn't have any side effects I've noticed besides possible increased battery life, since the "hwrng" process that generates entropy has no work to do. In case you don't have init.d, make sure busybox is installed, run this command in the terminal, and you'll have init.d startup:
Code:
mount -o remount,rw /system; echo "sleep 300 && run-parts /system/etc/init.d" >> /system/etc/init.qcom.post_boot.sh; mount -o remount,ro /system
One last thing to mention. The touch device has a little section in sysfs under: /sys/devices/virtual/input/lge_touch. There's some interesting information you can find there, values you can change, and tests you can run. Any file with a name ending in "test" can be run by opening the file, yes sysfs files are weird like this. All tests pass for me except "abs_test":
Code:
cat /sys/devices/virtual/input/lge_touch/abs_test
> ========RESULT=======
> Absolute Sensing Short Test : RESULT: Fail
> Absolute Sensing Open Test : RESULT: Fail
I haven't seen other people with or without touch screen issues run this test, so it may or may not be an indicator that something's wrong with the touch screen or its kernel-side drivers. By the way, this doesn't require superuser. You can check this on any device and even use a good text editor like QuickEdit to open the file and generate test results.
At this point, I'm fairly content with the new improvements I've made, but my best bet on a complete fix would be upgraded touch drivers. The "Advanced In-Cell Touch" device this phone uses is pretty new. There's a good chance this technology has drivers that don't have all the bugs worked out. This is something we'll have to wait on. On the other hand, if LGE handed over a bootloader unlock method and some source files, I'd be just fine with that too.
What "issues" is this attempting to fix
kyle1867 said:
What "issues" is this attempting to fix
Click to expand...
Click to collapse
Probably the horrible touch response many users experience.
Is this something that we can copy and paste into the end of the build prop, or is it replacing stuff that is already there?
Sent from my LG-H811 using XDA Free mobile app
Wow nice job man.
Is it possible to address the swipe registering as taps through this or do you think this will also address it?
Harmtan2 said:
Is this something that we can copy and paste into the end of the build prop, or is it replacing stuff that is already there?
Sent from my LG-H811 using XDA Free mobile app
Click to expand...
Click to collapse
You'll have to add almost all of them.
Yes bro am too facing the touch problem in my intex aqua star power. The problem is when we keep the finger the screen shakes and also in 100% of my usage 20% touch mismatches . On first i irritated and now i habituated with this touch. [emoji28]
Sent from my Aqua Star Power using Tapatalk
The build.prop edits seem to be making the difference. ?
Sent From My LG G4
Rydah805 said:
The build.prop edits seem to be making the difference. ?
Sent From My LG G4
Click to expand...
Click to collapse
would you say that double tap to wake is improved as well?
esmenikmatixx said:
would you say that double tap to wake is improved as well?
Click to expand...
Click to collapse
Hmm, you know what, it is.
Sent From My LG G4
esmenikmatixx said:
would you say that double tap to wake is improved as well?
Click to expand...
Click to collapse
I would say so I have all these except the new ones he posted an an script from another post an I do see some improvements defiantly double tap to wake
GUGUITOMTG4 said:
You'll have to add almost all of them.
Click to expand...
Click to collapse
Soooo... can you run through this with me? I'm not a novice but I'm trying to figure out how to add them? I can't simply text edit the build.prop on my phone or pull/push from my computer?
This post is the reason why I'm glad we now have root.
Akomack said:
Soooo... can you run through this with me? I'm not a novice but I'm trying to figure out how to add them? I can't simply text edit the build.prop on my phone or pull/push from my computer?
Click to expand...
Click to collapse
Yes, you can manually edit it and or push pull it, but sometimes it causes bootloop when edited as a plain text. I would suggest using a build prop editor app from Play Store (I use Build Prop Editor by JRummy. It's Also built in in Rom Toolbox). You will have to copy-paste line by line. I'm gonna try those settings, but in my case, my screen sometimes misses when the phone gets hot. I attribute my touchscreen issues to the Lag LG injected on thermal files.
GUGUITOMTG4 said:
Yes, you can manually edit it and or push pull it, but sometimes it causes bootloop when edited as a plain text. I would suggest using a build prop editor app from Play Store (I use Build Prop Editor by JRummy. It's Also built in in Rom Toolbox). You will have to copy-paste line by line. I'm gonna try those settings, but in my case, my screen sometimes misses when the phone gets hot. I attribute my touchscreen issues to the Lag LG injected on thermal files.
Click to expand...
Click to collapse
Do you have to be rooted to do that?
Hendrycks said:
Do you have to be rooted to do that?
Click to expand...
Click to collapse
Yes you do
Sent from my LG-H811 using Tapatalk
Hi,
yesterday I bought a G4 H815.
I have the following problem: If my phone is on the bed next to me, or lying on a table, the touchscreen response is terrible. If I'm holding it in my hand, there's no problem. If it's charging and so lying on the bed, there's no problem either.
I took a few photos with my Optimus Black, since I could't take any screenshots of the issue:
this is with my phone lying on the bed:
and here holding it in my hands, producing no problems at all.
what is this? It's bloody annonying and totally unacceptable from a phone of this level, And yes... I would use it without holding it, just placing it on my bed next to me, but you can see how it is performing like so...
is my display faulty, or what?
Thanks man.
It's indeed more responsive. Especially double tap to wake is working good now.
*justintime* said:
Thanks man.
It's indeed more responsive. Especially double tap to wake is working good now.
Click to expand...
Click to collapse
I didnt feel a difference can you post a screenshot of your buildprop? Thanks in advance
Maybe im doing it wrong
Sent from my LG-H811 using Tapatalk
Just edit with es file Explorer.
And get the build.prop in the system folder. Not the other one.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

Fix autobrightness scaling issues

I notice on most LOS based ROMs, the autobrightness function does not scale very well with changes in light levels. I guess the table values are a default for multiple devices and not tailored for the Moto G.
Anyway, if you want to know how to fix it, here goes.....
This mod is applicable to all ROMs for our phone.
Decompile framework-res.apk using your favorite decompiler (mine is TickleMyAndroid)
Open D:\TickleMyAndroid\_WorkArea1\_working\framework-res.apk\res\values\arrays.xml
Edit the config_autoBrightnessLcdBacklightValues values as below (these are my edited values that get you much closer to ideal)
Code:
<integer-array name="config_autoBrightnessLevels">
<item>50</item>
<item>100</item>
<item>150</item>
<item>200</item>
<item>800</item>
<item>1300</item>
<item>2000</item>
<item>3000</item>
<item>4000</item>
<item>8000</item>
</integer-array>
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>22</item>
<item>32</item>
<item>44</item>
<item>56</item>
<item>68</item>
<item>98</item>
<item>120</item>
<item>148</item>
<item>180</item>
<item>216</item>
<item>255</item>
</integer-array>
While you are at it, might as well speed up response times a bit by editing integers.xml and changing this line from 8 secs to 4. There are other timings to mess with but defaults for the rest are pretty good.
Code:
<integer name="config_autoBrightnessDarkeningLightDebounce">4000</integer>
Recompile framework-res.apk without re-signing. (Never re-sign framework or system apks)
Copy the new framework-res.apk file over the original. The phone will probably immediately reboot - this always happens if a framework file changes size - don't panic.
If the phone does not reboot, force a reboot yourself.
If the LCD brightness does not follow ambient light levels to your satisfaction, you can monitor the LCD brightness here: /sys/class/leds/lcd-backlight/brightness and use an app such as Smart Tools-Pro to monitor Lux levels. This will give you an idea what value needs to be tweaked.
I won't post a modded framework-res.apk file as it will only be valid for exactly the ROM it came from and the fun of doing your own mod and maybe learning something will be lost

Categories

Resources