Where Customization Begins 

  • Test Android on Your PC (Android SDK Emulator)

 #18765  by Neuropass
 17 Aug 2011, 17:20
The Android Emulator requires Java to run, so if you don’t already have Java installed on your computer, download it from the link below and install as normal.

Download Java for your computer

Image


Then, download the Android SDK from Google (link below), and make sure to select the correct version for your computer. Once it’s downloaded, unzip the files as normal.

Android SDK


Image


In Windows, run the SDK Setup.exe program to get started running Android on your PC.


Image


The SDK will check Google’s servers for available packages.


httImage


If you see an SSL error message, click the Settings tab on the left in the SDK and AVD Manager window that opened in the background. Here, uncheck the Force https box, click Ok, and then reopen the setup.

Image


Now, the Package Installer will open. You can choose what you want to install, and then click Install to begin installing the Android emulator on your computer.


Image


By default, all of the SDK platforms, samples, and APIs will be selected for install. This can take quite a while to download, as several versions of Android are currently available. If you only want to play around with Android, choose the version you want. You’ll want the SDK Platform Android your.version. Then click the Reject bullet on all the other entries, and click Install. We wanted to try out the latest Android 2.2 as well as the older 1.5, so we downloaded both of them.


Image


Once you’ve started installing, you’ll see a window showing the download and installation progress. This may take a few minutes, depending on your Internet speed.


Image


You’ll have some little Androids in your taskbar, but unfortunately they don’t show the download progress.

Image


Setup an Android Emulator

Once the download is completed, you can setup an emulator to test drive Android on your computer. Select the Virtual Devices from the left menu, and then click the New button on the right.


Image



Enter a name for your virtualized Android, and select the version of Android you want to use from the drop-down menu. This will only show the version you installed previously, so you may only see one version listed depending on your selection.



Image




Enter a size under the SD Card entry; this is a virtual SD card that’s actually an IMG file that Android will use to store your settings and files in. Then, select a screen size from the skin options. The default is a standard, Nexus One-type display, while the others are different sizes including even a BlackBerry-style device.




Image



Click Create AVD when you’re finished.


Image




The program may appear to freeze while it is creating the AVD, so just wait until you see the confirmation window.



Image



You’re now ready to run Android on your PC! Select your new virtual Android, and click Start on the right.



Image



You can choose to scale the display if you’ve chosen a larger screen size than your monitor will fit, and then select Launch.



Image



Android will now begin to load in your emulator. Several command prompt windows may open, and then you’ll see the emulator itself. Notice that the default, large screen size will display a keypad and virtual buttons on the right side of the emulated device.


Image



Android may take several minutes to load, especially on your first run. After a while, the boot screen will switch to an Android boot animation.
Finally, you’ll be presented with your new Android home screen! Use your mouse as you would normally, though remember that you don’t need to double-click to open apps.


Image




You can open pre-installed apps from the launcher menu, though unfortunately these emulator images do not include the Android Marketplace.
View your favorite websites in the browser, and they will render just as they would on an Android device. Note that you can enter text using the on screen keyboard in the emulator, or with your standard keyboard. Since this is an emulator, you may notice some lag in entering text.
You can also install Apps that are directly available online.
Default apps such as Email work great, and you can even see most of the device settings in Android.


Launch Android Virtual Machines Later

Anytime you want to launch your Android virtual machines in the emulator, just run the SDK Setup.exe as before, and select them from the Virtual Devices list. Alternately, you can launch an emulator directly from the command line. To do this, browse to your Android SDK folder and open the Tools folder. Press the Shift key and right-click, and then select Open Command Window Here.


Image



Now enter the following in the Command Prompt, substituting the name of your Android virtual machine for your_device:


Code: Select allemulator @your_device



Image



Create a Shortcut For Your Android

Alternately, right-click on the Emulator.exe in the SDK Tools folder, and select Create Shortcut.
This shortcut would actually only run the emulator in Command Prompt and not load an actual virtual device. We’ll need to change the properties to do this, so right-click and select Properties.
Select the Shortcut tab, and then scroll to the end of the Target box. Enter the name of your virtual Android as before, as @your_Android after the emulator.exe, and then click Ok.
Now you can launch your Android directly from your Desktop or Start menu.