hidl-gen command not found

In this troubleshooting guide we learn how to fix hidl-gen command not found error message

Introduction

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

hidl-gen: command not found

or when using sudo you get the following error message

sudo: hidl-gen: command not found

Solutions to hidl-gen: command not found

How To Fix hidl-gen: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu hidl-gen is provided by hidl-gen package.

hidl-gen is:

HAL interface definition language or HIDL is an interface description language (IDL) to specify the interface between a HAL and its users. It allows specifying types and method calls, collected into interfaces and packages. More broadly, HIDL is a system for communicating between codebases that may be compiled independently.

https://source.android.com/devices/architecture/hidl/

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

sudo apt-get -y install hidl-gen

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

You can also use apt command to install hidl-gen.

sudo apt -y install hidl-gen

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

sudo aptitude install hidl-gen

Summary

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