Do you know that you can run Windows apps on Android and even run the OS on your Windows device. Well, this post is for the people who want to run Android OS on their PC maybe to get a taste of the latest Android release for testing or fun, or for developing Android apps.
As Android is an open source mobile technology and platform, that means, anyone can access its code or system images from the AOSP (Android Open Source Project). And that’s what you need to have for running Android virtually on Windows.
Android can be easily virtualized on a Windows PC. It’s as easy as downloading some tools, installing, configuring and running them. What you need is the right procedures which we are going to show you here, plus some solutions to troubleshoot common problems.
How to Tighten Security on Android Device
Smartphones have come to define us by being the portal to our online identity and as such should... Read more
Note: This tutorial was written to virtualize Android 4.2.2 JellyBean using 64-bit Android SDK Bundle running on Windows 8, but steps will be similar for any other Android release, or Windows architecture or release.
Let’s start by looking over the requirements for running Android in a virtual environment.
- Windows PC: A computer running XP or any later version of Windows operating system will do fine, i.e., XP, Vista, 7, 8, or any later version.
- Java: Java 6 or later must be installed on your computer, because it’s required by the Android SDK Bundle. Install the latest available Java version for your platform.
- Android SDK Bundle: The latest version of Android SDK bundle is required. Download and extract the file into a directory. You will see a folder named "adt-bundle-windows-…" This folder is referred to as the "Android SDK Folder" for the remainder of this tutorial. It contains two folders named "eclipse" and "sdk", and one file named "SDK Manager.exe".
- Android SDK packages: Open "SDK Manager.exe" from the Android SDK Folder. Check "Android 4.2.2 (API 17)" in the SDK Manager. This gives you the necessary SDK packages for running Android in a virtualized environment.
Note: You can decrease the download size by unchecking unnecessary sub-packages of the Android release. Click on the extend button (>) beside the Android release. Check only these sub-packages:
- SDK Platform
- ARM EABI v7a System Image
- Google APIs.
Then, click on Install packages… to download and install the required packages.
Create & Run AVD
Time to create your first Android Virtual Device.
- Open "SDK Manager.exe" from the Android SDK Folder. Browse to Tools > Manage AVDs. The Android Virtual Device Manager will open.
- Click on the New… button (top right) and you will see the Create new Android Virtual Device (AVD) window appear. Configure the new AVD as per the following configurations:
- You can now view it in the list of existing AVDs in the AVD Manager. Congratulations on creating your first Android Virtual Device!
|AVD Name:||Any name|
|Device:||Galaxy Nexus (4.65", 720 x 1280: xhdpi)|
|Target:||Android 4.2.2 – API Level 17|
|Memory Options – RAM:||768|
|Memory Options – VM Heap:||32|
|Internal Storage:||200 MiB|
|SD Card – Size:||500 MiB|
|Emulation Options- Snapshot:||Unchecked|
|Emulation Options – Use Host GPU:||Unchecked|
To start this up, select the AVD in the AVD Manager. Click on Start, then Launch. Wait for it to boot up then enjoy.
And there you have it, Android running on your Windows PC. Click around and get a feel of the Android interface (if this is your first time) before we get to the next section: trying out Android apps.
App Installation in AVD
While Google Play Store is the primary source of Android apps, unfortunately it is not present in the Android Virtual Device (AVD). However, there is a method to install apps in the AVD using Android Debug Bridge (ADB). We’ll also show you how to uninstall unwanted apps.
Installing An App
We’re going to run by you the steps required to install an app. We’re using the UC Browser Mini as an example.
- With AVD running, download the apk file for UC Browser Mini from AppsZoom (search for your app, open the page for your app from the search results, click on Download tab in the opened page, and click on the option to direct download APK file).
- Copy the downloaded file to "Android SDK Folder\sdk\platform-tools".
- Open the command prompt from the Start menu or screen then type:
cd <Android SDK Folder file path>\sdk\platform-toolsFor example, Android SDK Folder on our test computer was located at "D:\And\adt-bundle", so the command changes to "cd D:\And\adt-bundle\sdk\platform-tools".
- Type "adb start-server" at the prompt. It should report that the daemon started successfully.
- Type "adb devices" at the prompt. It should report a connected device with "emulator". If no device is reported, then you may not have started the AVD. Restart, wait for the android’s home screen, and re-type "adb-devices" at the prompt.
- Type "adb install <APK File>" at the prompt, after changing <APK File> with the name of the .apk file (of the android app) you want to install in the AVD. For example, the .apk file on our test sytem was named "ucb-mini.apk", so the command changes to adb install ucb-mini.apk.
- Wait while ADB pushes the APK file into the AVD and installs it. It might take some time depending on the size of the app which you’re installing. When the installation is complete, It should report success.
Uninstalling an App
Inside the AVD, Go to Settings from the app launcher, then to Applications > Downloaded. Click on the app you want to remove, then click Uninstall. Click OK to confirm then wait. That’s it.
Lastly, here are some of the problems you might encounter and the suggested solutions.
Internet not working in the AVD.
Please check if your firewall or internet security program is blocking Internet access for the program named "emulator-arm.exe".
Can’t set the RAM greater than 768MiB for the AVD.
Setting the RAM for AVD greater than 768MiB on Windows will cause the AVD to crash because of non-allocation of required memory due to platform restrictions. Please choose a maximum of 768MiB if you are experiencing crashes or errors.
AVD running too slow or hangs
Running the latest releases of Android on 768MiB of RAM can make it slow. Additionally, it will become slower if you’ve installed many apps in the AVD. If you need a fast and responsive AVD, then create a new AVD with an older release of Android (Android 4.0 ICS or older versions will run better).