1

I notice the battery on my Huawei P8 Lite (stock firmware ALE-L21C432B574 Marshmallow 6.0) drains quite fast when using GPS and a map application during bicycle rides. It used to last longer when I bought the phone about a year ago.

I wonder if the GPS is actually paused when I turn the screen off.

Is there a way to know for sure, using some kind of monitor?

Thank you.


Edit : here's the output of "dumpsys location":

C:\Program Files\MyPhoneExplorer\DLL>adb shell

shell@hwALE-H:/ $ dumpsys location

dumpsys location
Current Location Manager state:
  Location Listeners:
    Reciever[4ab4e84 listener UpdateRecord[local_database android(1000) Request[
POWER_LOW network requested=+24h0m0s0ms fastest=+24h0m0s0ms]] UpdateRecord[netwo
rk android(1000) Request[POWER_LOW network requested=+24h0m0s0ms fastest=+24h0m0
s0ms]]]
    Reciever[cdab2f0 listener UpdateRecord[local_database android(1000) Request[
POWER_NONE passive fastest=0]] UpdateRecord[passive android(1000) Request[POWER_
NONE passive fastest=0]]]
    Reciever[b916c9c listener UpdateRecord[local_database com.google.android.gms
(10008) Request[POWER_NONE passive fastest=0]] UpdateRecord[passive com.google.a
ndroid.gms(10008) Request[POWER_NONE passive fastest=0]]]
    Reciever[9fe164 listener UpdateRecord[local_database android(1000) Request[P
OWER_NONE passive fastest=0]] UpdateRecord[passive android(1000) Request[POWER_N
ONE passive fastest=0]]]
    Reciever[6d62829 listener UpdateRecord[local_database com.google.android.gms
(10008) Request[POWER_NONE passive fastest=0]] UpdateRecord[passive com.google.a
ndroid.gms(10008) Request[POWER_NONE passive fastest=0]]]
  Active Records by Provider:
    network:
      UpdateRecord[network android(1000) Request[POWER_LOW network requested=+24
h0m0s0ms fastest=+24h0m0s0ms]]
    fused:
    passive:
      UpdateRecord[passive android(1000) Request[POWER_NONE passive fastest=0]]
      UpdateRecord[passive android(1000) Request[POWER_NONE passive fastest=0]]
      UpdateRecord[passive com.google.android.gms(10008) Request[POWER_NONE pass
ive fastest=0]]
      UpdateRecord[passive com.google.android.gms(10008) Request[POWER_NONE pass
ive fastest=0]]
    local_database:
      UpdateRecord[local_database android(1000) Request[POWER_NONE passive faste
st=0]]
      UpdateRecord[local_database android(1000) Request[POWER_NONE passive faste
st=0]]
      UpdateRecord[local_database android(1000) Request[POWER_LOW network reques
ted=+24h0m0s0ms fastest=+24h0m0s0ms]]
      UpdateRecord[local_database com.google.android.gms(10008) Request[POWER_NO
NE passive fastest=0]]
      UpdateRecord[local_database com.google.android.gms(10008) Request[POWER_NO
NE passive fastest=0]]
    gps:
  Historical Records by Provider:
    fr.paris.android.signalement: gps: Interval 0 seconds: Duration requested 20
9 out of the last 18753 minutes
    fr.paris.android.signalement: local_database: Min interval 0 seconds: Max in
terval 1 seconds: Duration requested 210 out of the last 18753 minutes
    mobi.mgeek.TunnyBrowser: network: Interval 600 seconds: Duration requested 1
091 out of the last 24349 minutes
    com.mapswithme.maps.pro: local_database: Min interval 1 seconds: Max interva
l 10 seconds: Duration requested 89 out of the last 24388 minutes
    com.huawei.camera: gps: Interval 1 seconds: Duration requested 9 out of the
last 21196 minutes
    com.android.chrome: local_database: Interval 0 seconds: Duration requested 1
 out of the last 3121 minutes
    com.android.chrome: network: Interval 0 seconds: Duration requested 1 out of
 the last 3121 minutes
    me.guillaumin.android.osmtracker: gps: Interval 0 seconds: Duration requeste
d 1 out of the last 18519 minutes
    android: network: Interval 86400 seconds: Duration requested 23790 out of th
e last 23790 minutes: Currently active
    com.mapswithme.maps.pro: passive: Interval 10 seconds: Duration requested 50
 out of the last 24388 minutes
    com.android.vending: local_database: Interval 0 seconds: Duration requested
24 out of the last 24396 minutes
    com.google.android.gms: local_database: Min interval 0 seconds: Max interval
 5 seconds: Duration requested 22797 out of the last 24396 minutes: Currently ac
tive
    com.huawei.camera: network: Interval 1 seconds: Duration requested 9 out of
the last 21196 minutes
    com.mapswithme.maps.pro: gps: Min interval 1 seconds: Max interval 3 seconds
: Duration requested 40 out of the last 24388 minutes
    fr.paris.android.signalement: network: Min interval 0 seconds: Max interval
1 seconds: Duration requested 210 out of the last 18753 minutes
    com.huawei.android.totemweather: network: Interval 0 seconds: Duration reque
sted 527 out of the last 23809 minutes
    me.guillaumin.android.osmtracker: local_database: Interval 0 seconds: Durati
on requested 1 out of the last 18519 minutes
    android: passive: Interval 0 seconds: Duration requested 24396 out of the la
st 24396 minutes: Currently active
    com.huawei.android.totemweather: local_database: Interval 0 seconds: Duratio
n requested 528 out of the last 24364 minutes
    com.huawei.android.totemweather: gps: Interval 0 seconds: Duration requested
 7 out of the last 24364 minutes
    com.google.android.gms: passive: Interval 0 seconds: Duration requested 2279
7 out of the last 24396 minutes: Currently active
    android: local_database: Min interval 0 seconds: Max interval 86400 seconds:
 Duration requested 24396 out of the last 24396 minutes: Currently active
    com.mapswithme.maps.pro: network: Min interval 1 seconds: Max interval 3 sec
onds: Duration requested 25 out of the last 23809 minutes
    mobi.mgeek.TunnyBrowser: fused: Interval 0 seconds: Duration requested 1 out
 of the last 6081 minutes
    com.android.vending: fused: Interval 0 seconds: Duration requested 23 out of
 the last 24396 minutes
    com.huawei.camera: local_database: Interval 1 seconds: Duration requested 9
out of the last 21196 minutes
    com.google.android.gms: gps: Min interval 0 seconds: Max interval 5 seconds:
 Duration requested 12 out of the last 23477 minutes
    mobi.mgeek.TunnyBrowser: local_database: Min interval 0 seconds: Max interva
l 600 seconds: Duration requested 1091 out of the last 24349 minutes
  Last Known Locations:
  Last Known Locations Coarse Intervals:
  Geofences:
  Enabled Providers:
    local_database
    fused
    passive
  mWhitelist=[] mBlacklist=[]
  fudger: offset: 295, 1246 (meters)
passive Internal State:
mReportLocation=true
gps Internal State:
  mFixInterval=0
  mDisableGps (battery saver mode)=false
  mEngineCapabilities=0xf (SCHED MSB MSA SINGLE_SHOT )
nullnetwork Internal State (com.google.android.gms):
REMOTE SERVICE name=network pkg=com.google.android.gms version=2
service down (null)
fused Internal State (com.google.android.gms):
REMOTE SERVICE name=fused pkg=com.google.android.gms version=1
service down (null)
local_database Internal State:
  LocationPowerTracker:
    Gps history of com.google.android.gms, delay time is 0
      Record [Start=1480591831467, End=1480591831469]

Location Freeze Proc:
shell@hwALE-H:/ $
1
  • If the app you use is recording the route you would expect it to keep the gps on when the screen is off. If ts is not recording the route you would expect it to switch it off. I think you can see the gps on state on the battery drain graph from settings so you should be able to take a look at that.
    – Ifor
    Commented Dec 1, 2016 at 17:28

1 Answer 1

0

You can use ADB and execute a command on your phone while the screen is off with your PC.

First do adb shell and then dumpsys location and examine the output. Unfortunately I haven't needed this before and I don't know which exactly property do you need to check in the output but I'm sure something in there will help you further.

You could maybe execute it with the screen on and location on and then once more with screen off and compare outputs.

4
  • Thanks. If possible, I'd rather let an application run while the screen is off and gather data, as it's easier to use.
    – Gulbahar
    Commented Dec 1, 2016 at 12:42
  • In that case you will need to find an app and it depends how does the screen on/off affect the monitoring app itself. If nothing else, the ADB method if probably the most accurate info you can get and being sure there was no interference from some other events on your phone.
    – Chapz
    Commented Dec 1, 2016 at 12:47
  • I tried adb and it outputs a lot of data. Does someone know what to look for to check if GPS is pause or not?
    – Gulbahar
    Commented Dec 1, 2016 at 13:43
  • Look at the end for Enabled Providers, what does it say?
    – Chapz
    Commented Dec 1, 2016 at 14:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .