7

I'm trying to run the Hierarchy Viewer to investigate one screen of my app on an Android device (Samsung Galaxy S4, dev edition).

The HV starts up, but displays a blank screen in the tree view, with these error messages

[2014-06-10 16:52:22 - ViewServerDevice]Unable to debug device: samsung-gt_i9505g-86d22a7c
[2014-06-10 16:52:23 - hierarchyviewer]Missing forwarded port for 86d22a7c
[2014-06-10 16:52:23 - hierarchyviewer]Unable to get the focused window from device 86d22a7c

What are the steps to give HV the forwarded port that it wants? This is on MacOS 10.7.5

screendump of HV

Peter vdL
  • 4,953
  • 10
  • 40
  • 60

1 Answers1

0

Try the following steps to resolve this problem:

  1. Firstly check if you are running the application in debug mode. If yes, then quit the debug mode and run the application from launcher icon on the device. Also, it is preferable to start the android device monitor from terminal i.e. by going to /Users/<user>/Library/Android/sdk/tools then enter ANDROID_HVPROTO=ddm monitor.

  2. If it still doesn't work try running the android command on terminal, if it says command not found or something like that then try this (or check from d.danailov's answer here):

    vim ~/.bash_profile

Then enter these 3 lines in the insert mode of Vim.

export ANDROID_HOME=/Users/<Username>/Library/Android/sdk (path to your sdk)
export PATH=$ANDROID_HOME/tools:$PATH
export PATH=$ANDROID_HOME/platform-tools:$PATH
  1. Then restart your terminal and enter android on the terminal.

  2. Now start the android device monitor from terminal i.e. by going to /Users/<Username>/Library/Android/sdk/tools then enter ANDROID_HVPROTO=ddm monitor.

Hope it helps.

Marcello B.
  • 4,177
  • 11
  • 45
  • 65
pawar
  • 70
  • 2
  • 11