当前位置:   article > 正文

APPnium 自动化实践 :第一步adb 连接手机

appnium

1. 下载安装 adb ,添加到环境变量。

ADB Download - Get the latest version of ADB and fastboot

2.   手机开启开发者模式 

https://developer.huawei.com/consumer/cn/doc/quickApp-Guides/quickapp-open-developer-option-0000001137005543

3.  adb  连接设备  

【Andriod】adb调试安卓手机时连接真机或模拟器的3种方法,你知道么?_adb连接手机-CSDN博客

adb devices:                        获取设备和设备的状态列表
adb devices -l                        查看已连接的设备
adb get-serialno                     设备号
adb get-state:                      获取设备的状态(设备的状态有三种:device,设备连接正常;offline,连接出现异常,设备无响应;unknown,设备未连接;)

adb connect [ip:port]:                       远程连接设备(用于在同一网络下adb无线连接设备)
adb disconnect [ip:port]:                   断开设备连接(用于在同一网络下adb无线连接设备)

adb reboot: 重启设备
 

注:连接不成功,检查以下问题

确保网络和端口都没有问题,使用的是原装数据线
请确认 Android 设备与电脑是连接到了同一个 WiFi,然后再次执行 adb connect 那一步
通过adb kill-server重新启动 adb 然后从头再来一次试试

 

 重启设备 

 adb  shell 登录设备

 【Andriod】adb调试安卓手机时连接真机或模拟器的3种方法,你知道么?_adb连接手机-CSDN博客

建立连接
基本命令

adb -d:如果同时连了usb,又开了模拟器,连接当前唯一通过usb连接的安卓设备
adb -e shell:指定当前连接此电脑的唯一的一个模拟器
adb -s <设备号> shell:当电脑插多台手机或模拟器时,指定一个设备号进行连接

APK指令
列出安装在设备上的应用

adb shell pm list packages          列出所有应用
adb shell pm list package -s     列出系统应用
adb shell pm list package -3     列出第三方的应用
adb shell pm list package -i     列出来源
db shell pm list package -f     列出包名和路径

adb shell dumpsys基本指令
监控应用数据:

adb shell dumpsys cpuinfo       cpu信息
adb shell dumpsys meminfo       内存信息
adb shell dumpsys power         电源信息
adb shell dumpsys battery       电池信息
adb shell dumpsys wifi          wifi信息
adb shell dumpsys notification  通知信息
adb shell dumpsys activity      获取页面信息
adb shell dumpsys activity services [package-name] 查看正在运行的服务

dumpsys meminfo

  1. 127|HWJKM-HM:/ $ dumpsys meminfo
  2. Applications Memory Usage (in Kilobytes):
  3. Uptime: 599577 Realtime: 599577
  4. Total PSS by process:
  5. 182,930K: system (pid 1730)
  6. 176,147K: com.android.systemui (pid 2079)
  7. 106,123K: com.huawei.vassistant (pid 6311)
  8. 84,180K: com.huawei.phoneservice (pid 8800)
  9. 77,986K: com.huawei.android.launcher (pid 2409 / activities)
  10. 70,068K: com.huawei.hwid.core (pid 3058)
  11. 66,836K: com.android.gallery3d (pid 8115)
  12. 66,679K: android.hardware.graphics.composer@2.2-service (pid 600)
  13. 58,698K: vendor.huawei.hardware.biometrics.hwfacerecognize@1.1-service (pid 852)
  14. 50,879K: com.huawei.wallet (pid 7799)
  15. 42,587K: CameraDaemon (pid 889)
  16. 41,872K: com.huawei.hilink.framework (pid 3338)
  17. 35,905K: com.huawei.search (pid 9244)
  18. 30,546K: com.baidu.input_huawei (pid 5024)
  19. 30,377K: com.huawei.systemmanager:service (pid 2430)
  20. 26,029K: com.android.contacts (pid 9416)
  21. 23,838K: com.huawei.HwOPServer (pid 2301)
  22. 23,824K: /init (pid 1)
  23. 22,586K: android.hardware.graphics.allocator@2.0-service (pid 595)
  24. 21,757K: com.huawei.hwid.persistent (pid 3183)
  25. 21,170K: com.huawei.powergenie (pid 2356)
  26. 21,142K: com.huawei.hiai (pid 5299)
  27. 21,133K: com.android.settings (pid 2060)
  28. 20,840K: com.huawei.recsys (pid 9707)
  29. 20,454K: com.huawei.android.thememanager (pid 8362)
  30. 20,412K: com.android.phone (pid 2388)
  31. 19,856K: surfaceflinger (pid 629)
  32. 19,604K: com.huawei.hiview (pid 2263)
  33. 18,822K: com.android.gallery3d:search (pid 8473)
  34. 18,266K: com.huawei.hiaction (pid 4816)
  35. 18,265K: ohos.distributedschedule.foundation (pid 2241)
  36. 17,824K: com.huawei.hidisk (pid 7188)
  37. 17,562K: android.process.acore (pid 5336)
  38. 16,240K: android.process.media (pid 4836)
  39. 16,227K: com.huawei.systemserver (pid 2196)
  40. 16,027K: com.huawei.profile (pid 9730)
  41. 15,908K: com.huawei.hwid (pid 9025)
  42. 14,326K: com.huawei.hwid.container3 (pid 5757)
  43. 14,003K: com.huawei.lbs (pid 2177)
  44. 13,941K: com.huawei.hiai.engineservice (pid 5097)
  45. 13,772K: com.android.gallery3d:vision (pid 9618)
  46. 13,305K: com.huawei.android.totemweather (pid 3743)
  47. 13,163K: com.huawei.android.hwouc (pid 8670)
  48. 12,241K: gpuassistant (pid 626)
  49. 12,233K: com.huawei.ohos.photos (pid 9549)
  50. 11,140K: hiview (pid 927)
  51. 10,373K: com.huawei.nearby (pid 2283)
  52. 9,857K: com.huawei.android.pushagent.PushService (pid 4410)
  53. 9,611K: com.huawei.webview:sandboxed_process0 (pid 8947)
  54. 9,549K: com.huawei.securityserver (pid 2328)
  55. 9,497K: com.huawei.hwdetectrepair (pid 8882)
  56. 8,682K: com.huawei.vassistant:interactor (pid 4759)
  57. 7,877K: com.huawei.tips (pid 9795)
  58. 7,482K: zygote (pid 578)
  59. 7,424K: com.unionpay.tsmservice (pid 8635)
  60. 6,860K: com.android.providers.calendar (pid 8604)
  61. 6,801K: zygote64 (pid 577)
  62. 6,460K: webview_zygote (pid 2094)
  63. 6,419K: audioserver (pid 627)
  64. 6,404K: com.huawei.controlcenter:collaboration (pid 9829)
  65. 6,369K: media.extractor (pid 877)
  66. 6,077K: dubaid (pid 868)
  67. 5,778K: com.android.supl (pid 4799)
  68. 5,710K: media.codec (pid 890)
  69. 5,293K: com.android.incallui (pid 3000)
  70. 4,860K: distributeddata (pid 682)
  71. 4,752K: com.huawei.deviceauth (pid 9060)
  72. 4,587K: com.huawei.android.UEInfoCheck (pid 7030)
  73. 4,547K: vendor.huawei.hardware.audio@4.0-service (pid 608)
  74. 4,458K: mediaserver (pid 879)
  75. 4,420K: com.android.se (pid 7871)
  76. 4,344K: com.huawei.android.AutoRegSms (pid 7007)
  77. 4,089K: cameraserver (pid 863)
  78. 4,048K: samgr (pid 564)
  79. 3,534K: logd (pid 482)
  80. 3,368K: rild (pid 903)
  81. 3,195K: displayengineserver (pid 866)
  82. 2,812K: gnss_supl20clientd_hisi (pid 1595)
  83. 2,578K: netd (pid 576)
  84. 2,403K: vendor.huawei.hardware.hwdisplay.displayengine@1.2-service (pid 613)
  85. 2,386K: hsensors (pid 676)
  86. 2,265K: locationhub (pid 683)
  87. 2,235K: vold (pid 498)
  88. 2,072K: accountmgr (pid 561)
  89. 2,066K: wpa_supplicant_hisi (pid 2244)
  90. 2,018K: keystore (pid 875)
  91. 2,001K: wifiservice (pid 688)
  92. 1,971K: aptouch_daemon (pid 750)
  93. 1,896K: bluetoothservic (pid 679)
  94. 1,889K: audio_sa (pid 678)
  95. 1,864K: hiaiserver (pid 917)
  96. 1,862K: nfcservice (pid 684)
  97. 1,861K: vendor.huawei.hardware.hivrar@1.3-service (pid 612)
  98. 1,813K: tee_auth_daemon (pid 648)
  99. 1,779K: installd (pid 874)
  100. 1,770K: gnss_control_hisi (pid 1592)
  101. 1,754K: storaged (pid 881)
  102. 1,739K: hwpged (pid 892)
  103. 1,651K: hwservicemanager (pid 484)
  104. 1,630K: emcomd (pid 847)
  105. 1,623K: deviceidsrv (pid 681)
  106. 1,617K: fusion_daemon (pid 957)
  107. 1,609K: netmanager (pid 677)
  108. 1,602K: telephony (pid 687)
  109. 1,595K: vendor.huawei.hardware.biometrics.fingerprint@2.1-service (pid 972)
  110. 1,575K: vendor.huawei.hardware.perfgenius@2.0-service (pid 622)
  111. 1,540K: vendor.huawei.hardware.wifi@1.1-service (pid 625)
  112. 1,501K: statsd (pid 880)
  113. 1,496K: android.hardware.keymaster@3.0-service (pid 495)
  114. 1,472K: resschedd (pid 686)
  115. 1,447K: bastetd (pid 902)
  116. 1,421K: vendor.huawei.hardware.iawareperf@1.0-service (pid 619)
  117. 1,412K: gnss_engine_hisi (pid 1591)
  118. 1,376K: chargemonitor (pid 967)
  119. 1,375K: vendor.huawei.hardware.hwsecurity-service (pid 617)
  120. 1,356K: activity_recognition_service (pid 587)
  121. 1,355K: media.metrics (pid 878)
  122. 1,340K: ITouchservice (pid 860)
  123. 1,338K: thermal-daemon (pid 883)
  124. 1,304K: vendor.huawei.hardware.sensors@1.2-service (pid 911)
  125. 1,244K: ueventd (pid 435)
  126. 1,244K: vendor.huawei.hardware.libteec@2.0-service (pid 497)
  127. 1,243K: vendor.huawei.hardware.gnss@1.2-service (pid 910)
  128. 1,223K: /init (pid 432)
  129. 1,221K: gatekeeperd (pid 923)
  130. 1,208K: wificond (pid 884)
  131. 1,193K: vendor.huawei.hardware.motion@1.0-service (pid 974)
  132. 1,192K: vendor.huawei.hardware.dubai@1.1-service (pid 609)
  133. 1,157K: hivrarserver (pid 848)
  134. 1,126K: vendor.huawei.hardware.tp@1.0-service (pid 624)
  135. 1,106K: android.hardware.secure_element@1.0-service (pid 604)
  136. 1,104K: adbd (pid 4756)
  137. 1,083K: incidentd (pid 870)
  138. 1,057K: vendor.huawei.hardware.power@1.0-service (pid 623)
  139. 1,055K: teecd (pid 496)
  140. 1,037K: vendor.huawei.hardware.hwdisplay@1.0-service (pid 614)
  141. 1,008K: hisecd (pid 768)
  142. 1,004K: /init (pid 433)
  143. 987K: android.hardware.configstore@1.1-service (pid 590)
  144. 971K: modemchr (pid 4208)
  145. 967K: vendor.huawei.hardware.hwfactoryinterface@1.1-service (pid 486)
  146. 954K: vendor.huawei.hardware.hisupl@1.0-service (pid 611)
  147. 952K: mediadrmserver (pid 876)
  148. 948K: android.hardware.bluetooth@1.0-service (pid 588)
  149. 927K: vendor.huawei.hardware.hwvibrator@1.1-service (pid 618)
  150. 923K: servicemanager (pid 483)
  151. 910K: thermalserviced (pid 630)
  152. 908K: android.hardware.gatekeeper@1.0-service (pid 594)
  153. 907K: android.hardware.cas@1.0-service (pid 589)
  154. 902K: hinetmanager (pid 938)
  155. 901K: drmserver (pid 867)
  156. 876K: vendor.huawei.hardware.graphics.mediacomm@2.0-service (pid 610)
  157. 873K: vndservicemanager (pid 485)
  158. 872K: android.hardware.health@2.0-service (pid 602)
  159. 871K: pmom_cat (pid 487)
  160. 868K: oam_hisi (pid 1590)
  161. 864K: vendor.huawei.hardware.light@2.0-service (pid 620)
  162. 858K: android.hardware.usb@1.0-service (pid 607)
  163. 858K: dumpsys (pid 9894)
  164. 851K: iGraphicsservice (pid 869)
  165. 814K: sh (pid 6478)
  166. 812K: android.hardware.memtrack@1.0-service (pid 603)
  167. 811K: android.hardware.thermal@1.0-service (pid 605)
  168. 807K: vendor.huawei.hardware.hwfs@1.0-service (pid 615)
  169. 790K: vendor.huawei.hardware.hwhiview@1.0-service (pid 616)
  170. 758K: healthd (pid 586)
  171. 728K: hdbd (pid 4757)
  172. 720K: storage_info (pid 968)
  173. 716K: chargelogcat-c (pid 5215)
  174. 689K: android.hidl.allocator@1.0-service (pid 585)
  175. 639K: irqbalance (pid 831)
  176. 619K: tombstoned (pid 929)
  177. 619K: octty (pid 1588)
  178. 618K: gnss_watchlssd_thirdparty (pid 1598)
  179. 599K: unrmd (pid 916)
  180. 572K: lmkd (pid 628)
  181. 545K: lss (pid 1611)
  182. 468K: powerlogd (pid 646)
  183. 467K: hw_ueventd (pid 854)
  184. 392K: oeminfo_nvm_server (pid 452)
  185. Total PSS by OOM adjustment:
  186. 464,333K: Native
  187. 66,679K: android.hardware.graphics.composer@2.2-service (pid 600)
  188. 58,698K: vendor.huawei.hardware.biometrics.hwfacerecognize@1.1-service (pid 852)
  189. 42,587K: CameraDaemon (pid 889)
  190. 23,824K: /init (pid 1)
  191. 22,586K: android.hardware.graphics.allocator@2.0-service (pid 595)
  192. 19,856K: surfaceflinger (pid 629)
  193. 12,241K: gpuassistant (pid 626)
  194. 11,140K: hiview (pid 927)
  195. 7,482K: zygote (pid 578)
  196. 6,801K: zygote64 (pid 577)
  197. 6,460K: webview_zygote (pid 2094)
  198. 6,419K: audioserver (pid 627)
  199. 6,369K: media.extractor (pid 877)
  200. 6,077K: dubaid (pid 868)
  201. 5,710K: media.codec (pid 890)
  202. 4,860K: distributeddata (pid 682)
  203. 4,547K: vendor.huawei.hardware.audio@4.0-service (pid 608)
  204. 4,458K: mediaserver (pid 879)
  205. 4,089K: cameraserver (pid 863)
  206. 4,048K: samgr (pid 564)
  207. 3,534K: logd (pid 482)
  208. 3,368K: rild (pid 903)
  209. 3,195K: displayengineserver (pid 866)
  210. 2,812K: gnss_supl20clientd_hisi (pid 1595)
  211. 2,578K: netd (pid 576)
  212. 2,403K: vendor.huawei.hardware.hwdisplay.displayengine@1.2-service (pid 613)
  213. 2,386K: hsensors (pid 676)
  214. 2,265K: locationhub (pid 683)
  215. 2,235K: vold (pid 498)
  216. 2,072K: accountmgr (pid 561)
  217. 2,066K: wpa_supplicant_hisi (pid 2244)
  218. 2,018K: keystore (pid 875)
  219. 2,001K: wifiservice (pid 688)
  220. 1,971K: aptouch_daemon (pid 750)
  221. 1,896K: bluetoothservic (pid 679)
  222. 1,889K: audio_sa (pid 678)
  223. 1,864K: hiaiserver (pid 917)
  224. 1,862K: nfcservice (pid 684)
  225. 1,861K: vendor.huawei.hardware.hivrar@1.3-service (pid 612)
  226. 1,813K: tee_auth_daemon (pid 648)
  227. 1,779K: installd (pid 874)
  228. 1,770K: gnss_control_hisi (pid 1592)
  229. 1,754K: storaged (pid 881)
  230. 1,739K: hwpged (pid 892)
  231. 1,651K: hwservicemanager (pid 484)
  232. 1,630K: emcomd (pid 847)
  233. 1,623K: deviceidsrv (pid 681)
  234. 1,617K: fusion_daemon (pid 957)
  235. 1,609K: netmanager (pid 677)
  236. 1,602K: telephony (pid 687)
  237. 1,595K: vendor.huawei.hardware.biometrics.fingerprint@2.1-service (pid 972)
  238. 1,575K: vendor.huawei.hardware.perfgenius@2.0-service (pid 622)
  239. 1,540K: vendor.huawei.hardware.wifi@1.1-service (pid 625)
  240. 1,501K: statsd (pid 880)
  241. 1,496K: android.hardware.keymaster@3.0-service (pid 495)
  242. 1,472K: resschedd (pid 686)
  243. 1,447K: bastetd (pid 902)
  244. 1,421K: vendor.huawei.hardware.iawareperf@1.0-service (pid 619)
  245. 1,412K: gnss_engine_hisi (pid 1591)
  246. 1,376K: chargemonitor (pid 967)
  247. 1,375K: vendor.huawei.hardware.hwsecurity-service (pid 617)
  248. 1,356K: activity_recognition_service (pid 587)
  249. 1,355K: media.metrics (pid 878)
  250. 1,340K: ITouchservice (pid 860)
  251. 1,338K: thermal-daemon (pid 883)
  252. 1,304K: vendor.huawei.hardware.sensors@1.2-service (pid 911)
  253. 1,244K: ueventd (pid 435)
  254. 1,244K: vendor.huawei.hardware.libteec@2.0-service (pid 497)
  255. 1,243K: vendor.huawei.hardware.gnss@1.2-service (pid 910)
  256. 1,223K: /init (pid 432)
  257. 1,221K: gatekeeperd (pid 923)
  258. 1,208K: wificond (pid 884)
  259. 1,193K: vendor.huawei.hardware.motion@1.0-service (pid 974)
  260. 1,192K: vendor.huawei.hardware.dubai@1.1-service (pid 609)
  261. 1,157K: hivrarserver (pid 848)
  262. 1,126K: vendor.huawei.hardware.tp@1.0-service (pid 624)
  263. 1,106K: android.hardware.secure_element@1.0-service (pid 604)
  264. 1,104K: adbd (pid 4756)
  265. 1,083K: incidentd (pid 870)
  266. 1,057K: vendor.huawei.hardware.power@1.0-service (pid 623)
  267. 1,055K: teecd (pid 496)
  268. 1,037K: vendor.huawei.hardware.hwdisplay@1.0-service (pid 614)
  269. 1,008K: hisecd (pid 768)
  270. 1,004K: /init (pid 433)
  271. 987K: android.hardware.configstore@1.1-service (pid 590)
  272. 971K: modemchr (pid 4208)
  273. 967K: vendor.huawei.hardware.hwfactoryinterface@1.1-service (pid 486)
  274. 954K: vendor.huawei.hardware.hisupl@1.0-service (pid 611)
  275. 952K: mediadrmserver (pid 876)
  276. 948K: android.hardware.bluetooth@1.0-service (pid 588)
  277. 927K: vendor.huawei.hardware.hwvibrator@1.1-service (pid 618)
  278. 923K: servicemanager (pid 483)
  279. 910K: thermalserviced (pid 630)
  280. 908K: android.hardware.gatekeeper@1.0-service (pid 594)
  281. 907K: android.hardware.cas@1.0-service (pid 589)
  282. 902K: hinetmanager (pid 938)
  283. 901K: drmserver (pid 867)
  284. 876K: vendor.huawei.hardware.graphics.mediacomm@2.0-service (pid 610)
  285. 873K: vndservicemanager (pid 485)
  286. 872K: android.hardware.health@2.0-service (pid 602)
  287. 871K: pmom_cat (pid 487)
  288. 868K: oam_hisi (pid 1590)
  289. 864K: vendor.huawei.hardware.light@2.0-service (pid 620)
  290. 858K: android.hardware.usb@1.0-service (pid 607)
  291. 858K: dumpsys (pid 9894)
  292. 851K: iGraphicsservice (pid 869)
  293. 814K: sh (pid 6478)
  294. 812K: android.hardware.memtrack@1.0-service (pid 603)
  295. 811K: android.hardware.thermal@1.0-service (pid 605)
  296. 807K: vendor.huawei.hardware.hwfs@1.0-service (pid 615)
  297. 790K: vendor.huawei.hardware.hwhiview@1.0-service (pid 616)
  298. 758K: healthd (pid 586)
  299. 728K: hdbd (pid 4757)
  300. 720K: storage_info (pid 968)
  301. 716K: chargelogcat-c (pid 5215)
  302. 689K: android.hidl.allocator@1.0-service (pid 585)
  303. 639K: irqbalance (pid 831)
  304. 619K: tombstoned (pid 929)
  305. 619K: octty (pid 1588)
  306. 618K: gnss_watchlssd_thirdparty (pid 1598)
  307. 599K: unrmd (pid 916)
  308. 572K: lmkd (pid 628)
  309. 545K: lss (pid 1611)
  310. 468K: powerlogd (pid 646)
  311. 467K: hw_ueventd (pid 854)
  312. 392K: oeminfo_nvm_server (pid 452)
  313. 182,930K: System
  314. 182,930K: system (pid 1730)
  315. 349,486K: Persistent
  316. 176,147K: com.android.systemui (pid 2079)
  317. 23,838K: com.huawei.HwOPServer (pid 2301)
  318. 21,170K: com.huawei.powergenie (pid 2356)
  319. 20,412K: com.android.phone (pid 2388)
  320. 19,604K: com.huawei.hiview (pid 2263)
  321. 18,266K: com.huawei.hiaction (pid 4816)
  322. 18,265K: ohos.distributedschedule.foundation (pid 2241)
  323. 16,227K: com.huawei.systemserver (pid 2196)
  324. 10,373K: com.huawei.nearby (pid 2283)
  325. 9,857K: com.huawei.android.pushagent.PushService (pid 4410)
  326. 9,549K: com.huawei.securityserver (pid 2328)
  327. 5,778K: com.android.supl (pid 4799)
  328. 144,268K: Foreground
  329. 77,986K: com.huawei.android.launcher (pid 2409 / activities)
  330. 35,905K: com.huawei.search (pid 9244)
  331. 30,377K: com.huawei.systemmanager:service (pid 2430)
  332. 147,049K: Visible
  333. 70,068K: com.huawei.hwid.core (pid 3058)
  334. 21,757K: com.huawei.hwid.persistent (pid 3183)
  335. 14,003K: com.huawei.lbs (pid 2177)
  336. 13,941K: com.huawei.hiai.engineservice (pid 5097)
  337. 13,305K: com.huawei.android.totemweather (pid 3743)
  338. 8,682K: com.huawei.vassistant:interactor (pid 4759)
  339. 5,293K: com.android.incallui (pid 3000)
  340. 30,546K: Perceptible
  341. 30,546K: com.baidu.input_huawei (pid 5024)
  342. 34,914K: A Services
  343. 21,142K: com.huawei.hiai (pid 5299)
  344. 13,772K: com.android.gallery3d:vision (pid 9618)
  345. 46,304K: B Services
  346. 21,133K: com.android.settings (pid 2060)
  347. 16,240K: android.process.media (pid 4836)
  348. 4,587K: com.huawei.android.UEInfoCheck (pid 7030)
  349. 4,344K: com.huawei.android.AutoRegSms (pid 7007)
  350. 599,923K: Cached
  351. 106,123K: com.huawei.vassistant (pid 6311)
  352. 84,180K: com.huawei.phoneservice (pid 8800)
  353. 66,836K: com.android.gallery3d (pid 8115)
  354. 50,879K: com.huawei.wallet (pid 7799)
  355. 41,872K: com.huawei.hilink.framework (pid 3338)
  356. 26,029K: com.android.contacts (pid 9416)
  357. 20,840K: com.huawei.recsys (pid 9707)
  358. 20,454K: com.huawei.android.thememanager (pid 8362)
  359. 18,822K: com.android.gallery3d:search (pid 8473)
  360. 17,824K: com.huawei.hidisk (pid 7188)
  361. 17,562K: android.process.acore (pid 5336)
  362. 16,027K: com.huawei.profile (pid 9730)
  363. 15,908K: com.huawei.hwid (pid 9025)
  364. 14,326K: com.huawei.hwid.container3 (pid 5757)
  365. 13,163K: com.huawei.android.hwouc (pid 8670)
  366. 12,233K: com.huawei.ohos.photos (pid 9549)
  367. 9,611K: com.huawei.webview:sandboxed_process0 (pid 8947)
  368. 9,497K: com.huawei.hwdetectrepair (pid 8882)
  369. 7,877K: com.huawei.tips (pid 9795)
  370. 7,424K: com.unionpay.tsmservice (pid 8635)
  371. 6,860K: com.android.providers.calendar (pid 8604)
  372. 6,404K: com.huawei.controlcenter:collaboration (pid 9829)
  373. 4,752K: com.huawei.deviceauth (pid 9060)
  374. 4,420K: com.android.se (pid 7871)
  375. Total PSS by category:
  376. 263,826K: Native
  377. 207,202K: .dex mmap
  378. 158,024K: EGL mtrack
  379. 146,942K: Dalvik
  380. 116,177K: .so mmap
  381. 101,276K: .art mmap
  382. 80,892K: GL mtrack
  383. 70,589K: .apk mmap
  384. 45,375K: Dalvik Other
  385. 43,709K: Unknown
  386. 38,920K: .oat mmap
  387. 13,996K: Other mmap
  388. 3,972K: Stack
  389. 3,480K: Ashmem
  390. 2,896K: .jar mmap
  391. 2,715K: Other dev
  392. 726K: .ttf mmap
  393. 12K: Cursor
  394. 0K: Gfx dev
  395. 0K: Other mtrack
  396. Total RAM: 3,801,164K (status normal)
  397. Free RAM: 2,429,415K ( 599,923K cached pss + 1,776,292K cached kernel + 53,200K free)
  398. Used RAM: 2,010,502K (1,399,830K used pss + 610,672K kernel)
  399. Lost RAM: 144,855K
  400. ZRAM: 215,668K physical used for 780,268K in swap (2,293,756K total swap)
  401. Tuning: 384 (large 512), oom 322,560K, restore limit 107,520K (high-end-gfx)
  402. HWJKM-HM:/ $

dumpsys cpuinfo 

  1. HWJKM-HM:/ $ dumpsys cpuinfo
  2. Load: 44.18 / 39.47 / 22.48
  3. CPU usage from 139050ms to 115532ms ago (2024-01-03 23:39:26.889 to 2024-01-03 23:39:50.408):
  4. 6.3% 1730/system_server: 4.1% user + 2.2% kernel / faults: 147 minor 4 major
  5. 2.3% 3058/com.huawei.hwid.core: 1.8% user + 0.5% kernel / faults: 1614 minor 20 major
  6. 1.4% 868/dubaid: 0.8% user + 0.5% kernel / faults: 269 minor 14 major
  7. 0.6% 9707/com.huawei.recsys: 0.3% user + 0.2% kernel / faults: 57 minor
  8. 0.5% 241/kworker/u16:2: 0% user + 0.5% kernel
  9. 0.5% 482/logd: 0.3% user + 0.1% kernel
  10. 0.4% 294/mmc-cmdqd/0: 0% user + 0.4% kernel
  11. 0.4% 606/kworker/u16:5: 0% user + 0.4% kernel
  12. 0.4% 1272/hisi_frw/0: 0% user + 0.4% kernel
  13. 0.4% 2263/com.huawei.hiview: 0.2% user + 0.2% kernel / faults: 840 minor 17 major
  14. 0.3% 154/kswapd0: 0% user + 0.3% kernel
  15. 0.3% 245/kworker/0:1H: 0% user + 0.3% kernel
  16. 0.3% 2301/com.huawei.HwOPServer: 0% user + 0.2% kernel / faults: 226 minor 16 major
  17. 0.3% 7/rcu_preempt: 0% user + 0.3% kernel
  18. 0.3% 2356/com.huawei.powergenie: 0.2% user + 0.1% kernel / faults: 66 minor 2 major
  19. 0.2% 623/vendor.huawei.hardware.power@1.0-service: 0% user + 0.2% kernel / faults: 1326 minor
  20. 0.2% 495/android.hardware.keymaster@3.0-service: 0% user + 0.2% kernel
  21. 0.2% 242/kworker/u16:3: 0% user + 0.2% kernel
  22. 0.2% 459/f2fs_gc-179:70: 0% user + 0.2% kernel
  23. 0.2% 6311/com.huawei.vassistant: 0% user + 0.1% kernel / faults: 677 minor 78 major
  24. 0.1% 576/netd: 0% user + 0.1% kernel / faults: 10 minor
  25. 0.1% 577/zygote64: 0% user + 0.1% kernel / faults: 74 minor
  26. 0% 578/zygote: 0% user + 0% kernel / faults: 523 minor 20 major
  27. 0.1% 603/android.hardware.memtrack@1.0-service: 0% user + 0% kernel
  28. 0.1% 831/irqbalance: 0% user + 0% kernel
  29. 0.1% 883/thermal-daemon: 0% user + 0.1% kernel
  30. 0.1% 1314/hisi_hcc: 0% user + 0.1% kernel
  31. 0.1% 1315/hisi_rxdata: 0% user + 0.1% kernel
  32. 0.1% 1591/gnss_engine_hisi: 0% user + 0% kernel
  33. 0.1% 2409/com.huawei.android.launcher: 0% user + 0% kernel
  34. 0.1% 2430/com.huawei.systemmanager:service: 0% user + 0% kernel / faults: 23 minor
  35. 0.1% 3304/sugov:0: 0% user + 0.1% kernel
  36. 0% 1//init: 0% user + 0% kernel / faults: 2 minor
  37. 0% 72/mailbox-16: 0% user + 0% kernel
  38. 0% 83/khungtaskd: 0% user + 0% kernel
  39. 0% 368/kworker/u16:4: 0% user + 0% kernel
  40. 0% 628/lmkd: 0% user + 0% kernel
  41. 0% 672/kworker/u16:8: 0% user + 0% kernel
  42. 0% 927/hiview: 0% user + 0% kernel / faults: 15 minor 1 major
  43. 0% 967/chargemonitor: 0% user + 0% kernel
  44. 0% 1268/oal_gpio_rx_dat: 0% user + 0% kernel
  45. 0% 4410/com.huawei.android.pushagent.PushService: 0% user + 0% kernel / faults: 5 minor 1 major
  46. 0% 4756/adbd: 0% user + 0% kernel
  47. 0% 3/ksoftirqd/0: 0% user + 0% kernel
  48. 0% 8/rcu_sched: 0% user + 0% kernel
  49. 0% 24/ksoftirqd/2: 0% user + 0% kernel
  50. 0% 30/ksoftirqd/3: 0% user + 0% kernel
  51. 0% 48/ksoftirqd/6: 0% user + 0% kernel
  52. 0% 289/kworker/5:2: 0% user + 0% kernel
  53. 0% 435/ueventd: 0% user + 0% kernel
  54. 0% 483/servicemanager: 0% user + 0% kernel
  55. 0% 586/healthd: 0% user + 0% kernel
  56. 0% 627/audioserver: 0% user + 0% kernel
  57. 0% 646/powerlogd: 0% user + 0% kernel
  58. 0% 842/kworker/2:1H: 0% user + 0% kernel
  59. 0% 866/displayengineserver: 0% user + 0% kernel
  60. 0% 875/keystore: 0% user + 0% kernel
  61. 0% 968/storage_info: 0% user + 0% kernel / faults: 55 minor 33 major
  62. 0% 991/file-storage: 0% user + 0% kernel
  63. 0% 1592/gnss_control_hisi: 0% user + 0% kernel
  64. 0% 1595/gnss_supl20clientd_hisi: 0% user + 0% kernel
  65. 0% 2082/kworker/1:2: 0% user + 0% kernel
  66. 0% 2196/com.huawei.systemserver: 0% user + 0% kernel
  67. 0% 4208/modemchr: 0% user + 0% kernel
  68. 0% 5215/chargelogcat-c: 0% user + 0% kernel
  69. 0% 8362/com.huawei.android.thememanager: 0% user + 0% kernel
  70. 0% 8635/com.unionpay.tsmservice: 0% user + 0% kernel
  71. 0% 8800/com.huawei.phoneservice: 0% user + 0% kernel
  72. 0% 9508/kworker/3:0: 0% user + 0% kernel
  73. 0% 9730/com.huawei.profile: 0% user + 0% kernel
  74. 0% 9851/kworker/2:1: 0% user + 0% kernel
  75. +0% 9898/com.huawei.hiviewtunnel: 0% user + 0% kernel
  76. +0% 9931/com.huawei.hilink.framework: 0% user + 0% kernel
  77. 5.4% TOTAL: 3.2% user + 1.6% kernel + 0.2% iowait + 0.1% irq + 0.2% softirq
  78. HWJKM-HM:/ $

adb结合 monkey(压测)
1.什么是monkey

Monkey 是Android SDK提供的一个命令行工具,可以简单方便的发送伪随机的用户事件流,对Android APP做压力(稳定性)测试。主要是为了测试app是否存在无响应和崩溃的情况。

随机应用-随机操作

adb shell monkey 100:对该设备下,随机应用,执行100次的随机操作。(伪随机)

 日志打印到文件中  adb  shell  monkey 100 > D:/log.txt

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小惠珠哦/article/detail/916161
推荐阅读
相关标签
  

闽ICP备14008679号