How to install .apk file on Android phone or tablet

If you would like to install on your Android device an .apk file that you have built or downloaded from the web, there are several ways to do it. If your Android phone or tablet is connected to your Linux machine via USB, then the easiest way is to use adb (so-called Android Debug Bridge), which is a command line utility that allows you to communicate with Android devices or emulator via USB.

First of all, you need to configure your Android device to accept apk files, not downloaded from Android Market (or now known as Google Play). To do that, go to "Settings" -> "Applications" on your Android device. Check "Unknown sources" box to allow installation of non-Market applications.

Now connect your Android device to Linux machine via USB, and start an adb server.

$ adb start-server

Browse a list of connected Android devices or emulator instance:

$ adb devices
List of devices attached
3931F425198800EC        device

Along with a list of emulator/device instances, the command above shows their corresponding adb-assigned serial numbers (e.g., "emulator-5556" and "3931F425198800EC"), which you will need to know to connect to them.

Transfer .apk file to the download folder of your device:

$ adb -s 3931F425198800EC push my_program.apk /sdcard/download

If there is only one connected device, you can omit "-s 3931F425198800EC" in the above command.

Open up a file browser app on Android (e.g., "My Files" app), and go to /sdcard/download folder. Click on the downloaded .apk file to install it.

Subscribe to Xmodulo

Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.

Support Xmodulo

Did you find this tutorial helpful? Then please be generous and support Xmodulo!

The following two tabs change content below.
Dan Nanni is the founder and also a regular contributor of He is a Linux/FOSS enthusiast who loves to get his hands dirty with his Linux box. He likes to procrastinate when he is supposed to be busy and productive. When he is otherwise free, he likes to watch movies and shop for the coolest gadgets.

Leave a comment

Your email address will not be published. Required fields are marked *