Normally it is tricky to run apps for one operating system on another. Be that as it may, there are two or three techniques accessible for Linux clients to run Android applications that make things relatively simple. How about we investigate.
Available Methods for Android on Other Operating systems
There are few ways to run Android or its apps on other operating systems. These typically take one of two forms mentioned below:
- The first is to utilize a virtual machine (VM) of a few sorts, now and again called an emulator. As you know it is a software that virtualizes an entire Android system. The emulator included in Android Studio is an example, which we used extensively when creating a simple Android app. You could likewise utilize a universally useful VM application like VirtualBox, and run one of the kinds of Android intended for the desktop use. Lastly, BlueStacks is a more optimized example of this method for Windows.
- The latter method is to use compatibility software. While their exact strategies shift, they are intended to interpret the Android programming’s information and yield to something the host machine can get it. One methodology utilizes the Chrome browser with an extra called ARChon to accomplish this impact.
In the below sections we’ll explore the following Linux-native solutions by which one can run android apps on Linux, which use the above options to varying degrees:
- Anbox, which uses Ubuntu’s Snap package format. It works more like a compatibility layer and dispatches applications from a “control panel” of sorts.
- Shashlik, which utilizes a streamlined VM in view of QEMU. It makes entries for Android applications in your standard framework launcher.
- Genymotion, which utilizes an upgraded VM in view of VirtualBox. It runs a full virtual machine interface.
We’ll investigate every one of these choices underneath in more detail.
You can scan for it in your software centre, or utilize the prompt command like the accompanying one for Ubuntu:
sudo apt install snapd
Since the Snap framework is introduced, utilize the command from the Anbox website to download and introduce it:
snap install --classic anbox-installer && anbox-installer
The terminal-based installer content will get everything for you. It will begin by playing out some administrator capacities like including a new software repository and introducing requirements. It’ll at that point download the Anbox Snap bundle (appeared in the beneath picture) and introduce it.
When it’s installed, you can affirm it’s running with the following command:
Once Anbox is installed, you can launch it from your main menu. It appeared in the “Lost and Found” class for me, however, it ought to show up with a text search. After a few moments, the “Anbox Application Manager” should pop up on the screen.
The Esc key acts like the back catch, enabling you to close the applications.
After downloading the hefty DEB package, you can install it in an Ubuntu system with the following command:
dpkg -i shashlik_0.9.3.deb
The installation of apps in Shashlik is also a work in progress. But the installation command is a little more straightforward:
The following will get you what you need on Ubuntu:
sudo apt install android-tools-adb
Presently you can install an application for which you have an APK file helpful. The below-mentioned command will install Orgzly, a note-taking and to-do application:
adb install com.orgzly_83.apk
At last, you’ll see the app’s icon pop up in the Anbox window. By Clicking on, it will open the application just like you would expect (the following image shows the Orgzly app we installed above):
Once this completed, you’ll get a good little popup mentioning it was successful.
Also, you will get an entry in the launcher menu (under the “Android Apps” category), and when you click it, the app will be launched. The start-up time for Shashlik is noticeably longer than Anbox, as it is actually starting up a proper VM:
Finally, your app will open in what is probably a very small window. To get a larger screen there are some QEMU settings in */opt/shashlik/android/hardware-qemu.ini that you can tweak.
Altogether, the experience seems something easier getting Shashlik installed and set up with some applications if you’re acceptable with the slower start-up.
Use of Genymotion is slightly different from the above described two options which also can run Android apps on Linux.
Unlike others, it is a commercial product, so if you want to use it long-term you’ll need to pony up some cash. You should have an account with Genymotion in order to even download the trial. At last, it’s positioned as a developer tool, meaning it’s not really meant as a convenient way to launch apps so much as a fully decked-out system to test with. If none of these things turns you off, you can start by filling out a simple form and registering for an account:
After logging back into your account, click the “Trial” button at the top-right of the page. It will take you to a download page where you can pick a version of Genymotion for your system. While this is downloading, you should also make sure you have VirtualBox installed, as Genymotion uses it.
The simple setup will finish quickly, informing you of the available “/opt/genymobile/genymotion/genymotion” command. Running this will start the application:
The trial version will come up asking for authentication or a license. Opt to Sign In and provide your account credentials. After accepting the EULA, you’ll be asked to create a virtual device:
Once installed, you need only select the new device from the list in the app’s main window and click the app provides a selection of old and new devices. By selecting one and clicking Next twice will kick off the process, downloading and setting up the new device Start button:
After starting to run, you’ll see what appears to be a full-fledged Android device in a window.
At first, it only contains a minimal set of apps. Fortunately, with Genymotion you can use a graphical method (drag and drop) to install new ones. By dropping an APK file on the window will automatically transfer it to the virtual device, install it, and run it. From the below image we can see (again) Orgzly, this time in higher resolution:
So Which One Is your choice to run Android apps on Linux?
The answer to this is easy: the one that runs your android apps on Linux. What’s more, as is frequently the case, don’t think you have to choose only one. If your app works like a charm in Anbox, another one that hums in Shashlik, and another that requires the full horsepower of Genymotion, use them all! Just for good measure, feel free to throw the Android Studio emulator in there too!