Android x86 in Hyper-V

This is not a post how to install android x86 in hyper-v, you can find that here: INSTALLING ANDROID-X86 ON HYPER-V WITH WINDOWS 8.1 IN UNDER 5 MINUTES

android

After install you should enable developer mode and allow unknown sources, you can find that here: How to enable Developer Options on your Android phone or tablet and How to sideload an app onto your Android phone or tablet

Now setup the network configuration as described here: Part 2: Screen resolution and Network configuration
In short give the hyper-v virtual ethernet adapter a fixed ip address and on the android start terminal and type:

adb shell
su
dhcpcd -k eth0
dhcpcd -n eth0
netcfg

Android debug bridge

Install ADB and needed drivers from here and start adb in terminal on the android from here:

su
adb tcpip 5555

On your Host machine start a command prompt:

adb connect ip_from_android_netcfg
adb devices

The last command should output the ip address from the android and “device”

Installation of APK files is done with

adb install *.apk

Advanced

Edit the hosts file on the android by making the system read/write in terminal on the android

adb shell
su
mount -o remount,rw /dev/block/stl9 /system
chmod 777 /system/app
exit
exit

On the host machine

adb pull /system/etc/hosts d:\temp\hosts
REM edit with your favorite editor
adb push d:\temp\hosts /system/etc

Debugging log reading on the host machine

adb logcat

Got a lot of E/audio_hw_primary( 1393): no pcm card found? Turn off the touch sounds in settings > sound > uncheck everything (touch sounds, screen lock, dialpad)

Conclusion

This Android port for Hyper-V isn’t as user friendly as Genymotion. Microsoft comes with it’s own Android Emulator for VS2015.
But the project’s goal is not to provide an emulator for development. They want to provide an Android installation for laptops and do that well.

About erictummers

My work as a recruited developer changes almost every month. I like challenges and sharing the solutions with others. On my blog I’ll mostly post about my work, but expect an occasional home project, productivity tip and tooling review.
This entry was posted in Tooling and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s