I can uninstall an app on the device from my computer using adb uninstall <package_name>
,
but I'd like to do the same with a script on the actual device.
I've also tried running an android.intent.action.DELETE
intent using am
but it prompts the user for confirmation.
Given that the device is rooted, is it possible to run a command on the device to uninstall an app without requiring user action/confirmation ?
pm uninstall
command withsu -c
did the trick. I needed to trigger it from inside my Android app, so used something very similar to noman's approach