I'd like to be able to test the BroadcastReceiver for MY_PACKAGE_REPLACED.
Can I accomplish this with an adb command?
Does the emulator accomplish this when I launch an app from the IDE (Android studio)?
I'd like to be able to test the BroadcastReceiver for MY_PACKAGE_REPLACED.
Can I accomplish this with an adb command?
Does the emulator accomplish this when I launch an app from the IDE (Android studio)?
am broadcast -a android.intent.action.MY_PACKAGE_REPLACED
Unfortunately the previously proposed solution is not supported on Android 7.0+ because only the system is allowed to broadcast it.
However the intent can be stimulated by adb install -r
command when side loading the app.
I don't take credit for this answer as it has been submitted in another thread.