Installing Android on Ubuntu 20.10

This post is an addendum to installing Ubuntu, if you are missing any packages, please see the Essentials section in that post. Let’s get cracking!

Install Java

Not absolutely necessary, but I prefer to use the default JDK:

sudo apt install default-jdk default-jre

Setup Virtualization

The Android Emulator runs faster when virtualization software is used. Before proceeding, please make sure virtualization is enabled in your BIOS. Let’s verify if your CPU is supported:

sudo apt install cpu-checker

egrep -c '(vmx|svm)' /proc/cpuinfo

if the result is 0 then virtualization is not supported, skip to the next section.

sudo kvm-ok

The output should indicate that KVM acceleration can be used, if not skip to the next section.

Let’s configure virtualization as per this recommendation.

sudo apt install qemu qemu-kvm libvirt-clients libvirt-daemon libvirt-daemon-system virtinst bridge-utils 

sudo systemctl enable --now libvirtd

sudo systemctl status libvirtd

Add the current user to the KVM group:

sudo adduser $USER kvm

sudo reboot

Install Android Studio

Download the tar file from here.

I have a folder called Apps where I install software. I’ll change into that folder to begin the install:

cd ~\Apps

tar -xzf ~/Downloads/android-studio-ide-201.6953283-linux.tar.gz 

cd android-studio/bin

./studio.sh

Follow the prompts to complete your install. I typically select to use the version of the JDK we installed earlier, found at this location:

/usr/lib/jvm/java-11-openjdk-amd64

Post Installation Configuration

I like to use Sdk 28 for Flutter, so I install that from the SDK Manager available form the configuration drop down menu.

I also install the Command Line Tools.

Remember to create a desktop shortcut from the configuration menu’s Create Desktop Entry item.

Environment Configuration

Lastly, a few tweaks to the environment so everything runs smoothly.

sudo vim ~/.bashrc

Add this to the end of your bashrc file:

export ANDROID_SDK_ROOT=$HOME/Android/Sdk

export PATH=”$PATH:$ANDROID_SDK_ROOT/emulator:
$ANDROID_SDK_ROOT/tools:$ANDROID_SDK_ROOT/platform-tools”

Now you can create an device using AVD, perhaps called nexus, and start it from the console:

emulator @nexus &

2 thoughts on “Installing Android on Ubuntu 20.10

  1. hello , i have install the application, and even run the first application , but i dont have the android studio app on Desktop. how can get the application on my desktop

    Like

    1. Hi Desmond, did you select to create a desktop icon after installing? Can you find Android where you normally look for applications?

      If so, you can right click on the icon and add it to favorites – it will be in the side dock.

      If not, you can do that now:

      in the terminal, cd to where you extracted Android, in the above post it is here:

      cd $HOME/Apps/android-studio/bin

      Next, enter this command:

      ./studio.sh

      After a few seconds you should see the Android Studio startup screen. There is a drop down menu from which you can select “Create Desktop Entry”. This will create an icon for you. You can find it in where you normally search for applications, add it to favorites if you’d like to dock it in the side bar.

      I hope this helps.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s