How To Install androidsdk-uiautomatorviewer on Ubuntu 18.04

In this tutorial we learn how to install androidsdk-uiautomatorviewer on Ubuntu 18.04. androidsdk-uiautomatorviewer is Tool to scan and analyze the UI components of an Android application

Introduction

In this tutorial we learn how to install androidsdk-uiautomatorviewer on Ubuntu 18.04.

What is androidsdk-uiautomatorviewer

androidsdk-uiautomatorviewer is:

The uiautomatorviewer tool provides a convenient visual interface to inspect the layout hierarchy and view the properties of the individual UI components that are displayed on the test device. Using this information, you can later create uiautomator tests with selector objects that target specific UI components to test.

There are three methods to install androidsdk-uiautomatorviewer on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install androidsdk-uiautomatorviewer Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install androidsdk-uiautomatorviewer using apt-get by running the following command:

sudo apt-get -y install androidsdk-uiautomatorviewer

Install androidsdk-uiautomatorviewer Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install androidsdk-uiautomatorviewer using apt by running the following command:

sudo apt -y install androidsdk-uiautomatorviewer

Install androidsdk-uiautomatorviewer Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install androidsdk-uiautomatorviewer using aptitude by running the following command:

sudo aptitude -y install androidsdk-uiautomatorviewer

How To Uninstall androidsdk-uiautomatorviewer on Ubuntu 18.04

To uninstall only the androidsdk-uiautomatorviewer package we can use the following command:

sudo apt-get remove androidsdk-uiautomatorviewer

Uninstall androidsdk-uiautomatorviewer And Its Dependencies

To uninstall androidsdk-uiautomatorviewer and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove androidsdk-uiautomatorviewer

Remove androidsdk-uiautomatorviewer Configurations and Data

To remove androidsdk-uiautomatorviewer configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge androidsdk-uiautomatorviewer

Remove androidsdk-uiautomatorviewer configuration, data, and all of its dependencies

We can use the following command to remove androidsdk-uiautomatorviewer configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge androidsdk-uiautomatorviewer

References

Summary

In this tutorial we learn how to install androidsdk-uiautomatorviewer package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.