How to use KVM alone without Android Studio AVD to emulate official x86_64 android images

I want to use official (google compiled) x86_64 android images. I know that I can use AVD manager from Android Studio to easely run and manage them. However, I use virt-manager with KVM, so I can’t run Android and my other images at the same time (even if I could, I prefer to do all inside virt-manager instead of installing all of Android Studio).

Since the images are x86_64, theoretically I could run them into virt-manager as well. The problem is that the images downloaded from google server when I use ADV are a bit strange. They contain some files and at least two .img files inside of it. It’s not simply an ISO image that I can plug into a disk in virt-manager and run. For example, this is the image for Android 25 (7.0 I guess):

https://dl.google.com/android/repository/sys-img/google_apis/x86_64-25_r11.zip

So how to run this thing inside the zip file? Is it possible?

If it’s not possible, then is it possible to install and run AVD alone without Android Studio? Or at least launchd AVD manager GUI without launching Android Studio first?

1 Answer
1

Yes its possible to get Android SDK (Software Development Kit) as a standalone package.

There are just a couple of prerequisites to note:

  • Java runtime environment (or JDK) at Oracle website (and download the correct version (32- or 64-bit) for your computer).
  • A good internet connection (needed for downloading system images etc)

There is a simple option to install the Android SDK, you can
grab the available offline installer (Windows) SDK Tools installer_r24.4.1 from Google repository by itself you do not need Android Studio. You can then use the included sdk manager to download other SDK packages.

For linux (Ubuntu), you can refer to this guide: Complete Installation Guide for Android SDK / ADT Bundle on Ubuntu

Here is the workthrough (windows):

  • Download the SDK package from above link.
  • After downloading the package, begin installation (and choose the desired installation folder to proceed or just leave the default %USERPROFILE%\android-sdk):

enter image description here

  • When done leave the option to download system images “checked”:

enter image description here

Now we’re in business…

  • The SDK manager window will appear, now you need to update/download other sdk packages (i.e platform-tools, system-images, platforms etc according to API levels.
    enter image description here

Note: I recommend downloading x86 images as they’re much faster tham arm counterparts, also get intel HAXM (hardware accelerated execution manager) driver to significantly increase your emulator speed

  • All set, now you just need to create and configure an Android virtual device matching your target Android version and tweak desired settings.

  • To do this click on the Tools tab in SDK manager and select manage AVDs, then in the following window click Create you’ll see a similar screen as below:

enter image description here

  • After that boot the newly created virtual device running Android 8 Oreo

(Note: I am still running Android 7, because of this : Can’t start Android 8.0 Oreo on emulator: “Decryption unsuccessful” but you might be lucky 🙂

enter image description here

  • Install applications and test as you wish ..

Leave a Comment