Best Way to Run Android Apps and Games on Linux
It’s been some time since Android smartphones came into our lives. The Google Play Store is now home to around 3 million Android apps and games, many of which are so useful or entertaining that many Linux users would like to run them on their favorite operating system.
Thanks to the hard work of some talented developers, there are now multiple ways to run Android apps and games on Linux, and we describe seven of them in this article.
Why Running Android Apps Don’t Run Natively on Linux?
Considering that Android and Linux share the same kernel, one might assume that it would be easy to run Android apps natively on Linux, but it isn’t. That’s because the kernel is just the core of an operating system, and it takes a lot more software than just the kernel to run the applications you interact with on a daily basis.
Furthermore, Android APK files are not straightforward executables (like .exe files on Windows). They are essentially installer packages whose purpose is to extract files to certain specific locations. When executed, the extracted files call certain functions of the Android operating system to access the file system, hardware components, and so on.
Popular Linux distributions make no effort to be compatible with Android apps, so Linux users have to simulate Android devices on their computers using Android emulators or use an operating system that’s compatible with Android apps.
1. Anbox
Anbox is conceptually similar to Wine (a free and open-source compatibility layer that makes it possible to run Windows applications on Linux) because it abstracts hardware access and integrates Android applications with the Linux operating system.
The entire project is open source and licensed under the terms of the Apache and GPLv3 license. The goal of its developers is to make it so that every Android app and game can run on Linux. Because Anbox runs without hardware virtualization, it offers decent performance and tight integration with the host operating system.
Because Anbox is distributed exclusively as a snap (its developers claim that snaps make their lives much easier and allow them to frequently release updates without the need to customize them for multiple distributions), you can install it only on supported distributions unless you install Snap manually, which takes just a few simple commands, all of which are described in detail on Snap’s website.
With Anbox installed, you can add APKs using the Android Debug Bridge (adb). Afterward, you can launch your applications via the host system application launcher and manage them just like all other applications running on your system.
2. Arc Welder
If you’re a Google Chrome user, you can run Android apps on Linux using ARC Welder, also known as App Runtime for Chrome. This Chrome extension is actually intended to let Android developers test and publish their Android Apps to Chrome OS on other platforms, but that doesn’t mean you can’t use it for your personal purposes.
Because Arc Welder is a tool for developers, it doesn’t provide access to apps published in the Google Play Store. In order to run an Android app, you first need to find and download its APK file and then open the file using Arc Welder. Fortunately, there are many websites that let you easily download APK files, including APKMirror, APKPure, or APK Store.
Unfortunately, Arc Welder was last updated in June 2018, so bugs are to be expected. Still, you would be hard-pressed to find and easier way to run Android apps on Linux.
3. Genymotion
Because this is the year 2020, we can’t recommend the once-popular Android emulation solution called Shashlik anymore. The last version of Shashlik was released in 2016, and its developers have been quiet ever since. However, we can recommend something even better: Genymotion.
This cloud-based Android emulator is a boon to all Android developers who would like to streamline app testing and enjoy virtually unlimited scalability thanks to the computing power of Amazon Web Services, Microsoft Azure, Google Cloud Platform, and Alibaba Cloud.
Genymotion can emulate over 3,000 Android device configurations and simulate every imaginable scenario thanks to its full set of hardware sensors. The only problem is that you get only 60 minutes of use for free, and then it’s 5 cents per minute.
4. Android-x86
Android-x86 is a project whose aim is to port Android to the x86 instruction set. Because Android-x86 is a complete operating system, you need virtualization software like VirtualBox to run it inside your Linux distribution.
When setting up a VirtualBox virtual machine for Android-x86, Set Type to Linux, and Version to Linux 2.6 or newer. Allocate at least 2 GB of RAM and create a new hard disk image with 8 GB of storage space or more. Load the Android-x86 installation image and follow the official installation instructions.
When running Android-x86 inside a virtual machine, you can’t really expect great performance because Android-x86 is meant to run on bare metal.
5. Android Studio IDE
Android Studio IDE is Google’s official integrated development environment for Android. It’s built on JetBrains’ IntelliJ IDEA software and runs on Linux, Windows, macOS, and Chrome OS. Included with Android Studio IDE is an Android emulator intended for running and debugging apps in the Android studio.
To install the emulator, choose the Android Emulator component in the SDK Tools tab of the SDK Manager. Open the app you want to run and click the green play-like button in the menu bars at the top. When asked to choose a device, click the Create New Virtual Device button and specify its properties. Once you’re finished, select it from the list of available virtual devices and click OK. The virtual device should start up right away and automatically open your application.
The Android Emulator inside Android Studio IDE doesn’t exactly amaze with its performance or usability, but it gets the job done when you just want to run a single Android app on Linux without installing it on your smartphone.
About the author
David Morelo
David Morelo is a professional content writer in the technology niche, covering everything from consumer products to emerging technologies and their cross-industry application
Установка и запуск Android-приложений на Linux
Как известно, многие Android-приложения можно нативно запускать на Chrome OS благодаря библиотеке Chrome App Runtime.
С помощью расширений chromeos-apk и ARChon запуск Android APK стал возможен и на других ОС.
Устанавливаем ARChon Runtime
1) Скачиваем и распаковываем ARChon в произвольную дирректорию;
2) Открываем Chrome и включаем Developer mode в chrome://extensions/;
3) Кликаем «Load unpacked extension» и устанавливаем распакованный ARChon.
Далее необходимо подготовить архив APK для установки.
Устанавливаем chromeos-apk
1) Для Ubuntu прежде всего нужно установить библиотеку lib32stdc++6:
sudo apt-get install lib32stdc++6
2) chromeos-apk можно установить с помощью менеджера пакетов npm (поставляется вместе с node.js).
3) Сейчас можно установить непосредственно chromeos-apk:
npm install chromeos-apk -g
Теперь все готово к распаковке APK.
Подготавливаем APK с помощью chromeos-apk
1) Для распаковки APK-архива выполняем:
chromeos-apk path/to/file.apk
2) Теперь у нас есть Chrome-APK расширение, и все что нужно — загрузить (chrome://extensions/) и запустить его.
UPD: полезные ссылки от sequence
ARChon Packager: создает архивы для archon из установленных в телефоне приложений.
twerk: расширение хром, сильно облегчает конвертацию apk.
Can I run Android apps on Ubuntu?
Is it possible to run Android apps on Ubuntu? And I don’t mean inside an emulator, but natively, as you would with any other application installed using the Ubuntu Software Center.
9 Answers 9
You can now under Chrome run APKs, using this extension (bearing in mind it is in development for use by developers for testing apps). Here are some steps I did to get it to work
- Install from here — click ‘Add to Chrome’ This will take a while as it seems to download a crx installer weighing in at 113Mb, and another one at around 9Mb, so be patient: N.B. on my Fedora 21 build of Chromium 40 I got the error ‘Manifest file is invalid’ when trying install the extension, even after clearing data and reloading the extension. I also had issues with Ubuntu 14.04’s build of Chromium 41, so I installed Google Chrome 🙁 and that worked.
- Get a APK of the application you want to use — no, it does not seem like you can install from Google Play, you need a APK file of the app, so this is the tricky bit.
Most closed source devlopers don’t want their stuff freely distributed, so for most apps on Google Play at least you either need to use:- Use a APK for a open-source app — for testing this I tried using the x86 APK for VLC Media PLayer, which resulted in a error screen — I then tried the armv7 arc version and that worked at first and then crashed.
- Get a APK from a Android device — this easily easily be done on some rooted Android devices, on normal devices I think you can copy system app’s apks from /system/apps or somewhere — again not recommended due to legal stuff.
- Use a third-party service/repository of APKs — e.g. this article suggest this one, but the issue here is that you may be downloading modified or infected programs/files. Probably should be considered a last resort.
- Use a third-party extension — e.g. this one that pretends to be a device and downloads (not a good idea if you like legal stuff, plus google tracks your every move (mainly when signed in) so may be found out pretty quick. Dead as out of date on both browser and likely android support. It isn’t recommend to install extensions not in browser’s extension store anyway!
- Install it Now we get to the more fun bit of trying it out. Go to the Apps thing in chrome (or type chrome://apps in the URL bar) and launch Arc Welder. Then choose the directory the APK is in and then the APK, then choose ‘Launch App’ in the window. If the window shows the app icon as one that looks like this:
the app probably won’t work so their may not be much point in continuing. This seemed to happen alot with apps for Android 4.4+. - Use it I managed to get QuickOffice to run and mostly work under the extension, though I couldn’t save any documents as it was not happy about choosing the place to save the file (showing a folder selection box, not a file selection box for saving 😛 ) After you press ‘Launch App’, the extension automatically adds a entry to the apps page on Chrome — this you can make into a standalone application launcher to launch the app directly from your app menu/dash/launcher — this is possibly the best feature of this extension as integrates with the desktop and you don’t need to launch a emulator etc first. Overall this is brilliant, considering this probably is still in development and not designed for this it works quite well.
Alternatively you can use a emulator as suggested in other answers — I did have some success using Genymotion (there were some handy instructions here, but this answer may help). Android Emulator can be got as part of the Android Studio SDK, however since Android Nougat apps should be signed.