Last updated: November 01, 2019

Table of contents:

  1. Download latest Android SDK
  2. Path
  3. i366 support
  4. Installing SDK

Sometimes there is a need to install Android SDK on the server, without UI, for example, while setting up your own build server based on Jenkins or any other CI/CD tools. To install Android SDK on the Debian server you must to:

Download latest Android SDK:

wget https://dl.google.com/android/repository/build-tools_r29.0.2-linux.zip
tar -xvf android-sdk*-linux.tgz
cd android-sdk-linux/tools
./android update sdk --no-ui --filter platform,platform-tools

Set the path:

echo 'export PATH=$PATH:/opt/android-sdk-linux/platform-tools' >> /etc/profile.d/android.sh
echo 'export ANDROID_TOOLS=/opt/android-sdk-linux' >> /etc/profile.d/android.sh
source /etc/profile.d/android.sh

Add i366 support:

 
dpkg --add-architecture i386
apt-get update
apt-get install -y libc6:i386 libstdc++6:i386 zlib1g:i386

Install SDK:

cd /opt/android-sdk-linux/tools
./android list sdk --all
./android update sdk --no-ui --all

Reference:

  1. Online Android SDK Manager
  2. Build Android apps with Debian: apt install android-sdk
  3. Install Android SDK Manager on Ubuntu 18.04

My site is free of ads and trackers. Was this post helpful to you? Why not BuyMeACoffee