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)?
pm command can do this. You need the following things:
adb shellwill also work, but then you might just as well use
Open the terminal app, then run:
su pm install -r -d /sdcard/download/foobar.apk
Command line options are the same as for
-r will replace existing packages,
-d will downgrade if necessary.