Running apk on linux

How to Run Android Apps on Linux Distros (like Ubuntu)

Android has (almost) become the de-facto of mobile computing. That’s why its apps are sought-after even on other operating systems including Windows and Linux as everyone wishes to use their favorite apps on all devices — even on desktops and laptops. So, let me share the good news with you:

You can run Android apps on Linux, thanks to a solution called Anbox. Anbox — a short name for “Android in a Box” — turns your Linux into Android, allowing you to install and use Android apps like any other app on your system. So, what are you waiting for? Let’s check how to install and run Android apps on Linux.

10 Most Asked Questions About Linux

You have probably heard of Linux as the free alternative to Windows and OS X. It’s one of. Read more

Prerequisites

Let’s first talk about the essential things you must set up before installing and running Android apps on Linux, i.e., you must install Anbox. Please note that this tutorial was written for Debian-based OSs including Ubuntu and Linux Mint, so you may modify a few commands to make them work in other distros.

1.1 Check for snapd

First of all, you must check if your system supports snaps. Open a terminal and type snap find hello . If you see a list of packages (as in the screenshot below), it’s all good. If not, install snapd using this guide from Ubuntu.

Check if snapd is installed in Linux

1.2 Install kernel modules

Now, we must install kernel modules for Anbox, which help Anbox run the Android container in Linux. Here’s how to do it:

  1. Open a terminal and type sudo add-apt-repository ppa:morphis/anbox-support ; sudo apt update ; sudo apt install linux-headers-generic anbox-modules-dkms to install modules. Install Anbox kernel modules in Linux
  2. After the modules are installed, you need to load them for the first time. Type sudo modprobe ashmem_linux ; sudo modprobe binder_linux , and you won’t see any messages from this command, surprisingly!
  3. Finally, let’s confirm if you’ve got them installed properly by typing this command: ls -1 /dev/ . You’ll see like this: Check if Anbox kernal modules are installed
1.3 Install the Anbox snap

Now, let’s install Anbox from the Snap Store. That said, open a terminal and type snap install —devmode —beta anbox to install Anbox.

If it doesn’t work or gives any error or warning, try this command: sudo snap install —devmode —beta anbox . After it’s installed, you can type snap info anbox to confirm its installation in your system by checking the installed version of Anbox.

Install Anbox as a snap in Linux

1.4 Install ADB for Linux

ADB — Android Debug Bridge — is a tool to connect to and manage an Android device or instance through the command-line.

Anbox leverages this tool to allow you to install apps in Anbox, i.e., Android on Linux. Let’s see how to do it:

  1. In a terminal, type sudo apt install android-tools-adb . Install Android ADB tools in Linux
  2. Now, type and run adb —version to confirm its installation. Check if ADB is installed in Linux

Android Apps on Linux

Finally, let’s learn to install apps in Anbox, which will finally allow us to use them on Linux. But before you can do that, you must have an APK — it’s an executable, packaged form of an app; it’s as you have .deb files for Debian and Ubuntu.

Читайте также:  Отображать скрытые файлы линукс

You can download from APKMirror — it’s a popular and safe place to get APKs.

Once you’ve downloaded the APK, you can type adb install in the terminal.

For example, I used adb install com.manco.steno.apk to install Steno Notes — a minimalistic note-keeping app — on my system. If you see an error from ADB, Anbox isn’t running. You can type and run anbox.appmgr to get Anbox up and running. Thereafter, type the previous command again!

Install Android apps in Anbox on Linux

If you’d run the command for Anbox, you’ll see its window as in the screenshot below. If not, you can always search for Anbox Application Manager in the applications menu. When you run it, you’ll see the list of installed apps.

Anbox Application Manager on Linux

For instance, I ran Calculator, Calendar, Files, Settings, and Steno using Anbox on Linux. All apps ran successfully except Steno — it started as others, but it wasn’t accepting my input. It may be because Steno is a beta app and may have bugs. Or maybe Anbox can’t run all the apps that are available in the Google Play Store.

Nevertheless, it’s still worth a try, and also, you can run multiple apps!

Источник

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.

Читайте также:  Msi dragon center linux

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.

Читайте также:  Google uses linux or windows

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

Источник

How do I run Android’s .apk files on linux without the Android emulator?

I do not have a very good background of Android and the .apk files, hence these questions.

3 Answers 3

You cannot install .apk files directly onto your PC. Even though Android uses the Linux kernel, the applications runs on a totally different platform. APK files are ZIP file formatted packages based on the JAR file format, with .apk file extensions. They hold all of that program’s code (such as .dex files), resources, assets, certificates, and manifest file. They run only on the Dalvik virtual machine.

Install Android OS on your PC, if you really want to run them from a computer.

You can use the ARChon to run apk in ubuntu:

  1. Install the ARChon Runtime. http::github.com/vladikoff/chromeos-apk/blob/master/archon.md
  2. Open and enable the flag: chrome://flags/#enable-nacl,then restart Google-Chrome. (Important!)
  3. Install existing android apps in the website or convert your favourite android apps by «Online APK-CRX Converter.
  4. Drag and drop the Google-Chrome extensions into the chrome://extensions/ page in the browser and it will be installed in your browser. Enjor it!
  1. An apk file is not an executable, it’s just an archive file contaning all the resources and class files that are to be used by the application.
  2. The apk is set to be unpacked and run by the Dalvik vm.
  3. The elements that are contained inside the apk file are specifically designed and designated to be used in Android mobile phones and not a desktop PC running Linux. Though Android uses the Linux kernel, you definitely cannot run the apk file on a Linux machine, as you would an rpm or a deb file.

Thank you. Is it absolutely necessary that we need the ‘dalvik vm’ to run it, or can we replicate the operations by ‘dalvik vm’ manually, with tweaks, to make it run on linux directly?

No we cannot ! It will be like taking a human being who is designed to live and breath on earth , to Mars and tweaking Mars so as to accomodate human beings.

@Achilles Off topic, but random joke. There is two know mars missions planned, one by NASA and the other by MarsOne. These will later include teramorphing mars as there is not only ice on mars, but flowing water too. All one needs to synthesize an atmosphere is oxygen and electricity to create ozone. Back to topic, yes to «emulate» or reconstruct and optimise a vm is possible. But the time needed to do so is greater than the feasible use thereof (HrishikeshMurali)

Источник

Оцените статью
Adblock
detector