-
-
Notifications
You must be signed in to change notification settings - Fork 72
How Can I Help?
One of the most helpful ways to fast track a new app shortcut request is to provide some additional technical details by running one ADB command.
ADB command: adb shell dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp|mInputMethodTarget|mSurface'
It is possible to execute this command through the Home Assistant UI in just a few steps:
- Open the app on your Android device FIRST
- In Home Assistant, Open Developer Tools
- Click the Services Tab
- Select "Android TV: ADB Command" service
- Choose your device by clicking on the entity button
- Enter
adb shell dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp|mInputMethodTarget|mSurface'
into the command field - Click the CALL SERVICE button
- Click over to the developer tools States tab
- Choose your entity (the one you sent the command to)
- Copy and paste the "Attributes" data under the heading "adb_response:" into your app request issue submission
For example, when the Netflix app is open, following these steps will provide this useful output (or similar)
adb_response: mSurface=Surface(name=)/@0x96250e2
mSurface=Surface(name=com.netflix.ninja/com.netflix.ninja.MainActivity)/@0x7802d27
mCurrentFocus=Window{440f4dc u0 com.netflix.ninja/com.netflix.ninja.MainActivity}
mFocusedApp=AppWindowToken{d4bdfbd token=Token{75e6b14 ActivityRecord{a774167 u0 com.netflix.ninja/.MainActivity t1993}}}`
In order to discover the best and fastest way for Home Assistant to communicate with an android device, we can send a simple adb command to the device and examine the output.
ADB command: adb shell dumpsys input
It is possible to execute this command through the Home Assistant UI in just a few steps:
- Open Developer Tools
- Click the Services Tab
- Select "Android TV: ADB Command" service
- Choose your device by clicking on the entity button
- Enter
adb shell dumpsys input
into the command field - Click the CALL SERVICE button
- Click over to the developer tools States tab
- Choose your entity (the one you sent the command to)
- Review the data to see what and how your device is listening for external input