screenshot2 command not found

In this troubleshooting guide we learn how to fix screenshot2 command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

screenshot2: command not found

or when using sudo you get the following error message

sudo: screenshot2: command not found

Solutions to screenshot2: command not found

How To Fix screenshot2: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu screenshot2 is provided by android-platform-tools-base package.

android-platform-tools-base is:

This package includes various tools for developing and building Android applications, e.g.

  • Draw 9-patch: Allows you to easily create a NinePatch graphic using a WYSIWYG editor. It also previews stretched versions of the image, and highlights the area in which content is allowed.

  • screenshot2: Takes a screenshot from a remote Android device.

default-jre or other non-headless JRE needs to be installed in order to run “draw9patch”. However draw9patch fails to run due to bug #798794.

To fix this problem, we can install more using the command below.

sudo apt-get -y install android-platform-tools-base

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install android-platform-tools-base.

sudo apt -y install android-platform-tools-base

Or if you have aptitude installed you can use the following command.

sudo aptitude install android-platform-tools-base

Summary

In this tutorial we learn how to fix screenshot2 command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.