- How to install Android SDK on Ubuntu?
- 9 Answers 9
- How To Install android-sdk-platform-tools on Kali Linux
- What is android-sdk-platform-tools
- Install android-sdk-platform-tools Using apt-get
- Install android-sdk-platform-tools Using apt
- Install android-sdk-platform-tools Using aptitude
- How To Uninstall android-sdk-platform-tools on Kali Linux
- Uninstall android-sdk-platform-tools And Its Dependencies
- Remove android-sdk-platform-tools Configurations and Data
- Remove android-sdk-platform-tools configuration, data, and all of its dependencies
- References
- Summary
- How to Install Android SDK without Android Studio on Ubuntu
- Prerequisites
- Step 1. Setup Directory for Android SDK
- Step 2. Download Android command-line tools
- Step 3. Let the system know SDK Location
- Step 4. Install Android SDKs from Command Line
- Conclusion
How to install Android SDK on Ubuntu?
For my Ubuntu machine, I downloaded the latest version of Android SDK from this page. After extracting the downloaded .tgz file, I was trying to search for installation instructions and found:
To get started on Linux: Unpack the .zip file you’ve downloaded. The SDK files are download separately to a user-specified directory. Make a note of the name and location of the SDK directory on your system—you will need to refer to the SDK directory later when using the SDK tools from the command line.
there’s an easy install paolorotolo.github.io/android-studio — or check this tutorial on how do it manualy — youtube.com/watch?v=qfinKxwYYZs
@Tasos Any idea about the maintenance and long term support paolorotolo’s Android studio? This looks more of a personal project 🙁
Android Studio itself alerts you when there is a new update/upgrade so you do it from there. I dont think the person modified AS
from my last comment — however you can ask that question directly to the person here — github.com/PaoloRotolo/android-studio/issues
9 Answers 9
sudo apt update && sudo apt install android-sdk
The location of Android SDK on Linux can be any of the following:
- /home/AccountName/Android/Sdk
- /usr/lib/android-sdk
- /Library/Android/sdk/
- /Users/[USER]/Library/Android/sdk
- Download the Android Studio.
- Extract downloaded .zip file. The extracted folder name will read somewhat like android-studio
To keep navigation easy, move this folder to Home directory.
- After moving, copy the moved folder by right clicking it. This action will place folder’s location to clipboard.
- Use Ctrl Alt T to open a terminal
- Go to this folder’s directory using cd /home/(USER NAME)/android-studio/bin/
- Type this command to make studio.sh executable: chmod +x studio.sh
- Type ./studio.sh
A pop up will be shown asking for installation settings. In my particular case, it is a fresh install so I’ll go with selecting I do not have a previous version of Studio or I do not want to import my settings.
If you choose to import settings anyway, you may need to close any old project which is opened in order to get a working Android SDK.
From now onwards, setup wizard will guide you.
Android Studio can work with both Open JDK and Oracle’s JDK (recommended). Incase, Open JDK is installed the wizard will recommend installing Oracle Java JDK because some UI and performance issues are reported while using OpenJDK.
The downside with Oracle’s JDK is that it won’t update with the rest of your system like OpenJDK will.
The wizard may also prompt about the input problems with IDEA .
Verify installation settings
An emulator can also be configured as needed.
The wizard will start downloading the necessary SDK tools
The wizard may also show an error about Linux 32 Bit Libraries, which can be solved by using the below command:
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1
After this, all the required components will be downloaded and installed automatically.
After everything is upto the mark, just click finish
To make a Desktop icon, go to ‘Configure’ and then click ‘Create Desktop Entry’
How To Install android-sdk-platform-tools on Kali Linux
In this tutorial we learn how to install android-sdk-platform-tools on Kali Linux.
What is android-sdk-platform-tools
The Android SDK includes a variety of tools that help you develop mobile applications for the Android platform. The tools are classified into 3 groups: SDK Tools, Platform-tools and Build-tools.
Platform-tools are customized to support the features of the latest Android platform.
This package pulls Android SDK Platform-tools.
There are three ways to install android-sdk-platform-tools on Kali Linux . 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-sdk-platform-tools Using apt-get
Update apt database with apt-get using the following command.
After updating apt database, We can install android-sdk-platform-tools using apt-get by running the following command:
sudo apt-get -y install android-sdk-platform-tools
Install android-sdk-platform-tools Using apt
Update apt database with apt using the following command.
After updating apt database, We can install android-sdk-platform-tools using apt by running the following command:
sudo apt -y install android-sdk-platform-tools
Install android-sdk-platform-tools 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 Kali Linux. Update apt database with aptitude using the following command.
After updating apt database, We can install android-sdk-platform-tools using aptitude by running the following command:
sudo aptitude -y install android-sdk-platform-tools
How To Uninstall android-sdk-platform-tools on Kali Linux
To uninstall only the android-sdk-platform-tools package we can use the following command:
sudo apt-get remove android-sdk-platform-tools
Uninstall android-sdk-platform-tools And Its Dependencies
To uninstall android-sdk-platform-tools and its dependencies that are no longer needed by Kali Linux, we can use the command below:
sudo apt-get -y autoremove android-sdk-platform-tools
Remove android-sdk-platform-tools Configurations and Data
To remove android-sdk-platform-tools configuration and data from Kali Linux we can use the following command:
sudo apt-get -y purge android-sdk-platform-tools
Remove android-sdk-platform-tools configuration, data, and all of its dependencies
We can use the following command to remove android-sdk-platform-tools configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge android-sdk-platform-tools
References
Summary
In this tutorial we learn how to install android-sdk-platform-tools using different package management tools like apt, apt-get and aptitude.
How to Install Android SDK without Android Studio on Ubuntu
Android SDK consists of a collection of tools that help developers to create Android applications. It comes with tools such as Build Tools, Platform Tools, Emulator, Jetifier, and command line tools.
When you install Android Studio, the Android SDK comes along with it. Some developers may prefer to use their own preferred text editor or IDE and only need SDK tools for their development.
In this tutorial, we learn how to install Android SDK without android studio on a Ubuntu.
Prerequisites
Step 1. Setup Directory for Android SDK
First, create a directory structure to set up SDK Tool. In my case, going to place it in my home directory under ~/android/sdk directory.
For creating the directory, type:
Step 2. Download Android command-line tools
Visit the Android Studio download page and grab the link to download sdk command line tool. This would be at the bottom of the webpage in the section «Command line tools only» and contained in a zip file.
Note: This package is generic for all Linux Distributions. We have tested only on Ubuntu. Should work on other Linux Distros as well.
Change to the sdk directory created before:
Download the zip file using wget command:
sudo wget https://dl.google.com/android/repository/commandlinetools-linux-9123335_latest.zip
Once downloaded, extract the .zip file using the unzip command:
sudo unzip commandlinetools-linux-9123335_latest.zip
Once extraction is completed, you will have a new directory named cmdline-tools. Now change to that directory.
Let’s create a new directory inside cmdline-tools to hold all bin and lib contents.
Now you can move everything inside the cmdline_tools directory to the tools directory.
Step 3. Let the system know SDK Location
For the SDK command line tool to work, we have to set up environment variables properly. For this let us set the ANDROID_HOME environment variable and update the PATH variable.
export ANDROID_HOME=$HOME/android/sdk export PATH=$ANDROID_HOME/cmdline-tools/tools/bin/:$PATH export PATH=$ANDROID_HOME/emulator/:$PATH export PATH=$ANDROID_HOME/platform-tools/:$PATH
To make the changes permanent, you would need to add these commands to your shell profile file (e.g. .bash_profile or .bashrc).
Step 4. Install Android SDKs from Command Line
The Android SDK command line tools package comes with sdkmanager command. This tool is used to manage the packages and components of the Android SDK. Commonly used to list, install and update packages.
To list all installed and available packages, type
sdkmanager --list or sdkmanager --list --channel=channel_id // Channels: 0 (stable), 1 (beta), 2 (dev), or 3 (canary)
The output is a long list of packages. You can use filter the list using grep — for example sdkmanager —list | grep package-name.
To install packages use the following syntax:
sdkmanager --install packages [options]
Some of the useful packages are platform tools, build tools, and emulator. To install those packages using sdkmanager, type:
sdkmanager --install "platform-tools" "build-tools;30.0.1" "emulator" "platforms:android-33"
To keep all packages on the latest version update packages use sdkmanager —update command.
Conclusion
In this tutorial, we learned how to install Android SDK without actually installing the full android studio. This is more useful for guys who are more interested to stick on the command line.
Thanks for reading, if you encounter any issues please leave a comment.
If this resource helped you, let us know your care by a Thanks Tweet. Tweet a thanks