[X Style (Pure) General] NahuelMS:
MFirst of all i want to apologyze for my bad English.

After the nougat update i start getting a really bad battery life and have to charge the phone 3 times a day. I start digging in the problem and do test in search for a better battery. I managed to improve my 3hous SoT to get between 4.30 to 6 hours SoT.

The tweaks in this guide are not magical, there are just tips that help me improve a lot my battery life. There is no need to unlock bootloader or to root the phone. The idea is to make a good balance between functionality and battery life. Everyone can choose what thinks they want to sacrifice for battery life and what they want to keep. All the steps that are listed here are reversible and can't harm your device in any way. It is pointed to people that do not know a lot of this subject.

My advice is to full apply all the steps and after getting a good battery life start to enabling the features that you want to have on the phone one by one and test battery.

At the end of this guide there is a section with improvements wich aim is to make the moto x style look like more like the news motorola Phones.

Simple Tips for Battery life:

-After a major OS upgrade it is important to do a full factory reset, full wipe. When logging with your google acount start the device as a new device. Do not restore apps!

-Try to not use the Turbocharger. Based on my own experience, a good 1-2 Amp charger get a lot more juyce that the turbo charger. It may sound weird to you but i tested this a lot of times and really see and important difference. I only use the turbocharge when i am in a hurry.

-Do a full calibration of your battery. Let the battery get to 0%. Turn the phone off and let it charge to 100% and left it plugged a little bit more. After that unplugg the phone, restart it and see if the % is still 100%. If not plugg the phone again after a 100% charge and repeat the process until you get a full 100% charge or near that number.

-A good advice if to left the phone charging in the nigth, or when you think it is a good moment. After get to 100% of the charge, unplugg the phone, restart it and plug it again. For my the battery is not getting a good reading after Nougat update. After a restart i always "lost" like 8% of charge. I do this every time i charge the phone.

-The NOUGAT room is draining battery very very fast when there is bad celular signal. So if you are not having a good celular signal it is a good advice to put the phone in airplane mode until you change your location. Also, there is drain with bad wi-fi signal so try to avoid that too. It is not strong like the celular drain but can influence in your final results.

-Turn off location when you are not using it. If you have to use it try to use the "battery saver mode" and put high accuaricy when you are going to use the GPS for a precise fix or navigation. Google Play Services have and excess use of wackelocks due to location, they are listed ass NLPcollectorwackelock and NLPwackelock.

-If you are on Wifi turn off data and if you are in data turn off Wifi. If you can use both try to use Wifi with a good wifi signal. It uses a little bit less battery that 4G for me.

-Unninstall apps that you are not using or going to use in a short-mid time. They may be running in the background and eating

juice.

-Turn off automatic brigthness. Put your brigth to the minimun you are happy with. I used mine almost in the minimun and i see the screen perfect. Also remember that the power scale is non linear. Putting the wheel in the half of the brigthness bar is not getting you "half the brigthness of the screen".

Download autobrigth switch https://play.google.com/store/apps/details?id=com.abrody.brightness&hl=es_419 .This make you turn autobrigthness on with a click. This is very usefull if you are outside, let you see the screen with 100% and then let turn it off when you are inside. It is a easy way to manage brigthness.

IMPORTANT:

When you are not using your device it must go to sleep mode. It is a mode where the CPU is almost turned off and it doens't drain much battery. Later in this guide i will explain how to properly install a Battery monitor program. It is very important to watch if the device is sleeping ok and there aren't apps with bad behaviours keeping the device awake and draining your battery. This can be seem in GSAM Battery monitor watching the held awake tab. If an app is keeping your device awake you have to uninstall or contact the developer and tell him about your problem with his app.

Tunning the system to Optimize the Battery and Performance:

For this part you will need to have installed ADB drivers, you can download and install from here:

https://xdaforums.com/showthread.php?t=2588979

You have to activated debug mode on the phone:

Go to settings, about phone, tap 7 times the Compilation Number until you see a message saying that you are a developper. Now go to settingss, developer and activated USB DEBUG mode. To see what apps are running in the background on your phone go to settings, developer, in execution.

Also you will need to install 4 more free apps, later they can be uninstalled if you want:

App inspector to know the name of certain package:

https://play.google.com/store/apps/details?id=bg.projectoria.appinspector

App Ops to manage special permissions of apps:

https://play.google.com/store/apps/details?id=com.findsdk.apppermission&hl=es

Shizuku Manager is needed to give the permissions necesary to App Ops:

https://play.google.com/store/apps/details?id=moe.shizuku.privileged.api

Gsam battery Monitor for monitoring apps usage:

https://play.google.com/store/apps/details?id=com.gsamlabs.bbm&hl=es

The aim of this part of the guide is to disable all the features and apps that may be drainning your battery.

All of this can be reverted one by one after getting a good battery and testing the results and the impact on battery life:

-Turn off location, bluetooth, NFC.

-Go to moto app and turn off Moto Voice, Moto screen, Wave to wake. I keep the flaslight and the cam gesture on but you can dissable them if you want.

-Go to settingss, Motorola privacy and turn off enhancet device support and help us with bla bla.

-Go to settings, security, back up and turn off data back up.

-Go to settings, location, turn of Google location History and share location of google. In the Rigth upper corner tap on the 3 dots and turn of bluetooth scanning and wifi scanning.

-Go to settings, google, search, and turn off all the features like feed, nearby, voice detection, notifications, doodles, google fit, firebase App Indexing.

-Go to settings, google, security, dissable google play protect,etc. (If you consider this ass important do not disable it)

-Go to settings, apps, tap the 3 dots in the upper rigth corner and tap on show system apps. Disable Motorola device manager and Motorola notifications. Also delete the apps data.

-Go to accounts and turn off syncronizations of all the things you really don't need. For instance in google account i left on contacts, Chrome and Contacts info only.

-If you are using chrome go to settingss, site configuration. Turn off location, notifications, sync in the background. In the sync settings just let the chrome sync only what you need.

-Disable all google and motorola apps that you are not using. For instance Google Duo, hangouts, play music, play books, play games, carrier services, Motorola connect, talkback, devices help, etc.

-Search for apps that ask for permission you think they don't need it. Speacially location.

-Turn off special permission that you think apps don't need. The special permission can be managed going to settings, apps, tap the wheel, advance-special acces:Look to "change system settings" and "get over other aplications". Also turn off acces to data usage for Google Play and Google Play services.

-Go to settingss, security, trusted agents, disable smartlock.

-If you have apps like greenify installed, uninstall them.

-If you have home widgets be sure that they are not using your location and also if it posible put the refresh time to the minimum.

-I don't use GBOARD, it was not working ok for me and also draining battery. So i search in the internet and donwload the latest google keyboard version before GBOARD, it works perfect. I do not recommend GBOARD as it is not working ok and it is not propperly optimized.

Using ADB for Background process:

The next step consist of disabling System process and apps that you no not need to run in the background, for example MotoCare:

Motocare is a system process that runs in the background and collects info of your device use even if you turn off motorola privacy features. That not makes much sense but it is there and can't be disable in a easy way.

After installing ADB, drivers and turning on USB DEBUG MODE, plug the phone, go to the search bar in windows and search for CMD. Open it.

Write:

abd devices

Is everything is ok you will see a device in the list that is your Moto x Style. If not figure out what is the problem, make sure DEBUG MODE is on and that you give the propper permission in the phone.

Then write:

adb -d shell pm grant com.gsamlabs.bbm android.permission.BATTERY_STATS

This will let you see full wakelock list in GSAM Battery Monitor app. This is very important to know if there is an app keeping your device awake.

next:

abd shell

cmd appops set "com.motorola.motocare" RUN_IN_BACKGROUND ignore

cmd appops set "com.motorola.motocare.internal" RUN_IN_BACKGROUND ignore

This last two lines will stop motocare. After this go to apps, with "show system apps" on search motocare and motocareint and delete all the data. After that check that motocare is not running in the background.

cmd appops set "com.motorola.ccc.ota" RUN_IN_BACKGROUND ignore

cmd appops set "com.motorola.ccc.checkin" RUN_IN_BACKGROUND ignore

This will turn off OTA services. If you want to take an OTA after this, (if motorola ever send another OTA for our device) you can just go to settingss, about phone and check for update manually. (After enabling Motorola device Manager and Motorola Notification). Anyway is there is a new OTA you probably are going to know it from XDA forums.

You can use the same command to disable apps that you don't need to run in the background but you want to use.

To use this commands just open app inspector, search the app you want. Copy the package name and use the command with that package. Anyway in the next step i will show you a easy way to do the same with other apps that are not from the system.

If you want to re enable and app to run in the background just reinstall it or write the same sentence changing "ignore" for "allow":

For example with Facebook. If you search it in app ops the package name is com.facebook.katana . The name of the package is "katana" because it is like smashing your battery with a Katana lol.

adb shell

cmd appops set "com.facebook.katana" RUN_IN_BACKGROUND ignore

to enable it:

cmd appops set "com.facebook.katana" RUN_IN_BACKGROUND allow

My advice is to not use this command with google services or with system apps you don't know what they do in your phone. It may get you in a problem.

Now we are going to see another way to stop apps for running in the background. This is usefull with apps that you want to keep and don't want to run in the background.

For example in my case, i use facebook app but don't want it to run in the background. Also i disable all navitagion apps to run in the background, Here we go and google maps in my case. They both work perfect when I open they, don't need them running in the background. I let apps like WhatsApp, Instagram, Tinder, Facebook Messenger to run in the background because i want to know when someone send a message and don't want to wait until i open the app. If you don't need the notifications my advice is to don't let run in the background. That will get you a considerable amount of battery. Whatsapp have a lot of battery drain. For some reasons it has the acelerometer turn on a ridiculous amount of time and it triggers google play services wackelock PackageMeasuremntservice.

Connect the phone via usb and launch terminal as we did before, search bar and search button, type CMD and open it. Open Shizuku Manager

Wrote in the terminal:

adb shell sh /sdcard/Android/data/moe.shizuku.privileged.api/files/start.sh

if you do it rigth you will see that the server starts running. Now unplugg your phone, close shizuku manager and open App Ops. If you turn off your phone you will have to repeat the process in order to get app ops running again.

Search for apps that you don't want to run in the background. In the permission settings there is "run in the background", you can turn it off or on from there. It has exact the same effect that doing it in the ADB terminal ass we did it in the previous step. But motocare can't be disabled from the app.

Also you can manage all the permission from the apps one by one in a lot better detailed way than from the stock app settings..

There is also a trick with google play services and location. I am getting a big wake up with NLPcollector and variants. If you turn off the network location permission in google play services it will stop the wakelock even if you have your location ON. That make google play services almost drainless. The problem is that some apps may not get a correct location in "battery saving mode" because they use google play services. This is fixed turning on high presition mode or device only mode and letting the GPS do the location work only when you need it.

Finally you can tweak all your apps permissions and see the battery results. The two most important permission related to battery life are the location and the background one. Try to disable location for everything you don't need to be tracking you.

Tunning your Moto X Style:

To get the new Camera app from motorola:

Go to apps, search for stock camera app and disable it. Delete all the app data. Go to settings, security and turn on "Unkown Sources".After that donwload the moded camera app from this tread:

https://xdaforums.com/moto-x-style/themes-apps/moto-camera-6-0-43-10-modded-apk-t3459690

Restart your phonr and Install it! Now you have the new camera app :). It work almost perfect, the only things that are not working for me are: Twist to change to selfie mode, shutter time in pro mode and white balance in pro mode. Don't forget to thanks the developer for this great app. Also turn off Unkonw Sources after the installation.

To get the Moto Z command Widget:

Donwload and install this app:

https://xdaforums.com/moto-maxx/themes-apps/moto-z-command-center-widget-t3417171

Don't forget to turn location of the widget off, you can put your location manually and save battery.

Launcher 3:

https://xdaforums.com/moto-z-play/themes/moto-z2-play-launcher-google-root-t3623608

It is the new Motorola Stock Launcher. You can try the Moto G5 Launcher too, it is in XDA.

Unlock Method:

The phone doesn't have fingerprint scanner but a good alternative is to use face unlock. LG and Samsung do a lot of marketing of something that is build in on android stock and work almost perfect. Go to security, turn smartlock on.Then go to smartlock and turn on face detection. It works like a charm, is almost instantaneous. My advice is to do this after getting a good battery life as smartlock features can affect battery. Make sure you don't have on trusted places on Smartlock as it drains your battery. Also if you have location ON it may drain your battery even if you don't have trusted place on, so take care. The trusted face feature on its own drains a negligible % of battery.

As i stated in the beggining:

If you want the best battery life you always have to do a compromise between it and features of the phone. For example i love moto display and the wave to wake feature but it takes so much juice of my phone.

My advice is to do all the steps, make sure you are getting a good battery life and after that start reenabling one by one the features you need and watching the impact of them in your battery life. Also i know that some of the stuff i mention may have a negligible impact in battery for themselves but when you put all together they do make a difference. My phone is draining almost 0% on stand by mode with doze. I let it with a %, go to sleep and when i wake up i have the same %.

At this moment i am testing battery on my phone and seeying wich features do make a big diference in battery life.

For instance i am using smartlock, face unlock with location off and in security settings i have android device manager enabled. They seems to not affect the battery performance so much. I will continue testing features to see wich ones are the main offenders.

Any suggestion or any question is welcome! Also if this helps you please let me know and post your battery life before and after.