With a PC connection and adb, I can install packages by running
adb install foobar.apk
There is also an option to downgrade a package to an earlier version and keep data (as long the app itself did not introduce any incompatibilities in the later version):
adb install -r -d foobar.apk
Is there an equivalent local command which I could run from a terminal session (or any other way to downgrade without a PC connection)?
adb shell
doesn't need root access which is a big step for majority of the users. So you can't say them equivalent, but both are commandline solutions. Btw there are workarounds to runadb shell
on device. – Irfan Latif Oct 09 '19 at 17:54pm install
is equivalent in that it installs APKs and is capable of downgrading, just likeadb install
. It is true, though, thatpm
requires root whileadb install
doesn’t.adb shell
just gets you a command line, which is the same thing that the terminal app does; neither requires root per se. Or did you meanadb install
? If you have a way to runadb install
on the device itself, without requiring a PC connection, feel free to post this as an answer. – user149408 Oct 17 '19 at 13:50adb install
executesadb shell pm install
at back end, so they are essentially the same thing. Point is to connectadb
server toadbd
, then you may execute any commandadb XYZ
. See this: https://android.stackexchange.com/a/216474/218526 – Irfan Latif Oct 18 '19 at 00:54pm
and localadb
do the trick, each coming with their own prerequisites. Which of these two is easier depends mostly on your local device configuration. – user149408 Oct 22 '19 at 11:07