aidl command not found

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

Introduction

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

aidl: command not found

or when using sudo you get the following error message

sudo: aidl: command not found

Solutions to aidl: command not found

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

In Ubuntu aidl is provided by aidl package.

aidl is:

aidl is a utility to generate Java and/or C++ code from Android’s Android Interface Definition Language (AIDL). AIDL is similar to other IDLs you might have worked with. It allows you to define the programming interface that both the client and service agree upon in order to communicate with each other using interprocess communication (IPC). On Android, one process cannot normally access the memory of another process. So to talk, they need to decompose their objects into primitives that the operating system can understand, and marshall the objects across that boundary for you. The code to do that marshalling is tedious to write, so Android handles it for you with AIDL. This package provides two tools:

  • “aidl” which generates Java bindings.
  • “aidl-cpp” which generates C++ bindings.

For more info, see: https://developer.android.com/guide/components/aidl.html

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

sudo apt-get -y install aidl

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

You can also use apt command to install aidl.

sudo apt -y install aidl

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

sudo aptitude install aidl

Summary

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