Skip to content
Doug Nelson edited this page Sep 22, 2023 · 9 revisions

Buy Me A Coffee

Details for App Requests

One of the most helpful ways to fast track a new app shortcut request is to provide some additional technical details by running this one ADB command:

adb shell dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp|mInputMethodTarget|mSurface'

You can do this through the Home Assistant UI by following these steps:

  1. Open the app on your Android device FIRST
  2. In Home Assistant, Open Developer Tools
  3. Click the Services Tab
  4. Select "Android Debug Bridge: ADB command" service
  5. Choose your device by clicking on the entity button
  6. Enter adb shell dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp|mInputMethodTarget|mSurface' into the command field
  7. Click the CALL SERVICE button
  8. Click over to the developer tools States tab
  9. Choose your entity (the one you sent the command to)
  10. 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}}}`



Device Interrogation for New Device Support

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 shell dumpsys input

It is possible to execute this command through the Home Assistant UI in just a few steps:

  1. Open Developer Tools
  2. Click the Services Tab
  3. Select "Android Debug Bridge: ADB command" service
  4. Choose your device by clicking on the entity button
  5. Enter adb shell dumpsys input into the command field
  6. Click the CALL SERVICE button
  7. Click over to the developer tools States tab
  8. Choose your entity (the one you sent the command to)
  9. Review the data to see what and how your device is listening for external input