To run Hierarchy Viewer, you must enable Developer Options on your mobile device and perform some setup on your computer.
Enable Developer Options on your mobile device.
ANDROID_HVPROTO
ddm
~/.bash_profile
#Hierarchy Viewer Variable
export ANDROID_HVPROTO=ddm
source ~/.bash_profile
~/.bash_profile
#Hierarchy Viewer Variable
export ANDROID_HVPROTO=ddm
source ~/.bash_profile