apksigner command not found

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

Introduction

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

apksigner: command not found

or when using sudo you get the following error message

sudo: apksigner: command not found

Solutions to apksigner: command not found

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

In Ubuntu apksigner is provided by apksigner package.

apksigner is:

apksig is a project which aims to simplify APK signing and checking whether APK’s signatures should verify on Android. apksig supports JAR signing (used by Android since day one) and APK Signature Scheme v2 (supported since Android Nougat, API Level 24).

The key feature of apksig is that it knows about differences in APK signature verification logic between different versions of the Android platform. apksig can thus check whether a signed APK is expected to verify on all Android platform versions supported by the APK. When signing an APK, apksig will choose the most appropriate cryptographic algorithms based on the Android platform versions supported by the APK being signed.

apksigner command-line tool offers two operations:

  • sign the provided APK so that it verifies on all Android platforms supported by the APK. Run apksigner sign for usage information.

  • check whether the provided APK’s signatures are expected to verify on all Android platforms supported by the APK. Run apksigner verify for usage information.

The tool determines the range of Android platform versions (API Levels) supported by the APK by inspecting the APK’s AndroidManifest.xml. This behavior can be overridden by specifying the range of platform versions on the command-line.

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

sudo apt-get -y install apksigner

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

You can also use apt command to install apksigner.

sudo apt -y install apksigner

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

sudo aptitude install apksigner

Summary

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