You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Arthur Silva edited this page Oct 31, 2020
·
1 revision
UI Automator Viewer is a program from Android SDK tools. Unfortunately, the easiest way to get SDK tools is to download and install Android Studio from the official site. It won't be necessary to use Android Studio itself though.
UI Automator Viewer lets us make special Android screenshots, that contain not only a picture of the screen, but also a layout hierarchy. Simply speaking, it lets us understand how Instagram is built and how we can interact with Instagram interface with our bot.
How to use UI Automator Viewer
Make sure that you've connected your Android device and adb sees it (adb devices prints your device ID). If it's not, follow instructions on the main page. If you've successfully installed Android Studio, then uiautomatorviewer can be usually found in
C:\Users\<username>\AppData\Local\Android\sdk\tools\binfor Windows
~/Library/Android/sdk/tools/binfor macOS (press Shift+command+. in Finder to see hidden folders)
~/Android/sdk/tools/binfor Ubuntu
It can be launched simply by double-clicking. You will see something like this:
Now all you have to do is to press 1. Device Screenshot and 2. Save. You'll get two files: *.png and *.uix, describing what there's currently on your Android device's screen.