Breaking Latest Trending News

How to run Android on Linux using Virtual Machine

0

Android commenced its journey as a Palo Alto-based startup called Android Inc in 2003. The company initially set out to develop an operating system for digital cameras but abandoned those efforts to reach a more expansive and boosted market. This mobile OS is based on a modified version of the Linux kernel and other open-source software, primarily designed for touchscreen mobile devices like tablets and smartphones.

All Android users must agree that one of their guilty pleasures might be playing entertaining games. Or it could be that there is an app that only runs on their phone. And then here comes a question –  what if you could run the same games or applications on your desktop PC? Wouldn’t it be great? Yes, of course. One of the approaches to attain this is to run Android emulators, like Android studio, Bliss OS, Anbox, and Genymotion, on your PC. Some of them, like Android-x86, need you to reboot your Machine so that they fully take control of the hardware.

If you don’t mind a slight performance hit, you can operate a virtual machine simultaneously with your native operating system. Linux specifically offers several virtual machine choices, like VirtualBox, VMware, and Qemu, to mention a few.

The Android platform comprises an operating system based on the Linux kernel, a Graphical User Interface, a web browser, and end-user applications that can be downloaded. Android was released under the Apache v2 open-source license, which allows many variations of the OS to be generated for other gadgets like gaming consoles and digital cameras.

Running Android on Linux using Virtual Machines.

By the end of this article, you must be able to carry out the following on your own:

  • First, download and install VirtualBox for Linux.
  • Then, run Android-x86 and finish the basic setup.
  • Finally, configure the Android-x86 on your Virtual Machine.

Here are a couple of things you need to get started:

  • First, you must have a virtual machine; in this case, we will use a VirtualBox.
  • You must also download the Android-x86 ISO file.
  • We also suggest ensuring virtualization options are enabled in your computer’s Basic Input Output System(BIOS). Or else, you better prepare for troubleshooting moments later when things don’t turn out as they should. Please be warned.

Let us get going!

You will first download the ISO image of Android from this link. Next, select a 32-bit or 64-bit ISO image, depending on your PC’s architecture. At the time of this writing, Android 9.0 is the most stable release, which is what we are using here.

Download ISO image

After downloading the Android ISO image, download either VMware or VirtualBox on your Machine. You can obtain the VMware link here and this other link to find the VirtualBox setup file for all Linux distros. After you are done with the download process, install VirtualBox on your system.

download virtualbox
Download VirtualBox

To install VirtualBox on your Linux machine, navigate to the location you downloaded the .deb file to, in our case, the Downloads directory:

navigate to downloads
Navigate to Downloads

Then issue the following command to install the downloaded VirtualBox .deb file:

sudo dpkg -i virtualbox-7.0_7.0.2-154219_Ubuntu_jammy_amd64.deb
virtualbox installed
VirtualBox installed

And that is for the VirtualBox installation phase.

How to get a virtual machine for Android

Go ahead and start up your VirtualBox by clicking on the startup menu of your PC, then search for VirtualBox on the search bar. After that, click on the blue VirtualBox icon that pops up to find such a window:

virtualbox opened
Virtualbox opened

Afterward, click on “Machine” and then the “New” button to create a new virtual machine:

select machine then new
Select Machine, then New

Then, give your virtual Machine a name of your preference; in our case, we will use “fosslinux Android” because it makes sense, right? Then select your ISO image in the “ISO Image” section. After that, select “Linux” as the type and “Linux 2.6 / 3.x /4.x 32-bit” as the version. Then go ahead and click “Next.”

select operating system
Select operating system

Next is the memory section. Here, you can go with 2048 MB, especially if you are using the 32-bit build of Android (it cannot handle anything more). If you are using a 64-bit build, feel free to utilize it as much as you would. Once you have set the size, click “Next.”

memory allocation
Memory allocation

Next, choose “Create a virtual hard disk now” and click on “Create” as highlighted below:

select create virtual disk now
Select create virtual disk now

Next, select “VDI” now and click on “Next.”

select vdi
Select VDI

Select “Dynamically allocated” and click on “Next”:

select dynamically allocated size
Select the Dynamically allocated size

Then, input the storage size you want your Android phone to have. It will be allocated 8GB by default, but you can increase the storage to 20GB or more depending on your usage. Finally, click on “Create”:

select create
Select Create

Just like that, your new virtual Machine should be ready for use.

machine ready for use
Machine ready for use

How to configure Android in a Virtual machine

With your Machine all set up, it’s time to tweak a few things to get the best performance while running Android on Linux. To do this, click on “System,” as highlighted below:

select system
Select System

Navigate to the “Processor” tab and allocate at least 2 CPU cores. You can also boost it to 4 for better gaming performance:

boost number of cores
Boost the number of cores

Next, move to the “Acceleration” tab and select “KVM” from the drop-down menu:

select kvm
Select KVM

Once that is done, move to the “Display” category and modify the “Graphics controller” to “VBoxSVGA.” This is the most vital step; otherwise, you will be stuck on a blank screen. Please be warned. Besides that, also enhance the Video memory to at least 64-128MB:

select sboxsvga
Select SBoxSVGA

On the final stretch, If you did not add the ISO image as we did earlier, go to “Storage” and click the “Empty” sub-menu. After that, click on the disc icon and select “Choose a disk file”:

select disk
Select disk

Now select the Android ISO image that you downloaded earlier and click on the “OK” button:

select file disk
Select file disk

Boot up your Android inside Linux

After you are done with the basic setup and configuration as covered, you are now ready to boot Android on your Linux system. To do this, click on “fosslinux Android” on the left pane and then click on “Start,” as highlighted below:

click on start
Click on start

Next, navigate to the “Advanced options”:

select advanced options
Select Advanced options

Next, select “Auto_Installation,” and hit the “enter” button on your PC:

select auto installation
Select Auto installation

On the next window, select “Yes” and hit the “Enter” button on your computer’s keyboard:

select yes
Select yes

In the end, select “Run Android-x86” and hit the “Enter” button on your PC:

select run android
Select Run Android

You can proceed through the initial setup screen, like Android phones. So first click on “Start” as highlighted below:

click on start
Click on start

Next, connect to a network or skip as highlighted below:

connect to network
Connect to network

Next, select your Time and Date, then hit “Next” as shown below:

set your date and time
Set your Date and time

After that, Accept the Google terms and services by clicking on “Accept”:

accept the google services
Accept the Google services

Next, you can choose to protect your Android phone by either using a Pin, Pattern, or Password; If you don’t want to protect your phone, click “Not now”:

protect your android
Protect your Android

And there you finally have it. Android 9 is now running on your Linux with near-native performance. How awesome is that? From now onwards, you need to press the “Start” button in VirtualBox, and Android will readily be available for you:

final window
Final window

This might not be the quickest approach to running Android apps on your PC. BlueStacks is faster if you only want to run an app or two on your PC. Nevertheless, Android-x86 offers a complete Android system in a virtual machine. It is a better approach to getting familiar with a standard Android system or just experimenting like you would test out with a virtual machine or any other OS.

For those who want to delete the just-installed Android from their Linux machines, then right-click on the Android VM that you have created and select “Remove”:

click on remove
Click on Remove

Next, click on “Delete all files.” It will remove the Virtual hard drive and all the associated files, freeing up all the space on your PC. And that is it.

delete all files
Delete all files

Final Thoughts

And that is how you can set up and run Android on your Linux PC without paying for any of the services. One of the pros of this installation approach is that it makes things possible that you cannot do on your Android smartphone, like screenshot taking on Snapchat without notifying the sender, playing games like PUBG, protected content screen recording, and a lot more. And that is all from us; we believe this guide came in handy for you!

___

We have no tolerance for comments containing violence, racism, profanity, vulgarity, doxing, or discourteous behavior. Thank you for partnering with us to maintain fruitful conversation.

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

Amazon.com, Inc. 
$94.13  $1.37  1.43%  
Apple Inc. 
$147.81  $0.5  0.34%  
Home Depot, Inc. (The) 
$327.99  $0.92  0.28%  
United Parcel Service, Inc. 
$189.39  $0.8  0.42%  
Walt Disney Company (The) 
$99.43  $0.84  0.85%  
Procter & Gamble Company (The) 
$150.61  $1.36  0.91%  
Hudson Technologies, Inc. 
$11.42  $0.07  0.62%  
Tesla, Inc. 
$194.86  $0.16  0.08%  
Intel Corporation 
$29.41  $0.42  1.41%  
Raytheon Technologies Corporati 
$101.01  $1.51  1.52%  
Lockheed Martin Corporation 
$496.23  $12.54  2.59%  
Merck & Company, Inc. 
$110.04  $0.24  0.22%  
Cisco Systems, Inc. 
$49.70  $0.27  0.54%  
Coca-Cola Company (The) 
$64.35  $0.56  0.88%  
Northrop Grumman Corporation 
$545.60  $15.30  2.89%  
NVIDIA Corporation 
$168.76  $2.59  1.51%  
Hewlett Packard Enterprise Comp 
$16.69  $0.13  0.77%  
Ecolab Inc. 
$151.36  $0.58  0.38%  
Walmart Inc. 
$153.22  $0.15  0.10%  
Costco Wholesale Corporation 
$494.53  $9.33  1.85%  
Microsoft Corporation 
$255.02  $0.33  0.13%  
Pfizer, Inc. 
$50.91  $0.17  0.33%  
Johnson & Johnson 
$178.88  $0.14  0.08%  
T-Mobile US, Inc. 
$152.41  $0.6  0.40%  
General Dynamics Corporation 
$255.74  $3.47  1.38%  
General Electric Company 
$86.88  $1.62  1.90%  
Pacific Gas & Electric Co. 
$15.66  $0.04  0.26%  
BlackRock, Inc. 
$712.98  $9.20  1.27%