How To Run Apks on Linux
Last updated: June 18th, 2020
For Android development on Linux, we need following...
- Java 8
- Android studio for the (apk) app development
- Android Emulator for (apk) app testing
- How to install APKs on Anbox
Make sure you have Java 8 installed. You should see following message once you have Java 8 installed.
java -version openjdk version "1.8.0_242" OpenJDK Runtime Environment (build 1.8.0_242-b08) OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)
How to install Android Studio on Linux
To install Android studio, first download the Android Studio Linux package from following link.
Untar the file and create the following link...
tar -xvf android-studio-ide-193.6514223-linux.tar.gz mv android-studio /opt ln -s /opt/android-studio/bin/studio.sh /usr/local/bin/android-studio
Ok now let us test it by running following command...
If you see following GUI, it means. Android studio is successfully running on your Linux.
How to install Android Emulator Anbox on Linux
To install Anbox, we need to install snap first. Snap is a package manager for different software installations on Linux. We can install snap using yum as shown below.
sudo yum install epel-release sudo yum install snapd sudo systemctl enable --now snapd.socket sudo ln -s /var/lib/snapd/snap /snap
Once you have snap installed and enabled. Do following to install Anbox
sudo snap install anbox --beta
Well Anbox, doesn't come with Google Play Store, Therefore we need to install Android Debug Bridge (ADB) to install APKs in Anbox's virtual box.
How to install Android Debug Bridge (ADB) on Linux (Centos)
sudo yum install android-tools
Ok now we have ADB out of the way. Let us see now how we can download and install APKs in Anbox
How to download, upload and install APKs on Anbox
Go to apkmonk.com. You can upload as well download any APK. To download, go to apkmonk.com and go to the apk download page. Right click on the download button and copy the apk link, for example as shown below...
Now on your Linux machine, run following command to download the app.
How to install APK using ADB
Once you have the desired apk downloaded. Fire up the ADB server like this...
The above command will start the ADB service and list Anbox as one of the emulators.
Now run the following command to install apk on the emulator.
adb install name-of-your_app.apk