Install app as a system app on the emulator

Use the following commands to install your app as a system app on an emulator (or rooted device).

Note that for pre-KitKat devices the target folder is in /system/apps instead of /system/priv-app.

adb -e remount
adb -e push my_app.apk /system/priv-app/MyApp/my_app.apk
adb -e shell
chmod 644 /system/priv-app/MyApp/my_app.apk
# soft reboot using:
am broadcast -a android.intent.action.BOOT_COMPLETED
# Because adb -e reboot doesn't work properly

The following is similar; instructed by an Android dev rel, to root a rootable testdevice and install a system app:

adb root
adb disable-verity
adb reboot
adb root
adb remount
adb shell rm  ...the apk from vendor/app...
adb push app-release.apk /system/priv-app
adb reboot