Basic Package Management
In ADB shell,
List applications:
cmd package list packages
Disable an application:
cmd package disable-user --user 0 <id.package>
List disabled an application:
cmd package list packages -d
Enable an application:
cmd package enable <id.package>
Installer and install source
Install APK and set installer (install source):
cmd package install -i <id.package>
Or:
cmd package set-installer <id.package> <id.package.installer>
List packages with installer information:
cmd package list packages -i
Downgrading with Data Preserved
From ADB documentation:
adb uninstall [-k] <package> - remove this app package from the device ('-k' means keep the data and cache directories)
To downgrade an application but keep its data:
cmd package uninstall -k <id.package>
# Reboot the device
# Do reboot the device
# Otherwise it will still failed to install again
adb install /path/do/older_version.apk