How to start and stop android service from a adb shell?

前端 未结 11 1030
别跟我提以往
别跟我提以往 2020-12-07 16:32

I need to write a shell script to start and stop an android service .

11条回答
  •  感情败类
    2020-12-07 17:20

    Responding to pzulw's feedback to sandroid about specifying the intent.

    The format of the component name is described in the api docs for ComponentName.unflattenFromString

    It splits the string at the first '/', taking the part before as the package name and the part after as the class name. As a special convenience (to use, for example, when parsing component names on the command line), if the '/' is immediately followed by a '.' then the final class name will be the concatenation of the package name with the string following the '/'. Thus "com.foo/.Blah" becomes package="com.foo" class="com.foo.Blah".

提交回复
热议问题