[Q] how to change android refreshrate - Android Q&A, Help & Troubleshooting

Hi,
i'd like to tinker with a custom rom for my device (YuanDao N101 tablet), more precisely I would like to change the default screen refresh rate of Jelly Bean. I've been searching these forums and came across this thread, where at some point they mention this:
changelog 18.06.2012:
and also have changend default screen refreshrate from 60 to 56, with the possibility to change it:
echo 1 > /sys/kernel/refreshrate/enable (60 hz)
echo 0 > /sys/kernel/refreshrate/enable (56 hz)
################################################## ####
Click to expand...
Click to collapse
So apparently it is possible to change the JellyBean refreshrate at some level.
What I cannot find on these forums or elsewhere is information about how to go about doing that. Can anybody please give information on this subject?
- can this be done simply by entering a console command in stock android?
- or do you need to change a variable in some system file?
- or do you need to make changes to the kernel and if so, where?
thanks

And where change it ?

Thanx

Related

Collection of Tweaks | 11/08/11

Tripnraver and Fanboys that wants to start trouble follow this Link! If you want to clear up the Discussion and stop fighting write me a PM and if not stay at Modaco, i even post the link for you all
Open TripNHome
XDA Users stay here and help collecting some nice X10 Tweaks to help the whole Community, every Dev/Cooker knows other Tweaks so i would like to invite all to share there best Tweaks here. Above i post some basic Tweaks and a example File how it looks like.
build.prop Tweaks
# Network
HTML:
ro.ril.hep=1
ro.ril.hsxpa=2
ro.ril.gprsclass=10
ro.ril.hsdpa.category=8
ro.ril.hsupa.category=5
ro.telephony.call_ring.delay=1000
# Product
HTML:
ro.product.multi_touch_enabled=true
ro.product.max_num_touch=2
mot.proximity.delay=100
# Performance
HTML:
dalvik.vm.startheapsize=48m
dalvik.vm.heapsize=48m
dalvik.vm.execution-mode=int:jit
dalvik.vm.dexopt-flags=m=y
dalvik.vm.dexopt-data-only=1
dalvik.vm.lockprof.threshold=200
windowsmgr.max_events_per_sec=300
VM Tweaks
HTML:
echo 95 > /proc/sys/vm/dirty_ratio
echo 20 > /proc/sys/vm/vfs_cache_pressure
echo 4096 > /proc/sys/vm/min_free_kbytes
echo 1 > /proc/sys/vm/oom_kill_allocating_task
echo 60 > /proc/sys/vm/dirty_background_ratio
echo 1000 > /proc/sys/vm/dirty_expire_centisecs
echo 2000 > /proc/sys/vm/dirty_writeback_centisecs
Minfree Tweak
HTML:
echo 1536,3072,4096,15360,17920,20480 > /sys/module/lowmemorykiller/parameters/minfree
SD Card Tweak
HTML:
echo 2048 > /sys/devices/virtual/bdi/179:0/read_ahead_kb
echo 2048 > /sys/devices/virtual/bdi/default/read_ahead_kb
build.prop Tweaks go to system/build.prop
other Tweaks go to system/etc/install-recovery.sh
I attached 2 sample files with these Tweaks included.​
shall we edit these even if running 3.6?
bodomfan said:
shall we edit these even if running 3.6?
Click to expand...
Click to collapse
No
10 Characters
Wolfbreak said:
No
10 Characters
Click to expand...
Click to collapse
Lol ok,dumb question really.its probably all included ,iv posted a request in the rom thread
im liking v3.6 atm similar to 3.5,you got any new plan sfor releases,it would be kwl if you could get achotjans green signal bar in there as he said you have his permission and also the samsung galaxy s type gingerbread battery icon,would look sexy and very gb
You can flash the Addon yourself if you like it i dont need to include it. The ROM Style will stay same, all Theme modifications the Users can flash themself like they want it becouse everyone likes different i wont touch the Theme, everyone can flash what they want becouse i cant make a Theme everyone will like becouse thats just not possible, some like Blue, some like Carbon.....
BTW this doesnt has something to do with this Thread so please keep it clean
Wolfbreak said:
You can flash the Addon yourself if you like it i dont need to include it. The ROM Style will stay same, all Theme modifications the Users can flash themself like they want it becouse everyone likes different i wont touch the Theme, everyone can flash what they want becouse i cant make a Theme everyone will like becouse thats just not possible, some like Blue, some like Carbon.....
BTW this doesnt has something to do with this Thread so please keep it clean
Click to expand...
Click to collapse
ok thanks
10 characters
Hopefully you can create flashable zip for us.
Thanks Wolfbreak!!
You can edit buildprop w the flashtool or w rootexplorer, depending on which rom you are running, some of these tweaks may already be implimented!!
Zip file is too easy!! Explore research have fun.... just make a back up first....
Best regards,
Chris
Sent from my X10 TripNMiUI-Iris using XDA App
Already did it manually using Flashtool and Root Explorer.
But for others who need quick progress, WB should create flashable zip for them.
AND
If can, maybe WB should consolidate addon such as Bravia Engine, FPS uncap, xLoud, Audio Fix, in one flashable zip.
Hi wolfbreak
I was changing the tweaks u had given
I was changing the below tweak
ro.product.multi_touch_enabled=true
ro.product.max_num_touch=2
mot.proximity.delay=100
and i found that max num of touch was 4 instead of 2 by default.... does this mean anything?
2Wolfbreak : according to this http://www.linuxinsight.com/proc_sys_vm_oom_kill_allocating_task.html I wouldn't do this "echo 1 > /proc/sys/vm/oom_kill_allocating_task". Placing 0 performs better, and prevents some unexpected FCs.
awesome man.>!!!
Thats a good initiative I was thinking of starting something like this for past two day but was wait that some actual dev to start it and i will contribute more.
ohk so here are one or two simple tricks from my side.
those who don't want to mess with install-recover.sh and prefer keeping the init.d style work
here is how you can enable init.d support.
add one line at end of your install-recovery.sh
Code:
# trying run-parted
/system/xbin/busybox run-parts /system/etc/init.d
some more tweaks which might overlap with the existing tweaks posted here...
http://forum.xda-developers.com/showthread.php?p=16441133#post16441133
Note : as usual non of the credit to me all credit to Dev's.
Request
Can someone point all guides of framework customization and howtos related to that at one place.
stuff like replacing the background image to adding a reboot option and simmilar stuff.
all links at one place would be just fine for new dev's (don't get angry if its already there and i missed it, coz there are chances of it too...)
So what do these tweaks actually do?
*improve* your phone will be the sarcastic answer, but forgive me if I won't blindly apply tweaks without having at least some idea as to what they are doing?
anantshri said:
Can someone point all guides of framework customization and howtos related to that at one place.
stuff like replacing the background image to adding a reboot option and simmilar stuff.
all links at one place would be just fine for new dev's (don't get angry if its already there and i missed it, coz there are chances of it too...)
Click to expand...
Click to collapse
If u need help PM me.
blueowl0708 said:
So what do these tweaks actually do?
*improve* your phone will be the sarcastic answer, but forgive me if I won't blindly apply tweaks without having at least some idea as to what they are doing?
Click to expand...
Click to collapse
That's actually a good question i will see what i can help you with then later on other remaining could be answered by otheres.
# Product
HTML:
ro.product.multi_touch_enabled=true
ro.product.max_num_touch=2
mot.proximity.delay=100
This tweak is basically a build.prop tweak which is making system aware of a dual touch capable system.
# Performance
HTML:
dalvik.vm.startheapsize=64m
dalvik.vm.heapsize=64m
dalvik.vm.execution-mode=int:jit
dalvik.vm.dexopt-flags=m=y
dalvik.vm.dexopt-data-only=1
dalvik.vm.lockprof.threshold=150
windowsmgr.max_events_per_sec=80
These are basically VM related tweaks first making heapsize 64M i.e. larger default is smaller. also this last line makes your system more responsive i keep something higher then 250 in place of 80.
VM Tweaks
HTML:
echo 95 > /proc/sys/vm/dirty_ratio
echo 20 > /proc/sys/vm/vfs_cache_pressure
echo 4096 > /proc/sys/vm/min_free_kbytes
echo 1 > /proc/sys/vm/oom_kill_allocating_task
echo 60 > /proc/sys/vm/dirty_background_ratio
echo 1000 > /proc/sys/vm/dirty_expire_centisecs
echo 2000 > /proc/sys/vm/dirty_writeback_centisecs
VM Tweaks basically change min free bytes and kill level's of application used internally by android for memory management.SD Card Tweak
HTML:
echo 2048 > /sys/devices/virtual/bdi/179:0/read_ahead_kb
echo 2048 > /sys/devices/virtual/bdi/default/read_ahead_kb
This is a simple tweak which specifies the read ahead buffer which is by default 128Kb effectively making your SDCard i/o faster.
Hope these could clarify your doubts remaining ones wolf or others might give a try to explain.
a flashable zip file would be nice
ive been trying to place my own tweaks within the install-recovery.sh file however when i flash zip the file seems to have changed however nothing actually takes effect. new to this side of things so could just be a schoolboy error lol. can say if i use the simple install-recovery.sh file from Z's uncap fps or even yours from your rom and flash it.. it all works well! if i try to edit any of yours and flash again.. nothing happens! wat am i missing?

[Q] [NOOB] Silly Question About Tweaks!

hi my guys
i've a silly question! coz im a Noob
lemme explain what is my mean:
custom kernels supports init.d and we can create own tweaks and save these files into init.d directory,
for example this one :
vm.dirty_ratio=20;
i found dirty_ratio in /proc/sys/vm/dirty_ratio.
but when i open this file with text viewer , i see another value for this parameter!
like this : 35
and other parameters that we can write in initd tweak files!
every time i change values , when i open original file in /proc/sys/vm/ i see constant values! ( for example 35 for dirty_ratio )
i think ROM or some apps control this parameter!
it means if we change this parameters for customization , we cant see any changes!
emmm , jelly sandwich - maxio made - custom rom control this parameters??????
or you have same problems with all ROMS???????
or this is a common situation??????
sorry for poor english!
My Device : Xperia Ray
ROM : Jelly Sandwich 8.5
Kernel : Advanced Stock.587
Unlocked , Rooted!
Maybe the init.d script not properly created..init.d script must have execution lines in the script and # symbol.
Sent from my gorgeous ST18i
yamin8000 said:
hi my guys
i've a silly question! coz im a Noob
lemme explain what is my mean:
custom kernels supports init.d and we can create own tweaks and save these files into init.d directory,
for example this one :
vm.dirty_ratio=20;
i found dirty_ratio in /proc/sys/vm/dirty_ratio.
but when i open this file with text viewer , i see another value for this parameter!
like this : 35
and other parameters that we can write in initd tweak files!
every time i change values , when i open original file in /proc/sys/vm/ i see constant values! ( for example 35 for dirty_ratio )
i think ROM or some apps control this parameter!
it means if we change this parameters for customization , we cant see any changes!
emmm , jelly sandwich - maxio made - custom rom control this parameters??????
or you have same problems with all ROMS???????
or this is a common situation??????
sorry for poor english!
My Device : Xperia Ray
ROM : Jelly Sandwich 8.5
Kernel : Advanced Stock.587
Unlocked , Rooted!
Click to expand...
Click to collapse
You can check your init.d scripts with script manager (or something similar) before you jam them into the init.d folder. This way you can test them with out having to reboot your device. There is a pretty good tut for init.d from irridaki here: http://forum.xda-developers.com/showthread.php?t=1422061 It is mostly for getting init.d to work on stock roms...but it should work on custom roms as long as there is init.d support....
to change a value in /proc you have to use:
Code:
echo [I]value[/I] > /proc/[I]path/to/file[/I]
so in your case it's
Code:
echo 20 > /proc/sys/vm/dirty_ratio
Haaop said:
to change a value in /proc you have to use:
Code:
echo [I]value[/I] > /proc/[I]path/to/file[/I]
so in your case it's
Code:
echo 20 > /proc/sys/vm/dirty_ratio
Click to expand...
Click to collapse
thnx man
yes, i saw this pattern for setting values to parameters
ill check it plus will tell u the feedback

[Q] Proximity sensor sensitivity

As i keep ending calls unwillingly:
Is there a way to change the sensitivity for the proximity sensor?
Anybody have the same problem?
Using the test in "Xperia Diagnostics" the proximity sensor on my Xperia U on latest FXP is turning on/off at about 15mm, which is a bit too little. When i do the test holding the phone to my ear, there is no constant vibration but turning on and off, which happens during calls too, i guess...
Thanks for any input..
PS:
my ears are quite normal, if some are wondering
raha16 said:
As i keep ending calls unwillingly:
Is there a way to change the sensitivity for the proximity sensor?
Anybody have the same problem?
Using the test in "Xperia Diagnostics" the proximity sensor on my Xperia U on latest FXP is turning on/off at about 15mm, which is a bit too little. When i do the test holding the phone to my ear, there is no constant vibration but turning on and off, which happens during calls too, i guess...
Thanks for any input..
PS:
my ears are quite normal, if some are wondering
Click to expand...
Click to collapse
What build? Cause i got this with FXP 209, and not on any other build...
mirost1 said:
What build? Cause i got this with FXP 209, and not on any other build...
Click to expand...
Click to collapse
i had this problem with 209 and have it in 211 also...
raha16 said:
i had this problem with 209 and have it in 211 also...
Click to expand...
Click to collapse
May be its a common problem for new builds, cause now i am using 206a and have no probs with that.
mirost1 said:
May be its a common problem for new builds, cause now i am using 206a and have no probs with that.
Click to expand...
Click to collapse
I'm running 206a now too, but it is the same at least in "Xperia Diagnostics"... I will try real world usage tomorrow...
Anybody knows, where the settings for the sensor are stored? in the Phone-Application, in the Rom, in the Kernel, .... ?
Is there an app that lets you set the distance for the sensor for our device?
raha16 said:
I'm running 206a now too, but it is the same at least in "Xperia Diagnostics"... I will try real world usage tomorrow...
Anybody knows, where the settings for the sensor are stored? in the Phone-Application, in the Rom, in the Kernel, .... ?
Is there an app that lets you set the distance for the sensor for our device?
Click to expand...
Click to collapse
interesting question, did some googling and found this
http://stackoverflow.com/questions/9403351/how-to-change-android-proximity-sensor-sensitivity
This would solve it - but it's for the Desire:
http://forum.xda-developers.com/showthread.php?t=951858
Can somebody port this to our device?
No change in 206 btw...
Just for info, if someone s having the same issues:
I'm using eXperiance V2 - Rom on munjeni-Kernel now, but the problem remains.
i tried this, but no change:
http://forum.xda-developers.com/showpost.php?p=8888081&postcount=914
AndroSensor-App keeps showing 1cm as distance - can somebody verify this value on other kernels or other Roms?
1cm seems too little distance for my ear...
i get the feeling, i'm the only one, having this problem...?
:crying:
Found this:
https://github.com/rachit-rc96/Vengeance-Kernel-U8500/blob/master/drivers/input/misc/apds9702.c
According to my amateur-interpretion of this link, the settings for the sensor are stored in the kernel?
Can somebody confirm this?
Hello guys in my attemp to fix this really annoying bug (all the time calls were hanging or buttons were pressed) i decided to get my hands dirty and take a look!
So the calibration for the proximity sensor is done in the /system/etc/hw_config.sh
Requirements
ROOT
Root Explorer (or a filemanager of your choice with enables acces to system and edit files as text)
So changed the following lines of the originial hw_config.sh of firmware 6.1.1.B.0.54 ( i think that at every fw is the same configuration please provide feedback)
Code:
# Proximity sensor configuration
dev=/sys/bus/i2c/devices/2-0054/
val_cycle=2
val_nburst=0
val_freq=2
val_threshold=5
val_filter=0
echo $val_cycle > $dev/cycle # Duration Cycle. Valid range is 0 - 3.
echo $val_nburst > $dev/nburst # Numb er of pulses in burst. Valid range is 0 - 15.
echo $val_freq > $dev/freq # Burst frequency. Valid range is 0 - 3.
if `ls /data/etc/threshold > /dev/null`; then
cat /data/etc/threshold > $dev/threshold # Use value from calibration
rm /data/etc/threshold # Remove temp file
else # No value from calibration, use default value
echo $val_threshold > $dev/threshold # sensor threshold. Valid range is 0 - 15 (0.12V - 0.87V)
fi
if `ls /data/etc/filter > /dev/null`; then
cat /data/etc/filter > $dev/filter # Use value from calibration
rm /data/etc/filter # Remove temp file
else # No value from calibration, use default value
echo $val_filter > $dev/filter # RFilter. Valid range is 0 - 3.
fi
to :
Code:
# Proximity sensor configuration
dev=/sys/bus/i2c/devices/2-0054/
val_cycle=3
val_nburst=0
val_freq=2
val_threshold=2
val_filter=0
echo $val_cycle > $dev/cycle # Duration Cycle. Valid range is 0 - 3.
echo $val_nburst > $dev/nburst # Numb er of pulses in burst. Valid range is 0 - 15.
echo $val_freq > $dev/freq # Burst frequency. Valid range is 0 - 3.
echo $val_threshold > $dev/threshold # sensor threshold. Valid range is 0 - 15 (0.12V - 0.87V)
echo $val_filter > $dev/filter # RFilter. Valid range is 0 - 3.
As for now i think the overall experience of calling is definately better and no random hang up or button pressed so far... Please provide feedback!!!
Thank you for this useful information. I have a Sony Xperia V lt25i.
After display exchange, the proximity sensor always indicated "near" which resulted in black screen when using the telephone.
Anyhow here is what I did to resolve it:
- backup pics
- root phone using towelroot.apk
- install supersu
- install fx explorer
- install fx explorer root addon
THEN:
use fx explorer
... filesystems --> /system / --> root tools -> mount read-write
then go the file
/system/etc/hw_config.sh
and edit textfile
I changed the threshold from 5 to 9
val_threshold=5
then save file
... filesystems --> /system / --> root tools -> mount read-only
restart phone
try or use the app: Phone Tester
ENJOY
---

[Q&A] [ROM] Gohma 2.0 - 12/15/2014 [Android Wear]

Q&A for [ROM] Gohma 2.0 - 12/15/2014 [Android Wear]
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.
Before posting, please use the forum search and read through the discussion thread for [ROM] Gohma 2.0 - 12/15/2014 [Android Wear]. If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.
Thanks for understanding and for helping to keep XDA neat and tidy!
It appears that the vibration and other settings are not active in Gohma 2.0
From my research it seems that the /system/etc/rc.d/01tweaks file never gets to run.
I have been messing around with my watch to find a place to trigger execution of that directory but haven't found one yet.
Where did you put an initialization for it last time?
Alynna said:
It appears that the vibration and other settings are not active in Gohma 2.0
From my research it seems that the /system/etc/rc.d/01tweaks file never gets to run.
I have been messing around with my watch to find a place to trigger execution of that directory but haven't found one yet.
Where did you put an initialization for it last time?
Click to expand...
Click to collapse
I'll have a fix shortly, sorry!
Alynna said:
It appears that the vibration and other settings are not active in Gohma 2.0
From my research it seems that the /system/etc/rc.d/01tweaks file never gets to run.
I have been messing around with my watch to find a place to trigger execution of that directory but haven't found one yet.
Where did you put an initialization for it last time?
Click to expand...
Click to collapse
The init.d/rc.d directories seem to be run from the /system/etc/install-recovery.sh file. Look there and you should see the run-parts command. Which btw okibi, is ingenious, using the stock recovery script to provide init.d support in the face of a kernel that doesn't support it natively.
What software compilation are using Gohma 2.0? I´ve been testing and I have the corrosion problem with a Lg G watch (1,4 volts between pins while being out of the charger), perhaps the base isn´t a "finished-on-Y" compilation?
Nice work, 0 lag everywhere!
Bootloop
While I was running the windows installation to upgrade to 2.0, the program crashed, and the rom is stuck in a bootloop. I can boot into fastboot, and the recovery, but nothing. Any help?
tharrllz said:
While I was running the windows installation to upgrade to 2.0, the program crashed, and the rom is stuck in a bootloop. I can boot into fastboot, and the recovery, but nothing. Any help?
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?p=54250887
Toolkit should work to get back to stock lollipop.
Still a bug
There is still a little bug in gohma 2.1, but I fixed it in the script.
SOMETHING sets the governor back to userspace/787200 about a minute into the watches' boot.
I logged in and watched it occur.
However the other parameters now stick.
I fixed it with the following:
#!/system/bin/sh
/system/xbin/sysrw
##############################
# BEGIN CUSTOM USER SETTINGS #
##############################
# increase vibration intensity
# default is 80
echo 85 > /sys/class/timed_output/vibrator/amp
# default is 20
echo 175 > /sys/class/timed_output/vibrator/driving_ms
# switch from userspace to ondemand governor
# echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
# echo 787200 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
# Defer change until later, see enforcer below.
GOV=ondemand
FREQ=1094400
# set dpi (default is 240, smaller number means smaller text)
setprop ro.sf.lcd_density 200
##############################
# END CUSTOM USER SETTINGS #
##############################
# improve sd cache
if [ -e /sys/devices/virtual/bdi/179:0/read_ahead_kb ]; then
echo 2048 > /sys/devices/virtual/bdi/179:0/read_ahead_kb
fi
# improve block speed
for node in `busybox find /sys -name nr_requests | grep mmcblk`; do echo 1024 > $node; done
# gpu rendering
busybox mv /system/lib/egl/libGLES_android.so /system/lib/egl/libGLES_android.bak
busybox sed -i '/0 0 android/d' /system/lib/egl/egl.cfg
# adjust minfree
echo "0" > /sys/module/lowmemorykiller/parameters/debug_level
echo "2560,4096,6144,12288,14336,18432" > /sys/module/lowmemorykiller/parameters/minfree
# improve file system mounts
busybox mount -o remount,noatime,nodiratime,noauto_da_alloc,data=ordered,nobh,barrier=0 -t auto /
busybox mount -o remount,noatime,nodiratime,noauto_da_alloc,data=ordered,nobh,barrier=0 -t auto /sys
busybox mount -o remount,noatime,nodiratime,nodelalloc,noauto_da_alloc,data=ordered,nobh,barrier=0 -t auto /system
busybox mount -o remount,noatime,nodiratime,nodelalloc,noauto_da_alloc,data=ordered,nobh,barrier=0 -t auto /data
busybox mount -o remount,noatime,nodiratime,nodelalloc,noauto_da_alloc,data=ordered,nobh,barrier=0 -t auto /cache
# improve transitions
if [ -e /data/data/com.android.providers.settings/databases/settings.db ]; then
sqlite3 /data/data/com.android.providers.settings/databases/settings.db "update system set value = 0.5 where name = 'transition_animation_scale'"
sqlite3 /data/data/com.android.providers.settings/databases/settings.db "update system set value = 0.5 where name = 'animator_duration_scale'"
sqlite3 /data/data/com.android.providers.settings/databases/settings.db "update system set value = 1 where name = 'window_animation_scale'"
sqlite3 /data/data/com.android.providers.settings/databases/settings.db "update global set value = 0.5 where name = 'transition_animation_scale'"
sqlite3 /data/data/com.android.providers.settings/databases/settings.db "update global set value = 0.5 where name = 'animator_duration_scale'"
sqlite3 /data/data/com.android.providers.settings/databases/settings.db "update global set value = 1 where name = 'window_animation_scale'"
fi
# enable sysctl tweaks
busybox sysctl -p /system/etc/sysctl.conf
/system/xbin/sysro
# Wait around for the system to change the governor and change it back, then exit when we're sure its set.
# This function will remain running for a minute to enforce the change, until it's sure the system won't change it back.
enforcer () {
X=0
while [ $X -lt 12 ]; do
if [ ! `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor` = $GOV ]; then
echo $GOV > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo $FREQ > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
X=0
else
X=$(($X+1))
fi
sleep 5
done
unset X
}
enforcer &
Alynna said:
There is still a little bug in gohma 2.1, but I fixed it in the script.
SOMETHING sets the governor back to userspace/787200 about a minute into the watches' boot.
I logged in and watched it occur.
However the other parameters now stick.
I fixed it with the following:
Click to expand...
Click to collapse
I reinstalled using your additional governer tweak, is there any way to check and make sure its working? Seems to have made a noticeable improvement, it reduces some random lag i was getting with Wear Mini Launcher
myke66 said:
I reinstalled using your additional governer tweak, is there any way to check and make sure its working? Seems to have made a noticeable improvement, it reduces some random lag i was getting with Wear Mini Launcher
Click to expand...
Click to collapse
I log into the phone using:
adb shell
and check that the /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor remains 'ondemand'.
I noticed when I logged in with gohma 2.0 and 2.1, that this would get switched back to 'userspace' after a little less than a minute.
I'm not sure the 01tweaks file was even executed in 2.0. Definitely is executed in 2.1, but, something else in the system was changing the scaling settings back to defaults.
if its not working, the file above will be 'userspace', if it does, it is 'ondemand'.
Also, I have set my default top speed to 1.0ghz which is why wear launcher is probably snappier. This MAY have an impact on battery life, but probably not too much because the watch remains at about 300mhz whenever idle.
You can check /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies for valid values for the FREQ variable. Lower numbers probably mean marginally better battery life.
myke66 said:
I reinstalled using your additional governer tweak, is there any way to check and make sure its working? Seems to have made a noticeable improvement, it reduces some random lag i was getting with Wear Mini Launcher
Click to expand...
Click to collapse
A handy utility that you can sideload on our watch is PerfMon by Chainfire:
http://forum.xda-developers.com/showthread.php?t=1933284
If your frequency fluctuates from 300 to 1190, then you are on ondemand governor.
---------- Post added at 12:19 PM ---------- Previous post was at 11:50 AM ----------
Alynna,
Thanks for the enforcer mod. For some reason after installing your mod, the governor was still on userspace/787200. After playing around I changed sleep from 5 to 10 and now it works great.
:good:
The standard 5.0 ROM version has a new sleep function that turns off the watch display if it hasn't moved for 30 minutes. This is driving me nuts as I always put my watch next to my monitor while I'm working so I have to keep waking it up or I miss notifications.
Is this "feature" in this ROM and if so, is there any way to turn it off or extend the timeout ?
Thanks
i'm looking at the rom and kernel.
the kernel looks like it has more option/tweaks.
i know both dont work together a bit normal cause the rom is a bit the same it are tweaks and no visual changes
i think kernel looks better. in way of functions.
just this rom has also more cpu steps? 300-1.1ghz?
cause if im right stock just is locked on 778mhz? and even with wear control app seems like i can't change it (i mean i don't realy know cant see if power save or balanced governers do any thing). need to check with a app how fast my cpu is running.
This ROM had been great! One question: Does the reset option in the watch settings properly reset and keep gohma tweaks? I tend to flash allot of ROMs on my phone and have been flashing my watch back to stock then each time as well as reflashing gohma. Stock recovery here. See no real reason for custom when everything is done using adb and computer.
Nandrew said:
This ROM had been great! One question: Does the reset option in the watch settings properly reset and keep gohma tweaks? I tend to flash allot of ROMs on my phone and have been flashing my watch back to stock then each time as well as reflashing gohma. Stock recovery here. See no real reason for custom when everything is done using adb and computer.
Click to expand...
Click to collapse
Yup. Just reset between phone ROM flashes.
Any update or thoughts on if we can find a way to make this ROM stop pumping out the 1.74 volts to our wrists via the metal contacts? Just discovered the whole issue of corrosion via the voltage emitted from the watch while being worn. I checked mine, running this ROM, and sure enough: it's live. 1.74 volts of electricity going into your wrist while you wear this thing. LG claims to have sent out a software fix a while back.
Thanks for the development & work on this ROM! Hopefully an "ah-ha" moment can be had and get this issue solved!
To think some people actually pay to have electricity run thru their body.. LG didn't consider it a feature? Lol
No corrosion here.
Gohma 2.2 - NEED DOWNLOAD
Jake's site to download the rom seems to be acting up. The download is extremely slow and keeps failing. I am in desperate need of this excellent ROM!! Does anybody have an alternate download link for Gohma 2.2? Any help is greatly appreciated.
Quick question? Installed 2.2 and everything runs fine except Perfmon only shows one core active. If I run the adb script I can turn the others on but for some reason by default one one core is up after a reboot. Any help.
kwd114kwd114 said:
Quick question? Installed 2.2 and everything runs fine except Perfmon only shows one core active. If I run the adb script I can turn the others on but for some reason by default one one core is up after a reboot. Any help.
Click to expand...
Click to collapse
The 01tweaks script on 2.3 didn't work for me either. Ondemand and frequency are correctly set, but only one core. Couple of workarounds:
1. Set the cores directly using adb commands from your PC.
2. Sideload kernel adiutor from the play store (nice kernel tuner app that works on our watch, dev is active on XDA)
3. Or modify the 01tweaks script to set the cores within the enforcer part of the script (right after $GOV and $FREQ are set)
Code:
# Wait around for the system to change the governor and change it back, then exit when we're sure its set.
# This function will remain running for a minute to enforce the change, until it's sure the system won't change it back.
enforcer () {
X=0
while [ $X -lt 12 ]; do
if [ ! `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor` = $GOV ]; then
echo $GOV > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo $FREQ > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo "1" > /sys/devices/system/cpu/cpu1/online
X=0
else
X=$(($X+1))
fi
sleep 5
done
unset X
}
enforcer &

[FLASHLIGHT] Low flashlight brightness fix (torch light, not photo flash)

Hello.
Stock libraries on XZ1 Compact are using 25mA current for the flashlight, which leads to very dim light.
I fixed this to get 400mA current, and now flashlight is very bright, much better than on 25mA (stock) current.
WARNING: You may damage (or even fry) your flashlight LED with these libraries, but i'm think 400mA is fine, because there is 25..400mA limits in the code, and after 2 minutes of light at 400mA my phone's LED was just a bit warm (but not hot).
WARNING: You must disable dm-verity for /vendor/ partition before flashing any .zip attached below, or you will get bootloop.
NOTES:
1. The easiest way to disable dm-verity is to use Magisk to get root (it will automatically disable dm-verity of both /system/ and /vendor/ partitions when installed with default settings). The patched libraries does not require root access, Magisk is mentioned here only for disabling dm-verity.
2. To install Magisk you must unlock bootloader and flash TWRP. Please read [RECOVERY] TWRP 3.2.3-0 (lilac) [UPDATE: 2018-11-28] to learn more about TWRP installation for XZ1 Compact (or find appropriate TWRP for your device).
3. Please read [XZ1c/XZ1/XZp] temp root exploit to backup drm keys implemented to learn more about the way to backup your TA with DRM keys before unlocking your device's bootloader (this is important, because DRM keys will be lost on bootloader unlock, and you will have no way to get them back if you don't have TA backup with those DRM keys).
If you need other current value (in 25..400mA range) - feel free to contact me.
If you need patch for another ROM version or device - please contact me with attached /vendor/lib/libcameralight.so and /vendor/lib64/libcameralight.so from your ROM (and please tell me your device's model and version of your ROM).
You may try to do patch by yourself, tech details about patching is in Post #17 - feel free to upload patched .so files or flashable .zip for your device (please don't forget to write device model and ROM version in the description).
Files without model in name is for XZ1 Compact, other files (with model at the end of file name) is for corresponding phone models.
Files for 47.2.A.0.306 are also compatible with 47.2.A.2.33, 47.2.A.4.41 and 47.2.A.4.45 ROM versions, and may be compatible with future ROM releases (or may not - I don't know exactly, so please check compatibility before flashing).
Please check Post #25 for details about compatibility between fixes and ROM versions, and how to check compatibility if your ROM isn't listed.
You can use Magisk module from Post #32 instead of flashing the ZIP files directly to the /vendor/ (just replace existing .so files in Magisk module ZIP with desired versions (using any ZIP archiver) and install the module).
4PDA.ru post (in Russian)
@S-trace
please can modify for me the one for xz3 and for xzp. thank u
I assume root is needed?
karrouma said:
@S-trace
please can modify for me the one for xz3 and for xzp. thank u
Click to expand...
Click to collapse
Please upload necessary files here and tell me device models and firmware versions of each device you need, and which current should i set.
mEREHAIGE said:
I assume root is needed?
Click to expand...
Click to collapse
Yes, you must get root using Magisk (or disable verity on /vendor/ in any other way) before installing this mod, or you may get bootloop.
Root access itself is not necessary for mod to work, just disabled verity is needed (but installing Magisk is the easiest way to get this for me)
@S-trace
can you make a 350ma for pie version of xz1c
it is same as xzp
Can you make some medium for xz1c? Like 250 ?
karrouma said:
@S-tracecan you make a 350ma for pie version of xz1c
it is same as xzp
Click to expand...
Click to collapse
Done.
manuerduarte said:
Can you make some medium for xz1c? Like 250 ?
Click to expand...
Click to collapse
Done.
Thanks!
S-trace said:
Done.
Done.
Click to expand...
Click to collapse
Thank you my friend.
Teting the 350 and 400
400 is better in all condition for cam
And 400 has no heat so it is fine for daily use.
Thank you for your work
Here for xz3
Attached
Can you modified to 400ma
Thank you
Hi,
This is a welcome patch. It used to be (on Z3C) to just change flashled_calc_parameters file - do you think it's still possible on XZ1C? Can you share more details on how exactly you patch the .so files?
gshegosh81 said:
Hi,
This is a welcome patch. It used to be (on Z3C) to just change flashled_calc_parameters file - do you think it's still possible on XZ1C? Can you share more details on how exactly you patch the .so files?
Click to expand...
Click to collapse
Is there anyway, we can control the current that goes to the flash on the go?
S-trace said:
Done.
Done.
Click to expand...
Click to collapse
@S-trace
Can i take a little bit from your time
Can you make an 450ma and 500 for me.
Thank you
rsk_kelkar said:
Is there anyway, we can control the current that goes to the flash on the go?
Click to expand...
Click to collapse
You can use following script for testing different current values:
Code:
#!/system/bin/sh
toggle=$(cat /sys/class/leds/led:switch_0/brightness)
if [ "$toggle" = "0" ];then
echo 60 > /sys/class/leds/led:torch_0/brightness
echo 60 > /sys/class/leds/led:torch_1/brightness
echo 1 > /sys/class/leds/led:switch_0/brightness
echo "on"
else
echo 0 > /sys/class/leds/led:torch_0/brightness
echo 0 > /sys/class/leds/led:torch_1/brightness
echo 0 > /sys/class/leds/led:switch_0/brightness
echo "off"
fi
60 means 120mA here, stock value is 13 (25mA).
I don't know any way to control flashlight current dynamically from the Android OS (like display brightness can be controlled).
karrouma said:
@S-trace
Can i take a little bit from your time
Can you make an 450ma and 500 for me.
Thank you
Click to expand...
Click to collapse
No, it won't work (I tried) - kernel will limit current to 400mA. Maybe it will be possible if you will patch kernel/dt to overcome this limit, but I'm not sure.
S-trace said:
You can use following script for testing different current values:
Code:
#!/system/bin/sh
toggle=$(cat /sys/class/leds/led:switch_0/brightness)
if [ "$toggle" = "0" ];then
echo 60 > /sys/class/leds/led:torch_0/brightness
echo 60 > /sys/class/leds/led:torch_1/brightness
echo 1 > /sys/class/leds/led:switch_0/brightness
echo "on"
else
echo 0 > /sys/class/leds/led:torch_0/brightness
echo 0 > /sys/class/leds/led:torch_1/brightness
echo 0 > /sys/class/leds/led:switch_0/brightness
echo "off"
fi
60 means 120mA here, stock value is 13 (25mA).
I don't know any way to control flashlight current dynamically from the Android OS (like display brightness can be controlled).
No, it won't work (I tried) - kernel will limit current to 400mA. Maybe it will be possible if you will patch kernel/dt to overcome this limit, but I'm not sure.
Click to expand...
Click to collapse
Thank you
Can you use this on lineageos?
karrouma said:
Here for xz3
Attached
Can you modified to 400ma
Thank you
Click to expand...
Click to collapse
Modified
Can you tell exact ROM version (from which you have taken libraries) to let me upload these patched libraries and original libraries to the OP?
4684361 said:
Can you use this on lineageos?
Click to expand...
Click to collapse
This depends on LineageOS you have.
gshegosh81 said:
Hi,
This is a welcome patch. It used to be (on Z3C) to just change flashled_calc_parameters file - do you think it's still possible on XZ1C? Can you share more details on how exactly you patch the .so files?
Click to expand...
Click to collapse
I'm think /vendor/etc/flashled_calc_parameters.cfg holds only camera flash parameters, not torch parameters.
But you may try to edit this file if you want.
Details about patching (offsets is for XZ1c):
Code:
32bit 8.0: (Thumb-2)
0x3F52 ALL 23=>22
0x3F9A 300 00E0FFE746F2A810=>49F2E030C0F20400
0x3F9A 400 00E0FFE746F2A810=>41F68020C0F20600
64bit 8.0: (ARM64)
0x4BBC ALL 0003=>E002
0x4C18 300 020000140100001400358CD2=>007C92D28000A0F21F2003D5
0x4C18 400 020000140100001400358CD2=>005083D2C000A0F21F2003D5
32bit 9.0: (Thumb-2)
0x4D52 ALL 3C=>3B
0x4DCC 250 00E0FFE746F2A810=>4DF29000C0F20300
0x4DCC 350 00E0FFE746F2A810=>45F23070C0F20500
0x4DCC 400 00E0FFE746F2A810=>41F68020C0F20600
64bit 9.0: (ARM64)
0x5CAC ALL E0=>C0
0x5D64 250 020000140100001400358CD2=>00129AD26000A0F21F2003D5
0x5D64 350 020000140100001400358CD2=>00E68AD2A000A0F21F2003D5
0x5D64 400 020000140100001400358CD2=>005083D2C000A0F21F2003D5
Payloads:
32bit:
MOVW R0, #0x1A80
MOVT R0, #6
64bit:
MOVZ X0, #0x1A80
MOVK X0, #0x6, LSL #16
NOP
The first one-byte patch is just a fixup for BEQ offset (to make it jump to correct offset, because we need 4 extra bytes to insert one more instruction, so we'll replace two useless B opcodes with MOV* instructions).
The second multi-byte patch is a payload, in this example MOV* instructions store 0x61A80 (400000) in R0/X0.
You may use http://armconverter.com/ to assemble payload with desired current value and then use HEX editor to patch your libraries (32bit is more important, i don't know who and when will use 64bit library, but patch it too just to leave OS libraries consistent).
S-trace said:
Modified
Can you tell exact ROM version (from which you have taken libraries) to let me upload these patched libraries and original libraries to the OP?
This depends on LineageOS you have.
I'm think /vendor/etc/flashled_calc_parameters.cfg holds only camera flash parameters, not torch parameters.
But you may try to edit this file if you want.
Details about patching (offsets is for XZ1c):
Code:
32bit 8.0: (Thumb-2)
0x3F52 ALL 23=>22
0x3F9A 300 00E0FFE746F2A810=>49F2E030C0F20400
0x3F9A 400 00E0FFE746F2A810=>41F68020C0F20600
64bit 8.0: (ARM64)
0x4BBC ALL 0003=>E002
0x4C18 300 020000140100001400358CD2=>007C92D28000A0F21F2003D5
0x4C18 400 020000140100001400358CD2=>005083D2C000A0F21F2003D5
32bit 9.0: (Thumb-2)
0x4D52 ALL 3C=>3B
0x4DCC 250 00E0FFE746F2A810=>4DF29000C0F20300
0x4DCC 350 00E0FFE746F2A810=>45F23070C0F20500
0x4DCC 400 00E0FFE746F2A810=>41F68020C0F20600
64bit 9.0: (ARM64)
0x5CAC ALL E0=>C0
0x5D64 250 020000140100001400358CD2=>00129AD26000A0F21F2003D5
0x5D64 350 020000140100001400358CD2=>00E68AD2A000A0F21F2003D5
0x5D64 400 020000140100001400358CD2=>005083D2C000A0F21F2003D5
Payloads:
32bit:
MOVW R0, #0x1A80
MOVT R0, #6
64bit:
MOVZ X0, #0x1A80
MOVK X0, #0x6, LSL #16
NOP
The first one-byte patch is just a fixup for BEQ offset (to make it jump to correct offset, because we need 4 extra bytes to insert one more instruction, so we'll replace two useless B opcodes with MOV* instructions).
The second multi-byte patch is a payload, in this example MOV* instructions store 0x61A80 (400000) in R0/X0.
You may use http://armconverter.com/ to assemble payload with desired current value and then use HEX editor to patch your libraries (32bit is more important, i don't know who and when will use 64bit library, but patch it too just to leave OS libraries consistent).
Click to expand...
Click to collapse
52.0.A.3.84 xz3
karrouma said:
52.0.A.3.84 xz3
Click to expand...
Click to collapse
Thank you.
Uploaded files to the OP.
S-trace said:
Thank you.
Uploaded files to the OP.
Click to expand...
Click to collapse
Thank you

Categories

Resources