ADB“安装”与“命令和“ pm install”命令? [英] Difference between adb "install" command and "pm install" command?
问题描述
使用 install
命令安装应用程序和使用软件包管理器的 pm install
命令有什么区别?他们做的完全一样吗?
What's the difference between installing an app using the install
command and using the package manager's pm install
command? Do they do the exact same job? Does one command actually call the other in the back?
adb install -r APK_FILE
adb shell pm install APK_FILE
推荐答案
adb安装
是从开发主机运行的命令,该命令会将软件包上载到临时位置,然后再安装。
adb install
is a command to run from a development host, which uploads a package somewhere temporary and then installs it.
pm install
是在设备上本地运行的命令。
pm install
is a command to run locally on the device.
adb
确实使用了<$ c设备上的$ c> pm 程序-在以下位置查看源代码
adb
does indeed utilize the pm
program on the device - see the source code at
https://android.googlesource.com/platform/system/core/+/kitkat-mr2.2-release/ adb / commandline.c
这篇关于ADB“安装”与“命令和“ pm install”命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!