Ok, trying some more debugging:
The state of browser_mod reports the tablet as offline here in home-assistant.log:
2021-01-11 06:36:17 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.browser_mod_e6374c4f_f08d8xxx …
I have a matching entry in the home-assistant.log showing the disconnection of the websocket connection, so the problem must have happened already by then:
2021-01-11 06:36:09 INFO (MainThread) [homeassistant.components.websocket_api.http.connection] [140216985801920] Connection closed by client
I downloaded the debug-report from the tablet. In the log is the “Recent wakeup history”:
2021-01-11 06:35:52.338|1|10170|0|MqttService.pingSender.tab1
2021-01-11 06:35:52.900|562|10170|0|MqttService.pingSender.tab1
2021-01-11 06:35:52.933|33|10170|0|MqttService.pingSender.tab1
2021-01-11 06:35:53.287|354|10170|0|MqttService.pingSender.tab1
2021-01-11 06:35:53.329|42|10170|0|MqttService.pingSender.tab1
2021-01-11 06:35:53.331|2|10170|0|MqttService.pingSender.tab1
2021-01-11 06:35:53.333|2|10170|0|MqttService.pingSender.tab1
2021-01-11 06:35:56.575|3242|10170|0|MqttService.pingSender.tab1
2021-01-11 06:35:56.602|27|10170|0|MqttService.pingSender.tab1
2021-01-11 06:36:01.575|4973|10170|0|MqttService.pingSender.tab1
2021-01-11 06:36:01.600|25|10168|2|com.google.android.gms.gcm.ACTION_CHECK_QUEUE
2021-01-11 06:36:03.330|1730|1000|2|<listener>:*job.delay*
2021-01-11 06:36:03.388|58|10170|0|MqttService.pingSender.tab1
2021-01-11 06:36:06.578|3190|10170|0|MqttService.pingSender.tab1
2021-01-11 06:36:18.739|12161|10168|2|com.google.android.intent.action.GCM_RECONNECT
2021-01-11 06:36:24.180|5441|1000|2|<listener>:*job.delay*
2021-01-11 06:36:24.180|0|10168|3|null
2021-01-11 06:36:27.022|2842|10168|2|com.google.android.gms.gcm.ACTION_CHECK_QUEUE
2021-01-11 06:37:04.680|37658|1000|2|<listener>:*job.delay*
2021-01-11 06:37:04.680|0|10168|3|null
2021-01-11 06:37:12.942|8262|10170|0|MqttService.pingSender.tab1
2021-01-11 06:37:15.796|2854|10042|2|com.android.internal.policy.impl.PhoneWindowManager.DELAYED_KEYGUARD
2021-01-11 06:37:17.948|2152|10170|0|MqttService.pingSender.tab1
2021-01-11 06:37:22.954|5006|10170|0|MqttService.pingSender.tab1
2021-01-11 06:37:27.961|5007|10170|0|MqttService.pingSender.tab1
2021-01-11 06:37:32.965|5004|10170|0|MqttService.pingSender.tab1
Nothing very suspicious but the GCM_RECONNECT is the only occurence in the log so I assume it’s reconnecting after the connection was somehow broken.
Further down the debug is this, nicely matching the timeframe:
DUMP OF SERVICE dropbox:
...
2021-01-11 06:35:06 Log.main (contents lost)
2021-01-11 06:35:06 Log.main (contents lost)
2021-01-11 06:35:52 event_data (text, 39 bytes)
start=1610341522537/end=1610343352520
2021-01-11 06:36:08 system_app_crash (text, 2493 bytes)
Process: com.google.android.gms.persistent/Package: com.google.android ...
2021-01-11 06:40:06 Log.main (contents lost)
2021-01-11 06:40:06 Log.main (contents lost)
2021-01-11 06:40:06 Log.main (contents lost)
Indeed, looking for : “system_app_crash” in the log reveals:
========================================
2021-01-11 06:36:08 system_app_crash (text, 2493 bytes)
Process: com.google.android.gms.persistent
Package: com.google.android.gms v204714024 (20.47.14 (100300-349456378))
Build: Amazon/karnak/karnak:7.0/PS7315/1961N:user/amz-p,release-keys
java.lang.RuntimeException: Unable to stop service com.google.android.gms.magictether.host.TetherListenerService@b662e46: java.lang.SecurityException: App not allowed to read or update stored WiFi Ap config (uid = 10168)
at android.app.ActivityThread.handleStopService(ActivityThread.java:3738)
at android.app.ActivityThread.access$1700(ActivityThread.java:207)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6734)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.SecurityException: App not allowed to read or update stored WiFi Ap config (uid = 10168)
at android.os.Parcel.createException(Parcel.java:1950)
at android.os.Parcel.readException(Parcel.java:1918)
at android.os.Parcel.readException(Parcel.java:1868)
at android.net.wifi.IWifiManager$Stub$Proxy.getWifiApConfiguration(IWifiManager.java:1731)
at android.net.wifi.WifiManager.getWifiApConfiguration(WifiManager.java:2155)
at agrp.a(:com.google.android.gms@204714024@20.47.14 (100300-349456378):0)
at agrr.a(:com.google.android.gms@204714024@20.47.14 (100300-349456378):1)
at agqi.a(:com.google.android.gms@204714024@20.47.14 (100300-349456378):1)
at agpt.d(:com.google.android.gms@204714024@20.47.14 (100300-349456378):2)
at com.google.android.gms.magictether.host.TetherListenerChimeraService.b(:com.google.android.gms@204714024@20.47.14 (100300-349456378):4)
at com.google.android.gms.magictether.host.TetherListenerChimeraService.onDestroy(:com.google.android.gms@204714024@20.47.14 (100300-349456378):2)
at rch.onDestroy(:com.google.android.gms@204714024@20.47.14 (100300-349456378):3)
at android.app.ActivityThread.handleStopService(ActivityThread.java:3718)
... 8 more
...
Ah and here is the part where Wallpanel dies (as a consequence of the above?):
01-11 06:36:09.009 1000 544 1421 I am_proc_died: [0,7731,com.google.android.gms.persistent,0,95604]
01-11 06:36:09.018 1000 544 1421 I am_schedule_service_restart: [0,com.google.android.gms/.instantapps.service.InstantAppsService,1000]
01-11 06:36:09.018 1000 544 1421 I am_schedule_service_restart: [0,com.google.android.gms/com.google.android.location.internal.server.GoogleLocationService,11000]
01-11 06:36:09.018 1000 544 1421 I am_schedule_service_restart: [0,com.google.android.gms/.gcm.GcmService,21000]
01-11 06:36:09.018 1000 544 1421 I am_schedule_service_restart: [0,com.google.android.gms/com.google.android.location.internal.GoogleLocationManagerService,30999]
01-11 06:36:09.018 1000 544 1421 I am_schedule_service_restart: [0,com.google.android.gms/com.google.android.contextmanager.service.ContextManagerService,40999]
01-11 06:36:09.018 1000 544 1421 I am_schedule_service_restart: [0,com.google.android.gms/.tron.CollectionService,50999]
01-11 06:36:09.019 1000 544 1421 I am_schedule_service_restart: [0,com.google.android.gms/.nearby.sharing.ReceiveSurfaceService,60999]
01-11 06:36:09.019 1000 544 1421 I am_schedule_service_restart: [0,com.google.android.gms/com.google.android.location.reporting.service.DispatchingService,70999]
01-11 06:36:09.020 1000 544 1421 I am_schedule_service_restart: [0,com.google.android.gms/.chimera.PersistentDirectBootAwareApiService,70998]
01-11 06:36:09.020 1000 544 1421 I am_schedule_service_restart: [0,com.google.android.gms/.chimera.PersistentIntentOperationService,80998]
01-11 06:36:09.021 1000 544 1421 I am_kill : [0,23871,com.thanksmister.iot.wallpanel,200,depends on provider com.google.android.gms/.chimera.container.GmsModuleProvider in dying proc com.google.android.gms.persistent (adj 0)]
01-11 06:36:09.023 1000 544 1421 I am_broadcast_discard_app: [0,154382097,com.google.android.gms.phenotype.COMMITTED,0,ResolveInfo{2f42f49 com.google.android.gms/.chimera.GmsIntentOperationService$PersistentInternalReceiver m=0x108000}]
01-11 06:36:09.038 wifi 366 366 I auditd : type=1400 audit(0.0:1199390): avc: denied { read } for comm="wlan_assistant" name="nvdata" dev="tmpfs" ino=1315 scontext=u:r:wlan_assistant:s0 tcontext=u:object_r:nvdata_file:s0 tclass=lnk_file permissive=0
01-11 06:36:09.072 1000 544 564 I am_proc_start: [0,17575,10168,com.google.android.gms.persistent,broadcast,com.google.android.gms/.chimera.GmsIntentOperationService$PersistentInternalReceiver]
01-11 06:36:09.110 1000 544 2724 I am_proc_bound: [0,17575,com.google.android.gms.persistent]
01-11 06:36:09.214 1000 544 4963 I am_proc_died: [0,23871,com.thanksmister.iot.wallpanel,200,132314]
01-11 06:36:09.244 1047 323 24041 I liblog : 214
01-11 06:36:09.244 1047 323 24041 I chatty : uid=1047(cameraserver) /system/bin/cameraserver identical 1 line
01-11 06:36:09.244 1047 323 24041 I liblog : 1
01-11 06:36:09.259 1000 544 4963 I am_schedule_service_restart: [0,com.thanksmister.iot.wallpanel/.network.WallPanelService,1000]
01-11 06:36:09.259 1000 544 4963 I am_schedule_service_restart: [0,com.thanksmister.iot.wallpanel/org.eclipse.paho.android.service.MqttService,11000]
01-11 06:36:09.259 1000 544 4963 I am_uid_stopped: 10170
01-11 06:36:09.260 1000 544 544 I sysui_multi_action: [757,128,758,5,759,8,793,201265036,794,0,795,201263833,796,1,806,com.thanksmister.iot.wallpanel,857,com.thanksmister.iot.wallpa-ded44f4d,858,2,947,0]
01-11 06:36:09.260 1000 544 4963 I am_finish_activity: [0,182098856,395,com.thanksmister.iot.wallpanel/.ui.activities.BrowserActivityNative,proc died without state saved]
01-11 06:36:09.260 1000 544 544 I notification_canceled: [0|com.thanksmister.iot.wallpanel|1|null|10170,8,201265036,201263833,0,-1,-1,NULL]
01-11 06:36:09.282 1000 544 4963 I wm_task_removed: [395,removeAppToken: last token]
01-11 06:36:09.283 1000 544 4963 I am_remove_task: [395,8]
01-11 06:36:09.283 1000 544 4963 I wm_task_removed: [395,removeTask]
01-11 06:36:09.293 1000 544 4963 I am_focused_stack: [0,0,8,appDied leftTaskHistoryEmpty]
My guess as a non-android-dev would be: the Google Play Services (com.google.android.gms.persistent) die (they are not supposed to run on a fire tablet anyway, I just installed them) when trying to modify the Wifi settings.
As a result Wallpanel also dies as it somehow depends on them.
Maybe @Mister can chime in if there is anything that could be done?