page.title=Device Setup for Hierarchy Viewer meta.tags="android, performance, profiling, tools, rendering, hierarchyviewer" page.tags="android", "performance", "profiling", "tools", "rendering", "hierarchyviewer" page.metaDescription=Set up your mobile device to work with Hierarchy Viewer. page.image=tools/performance/thumbnails/tools_hierarchy_viewer.png page.article=true @jd:body

You should also read

To run Hierarchy Viewer, you must enable Developer Options on your mobile device and perform some setup on your computer.

Configuring Devices

  1. Enable Developer Options on your mobile device.

  2. Depending on the type of device you have, do one of the following:

Setting the ANDROID_HVPROTO variable

Windows

  1. Click My Computer > Property > Advanced > Environment Variables.
  2. Click New.
  3. In variables name put: ANDROID_HVPROTO
  4. In variable value put: ddm
  5. Click OK<./li>

Mac

  1. Edit ~/.bash_profile
  2. Add:
    #Hierarchy Viewer Variable
    export ANDROID_HVPROTO=ddm
  3. source ~/.bash_profile

Linux

  1. Edit ~/.bash_profile
  2. Add:
    #Hierarchy Viewer Variable
    export ANDROID_HVPROTO=ddm
  3. source ~/.bash_profile