How to install .apk file on Android phone or tablet

Last updated on January 19, 2013 by Dan Nanni

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 third-party apk files, not downloaded from Android Market (or now known as Google Play). To do that, go to SettingsApplications 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 the .apk file to install it.

Support Xmodulo

This website is made possible by minimal ads and your gracious donation via PayPal (Credit Card) or Bitcoin (1M161JGAkz3oaHNvTiPFjNYkeABox8rb4g).

Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.

Xmodulo © 2021 ‒ AboutWrite for UsFeed ‒ Powered by DigitalOcean