Skip to content

Instantly share code, notes, and snippets.

@jonascheng
Created February 5, 2017 01:06
Show Gist options
  • Save jonascheng/e6530fa4249e78e5174550f853642987 to your computer and use it in GitHub Desktop.
Save jonascheng/e6530fa4249e78e5174550f853642987 to your computer and use it in GitHub Desktop.
android tool hierarchyviewer is not working
The standalone version of hieararchyviewer is deprecated.
Please use Android Device Monitor (tools/monitor) instead.
08:57:39 E/ViewServerDevice: Unable to debug device: samsung-sm_n9208-05157df5db5a2417
08:57:39 E/hierarchyviewer: Missing forwarded port for 05157df5db5a2417
08:57:39 E/hierarchyviewer: Unable to get the focused window from device 05157df5db5a2417
For anyone working with Android 4.1 or later:
you can get Hierarchy Viewer working by setting the environment variable ANDROID_HVPROTO to ddm.
Mac OSX/Android Studio users, remember to start hierarchy viewer from command line so it will pick up the environment variable.
[Device Setup for Hierarchy Viewer](https://developer.android.com/studio/profile/hierarchy-viewer-setup.html)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment