How ADB installs and uninstalls apk

Source: Internet
Author: User

Yesterday in the use of the ADB uninstall program, the results will not unload. The commands and system prompts I entered are as follows:

    1. D:\TESTAPK>ADB Uninstall HelloWorld
    2. Failure

Later found that the original uninstall program, only adb uninstall behind the parameters should not be the. apk file, but the package name, that is, the Androidmainifest.xml file in the <manifest> node under the packages element specified by the name, as follows

    1. D:\TESTAPK>ADB Uninstall Org.crazyit.helloword
    2. Success

How to install APK:

1. ADB install-r android-gateway-nightly.apk

If you install APK into ROM, prompt "Exsit ... "The hint message can be added with the-r parameter, can replace the original apk

2. adb shell pm Clean com.cvte.health

Can erase the data of a package apk, which is equivalent to purging data

Additional:

adb install [-l] [-r] [-s] <file>

En

CHS

To install software for the device ('-l ' means forward-lock the app) #锁定该程序 ('-R ' means reinstall the app, keeping its data) #重新安装该程序, save the data ('-s ' means I Nstall on SD card instead of internal storage) #安装在SD卡内 instead of device internal storageadb uninstall [-k] <package>

En

CHS

Remove the package from the device ('-K ' means keep the data and cache directories) #不删除程序运行所产生的数据和缓存目录 (such as the database file for the software)

How ADB installs and uninstalls apk

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.