Running a mobile operating system on a personal computer opens up great opportunities for developers, testers and ordinary users who want to try out new features without risking the main smartphone. Virtualization allows you to isolate the Android environment from your main OS, creating a safe testing ground for experiments. Using Oracle VM VirtualBox is one of the most popular and free ways to implement this task due to its cross-platform and flexible settings.

Unlike emulators like BlueStacks or LDPlayer, which are focused primarily on running games optimized for gaming, VirtualBox provides access to a “clean” system. This is critically important if you need to test the application in an environment as close as possible to stock Android, without unnecessary add-ons and advertising. However, the installation process here is more complicated and requires an understanding of the operating principles of virtual machines and file images.

Before starting the procedure, make sure that your computer has sufficient resources. Allocation of RAM and CPU time to the guest operating system can significantly reduce the performance of the host. You also need to check whether hardware virtualization technology is included in the BIOS/UEFI of your motherboard Intel VT-x or AMD-V, since without it, running 64-bit systems will be impossible.

Preparing a system image and setting up the BIOS

The first step is to search and downloading a suitable operating system image. Since Google's official Android is not distributed as a ready-made ISO file for PCs, the developer community has created special ports. Projects Android-x86 and Bliss OSare considered the most stable and proven options. They are optimized for the x86 processor architecture, which allows them to work effectively on standard computers, and not just on ARM devices.

Download images only from official project sites or trusted mirrors to avoid the introduction of malicious code. After downloading an .iso file, it is recommended to check its checksum if it is provided by the developers. This is a simple but important procedure to ensure data integrity, especially if the file is large and took a long time to download.

⚠️ Attention: Some older versions of Android-x86 may not work correctly on modern hardware with UEFI. If errors occur during boot, try switching the boot mode to Legacy (BIOS) in the virtual machine settings or, conversely, enabling EFI support depending on the image version.

Next, you need to make sure that virtualization is active at the hardware level. For Intel processors this is usually an option Intel Virtualization Technology, and for AMD - SVM Mode. You can find these settings in the Advanced or CPU Configuration section of your BIOS. Without enabling these flags, VirtualBox simply will not allow you to create a 64-bit machine, limiting the list of available OSes to only 32-bit options, which is unacceptable for modern versions of Android.

💡

If you are using a laptop, make sure it is connected to power during installation. The disk burning and system initialization processes can consume a lot of power, and a sudden shutdown will damage the virtual hard disk.

Creating and configuring a virtual machine

After preparing all the components, you can begin creating the machine itself in the VirtualBox interface. Click the "Create" button and enter a name, for example, Android_Test. Select the system type as “Linux” and the version as “Linux 2.6 / 3.x / 4.x (64-bit)” or “Other Linux (64-bit)”, depending on the available options in your hypervisor version. It is important to immediately allocate a sufficient amount of RAM: for comfortable operation of Android 9 and higher, it is recommended that at least 4096 MB (4 GB).

At the stage of creating a hard disk, select the option “Create a new virtual hard disk”. It is better to leave the file type as default - VDI (VirtualBox Disk Image). The storage format should be selected “Dynamic” so that the image file occupies on the real disk only the space that is actually used by the system, and not the entire allocated volume at once. For a full installation with applications and cache, it is recommended to allocate at least 16-32 GB of space.

A critical step is setting up the processor and acceleration. In the System section of the Processor tab, increase the number of cores to 2 or 4 if your host allows it. On the “Acceleration” tab, be sure to check the boxes opposite VT-x/AMD-V and Nested Paging. Disabling these features will result in extremely low performance or a complete failure of the system to boot.

☑️ Setting up a virtual machine

Done: 0 / 5

The process of installing Android on a virtual disk

Run the created virtual car. When you launch VirtualBox for the first time, you will be prompted for bootable media—specify the path to the Android ISO image you downloaded earlier. Once booted, you will see the GRUB menu. Select item Installation - Install Android-x86 to harddisk. Do not select Live CD mode if you plan to use the system constantly, as in Live mode all data will be lost after shutdown.

The installer interface will open. The first step is to create a partition on the virtual disk. Select item Create/Modify partitions. You will be transferred to the utility cfdisk. If the disk is new, the app will offer to create a new partition table - agree (select dos). Then create a new Primary partition using all the available space and be sure to select the option Bootable in the action menu. Write down the changes (Write) and exit the utility.

Back to the installer menu, select the created partition (usually sda1). It is recommended to format the file system in ext4, since it is the most stable for the Linux kernel on which Android is based. Confirm formatting and installation of the GRUB boot loader. When asked about setting the directory /system in read-write mode, answer affirmatively (“Yes”), this will give you rights to change system files in the future.

⚠️ Attention: When formatting a partition, all data on it will be destroyed. Make sure that you have selected the virtual disk (VBOX_HARDDISK), and not any connected physical drive, if any are inserted into the virtual machine.

After installation is complete, select “Run Android-x86” or reboot the machine, having previously disabled the ISO image in the media settings. When you boot for the first time, the system will perform an initial setup, which may take a few minutes. Don't be alarmed by the black screen or Android logo - in virtualization mode, graphics initialization takes longer than on a real device.

What to do if the installation freezes at the logo?

This is often due to incompatible video drivers. Try pressing Tab when booting into the GRUB menu and adding the nomodeset parameter to the boot line. This will disable hardware graphics acceleration at boot time, allowing the system to start in basic mode.

Configuring graphics and peripherals

The default video memory settings in VirtualBox are often insufficient for the Android GUI to run smoothly. Go to the machine settings, “Display” section, and increase the video memory to the maximum value (usually 128 MB). It is also recommended to enable the 3D accelerationoption. Without this, interface animations will be jerky, and heavy applications may crash.

For the mouse and keyboard to work correctly, you need to install Guest Additions, although for Android this process differs from classic Linux distributions. Most builds of Android-x86 already have drivers built-in. If the mouse cursor gets caught and does not move out of the virtual machine window, use the right Ctrl key to release the pointer. For more convenient control, you can configure pointer integration in the VirtualBox input settings.

The default screen resolution may be low (for example, 1024x768). To change it, you can use console commands or settings within Android itself. Go to Settings → Screen and select the desired resolution. If the desired option is not available, you can use the command wm size via a terminal emulator, but this requires root access, which are usually enabled by default in Android-x86.

Settings parameter Recommended value Impact on the system
Video memory 128 MB Smoothness of the interface and games
Number of CPU cores 2-4 cores Application launch speed
RAM 4096 MB Multitasking stability
Storage controller SATA (AHCI) Speed disk read/write
📊 What version of Android do you need for tests?
Android 7 (Nougat)
Android 9 (Pie)
Android 11
Android 13 and later

Working with network and Internet access

By default, VirtualBox uses NAT mode for the network connection of the virtual machine. In this mode, Android accesses the Internet through the host machine, but is located in an isolated subnet. For most tasks of surfing and downloading applications from Google Play, this is enough. The system will automatically obtain an IP address via DHCP upon boot.

If you need virtual Android to be visible on your local network (for example, to debug via ADB from another device or access shared folders), switch the network mode in the machine settings to Network Bridge (Bridged Adapter). Select your physical network adapter (Wi-Fi or Ethernet). In this case, the router will give the virtual machine a separate IP address, as if it were a real physical device connected to the same network.

Sometimes a problem arises when the Internet in the guest system does not work, despite the presence of a connection on the host. In this case, check your DNS settings inside Android. Try registering static DNS servers (for example, from Google: 8.8.8.8 and 8.8.4.4) in the Wi-Fi connection settings, expanding the network settings and changing the IP settings from DHCP to Static.

⚠️ Attention: When using the “Network Bridge” mode on corporate networks or in hostels with authorization by MAC address, your device may be blocked by the network administrator, since the virtual machine has its own unique MAC address, different from the address of your computer.

Solving common problems and errors

One of the most common problems is a black screen after selecting the boot option in GRUB. This is almost always due to a video driver conflict. The solution is to edit the boot options. In the GRUB menu, press the key e to edit the boot line and add the parameter kernel. This will force the system to use the basic VESA video driver. nomodeset or video=LVDS-1:eto the end of the line starting with

Another common problem is the lack of sound. In the virtual machine settings, under Sound, make sure the sound controller is enabled. For Android-x86, the best compatibility is shown by the controller Intel HD Audio. If there is still no sound, check the volume mixer inside the Android operating system itself, as sometimes the media channel is muted by default.

If the system is extremely slow, check to see if the host RAM is running low. VirtualBox does not always free memory correctly after shutting down the machine. Also make sure that the antivirus on the main computer is not scanning virtual disk (.vdi) files in real time, as this creates a huge I/O load. Add the folder with virtual machines to the antivirus exceptions.

💡

The stability of Android on VirtualBox directly depends on the correct graphics settings and resource allocation. Don't skimp on RAM and CPU cores if you want an experience close to the real device.

Questions and answers (FAQ)

Is it possible to install Google Play Store on Android-x86 in VirtualBox?

Yes, you can, but it doesn't always work out of the box. Many Android-x86 images ship without Google services (GApps) due to licensing restrictions. You will need to download the GApps package of the corresponding version of Android and install it via Recovery mode or use special installation scripts, which can often be found on the 4PDA or XDA Developers forum. An alternative is to use the Aurora Store.

Why does VirtualBox give an error VT-x/AMD-V is not available (code -6)?

This error means that the virtualization technology is occupied by another process or is disabled. Common causes: Hyper-V enabled in Windows (conflicts with VirtualBox), Android Studio emulator running, or virtualization disabled in BIOS. Try disabling Hyper-V via the command line with the command bcdedit /set hypervisorlaunchtype off and reboot the computer.

How to take a screenshot of the screen inside virtual Android?

A screenshot can be taken using the Android operating system itself (usually a combination of the volume down and power buttons, emulated through the VirtualBox "Input" menu → “Keyboard”). Or you can use the host system function: in the VirtualBox window menu, select “Machine” → “Take Screenshot”, but the quality may be lower due to the way the window is rendered.

Is it safe to log into your Google accounts through VirtualBox?

The virtual machine is isolated from the main system, which increases security. However, images from unverified third-party developers may theoretically contain modifications. For maximum security, it is recommended to use test accounts or enable two-factor authentication. If you downloaded the image from the official website of Android-x86 or Bliss OS, the risks are minimal.