Difference between revisions of "Anbox"
m (→Usage) |
m (→Install an apk file / install an app) |
||
Line 37: | Line 37: | ||
2. use the following command to install app to Anbox Android | 2. use the following command to install app to Anbox Android | ||
adb install com.headcode.ourgroceries-1.apk | adb install com.headcode.ourgroceries-1.apk | ||
+ | 3. find and execute the app using Anbox Application Manager | ||
+ | anbox.appmgr | ||
=== Google Play === | === Google Play === |
Revision as of 18:35, 5 February 2020
anbox - Android emulator. Anbox puts the Android operating system into a container, abstracts hardware access and integrates core system services into a GNU/Linux system.
Contents
Installation
For Mint Linux installation instructions see our Snapcraft guide. Once installed it is located here:
- /home/nicolep/snap/anbox
Make sure you run anbox.appmgr at least once after installing Anbox. Just type the following from your command prompt:
~ $ anbox.appmgr
There are other methods of installation.
If you have installed anbox using snap on ubuntu, you can find Android folders at place
/var/snap/anbox/common/data/media/0
- sudo permission required to access
Limitations
You can install Android apps but they need to be in android's architecture-neutral bytecode or in the same native architecture as your main OS, because there's no emulator, Anbox runs in a container, thus interecting straight with your current kernel. So you won't be able to install an ARM app on your PC which uses an Intel x86 / 64 processor. These processors work differently than the ARM processor in your phone. However, there are other factors such as the consideration you could use a Raspberry Pi with an ARM processor, or use further emulation on your PC to function between Anbox and your kernel.
One solution is using libhoudini to allow you to run ARM apps on your PC with Anbox.
Usage
In current distributions of Ubuntu and Mint (including Mint 18.3 and up) you can launch anbox from the command prompt (or from the search menu):
anbox.appmgr
- MENU -> OTHER -> ANBOX APPLICATION MANAGER
To install applications you must download each app APK and install it manually using adb.
If using Snapcraft you will find the installed apps here:
- /var/snap/anbox/common/data/app
Install an apk file / install an app
To install an app, in this example the Our Groceries App, do the following:
1. navigate to the directory where the apk file you downloaded resides. say ~/Downloads
cd ~/Downloads
2. use the following command to install app to Anbox Android
adb install com.headcode.ourgroceries-1.apk
3. find and execute the app using Anbox Application Manager
anbox.appmgr
Google Play
Anbox doesn't come with Google Services as Google Services can't be installed on an unregistered device including your emulator.
Troubleshooting
Failed to install : Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]
This error:
Failed to install battlefieldmars.apk: Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]
You are trying to install an app which was written for the ARM processor architecture on your Intel based device, Anbox on your PC.
Try libhoudini
anbox-init.sh
binaries
running with snapcraft
- /snap/anbox/158/usr/bin/anbox container-manager --data-path=/var/snap/anbox/common/ --android-image=/snap/anbox/158/android.img --daemon
- /snap/anbox/158/usr/bin/anbox session-manager
- /var/snap/anbox/common/containers default
- /system/bin/anboxd
$ mount|grep anbox /var/lib/snapd/snaps/anbox_158.snap on /snap/anbox/158 type squashfs (ro,nodev,relatime) /var/lib/snapd/snaps/anbox-installer_24.snap on /snap/anbox-installer/24 type squashfs (ro,nodev,relatime) nsfs on /run/snapd/ns/anbox.mnt type nsfs (rw)