Sunday, June 03, 2012

Install Android in VirtualBox with Internet connection

  1. Download a "Buildroid for VirtualBox" OVA file at http://www.buildroid.org. There are 3 versions: for "phone", for "tablet" and for "tablet" with phone capabilities. [There is a Buildroid image with Market/Play app but "for testing purpose only".]
  2. Import the Buildroid image into Virtualbox: File --> Import Appliance...
  3. Install Google Play Store app (and other apps) (in Windows):
    • Get the adb (Android Debug Bridge) utility from Android SDK (http://developer.android.com/sdk/index.html) or download the adb at https://sites.google.com/site/keyablefile/adb-win.zip (including adb.exe and AdbWinApi.dll).
    • Download the app at http://buildroid.org/Download/buildroid-gapps-ics-20120317-signed.tgz
    • VirtualBox: Settings --> Network --> Adapter 1 --> Attached to: NAT; Advanced --> Port Forwarding --> Insert new rule: both Host Port and Guest Port = 5555. [Multiple virtual machines: increment the host port (5556,...) and keep the same guest port for each machine.] [Adapter 2 is used for emulating a Wifi connection.]
    • Start Buildroid virtual machine. Open Buildroid VM Configuration, there should be the IP address under IP Management.
    • In Windows Explorer, go to the folder containing adb.exe; Shift-right click --> Open command window here. [Check adb help for options and parameters.]
      • adb connect localhost (or adb connect the_above_IP_address)
      • adb push path\to/buildroid-gapps-ics-20120317-signed.tgz /sdcard/ (copy the .tgz apps file to Android)
      • adb shell
      • su
      • mount -o remount,rw /system
      • tar -xvzf /sdcard/buildroid-gapps-ics-20120317-signed.tgz
      • mount -o remount,ro /system
      • reboot
    • The Adroid machine will reboot and there should be Google apps including Market/Play.
Ref:
- http://keyable.blogspot.jp/2012/05/how-to-run-android-40-in-virtualbox.html
- http://www.buildroid.org/blog/?page_id=121

3 comments:

Rabiul Islam said...

" sh: tar: not found "
What can i do now?

Rabiul Islam said...

" sh: tar: not found "
What can i do now?

Rabiul Islam said...

" sh: tar: not found "
What can i do now?