With Google and Intel announcing collaboration on Android for X86 Intel Architecture last month on Intel IDF, it is official that the door is open for Android to, besides ARM, support Intel CPU family. As the only open source virtual software solution under the terms of the GNU GPL v2, cross-platforms Virtualbox provide a fast and simple solution to open source Android for x86. It allows developers to develop, test or port their existing apps quickly without hardware. Standardized system images(iso/vdi) from Intel, Google and OEM partners repositories allow developer to test and validate their apps on designated platforms and get accepted earlier for targeted apps store. This is the first of a blog series aiming at introducing a customer driven solution of developing, testing and validating apps with virtual Android, unconventional installation via VDI conversion, bridged networking and integration with Android Eclipse/DDMS platform.
Oracle full visualizer for Intel X86 architecture
Oracle Virtualbox platform packages are Open Source and Cross-Platforms which support Windows, IOS, Linux and Solaris. The binaries are released under the terms of the GPL version 2 and can be downloaded at:http://www.virtualbox.org/wiki/Downloads. It support same virtual OS( in a single .vdi file) run on Windows, Linux and IOS, and is a critical key player in open source & cross-platforms ecosystem(Host OS, Virtualbox, Eclipse( Android)).
Download Google Android X86 iso image from Google
Go to Google Code site ( http://code.google.com/p/android-x86/downloads/detail?name=android-x86-2.2-generic.iso&can=2&q=), and download the Android of your preference. However, Android-x86 version 2.2 Generic and 2.3 Ginger Bread are the versions that have been tested and confirmed the support of both LAN and Wireless connection via bridged network adapter configuration. Same iso image can also been located at www.android-86.org .
Install and setup Android in Virtualbox
Start Oracle VM Virtualbox Manager, and follow the steps below:
Before installation, make sure your parameters are set as below:
Click Settings on the top menu, and select Storage. Click the Green + icon next to IDE Controller and add Android-x86-2.2 Generic iso image you just downloaded from Google. Then click OK.
Click Start to continue the installation:
Use Up and Down Key to move the highlighted selection to Installation - Install Android-x86 to harddisk, and then press Tab key to enter edit mode, and enter the following (case sensitive. See above):
This step is very important as we need to set primary partition for Android and a logical partition for SD Card so that you can use simulated SD Card latter to transfer files. You will find this very handy.
On next screens, do the following sequentially:
Now sit back and relax until the installation is complete. Before reboot, just remeber that you still have an Android 2.2 installation iso image loaded as virtual boot CD-rom. So you have to go back to Setting->Storage to remove the iso image. Now reboot:
Before startting to run virtual Android, you first need to click Machine on top menu and select Disable Mouse Integration. By clicking any area in Android, you mouse icon will change to a darker color, and now you are free to run Virtual Android on your laptop just like a real Android device. The complete virtual Android is saved as a single .vdi file and you can find it at C:\Users\yourname\VirtualBox VM
Popular keys for virtual Android-X86 on laptop
At the very first start, you will need to click Machine on the top menu, and select Disable Mouse Integration to enter into virtual Android( rightctrl release the mouse):
Set up SD card
Virtualbox Android has pretty much all the functionality of an Android device except for the ability of making calls, location service and proximity sensor etc (same as any emulator including Google AVD). In addition, having the ability to run Android virtually, provides an alternative solution for those who do not want to set aside a computer for this purpose. To get startted, the first step you need to do is to install the SD Card and enable install from outside Android InMarket. To Do this, first go to Setting:
After selecting correct network adapter, now start your Android. Unlock your screen and type Alt+F1 to enter into Android terminal window, and enter very typical Linux command: netcfg. If you see your eth0 obtained an IP address from your DHCP server, your Android is connected to Internet:
Lets get some free apps loaded before shopping Google Android Market
Start your Brower and confirm that your virtual Android is connected to internet like a real device:
Then, start AndAppStore, and get some free apps for your Android Apps development and testing. Currently there are around 5000 apps listed in Android-x86 2.2 AndAppStore :
One of app that I found of most useful is File Expert (Utilities::File & Disk Management) that you can setup a Web share and FTP share on your virtual Android so that you can freely download and upload files, which are very convenient when you start to build your development environment:
You can set up your own user name and password for increased security.
Develop and test your Android Apps ( .apk package)
Google apps are all packaged with .apk extension, and put in /system/app folder. With virtual Android-x86, you can easily upload/download your .apk package:
After you upload your .apk package to /system/app folder, you can get access to terminal via Alt-F1 and run the following command:
chown 1000:1000 /system/app/yourpackage.apk
Then your app will show up in Android menu.
Test different screen size and resolution
By default, Android in virtualbox is displayed in 800x600. You can easily change the screen size and resolution to your prefered size or the same size of your targeted Android device. To do this, you need to press"e" twice at Android start menu to reach grub edit menu and enter vga=ask at the end of entry as below:
Then press "b" to boot your Android, and the screen size and resolution options are displayed as below. You can select whatever the size/resolution you want to start the Android:
Android-x86 in Virtualbox vs Google Android Virtual Device (AVD)?
There is no doubt, Android-x86 in Virtualbox is way faster than Google AVD. Below are some difference:
I will continue to blog on my projects:
If you are on some of those topics, lets collaborate.
Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.
Notice revision #20110804