简体   繁体   中英

Install apk via adb can not delete old apk

I try to install via adb an apk to a connected device with :

adb -d install android-debug.apk

But could not delete the old apk :

2956 KB/s (2131317 bytes in 0.704s) pkg: /data/local/tmp/android-debug.apk Failure [INSTALL_FAILED_ALREADY_EXISTS] rm failed for -f, No such file or directory

is there a way to force the install ?

adb install -r android-debug.apk

-r replaces the existing APK.

I know, it is not documented ... but the command's --help lists:

adb install [-lrtsd] <file> - push this package file to the device and install it
                             (-l: forward lock application)
                             (-r: replace existing application)
                             (-t: allow test packages)
                             (-s: install application on sdcard)
                             (-d: allow version code downgrade)
                             (-p: partial application install)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM