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

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

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

11条回答
  •  太阳男子
    2020-12-07 17:22

    Starting a service:

    adb shell am startservice ...
    

    start a Service. Options are: --user | current: Specify which user to run as; if not specified then run as the current user.

    Stopping a service:

    adb shell am stopservice ... 
    

    stop a Service. Options are: --user | current: Specify which user to run as; if not specified then run as the current user.

提交回复
热议问题