Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

State of media_player very often changes from "turned off" to "unavailable" #29

Closed
bieniu opened this issue Oct 12, 2019 · 27 comments
Closed

Comments

@bieniu
Copy link

bieniu commented Oct 12, 2019

HA: 0.100.1
adb-shell: 0.0.4
Device: Xiaomi Mi Box TV 4K
Configuration:

- platform: androidtv
 host: !secret mibox_hostname
 adbkey: "~/.android/adbkey"
 name: "MiBox"

After turning off device (via remote) its media_player entity very often changes states from "turned off" to "unavailable". Wi-Fi connection is still active when device is off.

Debug log:

2019-10-12 10:48:27 WARNING (SyncWorker_1) [androidtv.adb_manager] Couldn't connect to host mibox.bieniu.lan:5555, error: Timed out trying to connect to ADB device.
2019-10-12 10:49:57 DEBUG (SyncWorker_4) [adb_shell.adb_device] bulk_write: b'CNXN\x00\x00\x00\x01\x00\x10\x00\x00\x10\x00\x00\x00\x0c\x06\x00\x00\xbc\xb1\xa7\xb1'
2019-10-12 10:49:57 DEBUG (SyncWorker_4) [adb_shell.adb_device] bulk_write: b'host::raspberry\x00'
2019-10-12 10:49:57 DEBUG (SyncWorker_4) [adb_shell.adb_device] bulk_read(24): b'AUTH\x01\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\xb3\n\x00\x00\xbe\xaa\xab\xb7'
2019-10-12 10:49:57 DEBUG (SyncWorker_4) [adb_shell.adb_device] bulk_read(20): b'\x88Lo\x8a\x13\xa7\xbb\xbd\xb4<2\xce\xfdy\xad\xd8}J\xc8:'
2019-10-12 10:49:57 DEBUG (SyncWorker_4) [adb_shell.adb_device] bulk_write: b'AUTH\x02\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\xed}\x00\x00\xbe\xaa\xab\xb7'
2019-10-12 10:49:57 DEBUG (SyncWorker_4) [adb_shell.adb_device] bulk_write: b'\x80H\x1d\xd18\x9c\x1c\xe4\n\xbb\xdf|N\x86f*\x8d4\xed\xca\x86b~\xf1l\x1f\xdc{H\xea\x94\xa5\xa4MUe\xeb\x9d\x90\r\xde\xee\xd5\x14\xd2AM\x0b\xf8-"\xbb\xb7\xca\x85\xf1J"\x83\xd09\x8b-$\xd1\x0b\xc9f9\xdc\xcf\xbeB4\\\x00\xb9q\xeb<H\xf6\xf3\x16\xfd\xf9MQ8\xab2\xa7qs\xbd\xa7h\xad\x14\xd1\x9c\x1bh~\xe6\x1e//\xda/\xe2\xdf\x88+\x9cp\x16\x1a\x15>\xff0\x170\xec\xb8\x92AT\x8b\xe2\x02\x05\x15\xcc\xbe\xfbE-u\x08\xbbC\'\xc0\x8d\xd5/\xd3\xdfF\xb4\xfe\\%c\xe1a3\xb3\xb6\x16z\xca8\xa8\xac\xea>\xa04\xd6w\xab\xb1Z\xfex\xec\xe3\xba\'\xaf\xe3\xb7y\xe1\x02\\K\x1c\xa0\x1b\x8c;\x90xA\xdd]AX\x9c\x92\xb8~\x1a\x03\x90c \x9a\xfc\xf7Z\x7fOF\x8dW\xa6]K\xd4a\xab\xc5\x16\x03\x7f&\xd97r\xbc\x14K\xb9G%\xee\xdaRz\x11\x0cql\xa2\xb0\xd4\xbc\xe6\xbdA\xe7'
2019-10-12 10:49:58 DEBUG (SyncWorker_4) [adb_shell.adb_device] bulk_read(24): b"CNXN\x00\x00\x00\x01\x00\x10\x00\x00i\x00\x00\x00.'\x00\x00\xbc\xb1\xa7\xb1"
2019-10-12 10:49:58 DEBUG (SyncWorker_4) [adb_shell.adb_device] bulk_read(105): b'device::ro.product.name=once;ro.product.model=MIBOX3;ro.product.device=once;features=stat_v2,cmd,shell_v2'
2019-10-12 10:50:08 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_write: b'OPEN\x01\x00\x00\x00\x00\x00\x00\x00\xb4\x02\x00\x00\x11\xdb\x00\x00\xb0\xaf\xba\xb1'
2019-10-12 10:50:08 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_write: b"shell:dumpsys power | grep 'Display Power' | grep -q 'state=ON' && echo -e '1\\c' && dumpsys power | grep mWakefulness | grep -q Awake && echo -e '1\\c' && (dumpsys audio | grep paused | grep -qv 'Buffer Queue' && echo -e '1\\c' || (dumpsys audio | grep started | grep -qv 'Buffer Queue' && echo '2\\c' || echo '0\\c')) && dumpsys power | grep Locks | grep 'size=' && CURRENT_APP=$(dumpsys window windows | grep mCurrentFocus) && CURRENT_APP=${CURRENT_APP#*{* * } && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP && (dumpsys media_session | grep -A 100 'Sessions Stack' | grep -A 100 $CURRENT_APP | grep -m 1 'state=PlaybackState {' || echo) && dumpsys audio | grep '\\- STREAM_MUSIC:' -A 12\x00"
2019-10-12 10:50:08 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_read(24): b'OKAY\x97\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:50:08 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_read(24): b'CLSE\x97\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:50:08 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_write: b'CLSE\x01\x00\x00\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:50:08 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:50:19 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b'OPEN\x01\x00\x00\x00\x00\x00\x00\x00\xb4\x02\x00\x00\x11\xdb\x00\x00\xb0\xaf\xba\xb1'
2019-10-12 10:50:19 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b"shell:dumpsys power | grep 'Display Power' | grep -q 'state=ON' && echo -e '1\\c' && dumpsys power | grep mWakefulness | grep -q Awake && echo -e '1\\c' && (dumpsys audio | grep paused | grep -qv 'Buffer Queue' && echo -e '1\\c' || (dumpsys audio | grep started | grep -qv 'Buffer Queue' && echo '2\\c' || echo '0\\c')) && dumpsys power | grep Locks | grep 'size=' && CURRENT_APP=$(dumpsys window windows | grep mCurrentFocus) && CURRENT_APP=${CURRENT_APP#*{* * } && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP && (dumpsys media_session | grep -A 100 'Sessions Stack' | grep -A 100 $CURRENT_APP | grep -m 1 'state=PlaybackState {' || echo) && dumpsys audio | grep '\\- STREAM_MUSIC:' -A 12\x00"
2019-10-12 10:50:28 ERROR (SyncWorker_12) [homeassistant.components.androidtv.media_player] Failed to execute an ADB command. ADB connection re-establishing attempt in the next update. Error: Reading from mibox.bieniu.lan:5555 timed out (9.0 seconds)
2019-10-12 10:50:38 WARNING (SyncWorker_13) [androidtv.adb_manager] Couldn't connect to host mibox.bieniu.lan:5555, error: Timed out trying to connect to ADB device.
2019-10-12 10:51:21 DEBUG (SyncWorker_1) [adb_shell.adb_device] bulk_write: b'CNXN\x00\x00\x00\x01\x00\x10\x00\x00\x10\x00\x00\x00\x0c\x06\x00\x00\xbc\xb1\xa7\xb1'
2019-10-12 10:51:21 DEBUG (SyncWorker_1) [adb_shell.adb_device] bulk_write: b'host::raspberry\x00'
2019-10-12 10:51:21 DEBUG (SyncWorker_1) [adb_shell.adb_device] bulk_read(24): b'AUTH\x01\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\xc5\n\x00\x00\xbe\xaa\xab\xb7'
2019-10-12 10:51:21 DEBUG (SyncWorker_1) [adb_shell.adb_device] bulk_read(20): b"\x17\xbf\xbf\xff\xc7\xa2eo'Sh\xdf\x8e\xf5\xff\xe0\tJ6H"
2019-10-12 10:51:22 DEBUG (SyncWorker_1) [adb_shell.adb_device] bulk_write: b'AUTH\x02\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\xc9\x80\x00\x00\xbe\xaa\xab\xb7'
2019-10-12 10:51:22 DEBUG (SyncWorker_1) [adb_shell.adb_device] bulk_write: b'\xbe1\xf5\x80\xc5\xdbul\xce\xd0\xf5|:\x03~\x07d#\xdb\x8b.^\xc6\xba\xe0\x0b9p\xa7A\x04c\xe1\xb3\xd9\xffC\xbba\x96\x05w\xaf\x1a6\xfdN\x8f0\xb1\r\x84\xdc\xe0*e\xef\xcel\xeb%\xdcrI\xa8\xf4?\xec5\xa5l\x90&\xb6\xa3\\\xc9<C\xc7O^\xe8[~\xefD\x00\xdc+\x0frY\x98\xa9l\'\xb2\x08VJOz\xd3.\xb3\xfb\x1fx\x1a\xeb\xc2G)]\x019\xdd\xd2\xbcj\x8f\xad\xad\x9e=\x84\xf9D\xf0)\xe2\xfc+D*\x9a*\xbb\x10\xc4\x05;Y\xf3\x1b\xac\x94F\x8ek5a\xf5\xc8\xeb=a\xd0\xbaRn\x8bC3\xdd\xa7e\x7f\xf0h\xa6\x82\x90E\xe7\xc2\xa3\x1a\x0e\xbc\xd6~a\x9f\xba\xbeU\x8d\x03\xb9G}\x83"%s\x19\x85\xd1q|\xb3\x7f\xcf\xfbg*pg\x84s\xe4\xc3a\xc3\x05\xfe)$\xe7\xb7\x9a(\x9b\xae\x16\xcb\xbd\xa5>\xc4\xe0\xe6\xce\xda/\x0bcE \xd9:\xa8\x97d\x93\xea\xa8\x0ce\n5f\xf0\xed'
2019-10-12 10:51:22 DEBUG (SyncWorker_1) [adb_shell.adb_device] bulk_read(24): b"CNXN\x00\x00\x00\x01\x00\x10\x00\x00i\x00\x00\x00.'\x00\x00\xbc\xb1\xa7\xb1"
2019-10-12 10:51:22 DEBUG (SyncWorker_1) [adb_shell.adb_device] bulk_read(105): b'device::ro.product.name=once;ro.product.model=MIBOX3;ro.product.device=once;features=stat_v2,cmd,shell_v2'
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_write: b'OPEN\x01\x00\x00\x00\x00\x00\x00\x00\xb4\x02\x00\x00\x11\xdb\x00\x00\xb0\xaf\xba\xb1'
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_write: b"shell:dumpsys power | grep 'Display Power' | grep -q 'state=ON' && echo -e '1\\c' && dumpsys power | grep mWakefulness | grep -q Awake && echo -e '1\\c' && (dumpsys audio | grep paused | grep -qv 'Buffer Queue' && echo -e '1\\c' || (dumpsys audio | grep started | grep -qv 'Buffer Queue' && echo '2\\c' || echo '0\\c')) && dumpsys power | grep Locks | grep 'size=' && CURRENT_APP=$(dumpsys window windows | grep mCurrentFocus) && CURRENT_APP=${CURRENT_APP#*{* * } && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP && (dumpsys media_session | grep -A 100 'Sessions Stack' | grep -A 100 $CURRENT_APP | grep -m 1 'state=PlaybackState {' || echo) && dumpsys audio | grep '\\- STREAM_MUSIC:' -A 12\x00"
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_read(24): b'OKAY\x99\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_read(24): b'WRTE\x99\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x001\x00\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_read(1): b'1'
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_read(24): b'WRTE\x99\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x001\x00\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_read(1): b'1'
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_read(24): b'WRTE\x99\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x000\x00\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_read(1): b'0'
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_read(24): b'WRTE\x99\x00\x00\x00\x01\x00\x00\x00\x13\x00\x00\x000\x06\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_read(19): b'Wake Locks: size=0\n'
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_read(24): b'WRTE\x99\x00\x00\x00\x01\x00\x00\x00\x1e\x00\x00\x00V\x0b\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_read(30): b'com.google.android.youtube.tv\n'
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_read(24): b'WRTE\x99\x00\x00\x00\x01\x00\x00\x00\x98\x00\x00\x00\xa13\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_read(152): b'      state=PlaybackState {state=0, position=0, buffered position=0, speed=0.0, updated=0, actions=0, custom actions=[], active item id=-1, error=null}\n'
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_read(24): b'WRTE\x99\x00\x00\x00\x01\x00\x00\x00.\x01\x00\x00\xceP\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_read(302): b'- STREAM_MUSIC:\n   Muted: false\n   Min: 0\n   Max: 15\n   Current: 2 (speaker): 11, 4 (headset): 10, 8 (headphone): 10, 400 (hdmi): 6, 40000000 (default): 11\n   Devices: hdmi\n- STREAM_ALARM:\n   Muted: false\n   Min: 0\n   Max: 7\n   Current: 40000000 (default): 6\n   Devices: speaker\n- STREAM_NOTIFICATION:\n'
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_read(24): b'CLSE\x99\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_write: b'CLSE\x01\x00\x00\x00\x99\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:51:24 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_write: b'OPEN\x01\x00\x00\x00\x00\x00\x00\x00\xb4\x02\x00\x00\x11\xdb\x00\x00\xb0\xaf\xba\xb1'
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_write: b"shell:dumpsys power | grep 'Display Power' | grep -q 'state=ON' && echo -e '1\\c' && dumpsys power | grep mWakefulness | grep -q Awake && echo -e '1\\c' && (dumpsys audio | grep paused | grep -qv 'Buffer Queue' && echo -e '1\\c' || (dumpsys audio | grep started | grep -qv 'Buffer Queue' && echo '2\\c' || echo '0\\c')) && dumpsys power | grep Locks | grep 'size=' && CURRENT_APP=$(dumpsys window windows | grep mCurrentFocus) && CURRENT_APP=${CURRENT_APP#*{* * } && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP && (dumpsys media_session | grep -A 100 'Sessions Stack' | grep -A 100 $CURRENT_APP | grep -m 1 'state=PlaybackState {' || echo) && dumpsys audio | grep '\\- STREAM_MUSIC:' -A 12\x00"
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_read(24): b'CLSE\x99\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_read(24): b'OKAY\x9a\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9a\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x001\x00\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_read(1): b'1'
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9a\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x001\x00\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_read(1): b'1'
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9a\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x000\x00\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_read(1): b'0'
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9a\x00\x00\x00\x01\x00\x00\x00\x13\x00\x00\x000\x06\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_read(19): b'Wake Locks: size=0\n'
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9a\x00\x00\x00\x01\x00\x00\x00\x1e\x00\x00\x00V\x0b\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_read(30): b'com.google.android.youtube.tv\n'
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9a\x00\x00\x00\x01\x00\x00\x00\x98\x00\x00\x00\xa13\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_read(152): b'      state=PlaybackState {state=0, position=0, buffered position=0, speed=0.0, updated=0, actions=0, custom actions=[], active item id=-1, error=null}\n'
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9a\x00\x00\x00\x01\x00\x00\x00.\x01\x00\x00\xceP\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_read(302): b'- STREAM_MUSIC:\n   Muted: false\n   Min: 0\n   Max: 15\n   Current: 2 (speaker): 11, 4 (headset): 10, 8 (headphone): 10, 400 (hdmi): 6, 40000000 (default): 11\n   Devices: hdmi\n- STREAM_ALARM:\n   Muted: false\n   Min: 0\n   Max: 7\n   Current: 40000000 (default): 6\n   Devices: speaker\n- STREAM_NOTIFICATION:\n'
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_read(24): b'CLSE\x9a\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_write: b'CLSE\x01\x00\x00\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:51:35 DEBUG (SyncWorker_13) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b'OPEN\x01\x00\x00\x00\x00\x00\x00\x00\xb4\x02\x00\x00\x11\xdb\x00\x00\xb0\xaf\xba\xb1'
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b"shell:dumpsys power | grep 'Display Power' | grep -q 'state=ON' && echo -e '1\\c' && dumpsys power | grep mWakefulness | grep -q Awake && echo -e '1\\c' && (dumpsys audio | grep paused | grep -qv 'Buffer Queue' && echo -e '1\\c' || (dumpsys audio | grep started | grep -qv 'Buffer Queue' && echo '2\\c' || echo '0\\c')) && dumpsys power | grep Locks | grep 'size=' && CURRENT_APP=$(dumpsys window windows | grep mCurrentFocus) && CURRENT_APP=${CURRENT_APP#*{* * } && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP && (dumpsys media_session | grep -A 100 'Sessions Stack' | grep -A 100 $CURRENT_APP | grep -m 1 'state=PlaybackState {' || echo) && dumpsys audio | grep '\\- STREAM_MUSIC:' -A 12\x00"
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(24): b'CLSE\x9a\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(24): b'OKAY\x9b\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9b\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x001\x00\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(1): b'1'
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9b\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x001\x00\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(1): b'1'
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9b\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x000\x00\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(1): b'0'
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9b\x00\x00\x00\x01\x00\x00\x00\x13\x00\x00\x000\x06\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(19): b'Wake Locks: size=0\n'
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9b\x00\x00\x00\x01\x00\x00\x00\x1e\x00\x00\x00V\x0b\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(30): b'com.google.android.youtube.tv\n'
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9b\x00\x00\x00\x01\x00\x00\x00\x98\x00\x00\x00\xa13\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(152): b'      state=PlaybackState {state=0, position=0, buffered position=0, speed=0.0, updated=0, actions=0, custom actions=[], active item id=-1, error=null}\n'
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9b\x00\x00\x00\x01\x00\x00\x00.\x01\x00\x00\xceP\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(302): b'- STREAM_MUSIC:\n   Muted: false\n   Min: 0\n   Max: 15\n   Current: 2 (speaker): 11, 4 (headset): 10, 8 (headphone): 10, 400 (hdmi): 6, 40000000 (default): 11\n   Devices: hdmi\n- STREAM_ALARM:\n   Muted: false\n   Min: 0\n   Max: 7\n   Current: 40000000 (default): 6\n   Devices: speaker\n- STREAM_NOTIFICATION:\n'
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(24): b'CLSE\x9b\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b'CLSE\x01\x00\x00\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:51:46 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b'OPEN\x01\x00\x00\x00\x00\x00\x00\x00\xb4\x02\x00\x00\x11\xdb\x00\x00\xb0\xaf\xba\xb1'
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b"shell:dumpsys power | grep 'Display Power' | grep -q 'state=ON' && echo -e '1\\c' && dumpsys power | grep mWakefulness | grep -q Awake && echo -e '1\\c' && (dumpsys audio | grep paused | grep -qv 'Buffer Queue' && echo -e '1\\c' || (dumpsys audio | grep started | grep -qv 'Buffer Queue' && echo '2\\c' || echo '0\\c')) && dumpsys power | grep Locks | grep 'size=' && CURRENT_APP=$(dumpsys window windows | grep mCurrentFocus) && CURRENT_APP=${CURRENT_APP#*{* * } && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP && (dumpsys media_session | grep -A 100 'Sessions Stack' | grep -A 100 $CURRENT_APP | grep -m 1 'state=PlaybackState {' || echo) && dumpsys audio | grep '\\- STREAM_MUSIC:' -A 12\x00"
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_read(24): b'CLSE\x9b\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_read(24): b'OKAY\x9c\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9c\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x001\x00\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_read(1): b'1'
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9c\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x001\x00\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_read(1): b'1'
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9c\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x000\x00\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_read(1): b'0'
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9c\x00\x00\x00\x01\x00\x00\x00\x13\x00\x00\x000\x06\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_read(19): b'Wake Locks: size=0\n'
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9c\x00\x00\x00\x01\x00\x00\x00\x1e\x00\x00\x00V\x0b\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_read(30): b'com.google.android.youtube.tv\n'
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9c\x00\x00\x00\x01\x00\x00\x00\x98\x00\x00\x00\xa13\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_read(152): b'      state=PlaybackState {state=0, position=0, buffered position=0, speed=0.0, updated=0, actions=0, custom actions=[], active item id=-1, error=null}\n'
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9c\x00\x00\x00\x01\x00\x00\x00.\x01\x00\x00\xceP\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_read(302): b'- STREAM_MUSIC:\n   Muted: false\n   Min: 0\n   Max: 15\n   Current: 2 (speaker): 11, 4 (headset): 10, 8 (headphone): 10, 400 (hdmi): 6, 40000000 (default): 11\n   Devices: hdmi\n- STREAM_ALARM:\n   Muted: false\n   Min: 0\n   Max: 7\n   Current: 40000000 (default): 6\n   Devices: speaker\n- STREAM_NOTIFICATION:\n'
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_read(24): b'CLSE\x9c\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b'CLSE\x01\x00\x00\x00\x9c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:51:57 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b'OPEN\x01\x00\x00\x00\x00\x00\x00\x00\xb4\x02\x00\x00\x11\xdb\x00\x00\xb0\xaf\xba\xb1'
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b"shell:dumpsys power | grep 'Display Power' | grep -q 'state=ON' && echo -e '1\\c' && dumpsys power | grep mWakefulness | grep -q Awake && echo -e '1\\c' && (dumpsys audio | grep paused | grep -qv 'Buffer Queue' && echo -e '1\\c' || (dumpsys audio | grep started | grep -qv 'Buffer Queue' && echo '2\\c' || echo '0\\c')) && dumpsys power | grep Locks | grep 'size=' && CURRENT_APP=$(dumpsys window windows | grep mCurrentFocus) && CURRENT_APP=${CURRENT_APP#*{* * } && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP && (dumpsys media_session | grep -A 100 'Sessions Stack' | grep -A 100 $CURRENT_APP | grep -m 1 'state=PlaybackState {' || echo) && dumpsys audio | grep '\\- STREAM_MUSIC:' -A 12\x00"
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(24): b'CLSE\x9c\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(24): b'OKAY\x9d\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9d\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x001\x00\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(1): b'1'
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9d\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x001\x00\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(1): b'1'
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9d\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x000\x00\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(1): b'0'
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9d\x00\x00\x00\x01\x00\x00\x00\x13\x00\x00\x000\x06\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(19): b'Wake Locks: size=0\n'
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9d\x00\x00\x00\x01\x00\x00\x00\x1e\x00\x00\x00V\x0b\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(30): b'com.google.android.youtube.tv\n'
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9d\x00\x00\x00\x01\x00\x00\x00\x98\x00\x00\x00\xa13\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(152): b'      state=PlaybackState {state=0, position=0, buffered position=0, speed=0.0, updated=0, actions=0, custom actions=[], active item id=-1, error=null}\n'
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9d\x00\x00\x00\x01\x00\x00\x00\xd7\x00\x00\x00\xe78\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(215): b'- STREAM_MUSIC:\n   Muted: false\n   Min: 0\n   Max: 15\n   Current: 2 (speaker): 11, 4 (headset): 10, 8 (headphone): 10, 400 (hdmi): 6, 40000000 (default): 11\n   Devices: hdmi\n- STREAM_ALARM:\n   Muted: false\n   Min: 0\n'
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9d\x00\x00\x00\x01\x00\x00\x00W\x00\x00\x00\xe7\x17\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(87): b'   Max: 7\n   Current: 40000000 (default): 6\n   Devices: speaker\n- STREAM_NOTIFICATION:\n'
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_read(24): b'CLSE\x9d\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b'CLSE\x01\x00\x00\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:52:08 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:52:19 DEBUG (SyncWorker_1) [adb_shell.adb_device] bulk_write: b'OPEN\x01\x00\x00\x00\x00\x00\x00\x00\xb4\x02\x00\x00\x11\xdb\x00\x00\xb0\xaf\xba\xb1'
2019-10-12 10:52:19 DEBUG (SyncWorker_1) [adb_shell.adb_device] bulk_write: b"shell:dumpsys power | grep 'Display Power' | grep -q 'state=ON' && echo -e '1\\c' && dumpsys power | grep mWakefulness | grep -q Awake && echo -e '1\\c' && (dumpsys audio | grep paused | grep -qv 'Buffer Queue' && echo -e '1\\c' || (dumpsys audio | grep started | grep -qv 'Buffer Queue' && echo '2\\c' || echo '0\\c')) && dumpsys power | grep Locks | grep 'size=' && CURRENT_APP=$(dumpsys window windows | grep mCurrentFocus) && CURRENT_APP=${CURRENT_APP#*{* * } && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP && (dumpsys media_session | grep -A 100 'Sessions Stack' | grep -A 100 $CURRENT_APP | grep -m 1 'state=PlaybackState {' || echo) && dumpsys audio | grep '\\- STREAM_MUSIC:' -A 12\x00"
2019-10-12 10:52:19 DEBUG (SyncWorker_1) [adb_shell.adb_device] bulk_read(24): b'CLSE\x9d\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:52:19 DEBUG (SyncWorker_1) [adb_shell.adb_device] bulk_read(24): b'CLSE\x9d\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:52:30 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b'OPEN\x01\x00\x00\x00\x00\x00\x00\x00\xb4\x02\x00\x00\x11\xdb\x00\x00\xb0\xaf\xba\xb1'
2019-10-12 10:52:30 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b"shell:dumpsys power | grep 'Display Power' | grep -q 'state=ON' && echo -e '1\\c' && dumpsys power | grep mWakefulness | grep -q Awake && echo -e '1\\c' && (dumpsys audio | grep paused | grep -qv 'Buffer Queue' && echo -e '1\\c' || (dumpsys audio | grep started | grep -qv 'Buffer Queue' && echo '2\\c' || echo '0\\c')) && dumpsys power | grep Locks | grep 'size=' && CURRENT_APP=$(dumpsys window windows | grep mCurrentFocus) && CURRENT_APP=${CURRENT_APP#*{* * } && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP && (dumpsys media_session | grep -A 100 'Sessions Stack' | grep -A 100 $CURRENT_APP | grep -m 1 'state=PlaybackState {' || echo) && dumpsys audio | grep '\\- STREAM_MUSIC:' -A 12\x00"
2019-10-12 10:52:30 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_read(24): b'OKAY\x9e\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:52:30 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9e\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x001\x00\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:52:30 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_read(1): b'1'
2019-10-12 10:52:30 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:52:30 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:52:30 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9e\x00\x00\x00\x01\x00\x00\x00\xf9\x01\x00\x00V\x96\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:52:30 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_read(505): b'10Wake Locks: size=0\ncom.google.android.youtube.tv\n      state=PlaybackState {state=0, position=0, buffered position=0, speed=0.0, updated=0, actions=0, custom actions=[], active item id=-1, error=null}\n- STREAM_MUSIC:\n   Muted: false\n   Min: 0\n   Max: 15\n   Current: 2 (speaker): 11, 4 (headset): 10, 8 (headphone): 10, 400 (hdmi): 6, 40000000 (default): 11\n   Devices: hdmi\n- STREAM_ALARM:\n   Muted: false\n   Min: 0\n   Max: 7\n   Current: 40000000 (default): 6\n   Devices: speaker\n- STREAM_NOTIFICATION:\n'
2019-10-12 10:52:30 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:52:30 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:52:30 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_read(24): b'CLSE\x9e\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:52:30 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b'CLSE\x01\x00\x00\x00\x9e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:52:30 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:52:41 DEBUG (SyncWorker_10) [adb_shell.adb_device] bulk_write: b'OPEN\x01\x00\x00\x00\x00\x00\x00\x00\xb4\x02\x00\x00\x11\xdb\x00\x00\xb0\xaf\xba\xb1'
2019-10-12 10:52:41 DEBUG (SyncWorker_10) [adb_shell.adb_device] bulk_write: b"shell:dumpsys power | grep 'Display Power' | grep -q 'state=ON' && echo -e '1\\c' && dumpsys power | grep mWakefulness | grep -q Awake && echo -e '1\\c' && (dumpsys audio | grep paused | grep -qv 'Buffer Queue' && echo -e '1\\c' || (dumpsys audio | grep started | grep -qv 'Buffer Queue' && echo '2\\c' || echo '0\\c')) && dumpsys power | grep Locks | grep 'size=' && CURRENT_APP=$(dumpsys window windows | grep mCurrentFocus) && CURRENT_APP=${CURRENT_APP#*{* * } && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP && (dumpsys media_session | grep -A 100 'Sessions Stack' | grep -A 100 $CURRENT_APP | grep -m 1 'state=PlaybackState {' || echo) && dumpsys audio | grep '\\- STREAM_MUSIC:' -A 12\x00"
2019-10-12 10:52:41 DEBUG (SyncWorker_10) [adb_shell.adb_device] bulk_read(24): b'OKAY\x9f\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:52:41 DEBUG (SyncWorker_10) [adb_shell.adb_device] bulk_read(24): b'CLSE\x9e\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:52:41 DEBUG (SyncWorker_10) [adb_shell.adb_device] bulk_read(24): b'CLSE\x9e\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:52:41 DEBUG (SyncWorker_10) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9f\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x001\x00\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:52:41 DEBUG (SyncWorker_10) [adb_shell.adb_device] bulk_read(1): b'1'
2019-10-12 10:52:41 DEBUG (SyncWorker_10) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:52:41 DEBUG (SyncWorker_10) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:52:41 DEBUG (SyncWorker_10) [adb_shell.adb_device] bulk_read(24): b'WRTE\x9f\x00\x00\x00\x01\x00\x00\x00\xf9\x01\x00\x00V\x96\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:52:41 DEBUG (SyncWorker_10) [adb_shell.adb_device] bulk_read(505): b'10Wake Locks: size=0\ncom.google.android.youtube.tv\n      state=PlaybackState {state=0, position=0, buffered position=0, speed=0.0, updated=0, actions=0, custom actions=[], active item id=-1, error=null}\n- STREAM_MUSIC:\n   Muted: false\n   Min: 0\n   Max: 15\n   Current: 2 (speaker): 11, 4 (headset): 10, 8 (headphone): 10, 400 (hdmi): 6, 40000000 (default): 11\n   Devices: hdmi\n- STREAM_ALARM:\n   Muted: false\n   Min: 0\n   Max: 7\n   Current: 40000000 (default): 6\n   Devices: speaker\n- STREAM_NOTIFICATION:\n'
2019-10-12 10:52:41 DEBUG (SyncWorker_10) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:52:41 DEBUG (SyncWorker_10) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:52:41 DEBUG (SyncWorker_10) [adb_shell.adb_device] bulk_read(24): b'CLSE\x9f\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:52:41 DEBUG (SyncWorker_10) [adb_shell.adb_device] bulk_write: b'CLSE\x01\x00\x00\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:52:41 DEBUG (SyncWorker_10) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:52:52 DEBUG (SyncWorker_7) [adb_shell.adb_device] bulk_write: b'OPEN\x01\x00\x00\x00\x00\x00\x00\x00\xb4\x02\x00\x00\x11\xdb\x00\x00\xb0\xaf\xba\xb1'
2019-10-12 10:52:52 DEBUG (SyncWorker_7) [adb_shell.adb_device] bulk_write: b"shell:dumpsys power | grep 'Display Power' | grep -q 'state=ON' && echo -e '1\\c' && dumpsys power | grep mWakefulness | grep -q Awake && echo -e '1\\c' && (dumpsys audio | grep paused | grep -qv 'Buffer Queue' && echo -e '1\\c' || (dumpsys audio | grep started | grep -qv 'Buffer Queue' && echo '2\\c' || echo '0\\c')) && dumpsys power | grep Locks | grep 'size=' && CURRENT_APP=$(dumpsys window windows | grep mCurrentFocus) && CURRENT_APP=${CURRENT_APP#*{* * } && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP && (dumpsys media_session | grep -A 100 'Sessions Stack' | grep -A 100 $CURRENT_APP | grep -m 1 'state=PlaybackState {' || echo) && dumpsys audio | grep '\\- STREAM_MUSIC:' -A 12\x00"
2019-10-12 10:52:52 DEBUG (SyncWorker_7) [adb_shell.adb_device] bulk_read(24): b'OKAY\xa0\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:52:52 DEBUG (SyncWorker_7) [adb_shell.adb_device] bulk_read(24): b'CLSE\x9f\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:52:52 DEBUG (SyncWorker_7) [adb_shell.adb_device] bulk_read(24): b'CLSE\x9f\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:52:52 DEBUG (SyncWorker_7) [adb_shell.adb_device] bulk_read(24): b'WRTE\xa0\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x001\x00\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:52:52 DEBUG (SyncWorker_7) [adb_shell.adb_device] bulk_read(1): b'1'
2019-10-12 10:52:52 DEBUG (SyncWorker_7) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:52:52 DEBUG (SyncWorker_7) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:52:52 DEBUG (SyncWorker_7) [adb_shell.adb_device] bulk_read(24): b'WRTE\xa0\x00\x00\x00\x01\x00\x00\x00\xf9\x01\x00\x00V\x96\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:52:52 DEBUG (SyncWorker_7) [adb_shell.adb_device] bulk_read(505): b'10Wake Locks: size=0\ncom.google.android.youtube.tv\n      state=PlaybackState {state=0, position=0, buffered position=0, speed=0.0, updated=0, actions=0, custom actions=[], active item id=-1, error=null}\n- STREAM_MUSIC:\n   Muted: false\n   Min: 0\n   Max: 15\n   Current: 2 (speaker): 11, 4 (headset): 10, 8 (headphone): 10, 400 (hdmi): 6, 40000000 (default): 11\n   Devices: hdmi\n- STREAM_ALARM:\n   Muted: false\n   Min: 0\n   Max: 7\n   Current: 40000000 (default): 6\n   Devices: speaker\n- STREAM_NOTIFICATION:\n'
2019-10-12 10:52:52 DEBUG (SyncWorker_7) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:52:52 DEBUG (SyncWorker_7) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:52:52 DEBUG (SyncWorker_7) [adb_shell.adb_device] bulk_read(24): b'CLSE\xa0\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:52:52 DEBUG (SyncWorker_7) [adb_shell.adb_device] bulk_write: b'CLSE\x01\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:52:52 DEBUG (SyncWorker_7) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:53:03 DEBUG (SyncWorker_18) [adb_shell.adb_device] bulk_write: b'OPEN\x01\x00\x00\x00\x00\x00\x00\x00\xb4\x02\x00\x00\x11\xdb\x00\x00\xb0\xaf\xba\xb1'
2019-10-12 10:53:03 DEBUG (SyncWorker_18) [adb_shell.adb_device] bulk_write: b"shell:dumpsys power | grep 'Display Power' | grep -q 'state=ON' && echo -e '1\\c' && dumpsys power | grep mWakefulness | grep -q Awake && echo -e '1\\c' && (dumpsys audio | grep paused | grep -qv 'Buffer Queue' && echo -e '1\\c' || (dumpsys audio | grep started | grep -qv 'Buffer Queue' && echo '2\\c' || echo '0\\c')) && dumpsys power | grep Locks | grep 'size=' && CURRENT_APP=$(dumpsys window windows | grep mCurrentFocus) && CURRENT_APP=${CURRENT_APP#*{* * } && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP && (dumpsys media_session | grep -A 100 'Sessions Stack' | grep -A 100 $CURRENT_APP | grep -m 1 'state=PlaybackState {' || echo) && dumpsys audio | grep '\\- STREAM_MUSIC:' -A 12\x00"
2019-10-12 10:53:03 DEBUG (SyncWorker_18) [adb_shell.adb_device] bulk_read(24): b'OKAY\xa1\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:53:03 DEBUG (SyncWorker_18) [adb_shell.adb_device] bulk_read(24): b'CLSE\xa0\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:53:03 DEBUG (SyncWorker_18) [adb_shell.adb_device] bulk_read(24): b'CLSE\xa0\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:53:03 DEBUG (SyncWorker_18) [adb_shell.adb_device] bulk_read(24): b'WRTE\xa1\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x001\x00\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:53:03 DEBUG (SyncWorker_18) [adb_shell.adb_device] bulk_read(1): b'1'
2019-10-12 10:53:03 DEBUG (SyncWorker_18) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:53:03 DEBUG (SyncWorker_18) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:53:03 DEBUG (SyncWorker_18) [adb_shell.adb_device] bulk_read(24): b'WRTE\xa1\x00\x00\x00\x01\x00\x00\x00\xf9\x01\x00\x00V\x96\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:53:03 DEBUG (SyncWorker_18) [adb_shell.adb_device] bulk_read(505): b'10Wake Locks: size=0\ncom.google.android.youtube.tv\n      state=PlaybackState {state=0, position=0, buffered position=0, speed=0.0, updated=0, actions=0, custom actions=[], active item id=-1, error=null}\n- STREAM_MUSIC:\n   Muted: false\n   Min: 0\n   Max: 15\n   Current: 2 (speaker): 11, 4 (headset): 10, 8 (headphone): 10, 400 (hdmi): 6, 40000000 (default): 11\n   Devices: hdmi\n- STREAM_ALARM:\n   Muted: false\n   Min: 0\n   Max: 7\n   Current: 40000000 (default): 6\n   Devices: speaker\n- STREAM_NOTIFICATION:\n'
2019-10-12 10:53:03 DEBUG (SyncWorker_18) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:53:03 DEBUG (SyncWorker_18) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:53:03 DEBUG (SyncWorker_18) [adb_shell.adb_device] bulk_read(24): b'CLSE\xa1\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:53:03 DEBUG (SyncWorker_18) [adb_shell.adb_device] bulk_write: b'CLSE\x01\x00\x00\x00\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:53:03 DEBUG (SyncWorker_18) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:53:14 DEBUG (SyncWorker_2) [adb_shell.adb_device] bulk_write: b'OPEN\x01\x00\x00\x00\x00\x00\x00\x00\xb4\x02\x00\x00\x11\xdb\x00\x00\xb0\xaf\xba\xb1'
2019-10-12 10:53:14 DEBUG (SyncWorker_2) [adb_shell.adb_device] bulk_write: b"shell:dumpsys power | grep 'Display Power' | grep -q 'state=ON' && echo -e '1\\c' && dumpsys power | grep mWakefulness | grep -q Awake && echo -e '1\\c' && (dumpsys audio | grep paused | grep -qv 'Buffer Queue' && echo -e '1\\c' || (dumpsys audio | grep started | grep -qv 'Buffer Queue' && echo '2\\c' || echo '0\\c')) && dumpsys power | grep Locks | grep 'size=' && CURRENT_APP=$(dumpsys window windows | grep mCurrentFocus) && CURRENT_APP=${CURRENT_APP#*{* * } && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP && (dumpsys media_session | grep -A 100 'Sessions Stack' | grep -A 100 $CURRENT_APP | grep -m 1 'state=PlaybackState {' || echo) && dumpsys audio | grep '\\- STREAM_MUSIC:' -A 12\x00"
2019-10-12 10:53:14 DEBUG (SyncWorker_2) [adb_shell.adb_device] bulk_read(24): b'OKAY\xa2\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:53:14 DEBUG (SyncWorker_2) [adb_shell.adb_device] bulk_read(24): b'CLSE\xa1\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:53:14 DEBUG (SyncWorker_2) [adb_shell.adb_device] bulk_read(24): b'CLSE\xa1\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:53:14 DEBUG (SyncWorker_2) [adb_shell.adb_device] bulk_read(24): b'WRTE\xa2\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x001\x00\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:53:14 DEBUG (SyncWorker_2) [adb_shell.adb_device] bulk_read(1): b'1'
2019-10-12 10:53:14 DEBUG (SyncWorker_2) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:53:14 DEBUG (SyncWorker_2) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:53:14 DEBUG (SyncWorker_2) [adb_shell.adb_device] bulk_read(24): b'WRTE\xa2\x00\x00\x00\x01\x00\x00\x00b\x01\x00\x00\xd7b\x00\x00\xa8\xad\xab\xba'
2019-10-12 10:53:14 DEBUG (SyncWorker_2) [adb_shell.adb_device] bulk_read(354): b'10Wake Locks: size=1\ncom.google.android.tvlauncher\n\n- STREAM_MUSIC:\n   Muted: false\n   Min: 0\n   Max: 15\n   Current: 2 (speaker): 11, 4 (headset): 10, 8 (headphone): 10, 400 (hdmi): 6, 40000000 (default): 11\n   Devices: hdmi\n- STREAM_ALARM:\n   Muted: false\n   Min: 0\n   Max: 7\n   Current: 40000000 (default): 6\n   Devices: speaker\n- STREAM_NOTIFICATION:\n'
2019-10-12 10:53:14 DEBUG (SyncWorker_2) [adb_shell.adb_device] bulk_write: b'OKAY\x01\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:53:14 DEBUG (SyncWorker_2) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:53:14 DEBUG (SyncWorker_2) [adb_shell.adb_device] bulk_read(24): b'CLSE\xa2\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:53:14 DEBUG (SyncWorker_2) [adb_shell.adb_device] bulk_write: b'CLSE\x01\x00\x00\x00\xa2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:53:14 DEBUG (SyncWorker_2) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:53:25 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b'OPEN\x01\x00\x00\x00\x00\x00\x00\x00\xb4\x02\x00\x00\x11\xdb\x00\x00\xb0\xaf\xba\xb1'
2019-10-12 10:53:25 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b"shell:dumpsys power | grep 'Display Power' | grep -q 'state=ON' && echo -e '1\\c' && dumpsys power | grep mWakefulness | grep -q Awake && echo -e '1\\c' && (dumpsys audio | grep paused | grep -qv 'Buffer Queue' && echo -e '1\\c' || (dumpsys audio | grep started | grep -qv 'Buffer Queue' && echo '2\\c' || echo '0\\c')) && dumpsys power | grep Locks | grep 'size=' && CURRENT_APP=$(dumpsys window windows | grep mCurrentFocus) && CURRENT_APP=${CURRENT_APP#*{* * } && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP && (dumpsys media_session | grep -A 100 'Sessions Stack' | grep -A 100 $CURRENT_APP | grep -m 1 'state=PlaybackState {' || echo) && dumpsys audio | grep '\\- STREAM_MUSIC:' -A 12\x00"
2019-10-12 10:53:25 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_read(24): b'OKAY\xa3\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:53:25 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_read(24): b'CLSE\xa2\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:53:25 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_read(24): b'CLSE\xa2\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:53:34 ERROR (SyncWorker_12) [homeassistant.components.androidtv.media_player] Failed to execute an ADB command. ADB connection re-establishing attempt in the next update. Error: Reading from mibox.bieniu.lan:5555 timed out (9.0 seconds)
2019-10-12 10:53:44 WARNING (SyncWorker_1) [androidtv.adb_manager] Couldn't connect to host mibox.bieniu.lan:5555, error: Timed out trying to connect to ADB device.
2019-10-12 10:55:24 DEBUG (SyncWorker_6) [adb_shell.adb_device] bulk_write: b'CNXN\x00\x00\x00\x01\x00\x10\x00\x00\x10\x00\x00\x00\x0c\x06\x00\x00\xbc\xb1\xa7\xb1'
2019-10-12 10:55:24 DEBUG (SyncWorker_6) [adb_shell.adb_device] bulk_write: b'host::raspberry\x00'
2019-10-12 10:55:24 DEBUG (SyncWorker_6) [adb_shell.adb_device] bulk_read(24): b'AUTH\x01\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x94\t\x00\x00\xbe\xaa\xab\xb7'
2019-10-12 10:55:24 DEBUG (SyncWorker_6) [adb_shell.adb_device] bulk_read(20): b'P\xa5\x86\x97\xe8\x01\xb09\x8c>F\x9d\xc6\xbd\xc0J\x80!\xbb\x1a'
2019-10-12 10:55:24 DEBUG (SyncWorker_6) [adb_shell.adb_device] bulk_write: b'AUTH\x02\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\xd1\x7f\x00\x00\xbe\xaa\xab\xb7'
2019-10-12 10:55:24 DEBUG (SyncWorker_6) [adb_shell.adb_device] bulk_write: b'v\xc3\xd1)\xbd\xb0\x0b\x0e\x9a\xc3\xa0ZV\x10)\xeb\x8b\x98\xcc\xe5V\x10\x8a\xb9\x11>8"\xc7\xc9\x9a\xfc\x9e\x1b\xfc&:\xc0\x1dO\x80\xc3*\x01\xf1\xd7"\x1c9\x0e\xf7\xbc\xed\x08\x9e\xed9\x19s\xae\x16\x99\xe1_\n\xe2\xfc\x80\xd96\x87\xd0U\n\xe5xr%\x7f;$\x95\xce\xf7\xdd\x01\x10t\xb4\x08"@\xe0\xfe\x00\xd4\xc5\x0c\xd9K*w\x99\xc3\xe6V\xcf`\x81S\xa5\xfa\xa3\xe4uAn\t\x88\xe4\xcb\xa1RB\\w\xc3WQ\x9e\xd6v\xb43\x80:\\\x9d\xb2\x8e\x8f\x8d*\x86\xa1\x0f,\xbdw\x8bg!\xd2\x17A\x9a\xc3\xe4-\x85\x97\x12}\xa8}e\x8d:\xd4\x04p\x1b\xad(5\xec\x93\x0cMH\x1e2Z\xd0n4\xdd\x9b\xb3\x94u\t\xe2\x86\xf0\xb8W\xd2\x95\x80\xdf\x15\xf0X\xb9}\xd2N\x86=\x1c\xab\xa9\xfe\x1b2\xa9>\x8d\xe3c\xf44\xdf\xfc\xa7\x9c\xbe\xd5r\x14\xaa\xea7Z\xb2u\xfd=PSh\xdf2\xa8\xb9\x07\x81\xa5\xeb\xcc\x1d\xf2\xa1\xf0\x86'
2019-10-12 10:55:25 DEBUG (SyncWorker_6) [adb_shell.adb_device] bulk_read(24): b"CNXN\x00\x00\x00\x01\x00\x10\x00\x00i\x00\x00\x00.'\x00\x00\xbc\xb1\xa7\xb1"
2019-10-12 10:55:25 DEBUG (SyncWorker_6) [adb_shell.adb_device] bulk_read(105): b'device::ro.product.name=once;ro.product.model=MIBOX3;ro.product.device=once;features=stat_v2,cmd,shell_v2'
2019-10-12 10:55:35 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_write: b'OPEN\x01\x00\x00\x00\x00\x00\x00\x00\xb4\x02\x00\x00\x11\xdb\x00\x00\xb0\xaf\xba\xb1'
2019-10-12 10:55:35 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_write: b"shell:dumpsys power | grep 'Display Power' | grep -q 'state=ON' && echo -e '1\\c' && dumpsys power | grep mWakefulness | grep -q Awake && echo -e '1\\c' && (dumpsys audio | grep paused | grep -qv 'Buffer Queue' && echo -e '1\\c' || (dumpsys audio | grep started | grep -qv 'Buffer Queue' && echo '2\\c' || echo '0\\c')) && dumpsys power | grep Locks | grep 'size=' && CURRENT_APP=$(dumpsys window windows | grep mCurrentFocus) && CURRENT_APP=${CURRENT_APP#*{* * } && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP && (dumpsys media_session | grep -A 100 'Sessions Stack' | grep -A 100 $CURRENT_APP | grep -m 1 'state=PlaybackState {' || echo) && dumpsys audio | grep '\\- STREAM_MUSIC:' -A 12\x00"
2019-10-12 10:55:35 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_read(24): b'OKAY\xa5\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:55:35 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_read(24): b'CLSE\xa5\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:55:35 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_write: b'CLSE\x01\x00\x00\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:55:35 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:55:46 DEBUG (SyncWorker_6) [adb_shell.adb_device] bulk_write: b'OPEN\x01\x00\x00\x00\x00\x00\x00\x00\xb4\x02\x00\x00\x11\xdb\x00\x00\xb0\xaf\xba\xb1'
2019-10-12 10:55:46 DEBUG (SyncWorker_6) [adb_shell.adb_device] bulk_write: b"shell:dumpsys power | grep 'Display Power' | grep -q 'state=ON' && echo -e '1\\c' && dumpsys power | grep mWakefulness | grep -q Awake && echo -e '1\\c' && (dumpsys audio | grep paused | grep -qv 'Buffer Queue' && echo -e '1\\c' || (dumpsys audio | grep started | grep -qv 'Buffer Queue' && echo '2\\c' || echo '0\\c')) && dumpsys power | grep Locks | grep 'size=' && CURRENT_APP=$(dumpsys window windows | grep mCurrentFocus) && CURRENT_APP=${CURRENT_APP#*{* * } && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP && (dumpsys media_session | grep -A 100 'Sessions Stack' | grep -A 100 $CURRENT_APP | grep -m 1 'state=PlaybackState {' || echo) && dumpsys audio | grep '\\- STREAM_MUSIC:' -A 12\x00"
2019-10-12 10:55:55 ERROR (SyncWorker_6) [homeassistant.components.androidtv.media_player] Failed to execute an ADB command. ADB connection re-establishing attempt in the next update. Error: Reading from mibox.bieniu.lan:5555 timed out (9.0 seconds)
2019-10-12 10:56:05 WARNING (SyncWorker_17) [androidtv.adb_manager] Couldn't connect to host mibox.bieniu.lan:5555, error: Timed out trying to connect to ADB device.
2019-10-12 10:57:24 DEBUG (SyncWorker_16) [adb_shell.adb_device] bulk_write: b'CNXN\x00\x00\x00\x01\x00\x10\x00\x00\x10\x00\x00\x00\x0c\x06\x00\x00\xbc\xb1\xa7\xb1'
2019-10-12 10:57:24 DEBUG (SyncWorker_16) [adb_shell.adb_device] bulk_write: b'host::raspberry\x00'
2019-10-12 10:57:24 DEBUG (SyncWorker_16) [adb_shell.adb_device] bulk_read(24): b'AUTH\x01\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00e\x0c\x00\x00\xbe\xaa\xab\xb7'
2019-10-12 10:57:24 DEBUG (SyncWorker_16) [adb_shell.adb_device] bulk_read(20): b'\xd3\xef\x7f_\xa6\xc0`b\x19\\z\xe4\xf3\xe2\xed\x8d\xe1W\xfbH'
2019-10-12 10:57:24 DEBUG (SyncWorker_16) [adb_shell.adb_device] bulk_write: b'AUTH\x02\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\xaa\x8b\x00\x00\xbe\xaa\xab\xb7'
2019-10-12 10:57:24 DEBUG (SyncWorker_16) [adb_shell.adb_device] bulk_write: b'\xa0D\xbcO?\xab\x817G\xdc}^\x98Y\xe3\xa6\xc0\xdc\xdeY36\xdbU\xd5/\x9c\x91`\xff\x0f\xa7\x85L\xc3\xe2\x91\x8f~\xd9Q\xb2\x1f#\x01\xd12N\xd8\xf4[\xd5k\xd6\xb4y\x91El\xd6\xea[\xae/\x93\xf7o\xcc\xc7t\xdc\xc3\xfb\xad\xcc\x91\x0e\xfcs[\xfa\xc7\x83\xb3\xc7\xe4\xbdu\xc1\xbf\xd3\xe0\xcatIH\xae\xd87\xb12kgnQ-\xcca\xbc\x02KZ\x1a\xe49\xbe\xa1\xc9\xad\xa5\xd9>\x7f\x15\xcc\x86\xa6\x9a\x9f\xea\xae\x08I\xc8\xfc4\xf3\xbfh\xa5\x8a+A\xaa\xc7b\x90\x8b^|Z\xc7\xd4\xcd\x0e\x00_uX\xc2`\xf6\xc6\xcb\xda\x18\xf8`(\xdc\xbck\xe8\xe20\xeed7\xb5\x01\xe2\xfa\xa2P\x13\xb3\xb0r\xbfa$\x98\xf4\xebA\x1aiG\xbf\xcd\xc5\xf5b\xb1\x9d\x151\t\x10\xebM[\x02\x04\xe1\x12\xbb\x93\x8b\xc0\xe0\xe61\xaa\x9e\xa8\xb5GBM\xf3\xd5\x0f\x94\x11\x88\x8d\x8f\xb0\xb8\xfcj(E\x8ag\x96\xcde\x92\xe5,\xe4\xb1\x96\xff'
2019-10-12 10:57:24 DEBUG (SyncWorker_16) [adb_shell.adb_device] bulk_read(24): b"CNXN\x00\x00\x00\x01\x00\x10\x00\x00i\x00\x00\x00.'\x00\x00\xbc\xb1\xa7\xb1"
2019-10-12 10:57:24 DEBUG (SyncWorker_16) [adb_shell.adb_device] bulk_read(105): b'device::ro.product.name=once;ro.product.model=MIBOX3;ro.product.device=once;features=stat_v2,cmd,shell_v2'
2019-10-12 10:57:35 DEBUG (SyncWorker_5) [adb_shell.adb_device] bulk_write: b'OPEN\x01\x00\x00\x00\x00\x00\x00\x00\xb4\x02\x00\x00\x11\xdb\x00\x00\xb0\xaf\xba\xb1'
2019-10-12 10:57:35 DEBUG (SyncWorker_5) [adb_shell.adb_device] bulk_write: b"shell:dumpsys power | grep 'Display Power' | grep -q 'state=ON' && echo -e '1\\c' && dumpsys power | grep mWakefulness | grep -q Awake && echo -e '1\\c' && (dumpsys audio | grep paused | grep -qv 'Buffer Queue' && echo -e '1\\c' || (dumpsys audio | grep started | grep -qv 'Buffer Queue' && echo '2\\c' || echo '0\\c')) && dumpsys power | grep Locks | grep 'size=' && CURRENT_APP=$(dumpsys window windows | grep mCurrentFocus) && CURRENT_APP=${CURRENT_APP#*{* * } && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP && (dumpsys media_session | grep -A 100 'Sessions Stack' | grep -A 100 $CURRENT_APP | grep -m 1 'state=PlaybackState {' || echo) && dumpsys audio | grep '\\- STREAM_MUSIC:' -A 12\x00"
2019-10-12 10:57:35 DEBUG (SyncWorker_5) [adb_shell.adb_device] bulk_read(24): b'OKAY\xa7\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:57:35 DEBUG (SyncWorker_5) [adb_shell.adb_device] bulk_read(24): b'CLSE\xa7\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:57:35 DEBUG (SyncWorker_5) [adb_shell.adb_device] bulk_write: b'CLSE\x01\x00\x00\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:57:35 DEBUG (SyncWorker_5) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:57:46 DEBUG (SyncWorker_14) [adb_shell.adb_device] bulk_write: b'OPEN\x01\x00\x00\x00\x00\x00\x00\x00\xb4\x02\x00\x00\x11\xdb\x00\x00\xb0\xaf\xba\xb1'
2019-10-12 10:57:46 DEBUG (SyncWorker_14) [adb_shell.adb_device] bulk_write: b"shell:dumpsys power | grep 'Display Power' | grep -q 'state=ON' && echo -e '1\\c' && dumpsys power | grep mWakefulness | grep -q Awake && echo -e '1\\c' && (dumpsys audio | grep paused | grep -qv 'Buffer Queue' && echo -e '1\\c' || (dumpsys audio | grep started | grep -qv 'Buffer Queue' && echo '2\\c' || echo '0\\c')) && dumpsys power | grep Locks | grep 'size=' && CURRENT_APP=$(dumpsys window windows | grep mCurrentFocus) && CURRENT_APP=${CURRENT_APP#*{* * } && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP && (dumpsys media_session | grep -A 100 'Sessions Stack' | grep -A 100 $CURRENT_APP | grep -m 1 'state=PlaybackState {' || echo) && dumpsys audio | grep '\\- STREAM_MUSIC:' -A 12\x00"
2019-10-12 10:57:55 ERROR (SyncWorker_14) [homeassistant.components.androidtv.media_player] Failed to execute an ADB command. ADB connection re-establishing attempt in the next update. Error: Reading from mibox.bieniu.lan:5555 timed out (9.0 seconds)
2019-10-12 10:58:05 WARNING (SyncWorker_3) [androidtv.adb_manager] Couldn't connect to host mibox.bieniu.lan:5555, error: Timed out trying to connect to ADB device.
2019-10-12 10:59:23 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_write: b'CNXN\x00\x00\x00\x01\x00\x10\x00\x00\x10\x00\x00\x00\x0c\x06\x00\x00\xbc\xb1\xa7\xb1'
2019-10-12 10:59:23 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_write: b'host::raspberry\x00'
2019-10-12 10:59:23 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_read(24): b'AUTH\x01\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x93\x08\x00\x00\xbe\xaa\xab\xb7'
2019-10-12 10:59:23 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_read(20): b's\xd4_e\xa4s\x02\x95\x0f\x1e\xec\n\x95Y9[`\x8e\xe1f'
2019-10-12 10:59:23 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_write: b'AUTH\x02\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\xfb\x86\x00\x00\xbe\xaa\xab\xb7'
2019-10-12 10:59:23 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_write: b"3\x98\x17A\x80<\xf8\xf3\x8a)\xf6\xa5\xbf\x90\x9b\xb8\x11\xc8\xbdO\xae\x14\xaf\xb1\xd3\x90\xaat\xaa4\xd0\x10-\x89tE\x8b\xfd)?u\xb5\x89\xe2$\xaei\xfd\x15 \x82\xee\xa7\x0b$\x9f\xe3\xd9\x7f\xcc\xe1\xa3E\xd6\xdf\xadS\x1d\xd7\xd6\x8b\x0fSK\xa5-~M\xdb{\xc9\xd7\x05\xea%u5\x15\xf7\xee\x06\x8c\xfeF\x95'\xed\x86\xd9}.$\n0\xc88?{7\xdeCd3\xe9\xdb\x06\xd3E`\xa9\x9b\xf1\xe6*\xe9\xff\xe3\x13\x93k)\xc3`a\xef\xdfR\xd9\x88\xd6g=\x89>\xc9})C\xec\x8c\xb2\xbdP\x0ec\xd5\x83go\xe2L\xd9d;\xf1\xadlw}i\xbcou\xa0\xd1\x15v\xa4.\xc5\xdb\xda^\xbf\xdd\xc6\xe6\xc1C\xcb\x94\xae\xe8\xef/\x08$8#\xb5P\xf6\x8b\x95\x83`\xa9\x99\xdf\xb0\x04\xef\xd6|\xa1\x1cm7\xab`>\x89U\xbb\xc2\xb3d\xf3\xc9\xb64;_\xdc\xd9\x93\xe1g\xee\x1c\x15A\xc6\x8b\xd5\\\xf7\xc3O<\xa8\x800\xdc\x16O"
2019-10-12 10:59:23 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_read(24): b"CNXN\x00\x00\x00\x01\x00\x10\x00\x00i\x00\x00\x00.'\x00\x00\xbc\xb1\xa7\xb1"
2019-10-12 10:59:23 DEBUG (SyncWorker_8) [adb_shell.adb_device] bulk_read(105): b'device::ro.product.name=once;ro.product.model=MIBOX3;ro.product.device=once;features=stat_v2,cmd,shell_v2'
2019-10-12 10:59:34 DEBUG (SyncWorker_15) [adb_shell.adb_device] bulk_write: b'OPEN\x01\x00\x00\x00\x00\x00\x00\x00\xb4\x02\x00\x00\x11\xdb\x00\x00\xb0\xaf\xba\xb1'
2019-10-12 10:59:34 DEBUG (SyncWorker_15) [adb_shell.adb_device] bulk_write: b"shell:dumpsys power | grep 'Display Power' | grep -q 'state=ON' && echo -e '1\\c' && dumpsys power | grep mWakefulness | grep -q Awake && echo -e '1\\c' && (dumpsys audio | grep paused | grep -qv 'Buffer Queue' && echo -e '1\\c' || (dumpsys audio | grep started | grep -qv 'Buffer Queue' && echo '2\\c' || echo '0\\c')) && dumpsys power | grep Locks | grep 'size=' && CURRENT_APP=$(dumpsys window windows | grep mCurrentFocus) && CURRENT_APP=${CURRENT_APP#*{* * } && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP && (dumpsys media_session | grep -A 100 'Sessions Stack' | grep -A 100 $CURRENT_APP | grep -m 1 'state=PlaybackState {' || echo) && dumpsys audio | grep '\\- STREAM_MUSIC:' -A 12\x00"
2019-10-12 10:59:34 DEBUG (SyncWorker_15) [adb_shell.adb_device] bulk_read(24): b'OKAY\xa9\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb4\xbe\xa6'
2019-10-12 10:59:34 DEBUG (SyncWorker_15) [adb_shell.adb_device] bulk_read(24): b'CLSE\xa9\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:59:34 DEBUG (SyncWorker_15) [adb_shell.adb_device] bulk_write: b'CLSE\x01\x00\x00\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xb3\xac\xba'
2019-10-12 10:59:34 DEBUG (SyncWorker_15) [adb_shell.adb_device] bulk_write: b''
2019-10-12 10:59:45 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b'OPEN\x01\x00\x00\x00\x00\x00\x00\x00\xb4\x02\x00\x00\x11\xdb\x00\x00\xb0\xaf\xba\xb1'
2019-10-12 10:59:45 DEBUG (SyncWorker_0) [adb_shell.adb_device] bulk_write: b"shell:dumpsys power | grep 'Display Power' | grep -q 'state=ON' && echo -e '1\\c' && dumpsys power | grep mWakefulness | grep -q Awake && echo -e '1\\c' && (dumpsys audio | grep paused | grep -qv 'Buffer Queue' && echo -e '1\\c' || (dumpsys audio | grep started | grep -qv 'Buffer Queue' && echo '2\\c' || echo '0\\c')) && dumpsys power | grep Locks | grep 'size=' && CURRENT_APP=$(dumpsys window windows | grep mCurrentFocus) && CURRENT_APP=${CURRENT_APP#*{* * } && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP && (dumpsys media_session | grep -A 100 'Sessions Stack' | grep -A 100 $CURRENT_APP | grep -m 1 'state=PlaybackState {' || echo) && dumpsys audio | grep '\\- STREAM_MUSIC:' -A 12\x00"
2019-10-12 10:59:54 ERROR (SyncWorker_0) [homeassistant.components.androidtv.media_player] Failed to execute an ADB command. ADB connection re-establishing attempt in the next update. Error: Reading from mibox.bieniu.lan:5555 timed out (9.0 seconds)
2019-10-12 11:00:05 WARNING (SyncWorker_4) [androidtv.adb_manager] Couldn't connect to host mibox.bieniu.lan:5555, error: Timed out trying to connect to ADB device.
@JeffLIrion
Copy link
Owner

Thanks for the log!

Could you try this custom component and see if it fixes the issue (HACS compatible): https://github.com/JeffLIrion/ha-androidtv

@bieniu
Copy link
Author

bieniu commented Oct 13, 2019

Unfortunately custom component doesn't help. I noticed that after about 20 minutes of changing states entity got a permanently "unavailable" state, which doesn't change even after device leaving the stand by mode.
image

@JeffLIrion
Copy link
Owner

In your log from above, you keep getting this error:

2019-10-12 10:50:19 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b'OPEN\x01\x00\x00\x00\x00\x00\x00\x00\xb4\x02\x00\x00\x11\xdb\x00\x00\xb0\xaf\xba\xb1'
2019-10-12 10:50:19 DEBUG (SyncWorker_12) [adb_shell.adb_device] bulk_write: b"shell:dumpsys power | grep 'Display Power' | grep -q 'state=ON' && echo -e '1\\c' && dumpsys power | grep mWakefulness | grep -q Awake && echo -e '1\\c' && (dumpsys audio | grep paused | grep -qv 'Buffer Queue' && echo -e '1\\c' || (dumpsys audio | grep started | grep -qv 'Buffer Queue' && echo '2\\c' || echo '0\\c')) && dumpsys power | grep Locks | grep 'size=' && CURRENT_APP=$(dumpsys window windows | grep mCurrentFocus) && CURRENT_APP=${CURRENT_APP#*{* * } && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP && (dumpsys media_session | grep -A 100 'Sessions Stack' | grep -A 100 $CURRENT_APP | grep -m 1 'state=PlaybackState {' || echo) && dumpsys audio | grep '\\- STREAM_MUSIC:' -A 12\x00"
2019-10-12 10:50:28 ERROR (SyncWorker_12) [homeassistant.components.androidtv.media_player] Failed to execute an ADB command. ADB connection re-establishing attempt in the next update. Error: Reading from mibox.bieniu.lan:5555 timed out (9.0 seconds)
2019-10-12 10:50:38 WARNING (SyncWorker_13) [androidtv.adb_manager] Couldn't connect to host mibox.bieniu.lan:5555, error: Timed out trying to connect to ADB device.

What's happening is:

  1. HA sends the update command
  2. HA tries to read a response, but never gets one, so it raises an exception
    • Here is where this happens in the code:
      timeout = self._default_timeout_s if timeout_s is None else timeout_s
      readable, _, _ = select.select([self._connection], [], [], timeout)
      if readable:
      return self._connection.recv(numbytes)
      msg = 'Reading from {} timed out ({} seconds)'.format(self.serial, timeout)
      raise TcpTimeoutException(msg)
  3. The socket connection gets closed, a new connection is established, and the ADB connection attempt is successful

I saw that you opened this issue: home-assistant/core#23820

I don't see anything wrong, it seems like your device just takes a long time to respond sometimes.

JeffLIrion added a commit that referenced this issue Oct 13, 2019
JeffLIrion added a commit that referenced this issue Oct 14, 2019
* Working on tests for issue 29

* Change '\xa2' to '\x99'

* More unit testing for issue 29

* Update documentation for '_read_until_close'

* Rename test

* Annotate test for issue 27

* Consolidate tests for issue #29

* Delete log.txt
JeffLIrion added a commit that referenced this issue Oct 14, 2019
* Only read 'OKAY' responses in '_open'; remove unreachable code

* Remove unused variable

* Update documentation

* Test for issue #29 (#30)

* Working on tests for issue 29

* Change '\xa2' to '\x99'

* More unit testing for issue 29

* Update documentation for '_read_until_close'

* Rename test

* Annotate test for issue 27

* Consolidate tests for issue #29

* Delete log.txt
@bieniu
Copy link
Author

bieniu commented Oct 14, 2019

Component with adb server works quite well. In HA 0.100 you made a lot of changes and I wanted to test them without an adb server. In fact, it seems to me that my device in standby mode responds with a very long delay or doesn't respond at all.
I think that changing the entity state to unavailable when the device is in standby mode isn't a problem. The problem is that the entity doesn't return to the correct state after the device exits standby mode. How can I debug this for you?
Thank you for great work on this component.

@JeffLIrion
Copy link
Owner

I don't know why it doesn't reconnect. In your log, it looked like it would reconnect but then encounter that timeout error and become unavailable again.

You could play around with the custom component: https://github.com/JeffLIrion/ha-androidtv/tree/master/custom_components/androidtv

The first thing I would try is, in media_player.py, catch the timeout exception separately from the other exceptions and just pass.

You could look into the ADBPython.close and ADBPython.connect functions in adb_manager.py.

You could look into the AdbDevice.close and AdbDevice.connect functions in adb_device.py.

Lastly, you could look into the TcpHandle.close and TcpHandle.connect functions in tcp_handle.py.

@MarvinSchenkel
Copy link

MarvinSchenkel commented Nov 6, 2019

@bieniu Have you ever debugged this issue? I am running into the same issue.

My Sony Bravia TV (KD65A1) works fine when I:

  • Turn off my TV and turn it on again
  • Then restart Home assistant

However, after I have had my TV off for a while, the home assistant entity keeps changing from unavailable to unknown and back.

If you haven't resolved this issue yet, I'll try the @JeffLIrion 's suggestions when I get home tonight and see if I can find some useful information.

@JeffLIrion
Copy link
Owner

You could try this custom component: https://github.com/JeffLIrion/ha-androidtv/tree/tcptimeout

Note that it's the tcptimeout branch, not master.

It implements my first suggestion from above. It's more of a workaround than a fix, but maybe it will avoid the issue.

@MarvinSchenkel
Copy link

@JeffLIrion Tried this, it works once I restart HA while my TV is on. However, when my tv has been off for a while it pops back to unavailable/unknown. When I turn on my TV, it doesn't auto-reconnect to my TV and keeps repeating this in the log:

2019-11-07 16:20:26 WARNING (SyncWorker_19) [custom_components.androidtv.androidtv.adb_manager] Couldn't connect to host 192.168.178.54:5555, error: Socket not connected

Any idea?

@JeffLIrion
Copy link
Owner

You didn’t get this “Socket not connected” error message before trying this custom component?

I'm not sure what the error is. I need debug logs for adb_shell (built-in component) / custom_components.androidtv.androidtv.adb_shell (custom component) in order to dig into the problem.

@MarvinSchenkel
Copy link

Yeah I did before trying the custom component as well, which was the whole reason of me trying the custom component in the first place :).How do I enable debug logging and pull those logs?

@JeffLIrion
Copy link
Owner

Right, but I'm asking specifically about the "Socket not connected" error message. Did you get that error message before or only with the custom component?

For setting log levels: https://www.home-assistant.io/integrations/logger/

@MarvinSchenkel
Copy link

Sorry if my previous message wasn't clear. I did get the 'socket not connected' message before the custom component as well after my TV had been off for a while.

@JeffLIrion
Copy link
Owner

Your problem seems like it might be different than the problem in the first post -- he doesn't have any "Socket not connected" error messages.

Without logs, there's no way to tell what happened.

@MarvinSchenkel
Copy link

home-assistant.log
Here's a log @JeffLIrion. The component isn't actively logging anymore since the last log entry. When I look at the entity in home-assistant it's current;y switching between 'unavailable' and 'unknown' every few seconds.

@JeffLIrion
Copy link
Owner

I don't see any errors or warnings in that log.

@MarvinSchenkel
Copy link

Hm. Any other ideas on how to debug this issue?

Also, should home assistant keep a connection to Android TV even when the TV is off? Because it looks like my Android TV closes sockets after being in standby mode for a while.

@JeffLIrion
Copy link
Owner

Hm. Any other ideas on how to debug this issue?

You could use the logger.set_level service to set the level to debug after the issue starts occurring once the device is on.

Also, should home assistant keep a connection to Android TV even when the TV is off? Because it looks like my Android TV closes sockets after being in standby mode for a while.

It's not wrong if the device goes to unavailable, since HA can't control it (e.g., turn it back on). What is wrong is that it doesn't reconnect.

A lot of devices (such as my Fire TV sticks) don't turn off completely, but rather go into a sleep mode. So HA can turn the device back on and never loses the connection. I've heard there are apps for Android that prevent the device from turning off completely, allowing the ADB connection to stay intact.

@MarvinSchenkel
Copy link

So I did manage to resolve workaround this issue. There's an option on my Sony Bravia TV (under Network) called 'Simple IP control' which, when enabled, prevents the TV from going into deep sleep. This still means that the auto-reconnect issue hasn't been resolved though.

No matter what I do, I cannot seem to get an error to log on the HA side, which makes me feel like Sony doesn't properly close connections when the TV enters deep sleep, causing HA to think the current socket connection is still valid. Is there any way I can help to validate this theory?

@JeffLIrion
Copy link
Owner

I pushed an update to the custom component, so please update that (use the tcptimeout branch). It's possible that the previous version was swallowing exceptions, but this version should log them.

When it gets into this error state, try setting the log level for the custom component (custom_components.androidtv) to debug. See if that results in any error messages getting logged and we can go from there.

@Twanislas
Copy link

Twanislas commented Feb 7, 2020

Hi !

FWIW, I have the same issue with a MiBox. I believe these boxes do not respect the "Do not sleep" setting. Even when set to on, if you put them in standby, they become unreachable (tested with ping and monitoring wifi connection from AP).

I thus believe the issue may be more on the Xiaomi side ?

Edit: Workaroud looks like to install a WakeLock app : see JeffLIrion/python-androidtv#18 (comment)

@JeffLIrion
Copy link
Owner

@Twanislas yeah, that would have been my first suggestion. Please report back and let me know if that fixes the issue.

@Twanislas
Copy link

Twanislas commented Feb 8, 2020

@JeffLIrion It's been 4 hours without a single disconnect, and I can turn on or off both my (Mi)boxes ! :)
The only downside is to have to sideload the apk, let's hope we see d4rken-org/wakelock-revamp#9 come to life !

@JeffLIrion
Copy link
Owner

That's good to hear! Please report back in a couple days to let me know if it's still working. If so, I'll close this issue.

@Twanislas
Copy link

4 days later, still working like a charm.
I believe you can close here. Moreover it's not really an adbshell issue...

Cheers !

@JeffLIrion
Copy link
Owner

@Twanislas thanks for the update! I'll go ahead and close this.

@bieniu
Copy link
Author

bieniu commented Feb 12, 2020

For me Wakelock app also fixed this issue. Thanks @Twanislas

@Twanislas
Copy link

Original credits go to @CultusMechanicus from JeffLIrion/python-androidtv#18 (comment) :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants