How To Install android-headers on Ubuntu 18.04
Introduction
In this tutorial we learn how to install android-headers
on Ubuntu 18.04.
What is android-headers
android-headers is:
Android NDK provided by Google contains subset of AOSP platform headers which are deemed “external interface” by Google. However, writing advanced software for Android necessitates access to complete platform. Many aspects of it change, sometimes drastically, between releases, so compiling user source code against platform headers for different releases is required (e.g. for libhybris).
This package provides the platform development headers for core components of AOSP (Android Open Source Project), for the 4.4.2 release
There are three methods to install android-headers
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 android-headers Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install android-headers
using apt-get
by running the following command:
sudo apt-get -y install android-headers
Install android-headers Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install android-headers
using apt
by running the following command:
sudo apt -y install android-headers
Install android-headers 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 android-headers
using aptitude
by running the following command:
sudo aptitude -y install android-headers
How To Uninstall android-headers on Ubuntu 18.04
To uninstall only the android-headers
package we can use the following command:
sudo apt-get remove android-headers
Uninstall android-headers And Its Dependencies
To uninstall android-headers
and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:
sudo apt-get -y autoremove android-headers
Remove android-headers Configurations and Data
To remove android-headers
configuration and data from Ubuntu 18.04 we can use the following command:
sudo apt-get -y purge android-headers
Remove android-headers configuration, data, and all of its dependencies
We can use the following command to remove android-headers
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge android-headers
References
Summary
In this tutorial we learn how to install android-headers
package on Ubuntu 18.04 using different package management tools: apt
, apt-get
and aptitude
.