Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between adb "install" command and "pm install" command?

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
like image 845
hackjutsu Avatar asked Feb 24 '15 00:02

hackjutsu


People also ask

What is PM in adb?

Using package manager (pm) Within an adb shell, you can issue commands with the package manager ( pm ) tool to perform actions and queries on application packages installed on the device.

What is PM install?

Within an adb shell, you can issue commands with the package manager (pm) tool to perform actions and queries on app packages installed on the device. You can issue a package manager command directly from adb without entering a remote shell.

What is adb install?

Android Debug Bridge (adb) is a versatile command-line tool that lets you communicate with a device. The adb command facilitates a variety of device actions, such as installing and debugging apps, and it provides access to a Unix shell that you can use to run a variety of commands on a device.

How do you know adb is installed or not?

Next type cd platform-tools : Then type ls (or dir on Windows). You should see adb or adb.exe depending on your operating system. From here you can type ./adb and see some program output.


1 Answers

adb install is a command to run from a development host, which uploads a package somewhere temporary and then installs it.

pm install is a command to run locally on the device.

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

like image 71
Chris Stratton Avatar answered Oct 20 '22 19:10

Chris Stratton