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

后端 未结 2 1141
栀梦
栀梦 2020-12-06 04:59

I\'ve been trying to test a service when a device boots up on android, but I cannot get it to work. I\'m trying to start it with this command from CMD:

(in ..\\AppDa

2条回答
  •  清歌不尽
    2020-12-06 05:53

    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
    

提交回复
热议问题