GUIDE: fine-tuning performance and battery for your S7 or S7 Edge

Search This thread

psouza4

Inactive Recognized Developer
Feb 26, 2009
746
858
Meridian, ID
www.PeterSouza.com
This is a follow-up post to my GUIDE: ROOT, install XPOSED, and UNROOT/returning to stock a Verizon Galaxy S7

So you want even better performance and battery life than what I include in my flashable update package and in my deep debloat flashable update package? Not afraid to get your hands dirty with more hands-on config? Not afraid to fork over a few dollars to get the nice root apps we need to do so? Well okay then, let's dive in!

Disclaimer: You tweak your phone at your own risk, even if you follow my guide exactly. If something doesn't work right for you or you have problems, feel free to report it so I can modify my guide accordingly, but I'm not offering anyone specific support or help with any of this process. This is just what I do to make my phone that much more optimized.

lh0rsDp.png
4RyIB6u.png


Apps you'll need:

Android Google Play Store apps you'll need:
Amplify (including in-app pro activation)
ForceDoze (free)
Greenify (including pro package)
L Speed [ROOT] (free)
LeanDroid (including in-app pro activation)

Android Xposed modules you'll need:
Amplify (installed via Play Store app)
Greenify (installed via Play Store app)
(don't forget to activate Xposed modules after you've installed them, then reboot your phone)

Additionally, you'll need the Xposed framework installed and functional. Check my root guide under Recommended Next Steps if you need help with that.

You'll notice that I don't use any task managers (with the slight exception of Greenify, but it's going to be set up to deep-sleep apps, not kill them). You'll also notice I don't use any CPU tweaking apps -- the default settings from our carrier does really well and are persistently set by my flashable update package anyway.

Configuring Android

Note: all of the changes in this section will be in your device's main settings.

Note: on my Verizon Galaxy S7, I use the 'Global' preferred network node (under 'Mobile networks'). Others have recommended LTE/GSM/UMTS instead -- use whichever works best for your device.

Tap on Wireless and networks: More. Tap on Nearby device scanning and turn it off.

Tap on Phone: Display and wallpaper. Tap on Always on Display and turn it off. If the AODService [com.samsung.android.app.aodservice] package is uninstalled or frozen, it should already be off.

Tap on Personal: Location. Enable Location if it's turned off so that you can tap on Improve accuracy and turn both Wi-Fi scanning and Bluetooth scanning off. Turn Location back off if you like. I only enable Location when I need it. Still in the Location settings, tap at the bottom on Google Location History. Tap to turn off Location History.

Tap on System: Developer options (should already be enabled from the root section of my guide). Scroll to three options labeled "Window animation scale", "Transition animation scale", and "Animator duration scale". Set all three to "Animation off".

Configuring Amplify

Note: swipe from the left in this app to get a list of sections.

Settings

Show launcher icon: checked
Choose theme: inconsequential
Service Blocking: checked
Force English: inconsequential
Scroll Item Names: checked

Wakelocks

Note: find the item in the list and tap it to configure, then tap 'ON' under 'SETTINGS' to enable controlling the wakelock, then tap the field immediately under this to configure the throttle for the wakelock.

LocationManagerService: 10 seconds
Icing: 30 seconds
GCoreFlp: 60 seconds
NlpWakeLock: 60 seconds
NetworkStats: 60 seconds
SyncLoopWakeLock: 300 seconds
AudioIn: 240 seconds
NlpCollectorWakeLock: 60 seconds
Wakeful StateMachine: GeofencerStateMachine: 10 seconds
GpsLocationProvider: 1 second
ContextManagerWakeLock: 5 seconds
UlrDispSvcFastWL: 9999999 seconds
RILJ0: 60 seconds
ImsService: 15 seconds

Alarms

Note: find the item in the list and tap it to configure, then tap 'ON' under 'SETTINGS' to enable controlling the alarm, then tap the field immediately under this to configure the throttle for the alarm.

com.android.internal.telephony.data-stall: 60 seconds
com.google.android.gms/.lockbox.LockboxAlarmReceiver: 60 seconds
com.levelup.beautifulwidgets.core.ACTION_REFRESHTIME: 120 seconds throttles the Beautiful Widgets widget refresh time
com.google.android.gms.location.fused.SEND_LOCATION_IN_SMD_MODE: 5 seconds

Services

Note: services can either be enabled or disabled entirely, not throttled.

com.google.android/gms/com.google.android.location.reporting.service.DispatchingService: Deny
com.google.android.gms/com.google.android.location.internal.PendingIntentCallbackService: Deny

Configuring ForceDoze

Enable the ForceDoze service.

Settings:
Don't disable sensors on screen off: unchecked
Turn off while charging: unchecked
Auto-rotate/brightness fix: unchecked
Show persistent notification: checked (your preference may vary)
Ignore lockscreen timeout: checked
Whitelist apps: (none)
Disable WiFi during Doze: unchecked
Disable mobile data during Doze: unchecked
Disable motion sensing for Doze: unchecked
Doze delay: 0
(disabled) Enable Doze on unsupported device: unchecked
Disable motion sensing for Doze (root): unchecked

Configuring Greenify

Note: most of the performance savings will come from this app.

Working Mode: Boost if you don't see this option, check Xposed Installer and enable the Greenify module, then reboot -- if the Greenify module isn't there, install it from the Xposed Installer first
Shallow Hibernation (experimental): enabled
Aggressive Doze (experimental): enabled
Xposed-based Features -> Wakeup Timer Coalescing (4.4+): checked
Xposed-based Features -> Telephony Wakeup: checked
Xposed-based Features -> Don't Remove Notifications: checked
Xposed-based Features -> Block App State Abuse: checked
Xposed-based Features -> Deep Hibernation (alpha): unchecked
Xposed-based Features -> GCM push for greenified apps: checked
Xposed-based Features -> Greenifying system apps: unchecked
Xposed-based Features -> Reveal Hidden Sync: unchecked

Now you'll need to add apps you want to Greenify. From the main Greenify menu, click the [+] button at the top of the app. Scroll down and click "Show more apps". I would select almost all apps except the ones that need to automate or update the UI such as widgets, Xposed modules, print services, dialer/phone, alarm clocks, widgets, etc. Some SMS or chat apps may also need to be skipped, but I personally have Hangouts, Facebook, etc. Greenified and I still get instant notifications for new messages and e-mails just fine. Your experience may vary, so spend some time experimenting with what apps you do and don't like put into hibernation when not in direct use.

Configuring L Speed

Note: some options are preferential and should be researched accordingly if you plan on changing them or are curious what they do. For my phone, I've chosen anything that boosts performance for 'free' (no or very negligible battery cost).

L Speed requires the sqlite binaries to be installed to change some settings. I used Sqlite installer for root, which worked fine. BusyBox does not include this binary.

First, go to Menu -> Settings and enable "Use Advanced UI". This will restart the app with a different interface.

From here forward, you can swipe from the left (or use the menu in the upper left) to access different sections.

Settings:
Use Advanced UI: enabled
Dark theme: disabled (preferential)
Color navigation bar: disabled (preferential)
Force English: disabled (preferential)
Show toggle toast: enabled (preferential)
Use Fahrenheit (°F): disabled (preferential)
Apply on boot delay: 5sec
Show boot notification: enabled (preferential)

Main Tweaks:
Kernel Modification -> Kernel Tweaks: Disabled
Kernel Modification -> Kernel sleepers optimization: enabled
System Tweaks -> Battery improvement: enabled
System Tweaks -> Faster boot: enabled
System Tweaks -> WiFi sleeper: disabled
System Tweaks -> Flag tuner: enabled
System Tweaks -> Assertive display: enabled (preferential)
System Tweaks -> Improve scrolling: enabled
System Tweaks -> Liquid smooth UI: enabled (preferential)
Debugging Options -> Disable debugging: enabled (this is unrelated to USB debugging)
Debugging Options -> Disable kernel panic: disabled
Other Tweaks -> Better in call audio: enabled (does not conflict with ViPRE4Android)
Other Tweaks -> Improve image quality: enabled

CPU Tuner:
CPU Tuning -> CPU Optimizer: enabled (does not conflict with my CPU fixes startup script)

LNET Optimizer:
LNET Tweaks -> NET Buffers: Default
LNET Tweaks -> RIL tweaks: disabled
LNET Optimizations -> Google DNS: disabled (preferential)
LNET Optimizations -> Faster streaming: enabled
LNET Optimizations -> Fast dormancy: enabled

IO Tweaks
Storage IO Tweaks -> SD tweak: Light
Storage IO Tweaks -> IO Boost: enabled
Storage IO Tweaks -> IO Extended Queue: disabled
Storage IO Tweaks -> Partition remount: enabled (preferential: gives more permissions to the SD card)

Virtual Memory
Memory Management Tweaks -> OOM Killer: Enabled
Memory Management Tweaks -> Cache Reclaiming: Minimum
Memory Management Tweaks -> Cache Allocation: Medium

RAM Manager
RAM Manager Options -> Ram Manager: Balanced

Seeder
Seeder Options -> Default

Cleaner
Cleaner Options -> Run cleaner on boot: disabled (preferential)

FStrim
FStrim Options -> Run fstrim on boot: disabled (preferential)

Configuring LeanDroid

Note: I only use LeanDroid's features to compliment Do Not Disturb (aka "Blocking Mode") during specific hours. Tasker or other automated programs could do this, but that's a more in-depth guide. Additionally, this setup will add a persistent notification that you can use to pause/unpause LeanDroid or jump to its settings. That notification can be disabled by going into the app, clicking the [...] menu in the top right, and choosing "Hide notification". I like having it there to know it's on and to pause/unpause it if I'm not using Do Not Disturb for some reason.

LeanDroid master on/off switch: enabled
Disable... -> Wi-Fi: checked
Disable... -> Cellular data -- leave it unchecked if you want the phone to be cut off from all data during Do Not Disturb hours / check it if you want it to be blocked
Disable... -> Cellular radio: unchecked
Disable... -> Bluetooth: checked -- unless you feel that Bluetooth connectivity is important during Do Not Disturb hours
Disable... -> Network location: checked -- unless you feel that location availability is important during Do Not Disturb hours
Disable... -> GPS location: checked -- unless you feel that GPS availability is important during Do Not Disturb hours
Switch... -> Cellular network mode to [varies]: unchecked -- you could check this and enable 2G or 3G if you are allowing Do Not Disturb hours to have access to cellular data, but want to restrict it to lower speeds (uses less battery than LTE/4G)
Switch... -> [varies] after screen off [except] -- multiple options here, set it to '5 MIN' after screen off and click 'EXCEPT ->'
EXCEPT-> Except [varies]-[varies] -- time range, I have mine set from 7:00 AM to 11:30 PM because at 11:30 PM is when my Do Not Disturb is enabled on my phone (until 7:00 AM the next day), adjust yours as necessary
EXCEPT-> remaining options: unchecked -- set as desired, but I have them all off
Restore... -> After screen on: selected
Restore... -> After screen unlocked: unselected
Restore... -> Every [varies] after screen off: unchecked -- configure if you want data enabled in short bursts during Do Not Disturb hours
Restore... -> Data after waiting [varies] for Wi-Fi to connect: unchecked

Use these settings in tandem with Samsung's built-in Do Not Disturb on a schedule. Your phone won't hardly touch any battery overnight if left off the charger (unless you're in a really horrible reception area and/or roaming or something -- cellular radio is still active for phone calls).

For example, I charged my phone to full and then unplugged it overnight while I slept. Here's how battery usage looks in the morning:

b3GhM4R.png


The radio antenna is left on, so calls, texts, and MMS can come through (but may be silenced depending on your Do Not Disturb settings), but data is strictly prohibited so if you need e-mail or chat alerts, etc., you would want to enable data every X minutes for X minutes. This will increase battery usage slightly, but not by much.

Enjoy!

 
Last edited:

psouza4

Inactive Recognized Developer
Feb 26, 2009
746
858
Meridian, ID
www.PeterSouza.com

cuezaireekaa

Senior Member
Apr 26, 2010
3,612
2,844
glacier bay
www.last.fm
Good to know. Haven't installed Xposed yet. I was trying to get some battery life and performance baselines before I get that far.
You're gonna be able to tweak your battery best once you have xposed installed. The two main battery saving apps, greenify, and amplify rely heavily on xposed. Painless process, but if you don't feel comfortable, re read things and go slowly because there is gonna be maintenance when tweaking this hard. ;P
Have fun, and keep full stock firmware for your specific device handy on your PC just in case bootloops
 
Last edited:

SanguiniusWept

Senior Member
Mar 19, 2013
54
18
Lincoln, Nebraska
You're gonna be able to tweak your battery best once you have xposed installed. The two main battery saving apps, greenify, and amplify rely heavily on xposed. Painless process, but if you don't feel comfortable, re read things and go slowly because there is gonna be maintenance when tweaking this hard. ;P
Have fun, and keep full stock firmware for your specific device handy on your PC just in case bootloops

It's not at all a case of wariness. I've used Xposed for years, first on a Droid Bionic and then on my S5. I have every intention of putting Xposed on my S7, but I'm taking it slow so I can basically have a bit of a "changelog" on my phone. I'll probably put it on in a few days, after I know everything I need to know about my current performance profiles. Thanks for the concern and the info :)
 

psouza4

Inactive Recognized Developer
Feb 26, 2009
746
858
Meridian, ID
www.PeterSouza.com
Any idea of performance gain and battery gain?
Here's a sample video I recorded on my phone (720p @ 30fps)... even recording didn't slow it down, so this video is a fairly decent preview of the kind of performance/responsiveness I'm getting. I took the video for a friend and didn't edit it so it's kind of all over the place as far as personal data and random clicking but you'll get the idea.

As far as battery goes, the thing doesn't use hardly any battery if I'm not touching it. On standby, it could go days. Since I've been developing and testing stuff (and it's my daily phone), it never gets to sit that long, but for example it uses about 1% battery overnight while I sleep and probably 1-2% battery per hour during non-blocking/LeanDroid hours.


(keep the laughter of my cheesy game selection to a minimum, bwahaha)

 

downhillvinnie

Senior Member
May 22, 2013
411
47
60
San Jose
www.facebook.com
Here's a sample video I recorded on my phone (720p @ 30fps)... even recording didn't slow it down, so this video is a fairly decent preview of the kind of performance/responsiveness I'm getting. I took the video for a friend and didn't edit it so it's kind of all over the place as far as personal data and random clicking but you'll get the idea.

As far as battery goes, the thing doesn't use hardly any battery if I'm not touching it. On standby, it could go days. Since I've been developing and testing stuff (and it's my daily phone), it never gets to sit that long, but for example it uses about 1% battery overnight while I sleep and probably 1-2% battery per hour during non-blocking/LeanDroid hours.


(keep the laughter of my cheesy game selection to a minimum, bwahaha)

8ab496aa31ad28fdeea37d754fb03431.jpg


Sent from my SM-G930V using XDA-Developers mobile app

---------- Post added at 05:08 PM ---------- Previous post was at 05:07 PM ----------

Stock i thought was retty good

Sent from my SM-G930V using XDA-Developers mobile app
 

pbaird

Senior Member
Mar 9, 2009
50
3
When I try to donate to get the pro features in Amplify, the Play Store unexpectedly quits. After reviewing your rooting guide, the one thing I missed (or noticed I missed...) was to enable su at boot, which I have now done and rebooted. I'm on S7 regular, and used your fix+debloat.

Update: I am trying to bill my Verizon account, I'm betting the debloat disabled the Verizon checking...
nope... using a credit card crashes too
 
Last edited:

kansaswaldo

Member
Apr 2, 2015
11
0
Kansas City
When I try to donate to get the pro features in Amplify, the Play Store unexpectedly quits. After reviewing your rooting guide, the one thing I missed (or noticed I missed...) was to enable su at boot, which I have now done and rebooted. I'm on S7 regular, and used your fix+debloat.

Update: I am trying to bill my Verizon account, I'm betting the debloat disabled the Verizon checking...
nope... using a credit card crashes too

I'm also getting a FC when attempting to donate for the pro features in Amplify.

Edited to add: I also tested LeanDroid's in-app purchase and got the same result. I'm wondering if something with the de-bloat removed a service component?
 
Last edited:

psouza4

Inactive Recognized Developer
Feb 26, 2009
746
858
Meridian, ID
www.PeterSouza.com
When I try to donate to get the pro features in Amplify, the Play Store unexpectedly quits. After reviewing your rooting guide, the one thing I missed (or noticed I missed...) was to enable su at boot, which I have now done and rebooted. I'm on S7 regular, and used your fix+debloat.

Update: I am trying to bill my Verizon account, I'm betting the debloat disabled the Verizon checking...
nope... using a credit card crashes too
I'm also getting a FC when attempting to donate for the pro features in Amplify.

Edited to add: I also tested LeanDroid's in-app purchase and got the same result. I'm wondering if something with the de-bloat removed a service component?
Potentially... what does logcat say?
 

pbaird

Senior Member
Mar 9, 2009
50
3
Best way to view and save logcat? I just tried alogcat, but I'm seeing much.
Update - downloaded logcat extreme, lets you do app specific. I'm attaching google play store results.
 

Attachments

  • Log_2016-07-14_11-22-05.txt
    12.1 KB · Views: 36
Last edited:

kansaswaldo

Member
Apr 2, 2015
11
0
Kansas City
What about the force close exception details?

Is this helpful? I also included the entire log as an attachment.

(22728): Shutting down VM
07-14 10:20:12.529 E/AndroidRuntime(22728): FATAL EXCEPTION: main
07-14 10:20:12.529 E/AndroidRuntime(22728): Process: com.ryansteckler.nlpunbounce, PID: 22728
07-14 10:20:12.529 E/AndroidRuntime(22728): java.lang.NullPointerException: Attempt to invoke interface method 'android.os.Bundle com.android.vending.billing.IInAppBillingService.getBuyIntent(int, java.lang.String, java.lang.String, java.lang.String, java.lang.String)' on a null object reference
07-14 10:20:12.529 E/AndroidRuntime(22728): at com.ryansteckler.inappbilling.IabHelper.launchPurchaseFlow(IabHelper.java:394)
07-14 10:20:12.529 E/AndroidRuntime(22728): at com.ryansteckler.inappbilling.IabHelper.launchPurchaseFlow(IabHelper.java:346)
07-14 10:20:12.529 E/AndroidRuntime(22728): at com.ryansteckler.nlpunbounce.HomeFragment$5.onClick(HomeFragment.java:532)
07-14 10:20:12.529 E/AndroidRuntime(22728): at android.view.View.performClick(View.java:5697)
07-14 10:20:12.529 E/AndroidRuntime(22728): at android.view.View$PerformClick.run(View.java:22526)
07-14 10:20:12.529 E/AndroidRuntime(22728): at android.os.Handler.handleCallback(Handler.java:739)
07-14 10:20:12.529 E/AndroidRuntime(22728): at android.os.Handler.dispatchMessage(Handler.java:95)
07-14 10:20:12.529 E/AndroidRuntime(22728): at android.os.Looper.loop(Looper.java:158)
07-14 10:20:12.529 E/AndroidRuntime(22728): at android.app.ActivityThread.main(ActivityThread.java:7224)
07-14 10:20:12.529 E/AndroidRuntime(22728): at java.lang.reflect.Method.invoke(Native Method)
07-14 10:20:12.529 E/AndroidRuntime(22728): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
07-14 10:20:12.529 E/AndroidRuntime(22728): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
07-14 10:20:12.529 E/AndroidRuntime(22728): at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:133)
07-14 10:20:12.529 I/PersonaManager(1419): mKnoxInfo is empty
07-14 10:20:12.529 W/ActivityManager(1419): Force finishing activity com.ryansteckler.nlpunbounce/.MaterialSettingsActivity
07-14 10:20:12.529 W/VirtualScreenManagerService(1419): failed to move task TaskRecord{50e1bc9 #2078 A=com.ryansteckler.nlpunbounce U=0 sz=1}
07-14 10:20:12.529 W/VirtualScreenManagerService(1419): moveTaskBackToDisplayIfNeeded(): top activity or app is null
07-14 10:20:12.529 D/FocusedStackFrame(1419): Set to : 0
07-14 10:20:12.539 D/InputDispatcher(1419): Focused application set to: xxxx
07-14 10:20:12.539 D/InputDispatcher(1419): Focus left window: 22728
07-14 10:20:12.539 D/PointerIcon(1419): setMouseIconStyle1 pointerType: 1001 iconType:101 flag:0 pid:1419 uid:1000
07-14 10:20:12.539 D/PointerIcon(1419): setMouseCustomIcon IconType is same.101
07-14 10:20:12.559 E/android.os.Debug(1419): ro.product_ship = true
07-14 10:20:12.559 E/android.os.Debug(1419): ro.debug_level = 0x4f4c
07-14 10:20:12.559 E/android.os.Debug(1419): sys.mobilecare.preload = false
07-14 10:20:12.579 D/ViewRootImpl(1419): #1 mView = com.android.internal.policy.PhoneWindow$DecorView{4c65b90 V.E...... R.....I. 0,0-0,0}
07-14 10:20:12.579 D/ISSUE_DEBUG(1419): InputChannelName : d6c448e Application Error: com.ryansteckler.nlpunbounce
07-14 10:20:12.579 D/InputDispatcher(1419): Focus entered window: 1419
07-14 10:20:12.579 D/PointerIcon(1419): setMouseIconStyle1 pointerType: 1001 iconType:101 flag:0 pid:1419 uid:1000
07-14 10:20:12.579 D/PointerIcon(1419): setMouseCustomIcon IconType is same.101
07-14 10:20:12.579 V/BroadcastQueue(1419): [background] Process cur broadcast BroadcastRecord{7d0a4af u0 android.intent.action.DROPBOX_ENTRY_ADDED qIdx=4}, state= (APP_RECEIVE) DELIVERED for app ProcessRecord{57cba1b 2671:com.google.android.gms/u0a18}
07-14 10:20:12.589 D/NetworkPolicy(1419): isUidForegroundLocked: 10259, mScreenOn: true, uidstate: 2, mProxSensorScreenOff: false
07-14 10:20:12.589 I/PersonaManager(1419): mKnoxInfo is empty
07-14 10:20:12.599 I/SurfaceFlinger(651): id=476 createSurf (193x193),1 flag=4, olpunbounce
07-14 10:20:12.619 D/libEGL (1419): eglInitialize EGLDisplay = 0x7f836e1188
07-14 10:20:12.619 I/OpenGLRenderer(1419): Initialized EGL, version 1.4
07-14 10:20:12.629 D/StatusBarManagerService(1419): manageDisableList userId=0 what=0x0 pkg=Window{d6c448e u0 d0 Application Error: com.ryansteckler.nlpunbounce}
07-14 10:20:12.639 W/DisplayListCanvas(1419): DisplayListCanvas is started on unbinded RenderNode (without mOwningView)
07-14 10:20:12.649 I/PersonaManager(1419): mKnoxInfo is empty
07-14 10:20:12.669 V/WindowStateAnimator(1419): Finishing drawing window Window{d6c448e u0 d0 Application Error: com.ryansteckler.nlpunbounce}: mDrawState=DRAW_PENDING
07-14 10:20:12.669 D/ViewRootImpl(1419): MSG_RESIZED_REPORT: ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1
07-14 10:20:12.679 D/libEGL (651): eglInitialize EGLDisplay = 0x7fea4a22d8
07-14 10:20:12.679 V/WindowStateAnimator(1419): Finishing drawing window Window{d6c448e u0 d0 Application Error: com.ryansteckler.nlpunbounce}: mDrawState=HAS_DRAWN
07-14 10:20:12.689 V/AlarmManager(1419): Expired Alarm result :8
07-14 10:20:12.689 D/libEGL (651): eglInitialize EGLDisplay = 0x7fea4a22d8
07-14 10:20:12.699 I/PersonaManager(1419): mKnoxInfo is empty
07-14 10:20:12.719 V/BroadcastQueue(1419): [background]
 

Attachments

  • logcat.zip
    153.5 KB · Views: 28
Last edited:

pbaird

Senior Member
Mar 9, 2009
50
3
I just did a cleaner log capture, I think. This includes all apps/system, but only for the timeperiod in which I produced the error.
 

Attachments

  • Log_2016-07-14_11-32-59.txt
    66.7 KB · Views: 31

Top Liked Posts

  • There are no posts matching your filters.
  • 34
    This is a follow-up post to my GUIDE: ROOT, install XPOSED, and UNROOT/returning to stock a Verizon Galaxy S7

    So you want even better performance and battery life than what I include in my flashable update package and in my deep debloat flashable update package? Not afraid to get your hands dirty with more hands-on config? Not afraid to fork over a few dollars to get the nice root apps we need to do so? Well okay then, let's dive in!

    Disclaimer: You tweak your phone at your own risk, even if you follow my guide exactly. If something doesn't work right for you or you have problems, feel free to report it so I can modify my guide accordingly, but I'm not offering anyone specific support or help with any of this process. This is just what I do to make my phone that much more optimized.

    lh0rsDp.png
    4RyIB6u.png


    Apps you'll need:

    Android Google Play Store apps you'll need:
    Amplify (including in-app pro activation)
    ForceDoze (free)
    Greenify (including pro package)
    L Speed [ROOT] (free)
    LeanDroid (including in-app pro activation)

    Android Xposed modules you'll need:
    Amplify (installed via Play Store app)
    Greenify (installed via Play Store app)
    (don't forget to activate Xposed modules after you've installed them, then reboot your phone)

    Additionally, you'll need the Xposed framework installed and functional. Check my root guide under Recommended Next Steps if you need help with that.

    You'll notice that I don't use any task managers (with the slight exception of Greenify, but it's going to be set up to deep-sleep apps, not kill them). You'll also notice I don't use any CPU tweaking apps -- the default settings from our carrier does really well and are persistently set by my flashable update package anyway.

    Configuring Android

    Note: all of the changes in this section will be in your device's main settings.

    Note: on my Verizon Galaxy S7, I use the 'Global' preferred network node (under 'Mobile networks'). Others have recommended LTE/GSM/UMTS instead -- use whichever works best for your device.

    Tap on Wireless and networks: More. Tap on Nearby device scanning and turn it off.

    Tap on Phone: Display and wallpaper. Tap on Always on Display and turn it off. If the AODService [com.samsung.android.app.aodservice] package is uninstalled or frozen, it should already be off.

    Tap on Personal: Location. Enable Location if it's turned off so that you can tap on Improve accuracy and turn both Wi-Fi scanning and Bluetooth scanning off. Turn Location back off if you like. I only enable Location when I need it. Still in the Location settings, tap at the bottom on Google Location History. Tap to turn off Location History.

    Tap on System: Developer options (should already be enabled from the root section of my guide). Scroll to three options labeled "Window animation scale", "Transition animation scale", and "Animator duration scale". Set all three to "Animation off".

    Configuring Amplify

    Note: swipe from the left in this app to get a list of sections.

    Settings

    Show launcher icon: checked
    Choose theme: inconsequential
    Service Blocking: checked
    Force English: inconsequential
    Scroll Item Names: checked

    Wakelocks

    Note: find the item in the list and tap it to configure, then tap 'ON' under 'SETTINGS' to enable controlling the wakelock, then tap the field immediately under this to configure the throttle for the wakelock.

    LocationManagerService: 10 seconds
    Icing: 30 seconds
    GCoreFlp: 60 seconds
    NlpWakeLock: 60 seconds
    NetworkStats: 60 seconds
    SyncLoopWakeLock: 300 seconds
    AudioIn: 240 seconds
    NlpCollectorWakeLock: 60 seconds
    Wakeful StateMachine: GeofencerStateMachine: 10 seconds
    GpsLocationProvider: 1 second
    ContextManagerWakeLock: 5 seconds
    UlrDispSvcFastWL: 9999999 seconds
    RILJ0: 60 seconds
    ImsService: 15 seconds

    Alarms

    Note: find the item in the list and tap it to configure, then tap 'ON' under 'SETTINGS' to enable controlling the alarm, then tap the field immediately under this to configure the throttle for the alarm.

    com.android.internal.telephony.data-stall: 60 seconds
    com.google.android.gms/.lockbox.LockboxAlarmReceiver: 60 seconds
    com.levelup.beautifulwidgets.core.ACTION_REFRESHTIME: 120 seconds throttles the Beautiful Widgets widget refresh time
    com.google.android.gms.location.fused.SEND_LOCATION_IN_SMD_MODE: 5 seconds

    Services

    Note: services can either be enabled or disabled entirely, not throttled.

    com.google.android/gms/com.google.android.location.reporting.service.DispatchingService: Deny
    com.google.android.gms/com.google.android.location.internal.PendingIntentCallbackService: Deny

    Configuring ForceDoze

    Enable the ForceDoze service.

    Settings:
    Don't disable sensors on screen off: unchecked
    Turn off while charging: unchecked
    Auto-rotate/brightness fix: unchecked
    Show persistent notification: checked (your preference may vary)
    Ignore lockscreen timeout: checked
    Whitelist apps: (none)
    Disable WiFi during Doze: unchecked
    Disable mobile data during Doze: unchecked
    Disable motion sensing for Doze: unchecked
    Doze delay: 0
    (disabled) Enable Doze on unsupported device: unchecked
    Disable motion sensing for Doze (root): unchecked

    Configuring Greenify

    Note: most of the performance savings will come from this app.

    Working Mode: Boost if you don't see this option, check Xposed Installer and enable the Greenify module, then reboot -- if the Greenify module isn't there, install it from the Xposed Installer first
    Shallow Hibernation (experimental): enabled
    Aggressive Doze (experimental): enabled
    Xposed-based Features -> Wakeup Timer Coalescing (4.4+): checked
    Xposed-based Features -> Telephony Wakeup: checked
    Xposed-based Features -> Don't Remove Notifications: checked
    Xposed-based Features -> Block App State Abuse: checked
    Xposed-based Features -> Deep Hibernation (alpha): unchecked
    Xposed-based Features -> GCM push for greenified apps: checked
    Xposed-based Features -> Greenifying system apps: unchecked
    Xposed-based Features -> Reveal Hidden Sync: unchecked

    Now you'll need to add apps you want to Greenify. From the main Greenify menu, click the [+] button at the top of the app. Scroll down and click "Show more apps". I would select almost all apps except the ones that need to automate or update the UI such as widgets, Xposed modules, print services, dialer/phone, alarm clocks, widgets, etc. Some SMS or chat apps may also need to be skipped, but I personally have Hangouts, Facebook, etc. Greenified and I still get instant notifications for new messages and e-mails just fine. Your experience may vary, so spend some time experimenting with what apps you do and don't like put into hibernation when not in direct use.

    Configuring L Speed

    Note: some options are preferential and should be researched accordingly if you plan on changing them or are curious what they do. For my phone, I've chosen anything that boosts performance for 'free' (no or very negligible battery cost).

    L Speed requires the sqlite binaries to be installed to change some settings. I used Sqlite installer for root, which worked fine. BusyBox does not include this binary.

    First, go to Menu -> Settings and enable "Use Advanced UI". This will restart the app with a different interface.

    From here forward, you can swipe from the left (or use the menu in the upper left) to access different sections.

    Settings:
    Use Advanced UI: enabled
    Dark theme: disabled (preferential)
    Color navigation bar: disabled (preferential)
    Force English: disabled (preferential)
    Show toggle toast: enabled (preferential)
    Use Fahrenheit (°F): disabled (preferential)
    Apply on boot delay: 5sec
    Show boot notification: enabled (preferential)

    Main Tweaks:
    Kernel Modification -> Kernel Tweaks: Disabled
    Kernel Modification -> Kernel sleepers optimization: enabled
    System Tweaks -> Battery improvement: enabled
    System Tweaks -> Faster boot: enabled
    System Tweaks -> WiFi sleeper: disabled
    System Tweaks -> Flag tuner: enabled
    System Tweaks -> Assertive display: enabled (preferential)
    System Tweaks -> Improve scrolling: enabled
    System Tweaks -> Liquid smooth UI: enabled (preferential)
    Debugging Options -> Disable debugging: enabled (this is unrelated to USB debugging)
    Debugging Options -> Disable kernel panic: disabled
    Other Tweaks -> Better in call audio: enabled (does not conflict with ViPRE4Android)
    Other Tweaks -> Improve image quality: enabled

    CPU Tuner:
    CPU Tuning -> CPU Optimizer: enabled (does not conflict with my CPU fixes startup script)

    LNET Optimizer:
    LNET Tweaks -> NET Buffers: Default
    LNET Tweaks -> RIL tweaks: disabled
    LNET Optimizations -> Google DNS: disabled (preferential)
    LNET Optimizations -> Faster streaming: enabled
    LNET Optimizations -> Fast dormancy: enabled

    IO Tweaks
    Storage IO Tweaks -> SD tweak: Light
    Storage IO Tweaks -> IO Boost: enabled
    Storage IO Tweaks -> IO Extended Queue: disabled
    Storage IO Tweaks -> Partition remount: enabled (preferential: gives more permissions to the SD card)

    Virtual Memory
    Memory Management Tweaks -> OOM Killer: Enabled
    Memory Management Tweaks -> Cache Reclaiming: Minimum
    Memory Management Tweaks -> Cache Allocation: Medium

    RAM Manager
    RAM Manager Options -> Ram Manager: Balanced

    Seeder
    Seeder Options -> Default

    Cleaner
    Cleaner Options -> Run cleaner on boot: disabled (preferential)

    FStrim
    FStrim Options -> Run fstrim on boot: disabled (preferential)

    Configuring LeanDroid

    Note: I only use LeanDroid's features to compliment Do Not Disturb (aka "Blocking Mode") during specific hours. Tasker or other automated programs could do this, but that's a more in-depth guide. Additionally, this setup will add a persistent notification that you can use to pause/unpause LeanDroid or jump to its settings. That notification can be disabled by going into the app, clicking the [...] menu in the top right, and choosing "Hide notification". I like having it there to know it's on and to pause/unpause it if I'm not using Do Not Disturb for some reason.

    LeanDroid master on/off switch: enabled
    Disable... -> Wi-Fi: checked
    Disable... -> Cellular data -- leave it unchecked if you want the phone to be cut off from all data during Do Not Disturb hours / check it if you want it to be blocked
    Disable... -> Cellular radio: unchecked
    Disable... -> Bluetooth: checked -- unless you feel that Bluetooth connectivity is important during Do Not Disturb hours
    Disable... -> Network location: checked -- unless you feel that location availability is important during Do Not Disturb hours
    Disable... -> GPS location: checked -- unless you feel that GPS availability is important during Do Not Disturb hours
    Switch... -> Cellular network mode to [varies]: unchecked -- you could check this and enable 2G or 3G if you are allowing Do Not Disturb hours to have access to cellular data, but want to restrict it to lower speeds (uses less battery than LTE/4G)
    Switch... -> [varies] after screen off [except] -- multiple options here, set it to '5 MIN' after screen off and click 'EXCEPT ->'
    EXCEPT-> Except [varies]-[varies] -- time range, I have mine set from 7:00 AM to 11:30 PM because at 11:30 PM is when my Do Not Disturb is enabled on my phone (until 7:00 AM the next day), adjust yours as necessary
    EXCEPT-> remaining options: unchecked -- set as desired, but I have them all off
    Restore... -> After screen on: selected
    Restore... -> After screen unlocked: unselected
    Restore... -> Every [varies] after screen off: unchecked -- configure if you want data enabled in short bursts during Do Not Disturb hours
    Restore... -> Data after waiting [varies] for Wi-Fi to connect: unchecked

    Use these settings in tandem with Samsung's built-in Do Not Disturb on a schedule. Your phone won't hardly touch any battery overnight if left off the charger (unless you're in a really horrible reception area and/or roaming or something -- cellular radio is still active for phone calls).

    For example, I charged my phone to full and then unplugged it overnight while I slept. Here's how battery usage looks in the morning:

    b3GhM4R.png


    The radio antenna is left on, so calls, texts, and MMS can come through (but may be silenced depending on your Do Not Disturb settings), but data is strictly prohibited so if you need e-mail or chat alerts, etc., you would want to enable data every X minutes for X minutes. This will increase battery usage slightly, but not by much.

    Enjoy!

    3
    Thanks for your hard work on this. I've done everything except lean droid and it does appear that the battery life is much improved. One observation regarding sqlite and 'L Speed'. I used the installer you mentioned and then went to double-check that the binary was installed. It was, however it was set 600 permissions. I changed it to 755 and it complained about PIE extensions. Are you sure your install of sqlite binary is working / that it is actually necessary for these tweaks? Maybe the installer pulled the wrong one for me? There were no options just an install button.

    Code:
    root@heroqltevzw:/ # sqlite3
    /system/bin/sh: sqlite3: can't execute: Permission denied
    root@heroqltevzw:/ # ls -l /system/xbin/sqlite3
    -rw------- root     root       868952 2016-07-23 14:17 sqlite3
    root@heroqltevzw:/ # mount -o remount,rw /system
    root@heroqltevzw:/ # chmod 755 /system/xbin/sqlite3
    root@heroqltevzw:/ # mount -o remount,ro /system
    root@heroqltevzw:/ # /system/xbin/sqlite3
    error: only position independent executables (PIE) are supported.
    root@heroqltevzw:/ #
    Check the L.Speed log from the menu -- I believe it was the misc. tweaks that fails because of missing sqlite binaries. Once installed, the operation completes successfully without error anymore, so I presume it's able to execute the binary correctly.
    2
    @psouza4 - Have you tried AppOpsXposed before? (it's in Xposed downloads)
    I had previously used it on older rooted devices to stop lots of apps from loading up at boot that I feel don't need to run unless I click on them, but I don't know if using it would mess up any other settings/scripts/etc if we've already followed this thread.
    I'm not getting the great screen-on battery life that some others seem to be getting and I'm not sure why. I've checked alarms and wakelocks via and can't really find anything that's out of control that I recognize what it is or hasn't already been tweaked via your guide.
    However, when I open up AppOpsXposed, I find that most apps are still set to load up at boot... just not sure if it's a misnomer due to AOX not being supported fully(?) or something to do with all the previous tweaks.

    Screenshot 1 & 2 are what I see in Amplify (already tweaked via this thread)
    Screenshot 3 & 4 are my battery stats (standard Samsung Settings > Battery)
    Screenshot 5 is a single page that is seriously long that shows all apps that are set to run at boot (this is AOX)

    Any ideas?

    EDIT: I forgot to mention that I followed this fine-tuning guide completely. Greenify is greenifying everything that isn't a widget, etc.
    First to answer your question: I wouldn't worry about restricting boot-time apps. Both ForceDoze and Greenify will take care of app hibernation stasis and I doubt (hope?) you aren't rebooting your phone a lot, so it shouldn't really matter much.

    Second, it's not really advisable to blanket-throttle everything that's safe... if it's not chewing through battery and you aren't 100% sure you know why you want to restrict a wakelock or alarm, you probably ought to not. A few hundred wakelocks over the course of a few hours isn't that much if the wakelock isn't doing anything tremendous.

    Finally, did you apply my v15 fix or fix+debloat from my root thread? It could just be a matter of poor battery performance as a result of incorrect CPU settings. You should apply that fix exclusively and not use any other app that modifies your CPU's settings (no Kernal Aduitor, etc.). It could also be a symptom of poor network or Wi-Fi signal, both of which are easy to test for (leave network data off for a while -- then leave WiFi off for a while with network data on, see if you get drastically different results).
    2
    For Greenify, what do you mean by "Working Mode: Boost"? My only two options are Root and Non-Root. Did you mean Root instead of Boost?
    Get the greenify xposed module. Install that too. And reboot. Now the option will be there.
    2
    Wow I did everything yesterday except for L Speed and now that I just did it my phone is lightning fast. Thanks so much

    Sent from my SM-G930V using XDA-Developers mobile app