I have been using an automated shell command in Automateit to stop an app, am force-stop {app}
This has worked fine until my Nexus 5 received Android 6 and now it doesnt work any more.
Terminal Emulator shows the following when I use it to run the command.........
u0_a68@hammerhead:/ $ am force-stop com.waze
java.lang.SecurityException: Permission Denial: forceStopPackage() from pid=2211, uid=10068 requires android.permission.FORCE_STOP_PACKAGES
at android.os.Parcel.readException(Parcel.java:1599) at android.os.Parcel.readException(Parcel.java:1552) at android.app.ActivityManagerProxy.forceStopPackage( ActivityManagerNative.java:4505)
at com.android.commands.am.Am.runForceStop(Am.java:98 3)
at com.android.commands.am.Am.onRun(Am.java:365)
at com.android.internal.os.BaseCommand.run(BaseComman d.java:47)
at com.android.commands.am.Am.main(Am.java:100)
at com.android.internal.os.RuntimeInit.nativeFinishIn it(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeIn it.java:251)
1|u0_a68@hammerhead:/ $
I dont really know anything much about shell commands but if someone could point me in the right direction to get this working again I would be most grateful.
This has worked fine until my Nexus 5 received Android 6 and now it doesnt work any more.
Terminal Emulator shows the following when I use it to run the command.........
u0_a68@hammerhead:/ $ am force-stop com.waze
java.lang.SecurityException: Permission Denial: forceStopPackage() from pid=2211, uid=10068 requires android.permission.FORCE_STOP_PACKAGES
at android.os.Parcel.readException(Parcel.java:1599) at android.os.Parcel.readException(Parcel.java:1552) at android.app.ActivityManagerProxy.forceStopPackage( ActivityManagerNative.java:4505)
at com.android.commands.am.Am.runForceStop(Am.java:98 3)
at com.android.commands.am.Am.onRun(Am.java:365)
at com.android.internal.os.BaseCommand.run(BaseComman d.java:47)
at com.android.commands.am.Am.main(Am.java:100)
at com.android.internal.os.RuntimeInit.nativeFinishIn it(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeIn it.java:251)
1|u0_a68@hammerhead:/ $
I dont really know anything much about shell commands but if someone could point me in the right direction to get this working again I would be most grateful.
No comments:
Post a Comment