Android is one of the most customizable operating systems as you can customize just about anything on your Android device. Unlike iOS, Android even lets you download and install apps to your device from unofficial sources.
This means that you no longer need to rely on the official Google Play Store to get your apps as you can get any app from any source and install it on your device without any restrictions.
One way to install apps on an Android device is to use the ADB (Android Debug Bridge) utility. It is a tool that allows you to execute various commands on your device from your computer. One of these commands allows you to install applications on your Android device directly from a terminal window or command line on your computer.
The following guide is about how you can use ADB to install new applications and remove existing applications from your device without leaving your computer. I will be using a Mac to complete the steps in the next tutorial. The steps will be slightly different for Windows and Linux users.
Download and install ADB on your computer
Download and install ADB on your computer
ADB is a really great utility as it allows you to perform a number of tasks on your device while it’s connected to your computer. You can install and uninstall apps, reboot your device into recovery mode, and perform some other tasks on your device from your computer.
To use ADB to install applications on your device, the first thing you need to do is download and configure the ADB tool on your computer. It is available for all three major operating systems, including Windows, Mac, and Linux.
Go to the ADB page on the official Android website and download the package for your operating system. After downloading, extract the files from the archive to your computer.
You will get multiple files in the extracted folder as shown above. You don’t need to open anything, as you will be using Terminal to work with these files.
Prepare your device for ADB communication
Set up the device for ADB connections
Now that the ADB tool has been downloaded and configured on your computer, you need to prepare your Android device to communicate with ADB. By default, your device is not recognized on your computer as you need to enable the setting on the device first.
- On your Android device, launch the Settings app and tap About Phone.
- You will see your phone information on the next screen. Find and tap the Build Number option about 7-8 times and it will show that you are a developer.
- Go back to the Settings app and you will find a new Developer Options option. Enter this new option and enable the USB debugging option. This is the setting that allows your device to communicate with your computer via ADB and must be enabled whenever you use ADB.
Install application using ADB
Install an application using ADB
Both your device and computer are now ADB ready, so let’s get down to installing apps on your device using the tool.
- Connect your Android device to your computer using a USB cable. If your device prompts you to select a connection mode, select data transfer.
- If you are a Windows user, open the folder containing the ADB files, hold down the Shift key on your keyboard, right-click anywhere on the screen, and select Open Command Window Here.
- If you are a Mac user, launch the Terminal application, type cd, press the space bar, drag the ADB folder into the terminal window, and finally press Enter. Your ADB folder should now be your current working directory in Terminal.
- Type ./adb devices in the Terminal window and press Enter. It will list all ADB compatible devices connected to your computer. In this list of devices, you will find your phone.
- Now that ADB recognizes your device, type ./adb install, press the spacebar, drag the Android app APK into the terminal window and press Enter. The selected application will be installed on your device.
Open the app drawer on your device to make sure the app is actually installed.
Using this method, you can install any number of applications on your Android device without leaving your computer.
Uninstalling application using ADB
Uninstall an application using ADB
ADB also allows you to remove apps installed on your device from your computer, but there is a catch. You must know the package name of the app you want to remove from your device, and many of you may not know about it.
Every Android app has a package name, but unfortunately you can’t find them easily on your device. However, to help you with this task, there is an application that allows you to display package names for all applications on your device.
Go to the Google Play store, download and install the App Inspector on your device. Launch it, select the application you want to uninstall using ADB and you will see the application package name on the screen.
Go back to the Terminal on your computer. Type ./adb uninstall, press spacebar, type the application package name and press Enter.
The app you selected will be removed from your Android device.
If you have a lot of Android apps on your computer, you can use the ADB tool to install these apps one by one on your device without transferring them to your device.