How to make “Hierarchy Viewer” work in a real device?

我的梦境 提交于 2019-12-04 10:45:19

ViewServer is required only on non-rooted devices with Android older than 4.1.

For devices with Android 4.1+ all you need is to set ANDROID_HVPROTO=ddm environmental variable and restart adb server.

It's one of the hidden Android features, found it on free Udacity course - Android Performance (Lesson 1: Render, 12th part "Hierarchy Viewer Walkthrough", links below video).

Try using HierarchyViewerSupport Annotation but not sure how much it will be of help.

This @HierarchyViewerSupport annotation allows you to use the HierarchyViewer inspection tool on any device.

Make sure your application has INTERNET permission and android:debuggable = true Manifest.

Just annotate your activity with @HierarchyViewerSupport :

@HierarchyViewerSupport
 @EActivity
 public class MyActivity extends Activity {

 }

I am not sure dude how much this could help based on your question i did bit RnD, i think its not possible on production builds as reason you already explained.

Anyway if you want details of your current activity screen like info about widgets and all you can still get it using a Python Script as well which i have developed but again it does not work on production build.

Try this above solution and let us know if it helps.

Have a look a the link following below it has detail information about how to enable hierarchy viewer in actual device

How to show hierarchy viewer in android device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!