본문 바로가기

카테고리 없음

Run Virtual Machine On Android



If you’re itching give Android a try but don’t necessarily want use your whole computer for the task, the best option is to run it in a virtual machine using VirtualBox. It’s actually pretty easy to set up, and will offer you the full Android experience in a matter of a few minutes. Let’s do this thing.

RELATED:How to Run Android on Your Computer

You’ll need a couple of things to get started:

Aug 08, 2019  VMOS Lets You Run a Virtual Android Machine on your Phone. Running virtual machines has been a standard way to test apps and run virtual operating systems for a long time.

  • VirtualBox: Download and install VirtualBox if you don’t already have it—it’s available for Windows, macOS, and Linux.
  • The Android x86 ISO: You’ll need to grab the Android x86 ISO for whichever version of Android you’d like to try. At the time of writing, Android 6.0 (Marshmallow) is the most stable release, which is what I’m using here.

Before you get started, I also recommend making sure virtualization options are enabled in your PC’s BIOS. Otherwise, you’ll be in for a lot of troubleshooting later when things don’t work as they should. You’ve been warned!

Once you have those things, you’re ready to get started.

How to Create a Virtual Machine for Android

Go ahead and fire up VirtualBox, then click the “New” button to creation a new virtual machine.

Name the virtual machine whatever you’d like (I’m using “Android” because that just kind of makes sense?), then select “Linux” as the type and “Linux 2.6 / 3.x / 4.x (32-bit)” as the version. Click Next.

For memory, I’d give it 2048MB, especially if you’re using a 32-bit build of Android (it can’t handle anything more). If you’re using a 64-bit build, feel free to use as much as you want. Once you’ve set the amount, click Next.

Click “Create” to start building your virtual machine. For hard disk type, leave it set as VDI.

Leave the hard disk size set as Dynamically Allocated, which will allow the virtual hard disk to grow as needed.

On the next step, you can choose how much storage you’d like to top the virtual machine out at—even though it will dynamically resize, it won’t be allowed to grow past the size you define here. Choose whatever size will work best for your system. I’m leaving this at 8GB.

Finally, click the Create button.

Poof! Just like that, your new virtual machine is ready to use.

How to Install Android in a Virtual Machine

With your machine all set up, highlight it and click on Start at the top.

When the machine starts up, point it to the Android ISO you downloaded. It should allow you to choose this as soon as you fire it up, but if not, click on Devices > Optical Drives > Choose Disk Image and select your Android ISO. Then use Machine > Reset to restart the virtual machine.

NOTE: When you click on the VirtualBox window, it will automatically capture the mouse and keyboard. To release the mouse and keyboard, just tap the right Ctrl key on the keyboard.

Once the virtual machine loads the ISO, use the keyboard to scroll down to “Install ” and press enter. This will start the Android installer.

Choose “Create/Modify” partitions. On the GPT screen, just choose “No.”

On the disk utility screen, select “New.”

Create a Primary disk and allow it to use the entire virtual hard disk space you chose earlier. In this case, it’s 8GB. This should be selected by default.

Hit Enter on the “Bootable” option to make the partition bootable, then choose “Write.” Tap Enter.

You will need to type “yes” and tap Enter on the following screen to verify you want to write the partition table to the disk.

Once it’s finished, highlight the Quit option and tap Enter.

Select the partition you just created to install Android on and tap Enter.

Select “ext4” to format the partition.

Highlight Yes and tap enter on the next screen to verify.

Choose “Yes” to install the GRUB bootloader.

Choose “Yes” to make the /system folder re-writable.

Once everything is finished, you can choose to reboot into Android or reset. Feel free to do either thing right here, but don’t forget to unmount the ISO file first. Otherwise it’ll just boot right back into the installer!

Using Android in VirtualBox

From here, the setup process is pretty cut and dry—you’ll set this thing up just like any other Android device, save for one exception: you won’t turn on Wi-Fi. The virtual machine will use your PC’s connection.

So yeah, just sign in and finish the set up. You’re ready to play!

RELATED:How to Play Android Games (and Run Android Apps) on Windows

This isn’t the fastest way to run Android apps on your PC—BlueStacks is faster if all you want to do is run an app or two on your Windows PC. However, Android-x86 provides access to a complete Android system in a virtual machine. It’s a great way to get more familiar with a standard Android system or just experiment with it like you would experiment with a virtual machine running any other operating system.

READ NEXT

  • › How to Disable Interactive Pop-Up Ads on Your Roku TV
  • › What’s New in macOS 10.15 Catalina, Available Now
  • › How to Copy and Back Up Files To External Storage on iPhone and iPad
  • › Everything You Need to Know About Co-Authoring in Excel
  • › How to Work with Variables in Bash
Active2 years, 5 months ago

I have been running Android Studio 1.5.1 doing development on a WMWare copy of Windows 2012 R2 and everything works fine. I've been able to run the device emulator with no problems and start various versions of Android running in AVD.

Android Studio 2.x ChangeI recently installed Android Studio 2.0 (see image below for exact version).

Now when I attempt to run the emulator nothing happens.Well, actually I do see a message in the status bar of Studio when I attempt to start the device, but then that message disappears and nothing happens after that.

There is a warning that I need to turn off Hyper-V (see image below), but I don't believe that is possible since this is a VM.

No Longer Possible?

Is it not possible to run the emulator on the VM any more?

raddevusraddevus

3,1154 gold badges36 silver badges47 bronze badges

2 Answers

More recent versions of the Android Emulator require hardware virtualization support (Intel HAXM).

Unfortunately, most virtual machines do not provide HAXM instructions to the guest (a VM within a VM), so you will be unable to use the emulator within the virtual machine.

Tom MettamTom Mettam

1,7251 gold badge18 silver badges25 bronze badges

I just installed Android Studio 2.1 on my Windows 2008 R2 VM (running VMWare) and I'm happy to report that it is possible to run ARM based AVD (Android Virtual Devices) on the VM.

Steps To Run Arm-based Virtual Device on VMWare

Virtual Machine Android Os

  1. Go to location where you've installed the Android SDKs (in my case it is at %appdata%Android2SDK
  2. If you are in the right place you should see a directory structure and directories like the ones shown in the first image below.
  1. Start the AVD.exe by double-clicking it.

You will see a window like the one in the image below

  1. Take a close look and notice that this is running an ARM(armeabi-v71) image. When you download images you have to download ARM-based images. (no x86 images will work on VM).

    These cookies uniquely identify your browser and Internet device. Prison architect pc Such cookies may even impact your experience of other websites you may visit subsequently.

  2. Also, you cannot start these images from AVD that launches from Android Studio 2.x

  3. Make sure you have an environment variable named ANDROID_SDK_HOME set to path which is similar to the one at the top of the AVD manager (in image).

Once you do all of this and start an ARM-based image on a VMWare VM it will warn you that it is faster with HAXM but at least the image will run.

Run Virtual Machine On Android

Finally, you can see if you attempt to launch your Virtual Device from the AVD Manager in Android Studio then it will warn you that Hyper-V needs to be turned off. Of course you cannot turn Hyper-V off on a VM.

EDIT -- Running Android 7 ARM Image

@mcflysoft asked about running an android 7 ARM image. At first I didn't think it worked, but if you open up your SDK manager and install the exact ARM OS image shown in the following picture, it will run on a Windows VM:

ARM image Containing Google APIs

I tried installing the ARM image that contained the Google APIs and that one would not ever start. There were failures logged which I could see in c:> adb shell logcat.

Beware : It Is Really Slow

Run Android On Pc Virtual Machine

However, running Android 7 seems extremely slow and I don't see a web browser.Not sure how helpful it may be to you, but you can get it working.Good luck.

Run Linux Virtual Machine On Android

raddevusraddevus

3,1154 gold badges36 silver badges47 bronze badges

Virtual Machine For Android Phone

Not the answer you're looking for? Browse other questions tagged androidavdandroid-studio-2.0 or ask your own question.