[Android Q&A, Help & Troubleshooting] skatertim:
Hey folks,

I've bought a China rugged phone (Doogee S60) for using it with OSMAND when driving my motorbike or when on a hiking trip. Because battery life is important and because I'm using prepaid SIM card, my attention was on battery usage and data volume usage while first time hands on the phone. As often the case, Google Play Services are draining battery and - which is not common - those are "eating" my data plan of prepaid SIM card. But first things first:

Android and Google Play Services versions:

Android 7.0 - Patch Level November 5, 2017

Not rooted, stock ROM

Google Play Services 12.2.17 (has been updated manually)

Installed apps:

NovaLauncher 5.5.3

WhatsApp

Telegram

OSMAND free

Firefox

Doogee Home (launching browser with Website / old launcher)

Toolbox

MediaTek apps for sensors

SOS button app (disabled)

What I've done so far (basic stuff):

To limit battery consumption, I've disabled every Google app (PlayStore, Music, Maps, Chrome, Backup Transport, Account Manager, ...) with exception of Google Play Services. Also I've turned off "Find my phone", "Nearby" and limited "Location" to "Only GPS". So I could improve battery usage, but still Google Play Services is the second consumer of battery (after Display) and the top consumer of cellular data is Play Services. So I've turned off "Background data" for Google Play Services. It looked like I could limit it to a good level (approx. 2 MB per day), it's still communicating. Push services should be impossible now and even Push service is possible, in compare to my day-by-day used Android phone, data usage of services is too high. So I started investigation as far as my computer knowledge will let me.

Current issue:

To cut the story short: I went through USB debugging and other stuff. I could find out following, which is not the case on my normal phone.

netstat

Many open connections to Google servers (port 5228 / nothing is transmitted or received).

More than 10 connections opened by process com.google.android.gms. :confused:​

Google Play services diagnostic app

It's showing those events almost endless:

03-05 13:10:10.232 net=0: Mobile Network Class [2]
03-05 13:10:10.431 net=0: Failed connection ev:1 state:3 err:10
03-05 13:10:15.112 net=0 Mobile Network Class [2]
03-05 13:10:15.245 net=0: Failed connection ev:1 state:3 err:10

Status is:

[COLOR="DarkRed"]DeviceID: null[/COLOR]
Not connected
ReconnectManager: next reconnect attempt in XX:XXs
alarm(XX:XX initial: 900s)
Last network state notification: 0/CONNECTED, time
19:32:50s ago
active network type: 0
Connected: 19:32:50/23:58:45
Network status: ON Previous Network stauts: ON

Note: My other phone has a DeviceID and Play Services are connected fine. On both phones no Play Store account is configured.​

I found following entries in log files:

[COLOR="Gray"]03-05 15:45:53.982 1416 1861 I ly20170220: lte level 4[/COLOR]
03-05 15:45:54.022 1945 18894 I System.out: [socket][398] connection mtalk.google.com/64.233.167.188:5228;LocalPort=-1(20000)
03-05 15:45:54.386 1945 18894 I System.out: [socket][/10.181.154.XXX:44496] connected
[COLOR="gray"]03-05 15:45:54.645 355 355 I wmt_launcher: fw log ctrl flag has been set
03-05 15:45:54.645 355 355 I wmt_launcher: fw dynamic ctrl flag has been set
03-05 15:45:55.095 6372 6558 I CastDatabase: Saving the database
03-05 15:45:55.108 6372 6558 I SQLiteCastStore: [CastNetworkInfo] saved: 0, skipped: 0, [CastDeviceInfo]: saved 0, skipped 0, Paired Guest Mode DeviceInfo] saved: 0, skipped: 0. [ProbedNetworks]: save 0, skipped: 0
03-05 15:45:55.289 1416 1416 I RecentsImpl: RecentsReceiver action:com.android.systemui.recents.action.CLEAR_TASKS
03-05 15:45:55.289 1416 1416 I RecentsImpl: forceStopThirdApp
03-05 15:45:55.290 1416 1416 I RecentsImpl: forceStopThirdApp clearState:0
03-05 15:45:55.326 1945 18894 I GCM : GCM config loaded
03-05 15:45:55.328 1945 18894 I GCM : GCM config loaded[/COLOR]
03-05 15:45:55.343 1945 18894 I System.out: close [socket][/10.181.154.XXX:44496]
[COLOR="DarkRed"]03-05 15:45:55.346 1945 18894 E WakeLock: release without a matched acquire![/COLOR]
03-05 15:45:55.412 1945 18897 I System.out: [socket][399] connection alt7-mtalk.google.com/74.125.21.188:5228;LocalPort=-1(20000)
03-05 15:45:55.559 1945 18897 I System.out: [socket][/10.181.154.XXX:60460] connected
[COLOR="Gray"]03-05 15:45:55.981 1416 1861 I ly20160721: gona_make_a_update
03-05 15:45:55.982 1416 1861 I ly20170220: lte level 4
03-05 15:45:56.057 1945 18897 I GCM : GCM config loaded
03-05 15:45:56.057 1945 18897 I GCM : GCM config loaded[/COLOR]
03-05 15:45:56.072 1945 18897 I System.out: close [socket][/10.181.154.XXX:60460]
[COLOR="darkred"]03-05 15:45:56.077 1945 18897 E WakeLock: release without a matched acquire![/COLOR]
03-05 15:45:56.080 1141 12538 I System.out: [CDS][DNS] getAllByNameOnNet netId = 101
03-05 15:45:56.156 1141 12538 I System.out: [CDS][DNS] getAllByNameOnNet netId = 101
[COLOR="DarkRed"]03-05 15:45:56.160 1141 12538 I System.out: [socket][171] connection captive.apple.com/17.253.79.202:80;LocalPort=-1(10000)[/COLOR]
03-05 15:45:56.209 1141 12538 I System.out: [socket][/10.181.154.XXX:57446] connected
03-05 15:45:56.209 1141 12538 I System.out: [OkHttp] sendRequest>>
03-05 15:45:56.209 1141 12538 I System.out: [OkHttp] sendRequest<<
03-05 15:45:56.282 1141 12538 I System.out: close [socket][/10.181.154.XXX:57446]
03-05 15:45:56.285 1141 12538 I System.out: Close in OkHttp

Process ID 1945 is "com.google.android.gms.persistent".

Process ID 1141 is "system server". I have no clue why this phone is contacting apple. :eek:​

Conclusion

It seems like Google Play Service is faulty. Even if background data option is turned off, those services try to connect to Google servers, keep connection open and close them again - according to log files. Due all 15 minute cyclic reconnection attempts, it's using cellular data volume unnecessarily. Per day around 2 MB. I've cleared Google Play Services cache and rebooted phone - without effect. Yes, I could ignore described issue because it's not affecting phone functionality itself.

I'm at a point, where I have no further idea and I would like to ask you ladies and gentlemen if you had similar issues in past and/or if you have other ideas how to proceed with investigation. For example: How I can set a Device ID? Thanks for any helpful input.

Best regards,

Tim