service 命令用法

一、用法概述:

# service

service

Usage: service [-h|-?]

service list

service check SERVICE

service call SERVICE CODE [i32 INT | s16 STR] [intent] ...

Options:

i32: Write the integer INT into the send parcel.

s16: Write the UTF-16 string STR into the send parcel.

intent: Write and Intent int the send parcel. ARGS can be/n"

action=STR data=STR type=STR launchFlags=INT component=STR categories=STR[,STR,...]/n

二、详解:

1.service list

会列出本机所有正在运行的service, 如:

Found 42 services:

0 phone: [com.android.internal.telephony.ITelephony]

1 iphonesubinfo: [com.android.internal.telephony.IPhoneSubInfo]

2 isms: [com.android.internal.telephony.gsm.ISms]

3 simphonebook: [com.android.internal.telephony.gsm.ISimPhoneBook]

4 appwidget: [com.android.internal.appwidget.IAppWidgetService]

5 audio: [android.media.IAudioService]

6 wallpaper: [android.app.IWallpaperService]

7 checkin: [android.os.ICheckinService]

8 search: [android.app.ISearchManager]

9 location: [android.location.ILocationManager]

10 devicestoragemonitor: []

11 mount: [android.os.IMountService]

12 notification: [android.app.INotificationManager]

13 connectivity: [android.net.IConnectivityManager]

14 wifi: [android.net.wifi.IWifiManager]

15 netstat: [android.os.INetStatService]

16 input_method: [com.android.internal.view.IInputMethodManager]

17 clipboard: [android.text.IClipboard]

18 statusbar: [android.app.IStatusBar]

19 window: [android.view.IWindowManager]

20 sensor: [android.hardware.ISensorService]

21 alarm: [android.app.IAlarmManager]

22 hardware: [android.os.IHardwareService]

23 battery: []

24 content: [android.content.IContentService]

25 permission: [android.os.IPermissionController]

26 activity.providers: []

27 activity.senders: []

28 activity.services: []

29 activity.broadcasts: []

30 cpuinfo: []

31 meminfo: []

32 activity: [android.app.IActivityManager]

33 package: [android.content.pm.IPackageManager]

34 telephony.registry: [com.android.internal.telephony.ITelephonyRegistry]

35 usagestats: [com.android.internal.app.IUsageStats]

36 batteryinfo: [com.android.internal.app.IBatteryStats]

37 power: [android.os.IPowerManager]

38 SurfaceFlinger: [android.ui.ISurfaceComposer]

39 media.camera: [android.hardware.ICameraService]

40 media.player: [android.hardware.IMediaPlayerService]

41 media.audio_flinger: [android.media.IAudioFlinger]

2、service check "service name" 检查service是否存在

如:

# service check phone

Service phone: found

# service check dd

Service dd: not found

3、service call "service name" code intent ....

如:service call power 1

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值