question

AxD avatar image
1 Vote"
AxD asked PradipKodiSenapati-8387 answered

Can I run Android Emulator in VMware Workstation VM?

Android Device Manager (launched from Visual Studio 2019) doesn’t seem to run within VMware Workstation virtual machine.

I'm a contractor, working for different clients, each with a different software configuration. I’m developing using VMware Workstation to be able to easily switch between customer configurations.

Now I’m working on a project with APKs, which I’m supposed to test. But I’m not able to do so because the Android emulator doesn’t run within my development VM for that customer.

Anyone know a remedy for that? Is there an Android Emulator available for running in a VM? Or is there an online provider to whom I can upload APKs to test (e.g. Azure)?

azure-virtual-machines
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

srbose-msft avatar image
1 Vote"
srbose-msft answered

@AxD

We regret the delayed response and any inconvenience caused by this issue.

Accelerating Android emulators on Windows


The following virtualization technologies are available for accelerating the Android emulator:

  1. Microsoft's Hyper-V and the Windows Hypervisor Platform (WHPX). Hyper-V is a virtualization feature of Windows that makes it possible to run virtualized computer systems on a physical host computer.

  2. Intel's Hardware Accelerated Execution Manager (HAXM). HAXM is a virtualization engine for computers running Intel CPUs.

For the best experience on Windows, it is recommended that you use WHPX to accelerate the Android emulator. If WHPX is not available on your computer, then HAXM can be used. The Android emulator will automatically make use of hardware acceleration if the following criteria are met:

  • Hardware acceleration is available and enabled on your development computer.

  • The emulator is running a system image created for an x86-based virtual device.

    IMPORTANT
    You can't run a VM-accelerated emulator inside another VM, such as a VM hosted by VirtualBox, VMware, or Docker (unless using WSL2). You must run the Android emulator directly on your system hardware.

For information about launching and debugging with the Android emulator, see Debugging on the Android Emulator



I could find this stack overflow article which has an answer about running Android Studio 2.1 on Windows 2008 R2 VM (running VMWare) but with newer versions of Android Studio it might not work.



You can check out the Azure Marketplace image Visual Studio Emulator on Windows Server 2016.


Visual Studio Emulator plays an important role in the edit-compile-debug cycle of your Android testing.

Though any emulators can be a good tool to test and debug your Android software, it might not be suitable for code performance characteristics measurement, hardware-specific tests, real-life user experience evaluations, and more. The Visual Studio can be used to find accuracy of the code, eliminate errors, shorten space, test DPI settings, screen resolutions, API levels, platform versions and more.

Simulate the sensors to test the real-time geographic tracking without moving physically to other location with the use of an emulator. The biggest advantage of Visual Studio Emulator is the speed of its operation. With Visual Studio Emulator, you can validate your Android app at a blazing speed without any pointless wait times. Screenshots, audio, graphics-intensive tests can be taken with this emulator. Visual Studio Emulator sets the new standard for Android emulators.

We at Apps4Rent helps you deploy Android Visual Studio Emulator on Azure. Tested by the Apps4rent engineers, the Android Visual Studio runs perfectly fine with Android OS when installed on Azure Cloud.

Key features available in Android Visual Studio Emulator on Azure:

Lightning fast speed for validating your apps
Strong simulations
Device profiles
Drag-and-drop installation of APK files
Connect to Android tools over Android Debug Bridge (ADB)
Deeply integrated debugging for cross-platform and Android projects
Familiar languages support C++, C#, JavaScript
Zoom button on vertical toolbar
Orientation changes
Network information
GPS settings
Accelerometer
Power/Battery Simulation
Screenshots, SD cards, Camera, Multi-touch
Audio playback, keyboard text input


Hope this helps!

Please "Accept as Answer" if it helped, so that it can help others in the community looking for help on similar topics.




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AxD avatar image
2 Votes"
AxD answered srbose-msft commented

This is bad news. As a contractor I need to run my development environment in virtual machine as I cannot afford to maintain a new metal machine for each of my customers.

Actually, on Linux the Android emulator runs smoothly in a VMware VM. I followed this setup, suggested by an MSFT.

Apparently, KVM seems more elaborate than Hyper-V is. But running a Linux VM only for being able to run Android Studio and the Android emulator means creating a second box, creating a virtual network, creating a network bridge, creating an SMB share, and it requires me to permanently switch between boxes. Not to mention that I cannot share my screen in MS Teams.

I created a Visual Studio Developer Community feature request item here:

https://developercommunity.visualstudio.com/t/android-device-manager-doesnt-run-within-vmware-wo/1438770


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@AxD , we realize that this is be a missing feature. I would request you to please share your feedback at this link so that our product teams can review and work on the same.


0 Votes 0 ·
PradipKodiSenapati-8387 avatar image
0 Votes"
PradipKodiSenapati-8387 answered

Hi srbose-msft,

I have tried the way you suggested. I am getting the following error "The emulator process for AVD test device has terminated." I have attached the screentshot.165561-screenshot-2022-01-17-at-104136-am.png



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.