Android - Trying to test a service on boot (java.lang.SecurityException: Permission Denial)

风流意气都作罢 提交于 2019-11-27 22:56:06
Alireza Rahimi

I had same problem and solve by this:

 Try restarting ADB in root mode: adb root

and then broadcast BOOT_COMPLETED like this

 adb shell am broadcast -a android.intent.action.BOOT_COMPLETED 
-p yourpackage.app
Ron____

If adb root is not working (Production build), Use in your manifest :

android:name="android.intent.action.ACTION_BOOT_COMPLETED instead.

and from terminal:

adb shell am broadcast -a android.intent.action.ACTION_BOOT_COMPLETED
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!