How To Install APK Using ADB Commands in 2023 [100% Working]

How To Install APK Using ADB Commands [100% Working]

There are many ways one can install APKs on their android phones. This method is called side loading, which can be done in two various ways, one using a Package Manager within Android and the second using ADB Commands from a computer/laptop.

Table Of Contents

What is ADB?

ADB, known as Android Debug Bridge is a handy tool that uses the command line to communicate with an Android-based device.

It provides the user with a UNIX-based shell, which can allow the user to do basic commands like Installing and Uninstalling Applications which will be covered in this article, and advanced setup like unlocking Bootloader and invoking FastBoot.

It consists of 3 parts, a client which sends the commands, a daemon that runs commands on the device, and third a server that allows the communication between the client and the daemon.

So it is just a small server that is hosted on your device which allows communication from the Computer/Laptop and Android Device using a command-line interface.

Why would one use this Method?

One might use this method as a workaround for using the Package Manager present in the device. One can also use it if an application is causing issues and your launcher keeps crashing. This method is quite stable and is easy when one learns simple commands.

Tools that are required for this Method: 

A functioning Laptop & Computer, A working internet connection, and the USB cable that is used to connect the Android Device to the Computer/Laptop.

Installing ADB on the Computer/Laptop

The first part of the method is to install ADB on the Computer/Laptop.

Step One – Download the ADB tool from the official Google SDK site. Check which operating system you are using, (https://developer.android.com/studio/releases/platform-tools).  For this example, we are using Windows as a test setup.

Step Two: When the files are downloaded as a .zip file after agreeing to the Terms and Conditions present on the Website, place it on the Desktop and then use a tool like WINRAR or 7-Zip to extract the files to a single folder so it does not cause any sort of confusion.

Step Three:  After the folder is extracted, rename the folder to ADB so it’s easily identifiable. Double click on the folder and open it.  That is the ADB tool that we will require for this job.

Enabling Developer Mode and USB Debugging: 

Step one: Navigate to the Settings of your Android Device and open it.

Step two: Scroll down to About Device, and open it. Find the build number and tap on it 7 times, after which a small prompt appears that you have enabled the Developer Mode.

Step Three: Find the Developer mode in the settings after it’s been enabled, Find the option of “USB Debugging”. Turn the Setting on. Voila now, your device has access to Developer Settings that will be used in this Method.

Installing an APK using ADB: 

The first requirement is to download the correct APK from third-party websites after checking if your device is x64 or x86 or ARM. This is important otherwise the application might not install correctly and might cause the device to crash.

Step one: You will be seeing a number of files. Leave them as it is for now and connect your device after enabling the USB Debugging option is given above. Make sure all the drivers for your device are installed and keep the phone unlocked and awake for the whole process. This is important as we will learn later.

Step Two: Open the Command Prompt in the ADB Folder on the desktop using a combination of Right Click+Shift and then selecting “Open Command Prompt Here” in the ensuing Menu. For users of Windows 10, the option would be “Open PowerShell Here”.

Step Three: Enter “ADB devices” in the Command prompt, without any quotes. Now a prompt will appear on the phone asking to “Allow USB debugging” Check the option to remember the Computer and select “Yes”.

Step Four: Check the output of the command if it says the name of your device with a port number i.e.

List of devices attached

Device_name:5555 device

It means that the device is successfully connected and is ready for the procedure.

Step Five: Drag the APK file to the ADB folder and copy the name of the. APK so you will not make any mistakes. Enter” ADB install app_ name.apk” Replace the app name with the.

APK the name of your file and remove the quotation marks and press Enter. Give it some time and see the result, if it says “Success”, it means the APK has been successfully installed on your phone.

Step Six: If you want to update an existing application, use “ADB install –r app_name.apk” Replace the app name with the. APK the name of your file and remove the quotation marks and press Enter.

If the command shows success, it means the application was successfully installed on your phone. If you want an application to be installed on your SD Card use “ADB install -s app_name.apk”, Replace the app name with the. APK the name of your file and remove the quotation marks and press Enter.

Uninstalling an APK using ADB

Uninstalling an Application can be a bit tricky. Follow the Steps one to four in the section on installing an. APK using ADB. These steps will remain similar for uninstalling without any changes.

Step one: In the Command Prompt Enter, “ADB uninstall app_name.apk” Replace the app name with the. APK the name of your file and remove the quotation marks and press Enter. If the prompt shows Success, it means the Application was successfully uninstalled from the device.

Step Two: If you want to keep the data and cache directories around after uninstall, use “ADB uninstall -k app_name.apk”, and make sure to Replace the app name with the. APK the name of your file and remove the quotation marks.

Common Errors made during the method:

The device does not show up after executing the “ADB devices command”

This error usually occurs if the Device’s driver is not installed correctly; use Windows Update or the manufacturer’s website to reinstall the device drivers.

Another error might be if the phone is not connected correctly to the Computer/Laptop. Check if you turned on USB Debugging otherwise the device will not show up.

Errors while using PowerShell instead of Command Prompt

While using Windows 10, you will be using Windows PowerShell instead of Command Prompt which is a tad bit different, if “ADB: The term ‘ADB’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the

spelling of the name, or if a path was included, verify that the path is correct and try again.

At line:1 char:1

+ adb devices

+ ~~~

+ CategoryInfo          : ObjectNotFound: (adb:String) [], CommandNotFoundException

+ FullyQualifiedErrorId : CommandNotFoundException

Suggestion [3, General]: The command ADB was not found, but does exist in the current location.”  Sort of error shows up, instead of using “ADB devices”, use “.\adb devices”.

Last words

This method is quite useful if one needs to install the application without any glitches and issues. The method is quite easy and is quite useful in emulator environments while testing an application.

Similar Posts

Leave a Reply

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