How to Install official Android Emulator (SDK) on Linux

Everybody knows Android OS (Opensource) is market leader and it is developed especially for touchscreen mobile devices like smartphones & tablet.

Initially android was developed by android Inc and later Google acquired and currently google doing further development. If you want to run any mobile app such as WhatsApp in your system, you should install the android emulator.

Android SDK is the official android emulator which is developed by Google to emulate the Android App in Linux System. In this article i’m going to explain how to install android emulator using android SDK in Linux.

Alternatively you can install Android Emulator through Genymotion (Android Emulator).

How to Install Genymotion (Android Emulator) on Linux

Prerequisites

Android SDK refers/depends 32-bit Libraries in run time, so 64-bit user should install 32-bit libraries on system to work properly or else you will get error when you launching the device.

[Install 32-bit libraries ia32-libs Package]
$ sudo apt-get install ia32-libs

[If you don't have ia32-libs package, then install Alternative Package]
$ sudo apt-get install libgl1-mesa-dev

1) Java installation

Android SDK purely depends on JAVA. I advise you to install OpenJDK or Oracle JAVA before proceeding Android SDK installation.

Install OpenJDK or Oracle JAVA on Linux

2) Verifying JAVA Version

Use the below command to check the java version which you have installed on your system.

$ java -version
java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)

3) Download SDK Package

Download the Android SDK Package Archive from android official site. Make sure you have to download the archive into /opt directory because opt directory is dedicated for third party software installation.

$ cd /opt
$ wget http://dl.google.com/android/android-sdk_r24.4.1-linux.tgz
$ sudo tar -zxvf android-sdk_r24.4.1-linux.tgz
$ cd /android-sdk-linux/tools
$ ./android

You will see the below pop-up window when you are hitting android.
installing-android-emulator-in-linux-5

Magesh Maruthamuthu

Love to play with all Linux distribution

You may also like...

  • Miguel Ángel San Antolín

    If you start on steps 2 or 3 (your architecture is 32 bits) before starting step 3 you need to register as super user, it means the second line would be:

    $ sudo wget http://dl.google.com/android/android-sdk_r24.4.1-linux.tgz

  • Hal Tutor

    okay, GNUB here to Linux. using 32bit Ubuntu 16.04. followed all instructions. when I get to the very end get this error in the “Starting Android Emulator” window:

    Starting emulator for AVD ‘Android’
    /opt/android-sdk-linux/tools/emulator: 1: /opt/android-sdk-linux/tools/emulator: Syntax error: “(” unexpected

    and then it just stops. Any other help? thanks

  • Christopher Merrell

    Everytime i try to do
    $ cd /android-sdk-linux/tools
    ./android
    I get an error
    ./android permission denied

  • Gabriel

    This is a pain in the ass, i get “android: can’t find sdkmanager.jar” after ./android. I am using Ubuntu MATE 15.10

    • @Gabriel,
      Can you please post your error message to investigate further.

  • John Dirk

    Stage 3 download SDK package, I get stuck at “cd…/tools”
    Linux Mint 17.3 Cinnamon 64 bit

    • @john Dirk,
      You need to navigate one by one directory and finally you will get tools folder, that’s it. I don’t know what challenge you are facing. Anyhow i will include all the directories.

    • michael

      having the same problem. says file not found

      • Michael,
        We will retest the installation and update the status.

  • John Dirk

    NOT happy!!!!!!
    Instructions missing crucial steps which brings me to a dead end.
    Mint 17.3 Cinnamon 64 bit

  • kalmesh

    [[email protected] ibab]# yum install libgl1-mesa-devLoaded plugins: langpacks, refresh-packagekit
    No package libgl1-mesa-dev available.
    Error: Nothing to do

    what should i do? I am using fedora 20.

  • achmad

    Dear Magesh
    thanks for the great tutororial, but i have problem when finish create AVD and i start i have same problem.
    for info i finished added line “export ANDROID_EMULATOR_FORCE_32BIT=true” on “.profile” but when i start again i got same problem.

    thanks

    • maha

      open run—-> edit configuration—->emulator—->-force-32bit

      In additional commandline option give -force-32bit

  • fedrick william

    Hallo Magesh i need help plz for errors below
    [email protected]:~$ ./android
    bash: ./android: No such file or directory
    [email protected]:~$ ~/sdk/toos$ ./android
    bash: /home/fedrick/sdk/toos$: No such file or directory

    • @fedrick,
      It seem’s that you are in wrong directory and correct directory is (tools). Give a try and update me the result.

    • this.foo

      It should be in android-sdk-linux

  • @Rizwan,

    The blow link will help you to solve your issue.

    http://developer.android.com/tools/devices/emulator.html#vm-windows

  • David Silva

    Hello Rizvan

    You need KVM compiled in your kernel (or as a module depending on what you’re using), since the emulator seems to be a virtual machine which requires to use KVM as a host/guest mechanism to run, in order to use your host PC’s resources (mainly your graphics acceleration).

  • @Rizwan,
    Can i have the distribution which you are using.

  • Rizwan

    Hello sir,
    I’m getting this error while kaunching the Emulator.. I’m using 32-bit
    ___________________________________________________________________
    Starting emulator for AVD ‘Android’
    emulator: ERROR: x86 emulation currently requires hardware acceleration!
    Please ensure KVM is properly installed and usable.
    CPU acceleration status: KVM is not installed on this machine (/dev/kvm is missing).
    ____________________________________________________________________

  • @Christine,

    I didn’t tried 5.0 but i installed upto 4.4 and its working fine for me.

    # ls -la

    you can get .profile file and do the below things

    Open .profile file and add below line.
    export ANDROID_EMULATOR_FORCE_32BIT=true
    Save and exit. and execute the profile file using below command.
    # source ~/.profile

  • @Senbagaraman,

    As per our policy we don’t allow to re produce our article but Backlinks allowed.

    • Christine

      Hello 2daygeek,

      Maybe it’s a stupid question, but where can I find the .profile file?
      We installed the latest version, 5.0, is it possible to run this on a 32-bit?

      Hope you (or someone else) can help!

      Christine

  • @Sukru,

    Pls post your error message.

  • Senbagaraman

    Great and thanks for the post.Can I use the above information on my blog with your permission.

  • @Navin,

    SDK designed based on 64 bit architecture. If you want to use in 32 bit, do below things to run.
    Open .profile file and add below line.
    export ANDROID_EMULATOR_FORCE_32BIT=true
    Save and exit. and execute the profile file using below command.
    # source ~/.profile

    • Sukru

      Hi,
      I have tried this, but I am getting same error.

  • @Navin,

    The error clearly says, You are in 32-bit OS.

    Did you downloaded 32-bit archive ?

    • Navin

      Ah yes !!! How stupid of me!! Thanks for the reply. Can I download this version? android-sdk_r20.0.3-linux.tgz

  • Navin

    Nice Explanation. I get the following error: can you please tell me wats the problem here
    Starting emulator for AVD ‘Android’
    ERROR: 32-bit Linux Android emulator binaries are DEPRECATED, to use them
    you will have to do at least one of the following:
    – Use the ‘-force-32bit’ option when invoking ’emulator’.
    – Set ANDROID_EMULATOR_FORCE_32BIT to ‘true’ in your environment.
    Either one will allow you to use the 32-bit binaries, but please be
    aware that these will disappear in a future Android SDK release.
    Consider moving to a 64-bit Linux system before that happens.

  • @arose,

    You are most welcome

  • arose

    great, first time with Linux mint 17 and it works

Shares
Close
Please support the site
By clicking any of these buttons you help our site to get better