How can I use Layout Inspector for apps installed from Google Play?

Sunil picture Sunil · Jun 3, 2018 · Viewed 7k times · Source

I was trying to use LayoutInspector for apps from Google Play. I have a rooted device so when I do "Show all processes", all the running apps developed by me are displayed but not the official ones.

Answer

Mohammad Monfared picture Mohammad Monfared · Oct 2, 2019

You can use UiAutomator2 Viewer ( a tool from android SDK)

{ your sdk path} \tools\bin\uiautomatorviewer.bat

This tool shows the complete hierarchy and attributes of all elements visible on the device display (no matter which app is running).

enter image description here

Also in the "Katalon studio" we have a tool named Mobile Spy which do the same + full Xpath

enter image description here

Note that you should have adb server running with connecting the device. so the "adb devices" must return device id.