First my apologies to Romain Guy, I am not sure if this is the right way to embedd this..its direct from his G+ post:

HierarchyViewer (http://developer.android.com/guide/developing/debugging/debugging-ui.html) is an extremely useful UI inspection and debugging tool for Android but it can only be used with the emulator or engineering/debug builds on phones.

With the latest update of the Android SDK r12 (http://developer.android.com/sdk/index.html) you can now use HierarchyViewer with your application on any retail phone.

To do so, visit https://github.com/romainguy/ViewServer and include the ViewServer class in your application and follow the instructions. HierarchyViewer will work only with your application, when the debug flag is enabled.

Enjoy!

Advertisements