[BetterBatteryStats] all the pugs:
Hello folks,

due to this thread, I was able to track down my wakelock problems and was able to resolve quite a lot of them by myself! THANK YOU EVERYBODY!

However, there is only one more issue I'm not able to understand, so I thought maybe asking here will help me out.

I'm using the Huawei P20 Pro, which has a 4000mah battery, but I was only able to get around 3h of DOT, without doing much with the device (the usual stuff: emails, a bit of browsing or spotify on the go, no games, no facebook). With the help of BBS, I found out that there were literally millions of ts_wake_lock counts which drained the battery during the day.

So I did a low level factory reset, removed or stopped as many apps as I could, and the issue went away. After re-installing Huawei Health, the issue appears again, but not so severe as before. What's happening is, after charging the device and unplugging, everything is fine for around an half hour. Then, Huawei Health AND the Google Play Service seem to be registering touch events (ts_wake_lock) and rapid motion events on the sensor. However, the device lays untouched in my bedroom drawer. No touchy, no moving. I already removed the permission for the body sensors for the Google Play Services app, but it is still happening.

Can anybody help me understand WHY this is happening? Why is this sensor registering rapid movement when the device is locked and tucked away, and why do these ts_wake_locks happen?

I attached screenshots and log info from this night.

Thank you very much in advance!

Edit: The screenshots just won't show up. I attached them as a zip.

/*
===================
General Information
===================
BetterBatteryStats version: 2.3-247
Creation Date: 2018-07-11 06:17:55
Statistic Type: Unplugged to Current
Since 7 h 6 m 59 s
Note:
VERSION.RELEASE: 8.1.0
BRAND: HUAWEI
DEVICE: HWCLT
MANUFACTURER: HUAWEI
MODEL: CLT-L29
OS.VERSION: 4.4.103+
BOOTLOADER: unknown
HARDWARE: kirin970
FINGERPRINT: HUAWEI/CLT-L29/HWCLT:8.1.0/HUAWEICLT-L29/131(C432):user/release-keys
ID: HUAWEICLT-L29
TAGS: release-keys
USER: test
PRODUCT: CLT-L29
RADIO: 21C20B365S000C000,21C20B365S000C000
Root perms: false
SELinux Policy:
BATTERY_STATS permission granted: true
XPosed BATTERY_STATS module enabled: false
============
Battery Info
============
Level lost [%]: Bat.: -2%(100% to 98%) [0,3%/h]
Voltage lost [mV]: (4373-4221) [21,4%/h]
===========
Other Usage
===========
Deep Sleep (): 6 h 58 m 20 s 98,0%
Awake (Screen Off) (): 6 m 42 s 1,6%
Screen On (): 1 m 56 s 0,5%
Wifi On (): 50 m 58 s 11,9%
Wifi Running (): 50 m 58 s 11,9%
Doze Interactive Time (): 1 m 55 s 0,5%
Doze Idle Mode Time (): 6 h 56 m 8 s 97,5%
Sync (): 8 s 0,0%
No Data Connection (): 7 h 6 m 50 s 100,0%
Great Signal (): 7 h 6 m 59 s 100,0%
Screen dark (): 1 m 56 s 0,5%
======================================================
Wakelocks (requires root / system app on Android 4.4+)
======================================================
deviceidle_maint (Android-System): 1 m 3 s Count:42 0,2%
ConnectivityService (Android-System): 13 s Count:36 0,1%
AnyMotionDetector (Android-System): 10 s Count:37 0,0%
GCM_CONN_ALARM (Google Play-Dienste): 9 s Count:130 0,0%
backupdb (com.whatsapp.WhatsApp): 5 s Count:16 0,0%
BleScanner_WakeLock (Google Play-Dienste): 5 s Count:128 0,0%
Step_DaemonStaticLogicalReceiver (com.huawei.health.Health): 4 s Count:2 0,0%
*alarm* (Android-System): 3 s Count:205 0,0%
AudioMix (1041): 3 s Count:1 0,0%
NlpCollectorWakeLock (Google Play-Dienste): 1 s Count:149 0,0%
GeofencePendingIntentWakeLock (Google Play-Dienste): 1 s Count:171 0,0%
*net_scheduler* (Google Play-Dienste): 1 s Count:353 0,0%
*job*/is.shortcut/com.ticlock.com.evernote.android.job.v21.PlatformJobService (is.shortcut.Evie): 1 s Count:4 0,0%
GnssLocationProvider (Android-System): 1 s Count:95 0,0%
================
Kernel Wakelocks
================
[B]Active resource: ts_wake_lock (*api*): 2 h 39 m 38 s Cnt:(c/wc/ec)4511/0/0 37,4%[/B]
Active resource: PowerManagerService.WakeLocks (*api*): 3 m 5 s Cnt:(c/wc/ec)144/0/0 0,7%
PowerManagerService.WakeLocks (*api*): 3 m 5 s Cnt:(c/wc/ec)144/0/0 0,7%
bluesleep (*api*): 2 m 31 s Cnt:(c/wc/ec)32/0/0 0,6%
ts_wake_lock (*api*): 46 s Cnt:(c/wc/ec)33/0/0 0,2%
ads_tx_wake (*api*): 24 s Cnt:(c/wc/ec)30/0/0 0,1%
sensorhub (*api*): 21 s Cnt:(c/wc/ec)18/0/0 0,1%
[timerfd] (*api*): 16 s Cnt:(c/wc/ec)493/0/0 0,1%
GPSD (*api*): 13 s Cnt:(c/wc/ec)865/0/0 0,1%
NETLINK (*api*): 7 s Cnt:(c/wc/ec)978/0/0 0,0%
hi64xx-resmgr (*api*): 6 s Cnt:(c/wc/ec)16/0/0 0,0%
ads_rx_wake (*api*): 3 s Cnt:(c/wc/ec)1/0/0 0,0%
fpc_ttw_wl (*api*): 3 s Cnt:(c/wc/ec)7/0/0 0,0%
alarmtimer (*api*): 2 s Cnt:(c/wc/ec)1/0/0 0,0%
otg_default (*api*): 1 s Cnt:(c/wc/ec)0/0/0 0,0%
appvcom53_rd_wake (*api*): 1 s Cnt:(c/wc/ec)19/0/0 0,0%
android-pwr (*api*): 1 s Cnt:(c/wc/ec)1/0/0 0,0%
event5 (*api*): Cnt:(c/wc/ec)1530/0/0 0,0%

**** SNIPP ****

=========
Processes
=========
system (Android-System): Uid: 1000 Sys: 8 m 22 s Us: 5 m 47 s Starts: 0
com.whatsapp (com.whatsapp.WhatsApp): Uid: 10148 Sys: 23 s Us: 2 m 38 s Starts: 0
com.google.android.gms.persistent (Google Play-Dienste): Uid: 10023 Sys: 30 s Us: 1 m 43 s Starts: 0
com.android.systemui (UID): Uid: 10032 Sys: 28 s Us: 1 m 21 s Starts: 0
com.huawei.powergenie (Android-System): Uid: 1000 Sys: 35 s Us: 37 s Starts: 0
surfaceflinger (0): Uid: 0 Sys: 29 s Us: 39 s Starts: 0

**** SNIPP ****

======================
Network
======================
1000 (Wifi) (Android-System): 287.0 KBytes 61,3%
10023 (Wifi) (Google Play-Dienste): 66.0 KBytes 14,2%
0 (Wifi) (0): 28.0 KBytes 6,0%

**** SNIPP ****

==========
CPU States
==========
1,84 GHz (): 1 m 14 s 0,3%
1,69 GHz (): 23 s 0,1%
1,56 GHz (): 12 s 0,0%
1,4 GHz (): 1 m 8 s 0,3%
1,21 GHz (): 4 s 0,0%
1,02 GHz (): 34 s 0,1%
509 MHz (): 5 m 2 s 1,2%
Deep Sleep (): 6 h 58 m 20 s 98,0%
==========
Sensors
==========
[B] (com.huawei.health.Health): Sensor: step counter(17), wakeup=false, Time: 6 h 44 m 29 s [/B]

[B] (Google Play-Dienste): Sensor: accelerometer-lsm6dsm(0), wakeup=false, Time: 13 s
Sensor: significant Motion(15), wakeup=true, Time: 4 h 52 m 41 s [/B]

(Android-System): Sensor: Unknown, Time: 6 s
Sensor: accelerometer-lsm6dsm(0), wakeup=false, Time: 10 s
Sensor: mag-akm09918(1), wakeup=false, Time: 5 s
Sensor: als-tmd3725(3), wakeup=false, Time: 0 s
Sensor: proximity-ams-tmd3725(4), wakeup=true, Time: 0 s
Sensor: gyroscope-lsm6dsm(5), wakeup=false, Time: 5 s
Sensor: uncalibrated Gyroscope(14), wakeup=false, Time: 2 s
Sensor: significant Motion(15), wakeup=true, Time: 19 m 1 s
Sensor: step counter(17), wakeup=false, Time: 22 m 30 s
Sensor: RPC sensor(24), wakeup=false, Time: 1 s
Sensor: color sensor(26), wakeup=false, Time: 0 s

(UID): Sensor: proximity-ams-tmd3725(4), wakeup=true, Time: 4 s

**** SNIPP ****
========
Services
========
Active since: The time when the service was first made active, either by someone starting or binding to it.
Last activity: The time when there was last activity in the service (either explicit requests to start it or clients binding to it)
See http://developer.android.com/reference/android/app/ActivityManager.RunningServiceInfo.html
com.asksven.betterbatterystats (com.asksven.betterbatterystats.services.EventWatcherService)
Active since: 3 h 32 m 2 s
Last activity: 9 h 32 m 32 s
Crash count:1
==================
Reference overview
==================
ref_custom: Reference ref_custom created 1 d 1 h 22 m 30 s (Wl: 50 elements; KWl: 83elements; NetS: 26 elements; Alrm: 13 elements; Proc: 312 elements; Oth: 16 elements; CPU: 8 elements; Sensors: 8 elements)
ref_unplugged: Reference ref_unplugged created 1 d 7 h 55 m 29 s (Wl: 0 elements; KWl: 81elements; NetS: 1 elements; Alrm: 19 elements; Proc: 121 elements; Oth: 9 elements; CPU: 8 elements; Sensors: 1 elements)
ref_charged: Reference ref_charged created 1 d 7 h 55 m 29 s (Wl: 0 elements; KWl: 81elements; NetS: 1 elements; Alrm: 19 elements; Proc: 121 elements; Oth: 8 elements; CPU: 8 elements; Sensors: 1 elements)
ref_current: Reference ref_current created 1 d 15 h 2 m 28 s (Wl: 14 elements; KWl: 83elements; NetS: 14 elements; Alrm: 21 elements; Proc: 234 elements; Oth: 11 elements; CPU: 8 elements; Sensors: 4 elements)
------ human readable part end here