How non-developers can install and uninstall Android apps using the command line

 

Mainly to solve in some special cases, how non-Android developers use the command line to install and uninstall APP.

There is no need to install a huge Android development environment, nor to configure system environment variables, just download an ADB tool to achieve it.

1. Download the ADB tool

You can download it in the attachment. After downloading, extract it to the specified directory. I unzip it here on D drive



 

 

2. How to use the command line

Search for cmd in the menu and open.



 

Then switch to the decompression directory of adb by command



 The red box in the figure above is the entered command. After entering it, press Enter to execute the command. Here I switched to the D drive adb file directory.

 

3. Connect the phone to the computer using USB.

After connecting, you can use adb related commands on the command line to view the connected mobile phone.

Enter adb devices at the command line and press Enter, as shown below:



 
 If the mobile phone information in the second red box in the picture above does not appear. Then unplug the USB and try again.

 

4. Use ADB command to uninstall and install APP

Uninstall: execute the uninstall command by entering adb uninstall xxxx (here is the package name, the unique identifier of an app, usually named com.xxx.xxx, such as com.tencent.mobileqq for QQ). Below I simulate uninstalling QQ, you can uninstall other APPs, provided you know the package name.



 

Here, use adb uninstall com.tencent.mobileqq to uninstall qq. After inputting, press Enter to execute. The following has prompted that the uninstallation was successful.

 

Installation: Install qq by typing adb install -r xxxx (directory location, such as D:\xxx.apk).

 



 

Here, adb install -r D:\adb\com.tencent.mobileqq_6.5.3_398.apk is used to install QQ's apk, where qq's apk is placed in the D drive directory, under the adb folder.

 

Now, as a novice user, can you use the command line to install and uninstall APKs? Is not it simple.

PS:  An apk (getAppInf.rar) is provided in the attachment, and the package name of the apk can be displayed after the installation is opened. As shown



 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326592842&siteId=291194637