Sometimes I need to test my app or try some new apps on main Android devices available on the market. Of course I don’t want to install them on my working cellphone. Under such circumstances, I prefer installing a virtual machine on my PC and testing whatever on it. Here in this post, I provide a way to run Android in Virtualbox.
-
Choose an Android 4.0.3_r1 (20120518 build)
-
Install (import) the package into VirtualBox
-
Install Android SDK
- Download Android SDK
- Extract the file to “$ANDROID”, and go to
$ANDROID/tools
- run
./android
and install Android SDK Platform-tools
-
Set up NAT
- Open VirtualBox
- Go to buildroid VM’s Settings → Network
- Under Adapter 1 tab, choose Attached to: NAT.
- Expand Advanced and click Port Forwarding button.
- Click Insert new rule button, input
5555
into Host Port and Guest Port. - Click OK to return to VirtualBox.
-
Install Google play
- Download Google apps
- go to
$ANDROID/platform-tools
, and run
adb connect localhost adb push $PATH /buildroid-gapps-ics-20120317-signed .tgz /sdcard/ adb shell su mount -o remount,rw /system tar -xvzf /sdcard/buildroid-gapps-ics-20120317-signed .tgz mount -o remount,ro /system reboot |
No comments:
Post a Comment