battery tweaks - Miscellaneous Android Development

Hello i extracted this tweaks from xperia z3 ROM and it seems to be working,I went from 5 hours Sot to 6+ hours Sot add them to bottom of build.prop, and put the file in system/etc with 644 permission then reboot
# Assertive Display
ro.qcom.ad=1
ro.qcom.ad.calib.data=/system/etc/ad_calib.cfg
# Modem power save enabled
persist.radio.add_power_save=1
# Limit Modem signaling to save power
persist.radio.data_no_toggle=1
https://www.dropbox.com/s/x6bevwk4aw...calib.cfg?dl=0

Related

[Tweaks]Build.Prop edit for faster DL speeds, better battery life and more fluid UI

Hey all,
These are some tweaks I have pulled from around the web and tested on the inspire 4g running CM7.
[This does require root access]
I have reached 6.5mbps download with these settings and 1mbps up ( i think i can tweak it further to get higher). It also seems to improve battery life quite a bit. With moderate to heavy use i pull in 8hrs (heavy use) to 12-16 hours (light to moderate use)
It also seems to enhance the UI speed and fluidity of the movement.
1st) make a nand backup of your rom of course and you will want ES file explorer (or anything that can browse root).
2nd) open up ES file explorer (or any root browser) (for es file explorer make sure you hit menu and go to settings and at the bottom select root explorer and set mount file system for this to work.)
3rd) Navigate to the root of your phone and go to system locate build.prop and copy to your sd card. (on es file explorer hit star select the phone icon and then select system. scroll to bottom to see build prop.)
4th) connect your phone to your pc/laptop and mount as usb drive and copy the build.prop to your pc/laptop.
5th) open up build.prop with wordpad (not notepad)
6th) very important you follow this completely. copy whats below and past it to the bottom of your build.prop file. NOW FOR EACH ITEM BELOW MAKE SURE YOU PLACE A # NEXT THE SAME NAMED ITEM ABOVE IN YOUR ORIGINAL AREA OF THE PROP FILE! The reason why is because # comments out (meaning excludes the system from executing that but is still readable by you and allows you to go back to default easily by deleting the mods and removing the # from the above original area of the prop file)
The one i have highlighted in red supposedly makes the phone call quality better. I havent done much testing it sounds mostly the same. Up to you if you want to include it or not.
#
#Tweaked settings below - originals commented out above
#
#Power save tweaks
ro.ril.disable.power.collapse=0
wifi.supplicant_scan_interval=180
pm.sleep_mode=1
ro.mot.eri.losalert.delay=1000
#Hardware Acceleration Tweaks
Debug.performance.tuning=1
video.accelerate.hw=1
debug.sf.hw=1
#voice quality tweak?
ro.ril.enable.amr.wideband=1
#Data Speed Tweaks
ro.ril.enable.dtm=1
ro.ril.gprsclass=34
ro.ril.hsdpa.category=28
ro.ril.hsupa.category=7
ro.ril.hsxpa=5
#buffer tweaks
net.tcp.buffersize.default=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.wifi=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.umts=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.gprs=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.hsdpa=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.edge=4096,87380,256960,4096,16384,256960
ro.ril.hep=1
ro.ril.def.agps.feature=1
7th) now save the build.prop file (your text editor may say something about losing formatting and converting to text when you save. IGNORE IT.) Also please make sure its saved a build.prop and NOT a build.prop.txt (windows will show you the extension if you have hide common extensions turned off)
8th)now that we have a properly saved build.prop (not build.prop.txt!) copy it back to your phone anywhere just make sure you can find it.
9th) unmount the phone as a usb drive, open up es file explorer (or whatever your using to browse root and files) navigate to root of your phone and go to system and delete the build.prop there. Go back to the sd card and copy the build.prop and then go back to system again on root and place the build.prop there.
10th) reboot twice ( i did it three times to make sure) run speed test a couple of times to get average of new download speeds. Also get used to the more fluid movement of your phone.
note: this was not tested with modified apn settings. If you have modified apn settings i do not know how that will affect download speeds.
note2: if running cyanogenmod 7 i suggest increasing vm heap size to 48m and locking home app in memory. (if your running a home screen that allows you to lock it via the home screen app like launcher pro disable it in launcher pro and only enable this feature in cm7 options.
Note3: previously i was able to get up to 3mbps upload consistently and one of these tweaks is not allowing that. I am on a limited data plan 2gb and will have to test speed settings next month to see if i can figure out which settings will enable the higher upload speeds. For now these settings are sufficient.
Note4: For the most accurate battery life i recommend downloading "battery calibration" from the market and charging to 100% then using it to wipe your battery stats file. Then drain your battery down to 0%. To the point where the phone turns off; making it so the batter is completely dead. Then charge it back up to 100% and you'll have the most accurate battery stats. This wont increase your battery life but it will make it so that your battery percentage reflects accurately what your actual current charge remaining is on your phone.
Note5: I havent tested this on any other rom than Cyanogenmod 7 so let me know if it works for you and on what rom with what kernel. The speed settings should work on any rom.
Note6: I also reccommend using Tiamat kernel with CM7 and using the smartass governor which is better for battery life. http://tiamat-dev.com/tiamat_msm7230/
Credit where credit is due, i found these build.prop tweaks from various places on the internet and tested them on my phone to see which ones work. So to whomever discovered the various build.prop settings thank you.

[Kernel Module] Backlight: Lower Brightness (Useful at Night)

(dev only for now, you need to know how to install/load a kernel module by hand/write a init.d script for it)
Hi,
I was annoyed by the too bright backlight especially at night. Even the lowest (non-zero) setting was too bright for me (see my thread in general section).
Thanks to irfanbagus BCM-TWEAK which I could easily adapt here's kernel module to lower the lowest brightness. This means that only the former lowest mode is changed to an even lower brightness, the other modes remain the same.
I've attached a kernel module for this incl. source (based on irfanbagus' source, say thanks to him ).
After loading this module you can simply use the system backlight setter to dim the backlight. In case it was already set to lowest brightness, simply increase the brightness and then decrease it again to apply the updated mode.
This doesn't work with GO Launcher's setting widget's backlight setter and probably also not with other 3rd party backlight setters.
If you test it, please report.
More details about backlight/brightness (see aat1401_bl.c in kernel source if you're interested):
- brightness level is a value in [0,255] (most apps map this to [0,100]%)
- in fact there're just about 25 different brightness levels which a stored in a table, each entry has a 'level' and a 'tune_level' value
- the tune_level (>0) determines the brightness: low level low brightness, high level high brightness
- there's a "lowest" level (30) but only the system setter respects this. This level's tune_level is changed by my kernel module to 1 instead of 2
- system's brightness setter allows no level below 30 thus my mod works good with it
- other setters allow levels below 30 and here is the problem:
The responsible module for setting the backlight brightness looks at the level value in [0,255]. If it's below 30 then a default tune_level of 2 is used.
The GO Launcher widget probably simply sets the level to 0.
I don't know a way to change this default tune_level in a already compiled/running kernel.
So if you want to use another setter, make sure to choose level 30 or about 12% because then my updated tune_level will be used. Usually 12% should map to level 30. If not, I can't help you. Use system setter instead.
Btw to switch backlight off (warning, not recommended) you can use the direct way: echo 0 > /sys/class/backlight/aat1401-backlight/brightness
Found a widget which allows custom brightness values and works fine with my mod: Brightness Widget - Backlight!
Tested with this settings: 30,1,150,255
i am using switch pro widget..range from
0% ----> 100%
ronnieryan said:
i am using switch pro widget..range from
0% ----> 100%
Click to expand...
Click to collapse
0% = no backlight?
Anyway, with my mod you'd have the lowest brightness at 12%.
mikstev said:
0% = no backlight?
Anyway, with my mod you'd have the lowest brightness at 12%.
Click to expand...
Click to collapse
yes, 0% no backlight, but its so inconvenient ..10% is better
Interesting, I'll have a look.
Edit: As far as I see this widget doesn't require root. Even if it could disable backlight (I'm not sure if this is possible) its lowest non-zero brightness is higher than with my mod.
how can i use this sir?
nakawanaoki said:
how can i use this sir?
Click to expand...
Click to collapse
1. Copy the .ko file to /system/lib/modules
2. Set the file permissions to 644
3. Install the module via insmod bl_brightness-tweak.ko (you can also use a init.d script for this, you can adapt the one I uploaded in the droidwall thread)
I am not sure why,
but on trying to turn off screen with "echo 0" it is only get darker, but not completely off.
Is there any way to really turn of screen ?
Thank you,
Ranchu

Galaxy tab 4 7" t230nu Intro.Tips n Ideas

Hey everyone! My name is Kori. So i have been homeless for awhile.Been usinf 2 lg motions as my enertainment.Watching video and typing was annoying on such small screens.
About new years i got a few extra bucks and ended up buying a Samsung Galaxy tab 4 7".
This thing was possessed with Demon Scripts. 2 minutes after my first boot i get notifications the phone cant see my eyes. Every time i touched the phone or even thought about it Power Manager,SSRM and DVFS get twitchy and bump my cpu_minfreq to max.
Chargin my battery isnt always possible when your "Camping" So i began Un-Development.
Then noticing Low Volume ,Weird Wifi and several other problems
My wifi would drop or data transfer would drop. I found that when connected with low signal icould run file in /system/bin called oem_iptables_init.sh would g3t me a data flow again. Then i noticed there seemed to be 2 sets of wifi and bluetooth drivers.
Anyways heres the bulk.
I have removed almost ALL the junk i dont need.
Selinux disabled. Knox is disabled
telephony is all gone. All but the jar and odex in frame"though i removed all permissions to the odex.
Nvm is gone and doesnt load. That means all rf reductionstables as well.
Csc is gone
nothing loads from /NVM , /etc/tel or /system/csc
removed Enterprise SSRM Dvfs has been cut out. Turned off all motion .palm swipe,air motion,smart stay and whatever else
Also managed to Stop several services that are useless to me
So nothing THERE IS NOTHING IN CONTROL OF MY CPUS EXCEPT FOR MY INIT.D SCRIPTS.AHhhhh
i have None of the original apps such as
touchwiz home,keyboard.camera,gallery,Lets say everything¡
All thats left from stock is like google play 'and its apps',settings,mtp,vpn,kies,bluetooth,cert installerand a few others
I mean completley stripped
i have a ton of apps on my phone including 5 or 6 social apps and 2 messenger apps. After a bootup phone idles on one cpu core on st 312 with about 700 to 650 mb of free ram
yes,i unlocked the Hotplug feature.And drastically changed the load balancing to the cores.
This allows the phone to Turn On and Off cpu cores as it needs. Saving battery life with great performance.
I have managed to Increase Volume also.Woooooo
Battery is way better now ,much better wifi. Tons of room in system for my apps. I control my phone now not Google Samsung Selinux Knox Enterprise NVM SSRM DVFS MPDCand all the others.
I have cool init.d setup i made with basically 7 init.d setups or profiles to choose from to exe at boot as well as 6 profiles you can run in realtime. Also 2 sysctl profiles to choose to boit from or exe in realtime.
Also i have tons of init.d settings for this tab i like.
Gettin tired of typing So i will be back with several How tos for you.
but here is something to play with
unlock hotplug
/sys/devices/system/cpu/hotplug/lock change to zero
This the current setup i have Though i think i need a few adjustments in load balancing
But it nice. Lets cpu idle and perform o cpu0 only but keeps a second core close to Help
Keeping the other 2 cores off until really needed
echo "0" > /sys/devices/system/cpu/hotplug/lock
echo "312000" > /sys/devices/system/cpu/hotplug/bound_freq
echo "10" > /sys/devices/system/cpu/hotplug/load_h0
echo "40" > /sys/devices/system/cpu/hotplug/load_h1
echo "70" > /sys/devices/system/cpu/hotplug/load_h2
echo "16" > /sys/devices/system/cpu/hotplug/load_l1
echo "35" > /sys/devices/system/cpu/hotplug/load_l2
echo "50" > /sys/devices/system/cpu/hotplug/load_l3
using this as Governor settings
chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
#chmod 777 /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
#echo "990000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
chmod 777 /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
chmod 777 /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo "1" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
Aslo keeping the cores limited to 1066 mhz max.
chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo "1066000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
Alright going 10-7
Over
Anyone else try it out?? Just wondering if you really can remove all that, and everything work.
Sent from my SM-T230NU using XDA-Developers mobile app

Terrible idle battery life after update.

Hi!
After I've updated my phone to 18.5.C.0.25 the battery life went very bad. 2 minutes writing SMS - 1% of battery gone. During night 15-20%, when the phone is doing nothing! Clean install through PC Companion, reseting to the factory settings, charging to 90, 80, 70% and then up to 100% didn't work. How to fix it? Anyone else has this problem? Stamina is on, the signal is good. What can be the problem?
Which variant are you using?
Following methods worked for me to reduce battery usage:
# clean install by flasing stock ftf using flashtool (downloaded by xperifirm)
# changing network mode from auto to gsm only (only when you don't need to use 3g/4g data)
# rooting phone, removing unnecessary apps(also some system apps and bloatwares) and managing autostart apps by allowing least number of apps to be started when system boots up
# stamina mode on > extended standby and extended usage is on (located inside the stamina option)
# turn off location service if not necessary, turn off wifi during sleep(keep wifi on only when charging), disable scanning always available for wifi, wifi optimization on
# turn off auto sync if not necessary
# remove widgets which drains battery faster by refreshing repeatedly (for example i've removed weather widget from screens)
# use auto brightness on and chose battery saving mode if applicable (lol no need to mention i guess! )
(btw, i'm using my phone with auto-rotate and wifi on all the time, now my phone provides me 2days of backup with around +/-6hrs screen on time on an average)
D2203. I have preffered 3G set, because my SIM doesn't support LTE
"# rooting phone, removing unnecessary apps(also some system apps and bloatwares) and managing autostart apps by allowing least number of apps to be started when system boots up"
I will try that
"# stamina mode on > extended standby and extended usage is on (located inside the stamina option)"
In use from the very beginning
"# turn off location service if not necessary, turn off wifi during sleep(keep wifi on only when charging), disable scanning always available for wifi, wifi optimization on
# turn off auto sync if not necessary
# remove widgets which drains battery faster by refreshing repeatedly (for example i've removed weather widget from screens)"
Done.
"# use auto brightness on and chose battery saving mode if applicable (lol no need to mention i guess! )"
I don't know why, but the brightness is very often set near maximum. Bug? The light sensor is ok (checked in CPU-Z)
The next question is, why the charging from 99 to 100% is taking so long? The next irritating fact is that the battery can stay on 99% for several hours and suddenly it's down to 92% in one minute. Is there any option to calibrate the battery gauge?
Magnum44pl said:
D2203. I have preffered 3G set, because my SIM doesn't support LTE
"# rooting phone, removing unnecessary apps(also some system apps and bloatwares) and managing autostart apps by allowing least number of apps to be started when system boots up"
I will try that
"# stamina mode on > extended standby and extended usage is on (located inside the stamina option)"
In use from the very beginning
"# turn off location service if not necessary, turn off wifi during sleep(keep wifi on only when charging), disable scanning always available for wifi, wifi optimization on
# turn off auto sync if not necessary
# remove widgets which drains battery faster by refreshing repeatedly (for example i've removed weather widget from screens)"
Done.
"# use auto brightness on and chose battery saving mode if applicable (lol no need to mention i guess! )"
I don't know why, but the brightness is very often set near maximum. Bug? The light sensor is ok (checked in CPU-Z)
The next question is, why the charging from 99 to 100% is taking so long? The next irritating fact is that the battery can stay on 99% for several hours and suddenly it's down to 92% in one minute. Is there any option to calibrate the battery gauge?
Click to expand...
Click to collapse
Well.. I haven't faced screen brightness issue like this yet, but an incompatible custom kernel can cause that, are you using any?
Charging from 99 to 100% can take upto 20mins i guess, because the last 10% is called trickle charging (or something like that) which means, the system will charge the battery in a periodic manner to ensure battery health.
Sudden drop of battery level can be caused by several different reasons, if the physical status of your battery is ok, try to find out the culprit which is draining your battery that way (you can figure it out by going power management > battery usage, here it'll show the battery consumption rate of various apps. right now i'm using CM11, last night i found that my battery was drained around 17% while staying in idle mode for around 6hrs! then i've found that the culprit was the nfc app which caused the huge battery drainage! Then i just removed nfc app (lol! ) because nfc was not working in CM11 either!)
Finally, many says that you can calibrate your your battery by discharging your battery to 1% and then re-charge it again to 100% in continuous manner and repeat this process couple of times to calibrate battery... some also say to hard turn off your phone after 100% charging by pressing volume up + power key for few seconds and then switch it on again, in that case if you find your phone battery is below 100% then charge it again to 100% continuously... But the thing I believe, if you find your phone in this situation that it shows drastically reduced battery level after phone restart, it's not any app, it's the damaged battery which is causing poor battery performance.
Thanks for reading, I hope you find this post helpful!

Xperia XZ dual - phone idle, google play services, android OS battery consumption

Hi All,
Do you know when Sony will issue a SW update to solve the high battery consumption of (phone idle, google play services, and android OS) processes.
I am on Nougat, 39.2.A.0.442
Thanks,
well they are kind of slow in getting updates on time...only issue i wish they fix is battery drainage...phone idle consumed 1050 mah of battery in 2 days, why Sony?is system doing something from behind that we dont know or what LOL.im also on latest Nougat .442
I debloated my phone on fw 442, build.prop and init.qcom.post_boot.sh tweaks and get 8-10 hrs SOT [without any cpu profile or underclock or vm tweaks!]
Without all of that, can get 5-6 hrs SOT too. (1-2 hrs play Clash Royal on LTE or 3G)
My Galaxy S6 get 4-5 hr on marshmallow and 5-6 on Lollipop.
I think for a LCD panel, not any problems at Sony battery consuming!
Can you share details about power usage for google play services? This is google fault not sony software!
---------- Post added at 07:03 PM ---------- Previous post was at 06:42 PM ----------
If you on stock fw without root check:
1- In Settings>Location click on 3dots menu an select "scan" then check wifi and blutooth scan is off?
2- don't use vibration at all (notifications and calls. touching display, keyboards, dialling, etc)
3- turn off auto-sync
4- turn off trust agent if do not use smart locks
5- turn off auto update for play store and firmware
6- check which app use data in background (and manage restriction for each of them)
7- at Settings>google>nearby, click on gear icon and turn of "nearby links" and "device ready to setup"
8- turn off "double touch to wake up" (optional)
i have the same issue on my Dual Sim Sony Xperia XZ. 8hrs idle and lost 15%. its same every day. Shame Sony!!! Its your flagship device.....
mzeshanhakeem said:
i have the same issue on my Dual Sim Sony Xperia XZ. 8hrs idle and lost 15%. its same every day. Shame Sony!!! Its your flagship device.....
Click to expand...
Click to collapse
It's easy to blame Sony when a simple change in your settings can make a huge difference in power consumption while the phone is idle.
Maybe you should check this rom if sony's stock software doesn't satisfy you https://forum.xda-developers.com/xperia-xz/development/duality-rom-legendary-battery-beta-t3574300
I'm on my way to 11h of SoT with moderate use, play services together to idle struggle to get to 20% after two days.
GenomeX said:
I debloated my phone on fw 442, build.prop and init.qcom.post_boot.sh tweaks and get 8-10 hrs SOT [without any cpu profile or underclock or vm tweaks!]
Without all of that, can get 5-6 hrs SOT too. (1-2 hrs play Clash Royal on LTE or 3G)
My Galaxy S6 get 4-5 hr on marshmallow and 5-6 on Lollipop.
I think for a LCD panel, not any problems at Sony battery consuming!
Can you share details about power usage for google play services? This is google fault not sony software!
---------- Post added at 07:03 PM ---------- Previous post was at 06:42 PM ----------
If you on stock fw without root check:
1- In Settings>Location click on 3dots menu an select "scan" then check wifi and blutooth scan is off?
2- don't use vibration at all (notifications and calls. touching display, keyboards, dialling, etc)
3- turn off auto-sync
4- turn off trust agent if do not use smart locks
5- turn off auto update for play store and firmware
6- check which app use data in background (and manage restriction for each of them)
7- at Settings>google>nearby, click on gear icon and turn of "nearby links" and "device ready to setup"
8- turn off "double touch to wake up" (optional)
Click to expand...
Click to collapse
Thanks alot... I did most of that, will monitor and let you know
Dears... and did you ever notice some cut in the notification sounds? especially whatsapp? ... random behaviour
Thanks,
for rooted user follow this tutrial for fix battery drain at android 7.0 fw...
open /system/etc/init.qcom.post_boot.sh and find this (method for msm8996)
Code:
case "$target" in
"msm8996")
# disable thermal bcl hotplug to switch governor
add red line:
Code:
echo 0 > /sys/module/msm_thermal/core_control/enabled
[COLOR="Red"]echo N > /sys/module/msm_thermal/parameters/enabled[/COLOR]
and
Code:
# Enable Adaptive LMK
echo 1 > /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk
echo 81250 > /sys/module/lowmemorykiller/parameters/vmpressure_file_min
[COLOR="red"] # Configure virtual memory for battery drain
echo 500 > /proc/sys/vm/dirty_expire_centisecs
echo 3000 > /proc/sys/vm/dirty_writeback_centisecs
echo 100 > /proc/sys/vm/vfs_cache_pressure[/COLOR]
now find
Code:
echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
and change like this:
Code:
echo [COLOR="red"]100[/COLOR] > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
above # online cpu2
add this:
Code:
[COLOR="red"]echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/fast_ramp_down[/COLOR]
# online CPU2
above # Override with SOMC tuning parameters for governor
add this:
Code:
[COLOR="red"] echo 1 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/fast_ramp_down
# Disable touch-boost
echo 0 > /sys/module/msm_performance/parameters/touchboost[/COLOR]
# Override with SOMC tuning parameters for governor
now re-enable hotplug
Code:
# re-enable thermal and BCL hotplug
echo 1 > /sys/module/msm_thermal/core_control/enabled
[COLOR="red"] echo Y > /sys/module/msm_thermal/parameters/enabled[/COLOR]
==============================================================
now let's go to edit build.prop
end of the file add this:
Code:
#
# CUSTOM_BUILD_PROPERTIES
#
ro.ril.power_collapse=1
ro.ril.disable.power.collapse=0
ro.ril.fast.dormancy.rule=0
pm.sleep_mode=1
power.saving.mode=1
wifi.supplicant_scan_interval=180
windowsmgr.max_events_per_sec=90
persist.sys.scrollingcache=3
ro.media.enc.jpeg.quality=100
persist.sys.purgeable_assets=1
reboot and enjoy
GenomeX said:
for rooted user follow this tutrial for fix battery drain at android 7.0 fw...
open /system/etc/init.qcom.post_boot.sh and find this (method for msm8996)
Code:
case "$target" in
"msm8996")
# disable thermal bcl hotplug to switch governor
add red line:
Code:
echo 0 > /sys/module/msm_thermal/core_control/enabled
[COLOR="Red"]echo N > /sys/module/msm_thermal/parameters/enabled[/COLOR]
and
Code:
# Enable Adaptive LMK
echo 1 > /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk
echo 81250 > /sys/module/lowmemorykiller/parameters/vmpressure_file_min
[COLOR="red"] # Configure virtual memory for battery drain
echo 500 > /proc/sys/vm/dirty_expire_centisecs
echo 3000 > /proc/sys/vm/dirty_writeback_centisecs
echo 100 > /proc/sys/vm/vfs_cache_pressure[/COLOR]
now find
Code:
echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
and change like this:
Code:
echo [COLOR="red"]100[/COLOR] > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
above # online cpu2
add this:
Code:
[COLOR="red"]echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/fast_ramp_down[/COLOR]
# online CPU2
above # Override with SOMC tuning parameters for governor
add this:
Code:
[COLOR="red"] echo 1 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/fast_ramp_down
# Disable touch-boost
echo 0 > /sys/module/msm_performance/parameters/touchboost[/COLOR]
# Override with SOMC tuning parameters for governor
now re-enable hotplug
Code:
# re-enable thermal and BCL hotplug
echo 1 > /sys/module/msm_thermal/core_control/enabled
[COLOR="red"] echo Y > /sys/module/msm_thermal/parameters/enabled[/COLOR]
==============================================================
now let's go to edit build.prop
end of the file add this:
Code:
#
# CUSTOM_BUILD_PROPERTIES
#
ro.ril.power_collapse=1
ro.ril.disable.power.collapse=0
ro.ril.fast.dormancy.rule=0
pm.sleep_mode=1
power.saving.mode=1
wifi.supplicant_scan_interval=180
windowsmgr.max_events_per_sec=90
persist.sys.scrollingcache=3
ro.media.enc.jpeg.quality=100
persist.sys.purgeable_assets=1
reboot and enjoy
Click to expand...
Click to collapse
nice to see that...looks like im going for root soon Thanks
GenomeX said:
for rooted user follow this tutrial for fix battery drain at android 7.0 fw...
open /system/etc/init.qcom.post_boot.sh and find this (method for msm8996)
Code:
case "$target" in
"msm8996")
# disable thermal bcl hotplug to switch governor
add red line:
Code:
echo 0 > /sys/module/msm_thermal/core_control/enabled
[COLOR="Red"]echo N > /sys/module/msm_thermal/parameters/enabled[/COLOR]
and
Code:
# Enable Adaptive LMK
echo 1 > /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk
echo 81250 > /sys/module/lowmemorykiller/parameters/vmpressure_file_min
[COLOR="red"] # Configure virtual memory for battery drain
echo 500 > /proc/sys/vm/dirty_expire_centisecs
echo 3000 > /proc/sys/vm/dirty_writeback_centisecs
echo 100 > /proc/sys/vm/vfs_cache_pressure[/COLOR]
now find
Code:
echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
and change like this:
Code:
echo [COLOR="red"]100[/COLOR] > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
above # online cpu2
add this:
Code:
[COLOR="red"]echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/fast_ramp_down[/COLOR]
# online CPU2
above # Override with SOMC tuning parameters for governor
add this:
Code:
[COLOR="red"] echo 1 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/fast_ramp_down
# Disable touch-boost
echo 0 > /sys/module/msm_performance/parameters/touchboost[/COLOR]
# Override with SOMC tuning parameters for governor
now re-enable hotplug
Code:
# re-enable thermal and BCL hotplug
echo 1 > /sys/module/msm_thermal/core_control/enabled
[COLOR="red"] echo Y > /sys/module/msm_thermal/parameters/enabled[/COLOR]
==============================================================
now let's go to edit build.prop
end of the file add this:
Code:
#
# CUSTOM_BUILD_PROPERTIES
#
ro.ril.power_collapse=1
ro.ril.disable.power.collapse=0
ro.ril.fast.dormancy.rule=0
pm.sleep_mode=1
power.saving.mode=1
wifi.supplicant_scan_interval=180
windowsmgr.max_events_per_sec=90
persist.sys.scrollingcache=3
ro.media.enc.jpeg.quality=100
persist.sys.purgeable_assets=1
reboot and enjoy
Click to expand...
Click to collapse
I do this thing but the result is the same at before. I must wait some cycle of charge? I copy the files on pc and i do this things there and then i replace those files in their directory
djgigi94 said:
I do this thing but the result is the same at before. I must wait some cycle of charge? I copy the files on pc and i do this things there and then i replace those files in their directory
Click to expand...
Click to collapse
Maybe one of your third-party app call google play services.
Reboot to safe mode and see is the problem still alive.
When writing this comment, I am on 67% battery and Play Services only drain 3%, android system only 7%!
I get 2hr sot (%36 drain)
play Asphalt8 for 45min (set on hi-graphic)
surface web with chrome for 30min
telegram for 10min
Instagram for 10min
7min call with SIM1 (gsm) and my SIM2 is on LTE when use social networking and web browsing.
I think this is where good battery life for a flagship smartphone with same useage.
I never problem with Standby; (becuse i use my phone always LOL)
Try (okey try if i can LOL) to change my useage and live the phone alone for few hours (really hard job for a internet lover you know) and share with you: is phone idle really a problem or not?
You can see i have not any battery drain problem with 7.0 firmware
http://uupload.ir/files/m6hi__20170406_065247.jpg
I use my phone from 100-95 (4G network) before sleep, after wakeup drain only 1%, 8hrs idle. (the 4G network was on)
** consider i debloated my phone too. Maybe some Sony or third-party apps may the real problem, not fault of play services or android 7.0 or kernel codes! (Pixel, HTC10, Moto Z, are normal with 7.x. Deep customized android firmware like Xperia X, XZ and Galaxy S6,S7 have issue)
*** use cpu monitoring apps to find cpu deep sleeping work correct and whiche services wakeup processor in background.
the strange thing here... after some days of phone usage, the phone seems to learn my usage. now battery takes hell of time before it drains! which is good
I don't see the point of having to turn off some settings in order to get by 5-6 hours of SOT...you shouldn't have to do that with phones in 2017.
I wish I could root my Japanese XZ, but I'd lost my mobile payments and that is too valuable.

Categories

Resources