Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,093 members, 7,818,281 topics. Date: Sunday, 05 May 2024 at 11:47 AM

Major Causes Of Battery Drain In Android Devices - Phones - Nairaland

Nairaland Forum / Science/Technology / Phones / Major Causes Of Battery Drain In Android Devices (19698 Views)

5 Apps That Drain Your Smartphone Battery The Most / 16 Things That Are Too Real For Nigerians Who Use Android Devices / Heavy Battery Drain While Using Data? Here's Why (2) (3) (4)

(1) (Reply) (Go Down)

Major Causes Of Battery Drain In Android Devices by OutOnBail(m): 3:41am On Mar 19, 2016
This might be a very long post but I can assure you all that it's worth it. This post is a sequel to my previous thread and it is a prerequisite needed for this post. Read it https://www.nairaland.com/2947314/android-smart-getting-best-out-device

In Android, there are loads of reasons why battery don't last long. People attribute it to location being on, background apps, internet, and so on. Though the aforementioned affects battery life however the main and the most common reason why your android device doesn't have a long lasting battery is due to Wakelocks, Alarms and Services.

Idle battery drain comes mostly from Alarms and Wakelocks that want to work when they're supposed to be sleeping. This GUIDE will help you reduce your idle battery drain to 0% [0.0%/h] without turning your smartphone into a dumbphone.

What are wakelocks? [/b]Have you ever gone to bed with your phone's battery well over 50% and woken up to find out that it has depleted overnight and the device has switched itself off? There are several causes for this abnormal behavior, and among the biggest culprits are the unwanted system wakelocks.

So, what exactly are these? Wakelocks are power-managing software mechanisms, which make sure that your Android device doesn't go into deep sleep (which is the state that you should strive for), because a given app needs to use your system resources.

Normally, wakelocks shouldn't use a large amount of your system resources when you are not using your device, as it should be in a state of deep sleep. Although wakelocks on Android are not necessarily a bad thing, minimizing these should be the priority of any Android power user who's on the hunt for better battery life. Simply put, [b]a wake lock is a mechanism to indicate that your application needs to have the device stay on.


Unfortunately, some poorly-coded, malicious, or simply buggy apps might create an abnormal amount of undesirable wakelocks. Other apps require constant Internet access in order to operate in a normal fashion - Facebook and Messenger are probably the most popular representatives. They persistently request information from the web (the so-called "polling" for new events), which is causing subsequent wakelocks thereby impacting on battery life.

Wakelocks are triggered depending on the time configured for each application that requires it. For example, a wakelock, alarm and service are all triggered when you turn on your music player, plug in your headset, make a call etc. There are even wakelocks that wakes your device every seconds e.g telephony wakelock keeps your device awake for the purpose of maintaining connection to your carrier, location wakelock are also major culprits, sync wakelocks etc.

To fix these unnecessary wakelocks (i.e the time a wakelock is triggered), you need the following
1. Root - find out for your own device
2. Xposed http://repo.xposed.info/module/de.robv.android.xposed.installer
3. Amplify https://play.google.com/store/apps/details?id=com.ryansteckler.nlpunbounce&hl=en

To get xposed to work, follow the installation and flashing procedures as explained in my previous thread https://www.nairaland.com/2947314/android-smart-getting-best-out-device

Another superb app to extend battery life is Greenify. You can use greenify without root however, you get limited functionality. To get the best out of greenify, ensure your device is rooted and you're using the paid version of greenify.

For amplify application, the free version has some wakelocks limited out of the box i.e you need no configuration. However, to get full functionality and the option of adding and battery draining wakelocks, you need the paid version.

This guide (based on Samsung s4 (now Lolipop) / my apps / my usage patterns) will list the alarms & wakelocks and time that they've been limited that I've used to gain the result I obtained. NOTE: This is a guide and your phone/apps/usage patterns WILL be different.

Lets Start with a few basic settings.

Display
Display brightness is an important factor in battery life.The more brighter the screen is,the more juice it drains.So keep the brightness under control.Using automated brightness is not adviceable.Try manually adjusting the screen brightness.Using dark wallpapers(on AMOLED display) can help you save some bit of juice.

Wifi
Even if your wifi is off,the phone searches for signal.To switch off this feature,go to Settings > Wifi > Options(Top right corner) > Advanced >Scanning always available(Off).

Location
Another juice sucker in Android-Location Services.You can turn it off while not in use.That saves a lot off juice.You can also set the location to 'Device Only" in settings.
Navigate to Settings->Location->Menu->Scanning->Turn off "Wi-Fi Scanning" and "Bluetooth Scanning"

These are the basic stuffs one must look into before complaining about their battery.

Amplify
Amplify is a genius in handling wakelocks and alarms. It is also capable of blocking services.Amplify is the best battery saver I've come across.It is a must have app for all droids running Xposed. You'll need a donation package to block wakelocks and alarms.

Limit the following:

Alarms

Alarms(Allow every 600 seconds)

com.android.internal.telephony.data-stall


Alarms(Allow every 1800 seconds)
com.oasisfeng.greenify.CLEAN_NOW



Alarms(Allow every 3600 seconds)
android.appwidget.action.APPWIDGET_UPDATE



Alarms(Allow every 7200 seconds)
android.content.syncmanager.SYNC_ALARM(delays sync)


Alarms(Allow every 10800 seconds)
android.net.ConnectivityService.action.PKT_CNT_SAM PLE_INTERVAL_ELAPSED
com.facebook.common.executors.WakingExecutorServic e.ACTION.ALARM.com.facebook.katana
com.google.android.apps.hangouts.CLEANUP_DB
com.pushbullet.android/.gcm.GcmFixReceiver
com.android.server.action.NETWORK_STATS_POLL
com.diune.pictures.intent.action.MEDIA_CHECK
LocationManagerService


Alarms[LOCATION](Allow every 41400 seconds)
ALARM_WAKEUP_LOCATOR(com.google.android.gms.nlp.AL ARM_WAKEUP_LOCATOR)
ALARM_WAKEUP_CACHE_UPDATER
ALARM_WAKEUP_BURST_COLLECTOR(com.google.android.gm s.nlp.ALARM_WAKEUP_BURST_COLLECTOR)
com.google.android.gms.location.fused.GPS_ALARM_BA LANCED_ACCURACY
ALARM_WAKEUP_ACTIVE_COLLECTOR
ALARM_WAKEUP_PASSIVE_COLLECTOR
ALARM_WAKEUP_BURST_COLLECTION_TRIGGER
com.google.android.intent.action.SEND_IDLE
ALARM_WAKEUP_ACTIVITY_DETECTION
com.google.android.location.reporting.ACTION_UPDAT E_WORLD


Alarms(Allow every 93600 seconds)
android.app.backup.intent.RUN
com.google.android.gms/.checkin.EventLogService$Receiver
com.google.android.gms/.checkinCheckinService%Receiver


Wakelocks

Wakelocks(Allow every 800 seconds)
WakefulIntentService[GCoreUlr-LocationReportingService]
RILJ
NetworkStats


Wakelocks(Allow every 3600 seconds)
WeatherUpdateService


Wakelocks(Allow every 10800 seconds)
SyncLoopWakeLock(delays sync)
*net_scheduler*
GCoreFlp
Icing
Wakeful StateMachine: GeofencerStateMachine
NfcService:mRoutingWakeLock
wake:com.pushbullet.android/.gcm.GcmService
SyncService(Package: Push Bullet)
ai(Package: Push Bullet)
ae(Package: Push Bullet)
AsyncService


Wakelocks(Allow every 41400 seconds)
NlpWakeLock
NlpCollectorWakeLock
LocationManagerService
Config Service Fetch


Wakelocks(Allow every 9999999 seconds)
*job*/com.facebook.katana/com.facebook.analytics2.logger.LollipopUploadServi ce
JobSchedulerHack-com.facebook.analytics2.logger.LollipopUploadServi ce
UploadServiceLogic-com.facebook.analytics2.logger.LollipopUploadServi ce
*job*/com.facebook.orca/com.facebook.bugreporter.scheduler.LollipopService (com.facebook.orca.Messenger)
*job*/com.facebook.katana/com.facebook.bugreporter.scheduler.LollipopService (com.facebook.katana.Facebook)



Services

Services(Block/Deny)
com.google.android.gms.analytics.AnalyticsService
com.google.android.gms/com.google.android.location.internal.GoogleLocatio nManagerService(Location Service)
com.android.gms.Feedback.FeedbackService(Breaks Play Games)
com.android.gms.ads.AdRequestBrokerService
com.google.android.gms/com.google.android.location.network.NetworkLocatio nService(Location Service)
com.google.android.location.geofencer.service.Geof encerProviderService(GPS Service)
com.google.android.gms/com.google.android.location.copresence.service.Pro ximitySettingInjectorService
com.facebook.katana/com.facebook.analytics.service.AnalyticsService
com.facebook.orca/com.facebook.analytics.service.AnalyticsService
com.android.cellbroadcastreceiver/.CellBroadcastAlertService
com.android.cellbroadcastreceiver/.CellBroadcastConfigService



NB:I don't use Location Service.That's why I've disabled the location Services.If your'e using Location service,do not disable the services with location and GPS tag)

Alarms(REGEX Blocking)
ALARM_WAKEUPxxxxx


Procedure(Screens attached)
Open Amplify.
Select Alarms from the menu.
Tap the list icon on the top right corner
Tap + button on top.
Add the following code to 'Enter Regex to match'

Code:
ALARM_WAKEUP[0-9]+
Set the interval to 9999999 seconds.
Re: Major Causes Of Battery Drain In Android Devices by Nobody: 4:14am On Mar 19, 2016
As a contribution OP, greenify is also superb.

You can use Greenify to hibernate apps that are not in use.You can use Donation Package of Greenify which includes lots of features.Once you have a Donation Package with you,you need to activate the Greenify Xposed Module in Xposed.Once done,enable the Boost mode and Experimental Features.See attached screenshots.

Below are some of the major drainers:

Browser
Facebook
Facebook Messenger
Google+
Hangouts
Hike
Instagram
Maps
UC Browser

Marshmallow Settings

Greenify introduced a new feature in Greenify 2.9 beta 1 which disables the "Motion Sensing" of doze.This can be achieved by turning ON the "Aggressive Doze" in Greenify settings.Unlike the default behaviour of doze,the device won't be kicked out of doze when a motion is detected.This helps in complete utilization of "doze".All you have to do is to enable the "Aggressive Doze" option in Greenify settings.See the attached screenshots.

Note: There's no need to hibernate all the apps.Do not Greenify Dialer or Messaging apps.

AppOpsXposed
AppOps is a permission manager in android.There are various versions of AppOps available in the PlayStore.I recommend the one linked with Xposed.(You can also use CyanogenMod Privacy Guard).

Download : http://forum.xda-developers.com/attachment.php?attachmentid=3654798&d=1456077892

AppOpsXposed

You can use Privacy Guard to disable some permissions of Google Play Services and Google Services Framework

Navigate to Settings->Hacks->Check FIX OP_WAKE_LOCK
Disable the following Permissions of Google Play Services using AppOps
OP_ALARM_WAKEUP/Wake Up
Keep Awake

Disable the following permissons of Google Services Framework
Keep Awake

Use Auto Start Permission of AppOpsXposed to disable apps on Boot.Make sure you do not disable crucial System Apps.Disable unwanted user apps that trigger on Boot.

Re: Major Causes Of Battery Drain In Android Devices by Nobody: 4:21am On Mar 19, 2016
I use this setting on my tab. See the screenshot below as i can't post it cos of the spa.mbo.t

Re: Major Causes Of Battery Drain In Android Devices by Nobody: 9:00am On Mar 19, 2016
See the screenshot of my own Amplify application and notice the number of times different wakelocks, alarms and services have woken up my device. Some are over 20,000 times. Such activity kills battery cos the processor needs to work more when they are supposed to be asleep(in deep sleep mode as explained by OP)

Re: Major Causes Of Battery Drain In Android Devices by Nobody: 9:01am On Mar 19, 2016
And these

Re: Major Causes Of Battery Drain In Android Devices by MilesLamar(m): 2:13pm On Mar 19, 2016
I no go kuku buy phone with 4000mAh or more? undecided

(1) (Reply)

What Is The Worst Phone You Have Used So Far? / Why Your Smart Phone May Be Your Enemy / NCC To Launch Mobile Number Portability On March 26

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 40
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.