Xiaomi MIUI Official Forum

Diamond Member

Rank: 5Rank: 5

Credits
1221
Device
Redmi Note 4
MIUI Version
V8.2.1.0.MBFMIDL
Online time
62 Hours
Send PM

Yi Action CameraMi  BunnyMi HeadphonesMIUI 8MIUI Devices ContestMIUI 2016Fantastic!Redmi Note 4Fan Of MIUI BangladeshMerry ChristmasPokemon Master Medal1 Million Forum App Installs1500K Forum MembersI Love 2016Rooster Year of 2017Puzzle Master10 Million Forum Posts3 Million Forum MembersMIUI 2017Happy Valentine's DayHappy New YearMIUI Lucky FridayForum Contest LoverMi Lover MedalUpdates LoverStar Of TechnologyAndroid Guru

[Tools, Tips & Tutorials] [Standby Battery drain][Performance] Improve battery life

[ Promote]
17729 117 |
21:13, Dec-07-2016 | From PC
|
|
Go to reply no.
This post was edited by memon.jameel at 19:20, Jan-31-2017

Warning
please backup the files/ROM before you perform any tweak on rooted phone

_________________________________________________________________________________________
------  Uninstall any other launcher specially modified or leaked such as Google pixel launcher  ---------
________________________________________________________________________________________

Requirement for advanced tweaks

(such as editing build.prop, using doze setting editor and init script)
1. Unlocked bootloader
2. Rooted Phone
3. Busybox installed (replace MIUI busybox with stericson busybox via busybox app from play store for additional compatibility and latest busybox version)

What will be achieved after this
1. Longer battery life
2. Around 1 - 1.5GB Free RAM (without these tweaks i had 800mb free out of 3 GB (actual RAM is 2.5GB)
3. Lag smooth free experience
4. Better RAM and Cache management

1) Apply following settings


setting > battery > Manage apps battery usage > On (tap 5 times) select ultimate.

Set the apps to be optimised
setting > battery > Manage apps battery usage > choose apps

settings > privacy > location > google location history > off

settings > privacy > location
look under location mode and select device only or battery saving

Settings > Wi-Fi > Advanced Wi-Fi > scanning always available (uncheck)
if you are ok to completely off the location the settings > privacy > location > access to my location (uncheck)

if you don't wish to use VoLTE
settings > SIM cards & Mobile network > VoLTE enabled (uncheck)

Keep brightness less then 40% or max 50%
Using greenify will help you as well

2. Editing Build.prop
add below lines in you root/system/build.prop file with the help of root explorer or any other root browser

#Dalvik optimization
dalvik.vm.dexopt-data-only=1
dalvik.vm.heapgrowthlimit=384m (there are 2 entries of this kindly remove/comment one and edit another existing line in build.prop)
dalvik.vm.heapsize=768m  (there are 2 entries of this kindly remove/comment one and edit another existing line in build.prop)
dalvik.vm.heapstartsize=32m
dalvik.vm.heaptargetutilization=0.75
dalvik.vm.heapminfree=4m
dalvik.vm.heapmaxfree=32m
dalvik.vm.heapidealfree=16777216
dalvik.vm.heapconcurrentstart=4194304
persist.sys.dalvik.hyperthreading=true
dalvik.vm.image-dex2oat-filter=speed
dalvik.vm.dex2oat-filter=speed

#Video and GPU Acceleration
debug.sf.hw=1
debug.performance.tuning=1
video.accelerate.hw=1
debug.egl.hw=1
persist.sys.ui.hw=1
hw3d.force=1
hw2d.force=1

#increase voice call quality
ro.ril.enable.amr.wideband=1

#scrolling velocity tweaks
ro.max.fling_velocity=20000
ro.min.fling_velocity=18000
ro.ril.transmitpower=true
ro.config.hw_menu_unlockscreen=false
ro.ril.hep=1
persist.sys.use.dithering=1
ro.ril.hsxpa=3
ro.ril.gprsclass=12

#3D performance tweaks
persist.android.strictmode=0
ro.secure=0

#Performance and RAM
ro.min_pointer_dur=1
persist.sys.purgeable_assets=1
dalvik.vm.dexopt-flags=m=y,v=n,o=v,u=n
force_hw_ui=true

#Keep launcher in memory to improve user experience
ro.HOME_APP_ADJ=1

#set background app limit
ro.sys.fw.bg_apps_limit=25

#Memory Management
kernel.sched_latency_ns=4000000
kernel.sched_min_granularity_ns=800000
kernel.sched_wakeup_granularity_ns=8000000

#hardware UI tweaks
ro.hwui.disable_scissor_opt=false
ro.hwui.texture_cache_size=72
ro.hwui.layer_cache_size=48
ro.hwui.r_buffer_cache_size=8
ro.hwui.path_cache_size=4
ro.hwui.gradient_cache_size=1
ro.hwui.drop_shadow_cache_size=6
ro.hwui.texture_cache_flushrate=0.6
ro.hwui.text_small_cache_width=1024
ro.hwui.text_small_cache_height=1024
ro.hwui.text_large_cache_width=2048
ro.hwui.text_large_cache_height=1024
hwui.text_gamma_correction=lookup
hwui.text_gamma=1.4
hwui.text_gamma.black_threshold=64
hwui.text_gamma.white_threshold=192
hwui.use_gpu_pixel_buffer=true
hwui.render_dirty_regions=true
hwui.use.blacklist=true

#Battery saving tweaks
wifi.supplicant_scan_interval=500
power.saving.mode=1
ro.ril.disable.power.collapse=0
ro.config.hw_power_saving=1

#Better Download and Internet Speed
net.tcp.buffersize.default=6144,87380,110208,6144,16384,110208
net.tcp.buffersize.wifi=262144,524288,1048576,262144,524288,1048576
net.tcp.buffersize.lte=262144,524288,3145728,262144,524288,3145728
net.tcp.buffersize.hsdpa=6144,262144,1048576,6144,262144,1048576
net.tcp.buffersize.evdo_b=6144,262144,1048576,6144,262144,1048576
net.tcp.buffersize.umts=6144,87380,110208,6144,16384,110208
net.tcp.buffersize.hspa=6144,87380,262144,6144,16384,262144
net.tcp.buffersize.gprs=6144,8760,11680,6144,8760,11680
net.tcp.buffersize.edge=6144,26280,35040,6144,16384,35040

pm.sleep_mode=3

net.ppp0.dns1=8.8.4.4
net.ppp0.dns2=8.8.8.8
net.dns1=8.8.4.4
net.dns2=8.8.8.8

if you have installed BRAVIA Reality v4 comment/remove below line as they are not effective

#ro.media.dec.jpeg.memcap=8000000
#ro.media.enc.hprof.vid.bps=8000000
#ro.media.enc.hprof.vid.fps=65
#ro.media.enc.jpeg.quality=100
#ro.media.capture.flash=led
#ro.media.capture.flashMinV=3300000
#ro.media.capture.torchIntensity=40
#ro.media.capture.flashIntensity=70
#ro.media.capture.maxres=16m
#ro.media.capture.fast.fps=4
#ro.media.capture.slow.fps=120
#ro.camcorder.videoModes=true
#ro.media.cam.preview.fps=0

these parameters are related to battery and RAM managment

3. Using power of Marshmallows Doze feature
default Doze activates after 30 minutes of inactivity which is too long and could compromise alot of battery juice till it kicks off so why not to kick it off earlier? let's do it

Install Doze settings editor app
It can be found here
http://forum.xda-developers.com/android/apps-games/root-doze-settings-editor-android-t3235130

after installing latest version of app use the settings in my below screenshot



Parameter Descriptions

These are all direct from the Doze source code.

Inactive Timeout - inactive_to
This is the time, after becoming inactive, at which we start looking at the motion sensor to determine if the device is being left alone. We don't do this immediately after going inactive just because we don't want to be continually running the significant motion sensor whenever the screen is off.
Sensing Timeout - sensing_to
If we don't receive a callback from AnyMotion in this amount of time + locating_to, we will change from STATE_SENSING to STATE_INACTIVE, and any AnyMotion callbacks while not in STATE_SENSING will be ignored.
Locating Timeout - locating_to
This is how long we will wait to try to get a good location fix before going in to idle mode.
Location Accuracy - location_accuracy
The desired maximum accuracy (in meters) we consider the location to be good enough to go on to idle. We will be trying to get an accuracy fix at least this good or until locating_to expires.
Motion Inactive Timeout - motion_inactive_to
This is the time, after seeing motion, that we wait after becoming inactive from that until we start looking for motion again.
Idle After Inactive Timeout - idle_after_inactive_to
This is the time, after the inactive timeout elapses, that we will wait looking for significant motion until we truly consider the device to be idle.
Idle Pending Timeout - idle_pending_to
This is the initial time, after being idle, that we will allow ourself to be back in the IDLE_PENDING state allowing the system to run normally until we return to idle.
Max Idle Pending Timeout - max_idle_pending_to
Maximum pending idle timeout (time spent running) we will be allowed to use.
Idle Pending Factor - idle_pending_factor
Scaling factor to apply to current pending idle timeout each time we cycle through that state.
Idle Timeout - idle_to
This is the initial time that we want to sit in the idle state before waking up again to return to pending idle and allowing normal work to run.
Max Idle Timeout - max_idle_to
Maximum idle duration we will be allowed to use.
Idle Factor - idle_factor
Scaling factor to apply to current idle timeout each time we cycle through that state.
Min Time to Alarm - min_time_to_alarm
This is the minimum time we will allow until the next upcoming alarm for us to actually go in to idle mode.
Max Temp App Whitelist Duration - max_temp_app_whitelist_duration
Max amount of time to temporarily whitelist an app when it receives a high tickle.
MMS Temp App Whitelist Duration - mms_temp_app_whitelist_duration
Amount of time we would like to whitelist an app that is receiving an MMS.
SMS Temp App Whitelist Duration - sms_temp_app_whitelist_duration
Amount of time we would like to whitelist an app that is receiving an SMS.

4. Optionally
Install Greenify only to hibernate rarely used apps do not use Aggresive Doze in settings of greenify if you will use doze editor in step 3

If anyone has any tip then please contribute

After applying these settings clear the cache from recovery if you are on unlocked bootloader or setting > storage > cached data > press ok

5. Init Scripts (for rooted phone)

5.1 If your root is systemless download following zip extract it and put scripts in /su/su.d folder and you don't need to follow step 5.2
5.2 if your root is not systemless (most of chinese stable/developer ROM) goto http://forum.xda-developers.com/showpost.php?p=32716412&postcount=2 and download init-term (do not use uni-init apk as init-term is much more intelligent script and works absolutly fine while APK is very old built that is not compatible with latest android) and follow the instructions to enable init.d support and copy attached scripts in system/etc/init.d folder.

change permissions to 0755 (rwxr-xr-x)
finally restart your phone and check /data/Logs folder if it doesn't exist it means init is not working otherwise you will see some Log files that will be updated on each restart

initscript.zip (2.68 KB, Downloads: 164)
Screenshot_2016-12-07-18-15-17-586_com.miui.securitycenter.png
Screenshot_2016-12-07-20-11-38-792_com.miui.securitycenter.png
Screenshot_2016-12-07-21-43-15-120_com.miui.securitycenter.png
Screenshot_2016-12-08-10-55-24-450_com.isaacparker.dozesettingseditor.png
Screenshot_2016-12-08-10-55-09-500_com.miui.securitycenter.png
Screenshot_2016-12-08-10-54-26-246_com.miui.securitycenter.png

Note4-Modem.zip

11.82 MB, Downloads: 76, Download cost : Experience -1

Favorite46 Share

Rated by 3 people   Experience Reason  

akbarkar + 1 Great!
Nocturnalme + 1 Thanks!
1660097017 + 1 Great!

Experience +3  View Rating Log

Redmi Note 4 owners kindly confirm if you are facing same bugs as below to have smooth experience, Lets help developer rather then crying and spamming forum with duplicate and useless posts

http://en.miui.com/thread-461696-1-1.html

Diamond Member

Rank: 5Rank: 5

Credits
1682
Device
Redmi Note 4
MIUI Version
V8.0.3.0.MBFMIDG
Online time
284 Hours
Send PM

Mi VRXiaomi 7th AnniversarySuper ThursdayMIUI 2017Die-hard MIUI FanMr. DependableMi Lover Medal

21:43, Dec-07-2016 | From PC
|
This post was edited by greezer at 22:03, Dec-07-2016

This steps is all good for saving some battery juice. But I'm sure most of us here just want the 'standby drain' to be fixed.


Screenshot_2016-12-01-14-40-03-998_com.miui.securitycenter.png

Rated by 1 person   Experience Reason  

Malasuerte2 + 1 Agreed!

Experience +1  View Rating Log

Redmi Note 4 owners please go to these links and click confirm. Hopefully the devs will look into it ASAP.

http://en.miui.com/thread-423145-1-1.html
http://en.miui.com/thread-421488-1-2.html
http://en.miui.com/thread-419270-1-2.html

Diamond Member

Rank: 5Rank: 5

Credits
1221
Device
Redmi Note 4
MIUI Version
V8.2.1.0.MBFMIDL
Online time
62 Hours
Send PM

Yi Action CameraMi  BunnyMi HeadphonesMIUI 8MIUI Devices ContestMIUI 2016Fantastic!Redmi Note 4Fan Of MIUI BangladeshMerry ChristmasPokemon Master Medal1 Million Forum App Installs1500K Forum MembersI Love 2016Rooster Year of 2017Puzzle Master10 Million Forum Posts3 Million Forum MembersMIUI 2017Happy Valentine's DayHappy New YearMIUI Lucky FridayForum Contest LoverMi Lover MedalUpdates LoverStar Of TechnologyAndroid Guru

 Author| 01:42, Dec-08-2016 | From PC
|
greezer replied at 2016-12-7 21:43
This steps is all good for saving some battery juice. But I'm sure most of us here just want the 'st ...

iam testing something really interesting that will surely help all of us to deal with standby drain. My phone battery was draining over 60% for hardware after setting these and using greenify it reduced to +50%..
new tips which i will share later on reduced hardware usage to <40%
Redmi Note 4 owners kindly confirm if you are facing same bugs as below to have smooth experience, Lets help developer rather then crying and spamming forum with duplicate and useless posts

http://en.miui.com/thread-461696-1-1.html

Platinum Member

Rank: 4

Credits
3224
Device
0
MIUI Version
V8.2.1.0.MBFMIDL
Online time
113 Hours
Send PM

Mi VRMi Power Bank 10000MAH MIUI Devices ContestMIUI 2015Fantastic!MIUI 6Redmi Note 4Redmi Note1500K Forum MembersHilal Ramadan MIUI 6th AnniversaryMIUI World TourXiaomi 6th AnniversaryI Love 2016Xiaomi 5th AnniversaryMIUI 9MIUI 100 Million Users2100K Forum MembersMIUI 2017Fan Of MIUI BangladeshMIUI Fan from TurkeyRooster Year of 2017Fan Of MIUI IndiaMiPopI Love Mi BunnyMi Bunny Game Master Technology GuruMIUI FollowerAndroid GuruScroll Of WisdomDebate MasterMi Lover Medal

13:35, Dec-08-2016 | Via mobile
|
Seems good try in absence of rom update by lousy developers, Iam not satisfied with on screen time of redminote4 coz it drains very fast while using net or playing games,

Diamond Member

Rank: 5Rank: 5

Credits
1221
Device
Redmi Note 4
MIUI Version
V8.2.1.0.MBFMIDL
Online time
62 Hours
Send PM

Yi Action CameraMi  BunnyMi HeadphonesMIUI 8MIUI Devices ContestMIUI 2016Fantastic!Redmi Note 4Fan Of MIUI BangladeshMerry ChristmasPokemon Master Medal1 Million Forum App Installs1500K Forum MembersI Love 2016Rooster Year of 2017Puzzle Master10 Million Forum Posts3 Million Forum MembersMIUI 2017Happy Valentine's DayHappy New YearMIUI Lucky FridayForum Contest LoverMi Lover MedalUpdates LoverStar Of TechnologyAndroid Guru

 Author| 15:04, Dec-08-2016 | From PC
|
New Doze Settings
Screenshot_2016-12-08-10-55-24-450_com.isaacparker.dozesettingseditor.png
Battery Performance and status during normal usage

Screenshot_2016-12-08-10-54-26-246_com.miui.securitycenter.png

Screenshot_2016-12-08-10-55-09-500_com.miui.securitycenter.png

Screenshot_2016-12-08-11-02-29-596_com.uzumapps.wakelockdetector[1].png

Screenshot_2016-12-08-11-02-42-182_com.bvalosek.cpuspy.realgpp[1].png
Redmi Note 4 owners kindly confirm if you are facing same bugs as below to have smooth experience, Lets help developer rather then crying and spamming forum with duplicate and useless posts

http://en.miui.com/thread-461696-1-1.html

Diamond Member

Rank: 5Rank: 5

Credits
1682
Device
Redmi Note 4
MIUI Version
V8.0.3.0.MBFMIDG
Online time
284 Hours
Send PM

Mi VRXiaomi 7th AnniversarySuper ThursdayMIUI 2017Die-hard MIUI FanMr. DependableMi Lover Medal

19:53, Dec-08-2016 | From PC
|
memon.jameel replied at 2016-12-8 01:42
iam testing something really interesting that will surely help all of us to deal with standby drai ...

My earlier response was for section 1 of your solution.

Does the doze settings editor, delay Whatsapp messages?
Redmi Note 4 owners please go to these links and click confirm. Hopefully the devs will look into it ASAP.

http://en.miui.com/thread-423145-1-1.html
http://en.miui.com/thread-421488-1-2.html
http://en.miui.com/thread-419270-1-2.html

Diamond Member

Rank: 5Rank: 5

Credits
1221
Device
Redmi Note 4
MIUI Version
V8.2.1.0.MBFMIDL
Online time
62 Hours
Send PM

Yi Action CameraMi  BunnyMi HeadphonesMIUI 8MIUI Devices ContestMIUI 2016Fantastic!Redmi Note 4Fan Of MIUI BangladeshMerry ChristmasPokemon Master Medal1 Million Forum App Installs1500K Forum MembersI Love 2016Rooster Year of 2017Puzzle Master10 Million Forum Posts3 Million Forum MembersMIUI 2017Happy Valentine's DayHappy New YearMIUI Lucky FridayForum Contest LoverMi Lover MedalUpdates LoverStar Of TechnologyAndroid Guru

 Author| 19:56, Dec-08-2016 | From PC
|
greezer replied at 2016-12-8 19:53
My earlier response was for section 1 of your solution.

Does the doze settings editor, delay Wha ...

No it doesn't impact on whatsapp messages.. (My whatsapp is white listed in battery performance) anything that is white listed in battery performance will not be Dozed -- correct me if iam wrong.

Please share your experience after applying this
Redmi Note 4 owners kindly confirm if you are facing same bugs as below to have smooth experience, Lets help developer rather then crying and spamming forum with duplicate and useless posts

http://en.miui.com/thread-461696-1-1.html

Diamond Member

Rank: 5Rank: 5

Credits
1682
Device
Redmi Note 4
MIUI Version
V8.0.3.0.MBFMIDG
Online time
284 Hours
Send PM

Mi VRXiaomi 7th AnniversarySuper ThursdayMIUI 2017Die-hard MIUI FanMr. DependableMi Lover Medal

19:59, Dec-08-2016 | From PC
|
memon.jameel replied at 2016-12-8 19:56
No it doesn't impact on whatsapp messages.. (My whatsapp is white listed in battery performance) a ...

When you say white listed, it's 'no restrictions' in the MIUI battery app, correct?
Redmi Note 4 owners please go to these links and click confirm. Hopefully the devs will look into it ASAP.

http://en.miui.com/thread-423145-1-1.html
http://en.miui.com/thread-421488-1-2.html
http://en.miui.com/thread-419270-1-2.html

Diamond Member

Rank: 5Rank: 5

Credits
1221
Device
Redmi Note 4
MIUI Version
V8.2.1.0.MBFMIDL
Online time
62 Hours
Send PM

Yi Action CameraMi  BunnyMi HeadphonesMIUI 8MIUI Devices ContestMIUI 2016Fantastic!Redmi Note 4Fan Of MIUI BangladeshMerry ChristmasPokemon Master Medal1 Million Forum App Installs1500K Forum MembersI Love 2016Rooster Year of 2017Puzzle Master10 Million Forum Posts3 Million Forum MembersMIUI 2017Happy Valentine's DayHappy New YearMIUI Lucky FridayForum Contest LoverMi Lover MedalUpdates LoverStar Of TechnologyAndroid Guru

 Author| 20:03, Dec-08-2016 | From PC
|
greezer replied at 2016-12-8 19:59
When you say white listed, it's 'no restrictions' in the MIUI battery app, correct?

yes correct

Security > Battery > App battery saver > select app (Whatsapp) > no restriction
Redmi Note 4 owners kindly confirm if you are facing same bugs as below to have smooth experience, Lets help developer rather then crying and spamming forum with duplicate and useless posts

http://en.miui.com/thread-461696-1-1.html

Diamond Member

Rank: 5Rank: 5

Credits
1221
Device
Redmi Note 4
MIUI Version
V8.2.1.0.MBFMIDL
Online time
62 Hours
Send PM

Yi Action CameraMi  BunnyMi HeadphonesMIUI 8MIUI Devices ContestMIUI 2016Fantastic!Redmi Note 4Fan Of MIUI BangladeshMerry ChristmasPokemon Master Medal1 Million Forum App Installs1500K Forum MembersI Love 2016Rooster Year of 2017Puzzle Master10 Million Forum Posts3 Million Forum MembersMIUI 2017Happy Valentine's DayHappy New YearMIUI Lucky FridayForum Contest LoverMi Lover MedalUpdates LoverStar Of TechnologyAndroid Guru

 Author| 20:04, Dec-08-2016 | From PC
|
greezer replied at 2016-12-8 19:59
When you say white listed, it's 'no restrictions' in the MIUI battery app, correct?

Also clear the cache from recovery if you are on unlocked bootloader or setting > storage > cached data > ok
Redmi Note 4 owners kindly confirm if you are facing same bugs as below to have smooth experience, Lets help developer rather then crying and spamming forum with duplicate and useless posts

http://en.miui.com/thread-461696-1-1.html

Credits Management

Quick Reply Top Return to the list