Android系统服务查看

        在进行应用开发时,经常要了解系统服务运行的情况:进程号是哪个,占用内存是多少,运行状态是怎么样等等。那么问题来了,怎么去获取这些信息呢?

 解决办法:

        直接使用命令:adb shell top

G:\mm_files\tools\adb-fastboot-v2>adb shell top
[s[999C[999B[6n[u[H[J[?25l[H[J[s[999C[999B[6n[uTasks: 483 total,   3 running, 480 sleeping,   0 stopped,   0 zombie
  Mem:  3938580K total,  2477888K used,  1460692K free,  16142336 buffers
 Swap:  2166212K total,   308192K used,  1858020K free,  1376448K cached
800%cpu   9%user   0%nice  41%sys 750%idle   0%iow   0%irq   0%sirq   0%host
[7m   PID USER         PR  NI VIRT  RES  SHR S[%CPU] %MEM     TIME+ ARGS           [0m
[mm  5054 shell        20   0  10G 4.5M 3.4M R 18.7   0.1   0:00.10 top
  1888 system       20   0 1.3G  79M  72M S 12.5   2.0   0:08.66 com.android.au+
[mm  1147 system       18  -2  16G 271M 226M R  3.1   7.0   1:09.55 system_server
   752 system       20   0  10G  12M  10M S  3.1   0.2   0:05.12 vendor.mediate+
   722 system       20   0  10G 6.0M 5.4M S  3.1   0.1   0:02.55 android.hardwa+
   365 system       20   0  10G 5.8M 4.9M S  3.1   0.1   0:01.66 hwservicemanag+
[mm   299 root         20   0    0    0    0 R  3.1   0.0   0:00.10 [charger_threa+
  5015 u0_a53       20   0  13G  88M  69M S  0.0   2.2   0:00.25 android.proces+
  4977 root         20   0    0    0    0 I  0.0   0.0   0:00.00 [kworker/4:3-e+
  4971 root          0 -20    0    0    0 I  0.0   0.0   0:00.00 [fs_suspend_sy+
  4620 system       20   0  10G  11M 9.4M S  0.0   0.2   0:02.62 vendor.mediate+
  4545 u0_a122      20   0  14G 134M 116M S  0.0   3.4   0:19.11 com.android.ga+
  3812 u0_a135      20   0  13G  77M  64M S  0.0   2.0   0:00.27 com.android.ce+
  3788 radio        20   0  13G  74M  56M S  0.0   1.9   0:00.17 com.nbbsw.mmi_+
  3760 system       20   0  13G  76M  63M S  0.0   1.9   0:00.20 com.mediatek.s+
  3736 system       20   0  13G  78M  65M S  0.0   2.0   0:00.20 com.mediatek.o+
  3706 u0_a45       20   0  13G  74M  56M S  0.0   1.9   0:00.19 com.mediatek.e+
  3679 u0_a119      20   0  13G  76M  58M S  0.0   1.9   0:00.25 com.mediatek.d+
  3654 u0_a133      20   0  14G 123M 112M S  0.0   3.1   0:21.86 com.mediatek.c+

当我们要了解系统服务有哪些时,可以使用如下命令:

adb shell service list

检查设备是否有指定服务时:

adb shell service check  xxxxxx

你可能感兴趣的:(android,adb)