[OnePlus 3 & 3T Cross Device Development] Pbotelho:
Alright guys, here goes my guide on obtaining ULTIMATE BATTERY LIFE on our devices using this ROM.

I've attached two screenshots of my Battery Settings to this post. These were my results using the 09/27 Build, but I've since done a Clean Flash and re-implemented all of the following on the 10/15 Build so that I could account for each change I've made as I made them. Henceforth, the following instructions are done from the perspective of what to change after a clean flash. If I haven't mentioned changing something after doing a Clean Flash, that likely means I left it at default settings when I went through these steps. The possibility that I made a human error also exists in listing out these steps, so I invite questions if someone notices a mistake (so that I can fix them), but please keep the bolded sentence in mind before asking any questions that may already be answered.

NOTE: THESE SETTINGS ARE NOT FOR THE FAINT OF HEART.

Also, this is sort of my first time writing a guide on something, so the formatting is rather rudimentary, but I'll do my best to edit it over time for presentation purposes.

I'm going to cover the following areas:

1) TWRP

2) Initial Boot

3) Install & Uninstall Apps

4) General Settings

5) Havoc Settings

6) Kernel Aduitor Settings

7) Build Prop Settings

8) Greenify Settings

9) Naptime Settings

10) Servicely Settings

11) Theme Settings

12) Nova Launcher Settings

13) Havoc Settings Extended - Alarms and Wakelocks

1) TWRP

• Wipe>Advanced Wipe>Dalvik, Cache, Data, System

•	Flashed 5.0.6 Firmware and Modem, Havoc OS ROM, Gapps Nano (Nano selected because I use face unlock), Magisk 17.1

• Reboot System

2) Initial Boot

•	Don’t copy device data on initial wizard.

•	Google Services Screen

o	Turn off all of the following options and proceed forward: Back-up to Google Drive, Free up space, Use location (and thus, Allow scanning), send usage and diagnostic data

•	No thanks to Voice Match, Fingerprint added later. Done.

3) Install & Uninstall Apps (This is my baseline for a new clean install, yours may be different)

•	Install from Play Store: Messenger Lite, Google Pay, Torchie – Volume Button Torch, Servicely, Banking apps, Naptime, Google Home (for use with Chromecast), Pitchblack Substratum Theme, substratum theme engine, Calendar Widget: Month, Nova Launcher, Kernel Aduitor, Messages (SMS app by Google), Google Keep, VLC, Hangouts Dialer, Hangouts, Gmail, Maps, Chrome, Drive, Netflix, Duolingo, Instagram, Whatsapp, Netflix, Greenify, System app remover (root), Google Calendar, BlackPlayer EX.

•	Install Magisk Manager APK and the following modules from Magisk Download Section:

	Greenify4Magisk

	ViPER4Android FX (v2.6.0.x)

	Youtube Vanced black themed (disable auto-update in Play Store for Youtube app after reboot)

o	Install following modules from XDA:

	Wifi 2.4GHZ Bonding (jamal2367)

	Dual Speaker Mod + Low In-Call Fix (jaml2367)

•	Uninstall the following apps using System App Remover (called Uninstall in drawer)

o	System: Google, Messaging (after making Messages default SMS app), Omniswitch (cleaning up app drawer), Pixel Launcher, Wallpapers (cleaning up app drawer)

o	Be sure to go to Recycle bin section, select all, and delete; or apps may sometimes auto restore on boot.

Reboot after completing up to this point. System App Remover can now be uninstalled

4) Configure General Settings

o	Enable Developer Options>Turn off Window, Transition, and Animator Duration scales

o	Wifi Preferences: Turn off both options (turn on wifi automatically and open network notification)

o	Connected Devices: Turn off NFC

o	Apps & Notifications: See all apps>find and click on app in list>Battery>Background restriction

	Do this for the following apps: Camera, Google Play Store, Android Keyboard, Instagram, Banking apps, Duolingo, Drive, Chrome, Maps, Netflix, Youtube (vanced), Messenger Lite.

	This will affect notifications for these apps while preventing them from running in the background.

	Note: These are the apps that popped up in the Battery section of settings as they consumed a percentage of my power. You can restrict them much easier in Battery Manager, but you have to wait until they populate in Battery Manager first. This is an alternative method that bypasses the wait time for the data population but takes a little longer to perform as its done on an app-by-app basis individually.

o	Battery: Battery saver set to turn on at 25%

o	Display: Night Light turned on from 8pm to 8am, Adaptive Brightness off

o	Security & Location: Set up Smart Lock (face unlock) and fingerprints (thumbs and indexes, one pinky)

o	Accounts: Disable Google Fit, People details, and Play Games sync for all accounts.

o	System: Languages & Input>Virtual Keyboard>Android Keyboard>Preferences: Disable vibrate on keypress

o	Search for Picture-in-Picture: Disable all

o	Search for Notification Access: Allow for Nova Launcher

o	Search for Unrestricted data: turn off Google Play Services

o	Search for Battery Optimization: Select Not optimized. Only the following should be listed:

•	Download Manager, Google Play Services, Messages, Mobile Broadcasts, Naptime, Phone, Servicely, Shell

5) Configure Havoc Settings

o	Status Bar: Quick pulldown on right side, Clock in center with seconds (AM/PM Hidden), Battery Style is circle with hidden percentage, Network traffic hidden

o	QS: Columns in Portrait set to 4, 8 small tiles, Brightness slider moved to bottom with auto brightness icon shown

o	Interface: Background color set to black

o	Ambient Display: No changes. New notifications should be the only thing turned on

o	Screen: No changes

o	Buttons:

	Volume Rockers: Music Control

	Power button:

•	Power Menu Advanced Reboot

•	Screen off power button torch

	Back Button:

•	Long press = Select Application, Applications, Phone

•	Double tap = Custom Action, QS Panel

	Home Button:

•	Long press = Select Application, Sleep and Hibernate

•	Double tap = Select Application, Applications, Camera

These button settings offer a lot of capacitive functions:

• Greenify's auto-hibernation doesn't need to be enabled, long pressing the Home button to shut off the screen offers a convenient manual hibernation

• Double tapping the screen when its off to wake it, and again on the lockscreen to be able to turn the screen off, while being able to lock and unlock the phone using the Home button, and glide typing; effectively allows you to use the phone while its sitting on a desk. No need to pick it up.

• QS Panel can be brought up easier when using the phone with one hand by double clicking back, no need to slide down from the top

• Holding power when the screen is off activates the Torch

• With Torchie installed, clicking both volume buttons at the same when the screen is on activates the torch

• Holding one of the volume buttons at a time when the screen is off changes soundtracks

• Holding back brings up your Dialer

o	Navigation Bar: No Changes

o	Gestures: Jump to camera turned on, all else off

o	Lockscreen:

	Double tap to sleep turned on, media cover art turned off, face auto unlock turned on

	Lockscreen Shortcuts

•	Left Shortcut: Launch calculator

•	Right Shortcut: New reminder ,Calendar app

o	Recents:

	Stock Recents Style: Oreo

	Show Memory Bar

o	Notifications:

	Disable FC Notifications

o	Weather:

	Weather Service>Cancel>Custom Location>Enter yours

	Lockscreen Weather and Custom Location are my only enabled items, Yahoo set as the weather provider

o	Animations: Disable transition animations

o	System:

	App Ops:

•	Need to do. This is a new edition since the 27th version of this ROM

o	Device:

	Off screen gestures: Only Proximity check and Tap to wake enabled

o	IME Settings: No changes

o	Battery Saving: See final section of this guide

o	Miscellaneous: No changes

6) Kernel Aduitor Settings

o	Enable dark theme in settings, disable data sharing

o	CPU

	Big Max Frequency: 1632 MHz

	Big Governor: darkness

	Little Max Frequency: 1036 MHz

	Little Governor: darkness

	Input Boost Frequency Core 1, 2, 3, & 4: Disabled for all

	Touch Boost: Disabled

	Apply on boot

o	Thermal

	Enable Intellithermal, disable Core Control

	Apply on boot

o	GPU

	Max Frequency: 133 MHz

	Apply on boot

7) Build Prop Settings:

o	Disabling Fast Dormancy. Create the following two rules using a Build Prop Editor (can be done in Kernel Aduitor)

	Name: ro.ril.fast.dormancy.rule Value: 0

	Name: ro.fast.dormancy Value: 0

8) Greenify Settings:

o	Grant Permission for Smart Hibernation (select allow under Greenify)

o	Working Mode = Root + Privileged

o	Smart Hibernation = enabled

o	Aggressive Doze = enabled

	Done on the Go = enabled

o	Always ignore background-free = enabled

o	Alternative Screen Off Mode = enabled

o	Hit plus sign, show all, and don’t add the following app types to be Greenified:

	Calendar apps, dialer apps, sms apps, Build Prop apps, music players, email apps, Kernel apps, Magisk Manager, Launcher apps, or anything else you want to work while the screen is off.

9)	Naptime Settings:

o	Turn ads off = enabled

o	Aggressive Doze = enabled

o	Re-apply Doze after wakeups = enabled

o	A persistent notification will now exist for Naptime, so head over to its Notification settings in Settings>Apps and disable Show notifications

10)	Servicely:

o	Turn ads off

o	Turn on main switch at top right

o	Turn off Force App Standby

o	Switch to middle section, allow permission (select allow under Servicely)

o	Force app sleep on same apps in Greenify list plus:

	Calculator, Camera, Files, Gallery, Google Play Store, and Settings

o	Disable wakelock permission for social media apps

o	Persistent notification for this app as well, same elimination process as before with Naptime

11) Theme Settings (apply Pitchblack theme in substratum)

o	Follow the instructions in substratum, pick a Pitchblack theme from the list. Once applied, the entire phone (nearly all apps) will be in black mode with your choice of colour accent.

	Enable dark mode in Messages

o	Wallpapers:

	Home screen is Pitch Black wallpaper

	Lock screen is an AMOLED wallpaper

12)	Nova Launcher Settings

o	Disable Persistent search bar

o	Look and Feel>Scroll and Animation speeds>Faster than light

o	App & widget drawers>Background>Select black and 100% transparency

o	Dock>Dock Background>Select black and 100% transparency

See the additional screenshots I have posted of my home screens and Quicksettings tiles.

• The weather tile is toggleable, so weather will only update when you want it to

• Add Event gives you a quick way to add to your calendar

• Sync gives you more control, allowing you a master switch

• I have three home screens. The one on the left has a Month and Music widget, the center has a daily Schedule widget with common apps, and the one on the right is a Google Keep widget that contains task lists, note, reminders, etc.

13) Havoc Settings Extended - Alarms and Wakelocks

Use the phone as normal for a few days before continuing to this next step. These items won't be listed immediately, they take time to populate.

The items I have listed in this section are taken in combination from the "Extreme Battery Life xda" and "0.0% idle battery drain xda" threads that can be found on Google using those search terms. This portion of the guide that I'm writing, as far as I know, should be the most relevant in terms of managing alarms and wakelocks in Pie.

You should note that the 0.0% thread has the most relevant warnings in terms of what

not

to limit. Ctrl+f "DANGEROUS" in that thread and you'll find them very easily.

The alarms and wakelocks I have implemented don't break my android experience, but you should know that your blacklist of apps won't be running at all until you open them. This means that you'll save ridiculous amounts of battery life at the expense of immediate notifications.

You'll likely have to have an app open for it to function without limits, like being able to only pay with Google Pay when Google Pay is open in the foreground, for example.

My general rule is to limit any processes that have the following terms in their name: facebook, instagram, analytics, location.

•	Havoc Settings>Battery Saving>Alarm Blocker

o	CONTEXT_MANAGER_ALARM_WAKEUP

o	KeepaliveManager.ACTION_BACKUP_ALARM.FBNS.com.instagram.android

o	KeepaliveManager.ACTION_BACKUP_ALARM.MqttSimpleClient.com.instagram.android

o	KeepaliveManager.ACTION_INEXACT_ALARM.FBNS.com.instagram.android

o	KeepaliveManager.ACTION_INEXACT_ALARM.MqttSimpleClient.com.instagram.android

o	X. 1p0.ACTION_ALARM.FBNS.com.instagram.android

o	X. 1p0.ACTION_ALARM.MqttSimpleClient.com.instagram.android

o	android.appwidget.action.APPWIDGET_UPDATE (This will prevent your widgets from updating. My widgets aren't updated very often by nature of their function, and when I do need them to update due to a new entry, I simply delete the widget and reapply it if need be.)

o	com.android.internal.telephony.data-reconnect.default

o	com.facebook.liblite.mqttnano_android.heartbeat

o	com.facebook.liblite.mqttnano_android.mqtt_connect

o	com.facebook.rti.fbns.intent.REGISTER_RETRY

o	com.google.android.apps.messaging/.shared.analytics.AnalyticsAlarmReceiver

o	com.google.android.gms.analytics.ANALYTICS_DISPATCH

o	com.google.android.gms.reminders.notification.ACTION_REFRESH_ALIAS_LOCATION_REMINDERS

o	com.google.android.gms/.nearby.messages.service.NearbyMessagesService

o	com.google.android.gms/com.google.android.contextmanager.service.ContextManagerService

o	com.google.android.gms/com.google.android.location.internal.AnalyticsSamplerReceiver

o	com.google.android.gms/com.google.android.location.internal.GoogleLocationManagerService

o	com.google.android.gms/com.google.android.location.internal.server.GoogleLocationService

o	com.google.android.gms/com.google.android.location.places.service.PlaceDetectionAsyncService

o	com.google.android.location.ALARM_WAKEUP_ACTIVITY_DETECTION

o	com.google.android.location.ALARM_WAKEUP_CACHE_UPDATER

o	com.google.android.location.ALARM_WAKEUP_CALIBRATION_COLLECTER

o	com.google.android.location.ALARM_WAKEUP_IN_OUT_DOOR_COLLECTOR

o	com.google.android.location.ALARM_WAKEUP_LOCATOR

o	com.google.android.location.ALARM_WAKEUP_SENSOR_COLLECTOR

o	com.google.android.location.ALARM_WAKEUP_SENSOR_UPLOADER

o	com.google.android.location.ALARM_WAKEUP_VEHICLE_EXIT_DETECTOR

•	Havoc Settings>Battery Saving>Wakelock Blocker

o	*job*/com.facebook.mlite/.jobscheduler.LiteJobSchedulerJobSchedulerService

o	*job*/com.facebook.mlite/.push.MLitePushCompat.JobService

o	*job*/com.facebook.analytics2.logger.LollipopUploadService

o	*job*/com.facebook.mlite/com.facebook.pushlite.PushLiteLollipopJobService

o	*job*/com.google.android.location.reporting/com.google/youremail@email.com:android

o	*job*/com.instagram.android/com.facebook.browser.lite.BrowserLiteIntentService

o	*job*com.instagram.android/com.facebook.fbreact.autoupdater.ighttp.IgHttpUpdateServiceCompat

o	*job*/com.instagram.android/com.instagram.arlink.util.ArLinkModelDownloadService

o	*job*/com.instagram.android/com.instagram.notifications.push.IgPushRegistrationService

o	*job*/com.instagram.android/com.instagram.util.offline.BackgroundWifiPrefetcherJobService

o	*net_scheduler*

o	*sync*/com.google.android.location.reporting/com.google/youremail@email.com

o	AlarmService#updateNtp

o	ConnectivityService

o	GCoreFlp

o	GnssLocationProvider

o	NetworkStats

o	NfcService:mRoutingWakeLock

o	NlpCollectorWakeLock

o	NlpWakelock

o	Wakeful StateMachine: GeofencerStateMachine

o	WakefulIntentService[GcmReceiverService]

o	wake:com.facebook.mlite/com.facebook.pushlite.tokenprovider.gcm.PushLiteGcmListenerService