Java自动化测试(adb常用命令 32)

时间:2022-07-26
本文章向大家介绍Java自动化测试(adb常用命令 32),主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

adb

adb「Android Bebug Bridge」是用来连接安卓和PC的桥梁

常用操作:

  • 安装卸载apk
  • 推送拷贝文件
  • 查看设备硬件信息
  • 查看应用程序占用资源
  • 在设备执行shell命令

常用命令

帮助命令

$ adb help

检测连接到电脑的安卓设备

$ adb devices
$ adb connect 127.0.0.1:62001

从手机上拉取信息到电脑上

$ adb pull <手机路径> <本地路径>

从电脑上提交信息到手机上

路径不能有中文和特殊字符

$ adb push <本地路径> <手机路径>

安装软件

$ adb install <本地软件路径>

卸载软件

$ adb uninstall <包名>

登录设备进入shell

$ adb shell

终止adb服务

$ adb kill-server

启动adb服务

$ adb start-server

启动App

$ adb shell am start -n <包名>/<入口>

清除应用数据和缓存

$ adb shell pm clear <包名>

坐标点击

$ adb shell input tap x坐标 y坐标

列出所有包名

$ adb shell pm list packages 
$ -s 系统apk路径及包名
$ -3 用户apk路径及包名

打印日志

$ adb logcat
$ adb logcat > <本地路径>

截图

$ adb shell screencap -p /sdcard/Pictures/Screenshots/a.png

appium打印内容解析(了解)

启动Appium的欢迎信息

[Appium] Welcome to Appium v1.17.1
[Appium] Non-default server args:
[Appium]   address: 127.0.0.1
[Appium]   allowInsecure: {
[Appium]   }
[Appium]   denyInsecure: {
[Appium]   }
[Appium] Appium REST http interface listener started on 127.0.0.1:4723
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"appActivity":"com.lemon.lemonban.activity.WelcomeActivity","appPackage":"com.lemon.lemonban","platformName":"Android","deviceName":"127.0.0.1:62001"},"capabilities":{"firstMatch":[{"appium:appActivity":"com.lemon.lemonban.activity.WelcomeActivity","appium:appPackage":"com.lemon.lemonban","appium:deviceName":"127.0.0.1:62001","platformName":"android"}]}}
[W3C] Calling AppiumDriver.createSession() with args: [{"appActivity":"com.lemon.lemonban.activity.WelcomeActivity","appPackage":"com.lemon.lemonban","platformName":"Android","deviceName":"127.0.0.1:62001"},null,{"firstMatch":[{"appium:appActivity":"com.lemon.lemonban.activity.WelcomeActivity","appium:appPackage":"com.lemon.lemonban","appium:deviceName":"127.0.0.1:62001","platformName":"android"}]}]
[BaseDriver] Event 'newSessionRequested' logged at 1601112368099 (17:26:08 GMT+0800 (中国标准时间))
[Appium] 
[Appium] ======================================================================
[Appium]   DEPRECATION WARNING:
[Appium] 
[Appium]   The 'automationName' capability was not provided in the desired 
[Appium]   capabilities for this Android session
[Appium] 
[Appium]   Setting 'automationName=UiAutomator2' by default and using the 
[Appium]   UiAutomator2 Driver
[Appium] 
[Appium]   The next major version of Appium (2.x) will **require** the 
[Appium]   'automationName' capability to be set for all sessions on all 
[Appium]   platforms
[Appium] 
[Appium]   In previous versions (Appium <= 1.13.x), the default was 
[Appium]   'automationName=UiAutomator1'
[Appium] 
[Appium]   If you wish to use that automation instead of UiAutomator2, please 
[Appium]   add 'automationName=UiAutomator1' to your desired capabilities
[Appium] 
[Appium]   For more information about drivers, please visit 
[Appium]   http://appium.io/docs/en/about-appium/intro/ and explore the 
[Appium]   'Drivers' menu
[Appium] 
[Appium] ======================================================================
[Appium] 
[Appium] Appium v1.17.1 creating new AndroidUiautomator2Driver (v1.44.2) session
[BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided
[BaseDriver] Creating session with W3C capabilities: {
[BaseDriver]   "alwaysMatch": {
[BaseDriver]     "platformName": "android",
[BaseDriver]     "appium:appActivity": "com.lemon.lemonban.activity.WelcomeActivity",
[BaseDriver]     "appium:appPackage": "com.lemon.lemonban",
[BaseDriver]     "appium:deviceName": "127.0.0.1:62001"
[BaseDriver]   },
[BaseDriver]   "firstMatch": [
[BaseDriver]     {}
[BaseDriver]   ]
[BaseDriver] }
[BaseDriver] Session created with session id: 56b02400-065d-4d7e-8a8f-a074c85ef643
[UiAutomator2] Starting 'com.lemon.lemonban' directly on the device

使用环境变量中配置的adb.exe

[ADB] Found 1 'build-tools' folders under '/Users/zhongxin/Library/Android/sdk' (newest first):
[ADB]     /Users/zhongxin/Library/Android/sdk/build-tools/30.0.2
[ADB] Using 'adb' from '/Users/zhongxin/Library/Android/sdk/platform-tools/adb'

[AndroidDriver] Retrieving device list
[ADB] Trying to find a connected android device
[ADB] Getting connected devices...
[ADB] Connected devices: [{"udid":"127.0.0.1:62001","state":"device"}]
[AndroidDriver] Using device: 127.0.0.1:62001

连接设备,并检测设备API版本号

[ADB] Using 'adb' from '/Users/zhongxin/Library/Android/sdk/platform-tools/adb'
[ADB] Setting device id to 127.0.0.1:62001
[ADB] Running '/Users/zhongxin/Library/Android/sdk/platform-tools/adb -P 5037 -s 127.0.0.1:62001 shell getprop ro.build.version.sdk'
[ADB] Current device property 'ro.build.version.sdk': 25
[ADB] Device API level: 25


[AndroidDriver] No app sent in, not parsing package/activity

等待设备连接

[ADB] Running '/Users/zhongxin/Library/Android/sdk/platform-tools/adb -P 5037 -s 127.0.0.1:62001 wait-for-device'
[ADB] Running '/Users/zhongxin/Library/Android/sdk/platform-tools/adb -P 5037 -s 127.0.0.1:62001 shell echo ping'

[AndroidDriver] Pushing settings apk to device...
[ADB] Getting install status for io.appium.settings

检测Appium Setting安装状态

[ADB] Running '/Users/zhongxin/Library/Android/sdk/platform-tools/adb -P 5037 -s 127.0.0.1:62001 shell dumpsys package io.appium.settings'
[ADB] 'io.appium.settings' is installed

[ADB] Getting package info for 'io.appium.settings'
[ADB] Running '/Users/zhongxin/Library/Android/sdk/platform-tools/adb -P 5037 -s 127.0.0.1:62001 shell dumpsys package io.appium.settings'
[ADB] The version name of the installed 'io.appium.settings' is greater or equal to the application version name ('3.1.0' >= '3.1.0')
[ADB] There is no need to install/upgrade '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/io.appium.settings/apks/settings_apk-debug.apk'
[ADB] Getting IDs of all 'io.appium.settings' processes
[ADB] Running '/Users/zhongxin/Library/Android/sdk/platform-tools/adb -P 5037 -s 127.0.0.1:62001 shell 'pgrep --help; echo $?''
[ADB] Running '/Users/zhongxin/Library/Android/sdk/platform-tools/adb -P 5037 -s 127.0.0.1:62001 shell 'pgrep ^appium\.settings$ || pgrep ^io\.appium\.setti$''
[AndroidDriver] io.appium.settings is already running. There is no need to reset its permissions.
[ADB] Running '/Users/zhongxin/Library/Android/sdk/platform-tools/adb -P 5037 -s 127.0.0.1:62001 shell appops set io.appium.settings android:mock_location allow'
[Logcat] Starting logcat capture

端口转发Appium Server端口8200连接到设备部中UiAutomator2 Server 6790

[UiAutomator2] Forwarding UiAutomator2 Server port 6790 to 8200
[ADB] Forwarding system: 8200 to device: 6790
[ADB] Running '/Users/zhongxin/Library/Android/sdk/platform-tools/adb -P 5037 -s 127.0.0.1:62001 forward tcp:8200 tcp:6790'

检测uiautomator2.serveruiautomator2.server.test安装状态

[ADB] Getting install status for io.appium.uiautomator2.server
[ADB] Running '/Users/zhongxin/Library/Android/sdk/platform-tools/adb -P 5037 -s 127.0.0.1:62001 shell dumpsys package io.appium.uiautomator2.server'
[ADB] 'io.appium.uiautomator2.server' is installed
[ADB] Getting package info for 'io.appium.uiautomator2.server'
[ADB] Running '/Users/zhongxin/Library/Android/sdk/platform-tools/adb -P 5037 -s 127.0.0.1:62001 shell dumpsys package io.appium.uiautomator2.server'
[ADB] The version name of the installed 'io.appium.uiautomator2.server' is greater or equal to the application version name ('4.5.5' >= '4.5.5')
[UiAutomator2] io.appium.uiautomator2.server installation state: sameVersionInstalled

验证uiautomator2.serveruiautomator2.server.test证书

[ADB] Checking app cert for /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.5.5.apk
[ADB] Using 'apksigner.jar' from '/Users/zhongxin/Library/Android/sdk/build-tools/30.0.2/lib/apksigner.jar'
[ADB] Starting apksigner: /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/bin/java -Xmx1024M -Xss1m -jar /Users/zhongxin/Library/Android/sdk/build-tools/30.0.2/lib/apksigner.jar verify --print-certs /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.5.5.apk
[ADB] apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[ADB] 
[ADB] '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.5.5.apk' is signed with the default certificate
[ADB] Getting install status for io.appium.uiautomator2.server.test
[ADB] Running '/Users/zhongxin/Library/Android/sdk/platform-tools/adb -P 5037 -s 127.0.0.1:62001 shell dumpsys package io.appium.uiautomator2.server.test'
[ADB] 'io.appium.uiautomator2.server.test' is installed
[ADB] Checking app cert for /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk
[ADB] Starting apksigner: /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/bin/java -Xmx1024M -Xss1m -jar /Users/zhongxin/Library/Android/sdk/build-tools/30.0.2/lib/apksigner.jar verify --print-certs /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk
[ADB] apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[ADB] 
[ADB] '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk' is signed with the default certificate
[UiAutomator2] Server packages are not going to be (re)installed
[UiAutomator2] Waiting up to 30000ms for services to be available
[ADB] Running '/Users/zhongxin/Library/Android/sdk/platform-tools/adb -P 5037 -s 127.0.0.1:62001 shell pm list instrumentation'
[UiAutomator2] Instrumentation target 'io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner' is available
[UiAutomator2] No app capability. Assuming it is already on the device

检测柠檬班App安装状态

[ADB] Getting install status for com.lemon.lemonban
[ADB] Running '/Users/zhongxin/Library/Android/sdk/platform-tools/adb -P 5037 -s 127.0.0.1:62001 shell dumpsys package com.lemon.lemonban'
[ADB] 'com.lemon.lemonban' is installed

强制关闭和清空柠檬班app的缓存

[ADB] Running '/Users/zhongxin/Library/Android/sdk/platform-tools/adb -P 5037 -s 127.0.0.1:62001 shell am force-stop com.lemon.lemonban'
[ADB] Running '/Users/zhongxin/Library/Android/sdk/platform-tools/adb -P 5037 -s 127.0.0.1:62001 shell pm clear com.lemon.lemonban'
[AndroidDriver] Performed fast reset on the installed 'com.lemon.lemonban' application (stop and clear)
[UiAutomator2] Performing shallow cleanup of automation leftovers
[UiAutomator2] No obsolete sessions have been detected (Error: socket hang up)
[ADB] Running '/Users/zhongxin/Library/Android/sdk/platform-tools/adb -P 5037 -s 127.0.0.1:62001 shell am force-stop io.appium.uiautomator2.server.test'
[UiAutomator2] Starting UIAutomator2 server 4.5.5
[UiAutomator2] Using UIAutomator2 server from '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.5.5.apk' and test from '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk'
[UiAutomator2] Waiting up to 30000ms for UiAutomator2 to be online...
[ADB] Creating ADB subprocess with args: ["-P",5037,"-s","127.0.0.1:62001","shell","am","instrument","-w","io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner"]
[Instrumentation] io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:
[WD Proxy] Matched '/status' to command name 'getStatus'
[WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body
[WD Proxy] Got response with unknown status: {"code":"ECONNRESET"}
[WD Proxy] Matched '/status' to command name 'getStatus'
[WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body
[WD Proxy] Got response with status 200: {"sessionId":"None","value":{"ready":true,"message":"UiAutomator2 Server is ready to accept commands"}}
[UiAutomator2] The initialization of the instrumentation process took 2035ms
[WD Proxy] Matched '/session' to command name 'createSession'
[WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8200/wd/hub/session] with body: {"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","appActivity":"com.lemon.lemonban.activity.WelcomeActivity","appPackage":"com.lemon.lemonban","deviceName":"127.0.0.1:62001"},"platformName":"android","appActivity":"com.lemon.lemonban.activity.WelcomeActivity","appPackage":"com.lemon.lemonban","deviceName":"127.0.0.1:62001","deviceUDID":"127.0.0.1:62001"}],"alwaysMatch":{}}}
[WD Proxy] Got response with status 200: {"sessionId":"9d7c96d1-9a56-41dc-ae9a-82078c4f7597","value":{"sessionId":"9d7c96d1-9a56-41dc-ae9a-82078c4f7597","capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","appActivity":"com.lemon.lemonban.activity.WelcomeActivity","appPackage":"com.lemon.lemonban","deviceName":"127.0.0.1:62001"},"platformName":"android","appActivity":"com.lemon.lemonban.activity.WelcomeActivity","appPackage":"com.lemon.lemonban","deviceName":"127.0.0.1:62001","deviceUDID":"127.0.0.1:62001"}],"alwaysMatch":{}}}}
[WD Proxy] Determined the downstream protocol as 'W3C'
[WD Proxy] Proxying [GET /appium/device/info] to [GET http://127.0.0.1:8200/wd/hub/session/9d7c96d1-9a56-41dc-ae9a-82078c4f7597/appium/device/info] with no body
[WD Proxy] Got response with status 200: {"sessionId":"9d7c96d1-9a56-41dc-ae9a-82078c4f7597","value":{"androidId":"784F438584880000","manufacturer":"samsung","model":"SM-N950N","brand":"samsung","apiVersion":"25","platformVersion":"7.1.2","carrierName":"CMCC","realDisplaySize":"900x1600","displayDensity":320,"networks":[{"type":1,"typeName":"WIFI","subtype":0,"subtypeName":"","isConnected":true,"detailedState":"CONNECTED","state":"CONNECTED","extraInfo":""WiredSSID"","isAvailable":true,"isFailover":false,"isRoaming":false,"capabilities":{"transportTypes":"TRANSPORT_WIFI","networkCapabilities":"NET_CAPABILITY_NOT_METERED,NET_CAPABILITY_NOT_RESTRICTED,NET_CAPABILITY_NOT_VPN,NET_CAPABILITY_NOT_ROAMING,NET_CAPABILITY_INTERNET,NET_CAPABILITY_TRUSTED,NET_CAPABILITY_VALIDATED","linkUpstreamBandwidthKbps":1048576,"linkDownBandwidthKbps":1048576,"signalStrength":-55,"networkSpecifier":null,"SSID":null}}],"locale":"zh_CN","timeZone":"Asia/Shanghai","bluetooth":{"state":"OFF"}}}
[ADB] Running '/Users/zhongxin/Library/Android/sdk/platform-tools/adb -P 5037 -s 127.0.0.1:62001 shell dumpsys window'
[AndroidDriver] Screen already unlocked, doing nothing
[UiAutomator2] Starting 'com.lemon.lemonban/com.lemon.lemonban.activity.WelcomeActivity and waiting for 'com.lemon.lemonban/com.lemon.lemonban.activity.WelcomeActivity'

启动柠檬班App

[ADB] Running '/Users/zhongxin/Library/Android/sdk/platform-tools/adb -P 5037 -s 127.0.0.1:62001 shell am start -W -n com.lemon.lemonban/com.lemon.lemonban.activity.WelcomeActivity -S'
[WD Proxy] Proxying [GET /appium/device/pixel_ratio] to [GET http://127.0.0.1:8200/wd/hub/session/9d7c96d1-9a56-41dc-ae9a-82078c4f7597/appium/device/pixel_ratio] with body: {}
[WD Proxy] Got response with status 200: {"sessionId":"9d7c96d1-9a56-41dc-ae9a-82078c4f7597","value":2}
[WD Proxy] Matched '/appium/device/system_bars' to command name 'getSystemBars'
[WD Proxy] Proxying [GET /appium/device/system_bars] to [GET http://127.0.0.1:8200/wd/hub/session/9d7c96d1-9a56-41dc-ae9a-82078c4f7597/appium/device/system_bars] with body: {}
[WD Proxy] Got response with status 200: {"sessionId":"9d7c96d1-9a56-41dc-ae9a-82078c4f7597","value":{"statusBar":48}}
[WD Proxy] Matched '/window/current/size' to command name 'getWindowSize'
[WD Proxy] Proxying [GET /window/current/size] to [GET http://127.0.0.1:8200/wd/hub/session/9d7c96d1-9a56-41dc-ae9a-82078c4f7597/window/current/size] with body: {}
[WD Proxy] Got response with status 200: {"sessionId":"9d7c96d1-9a56-41dc-ae9a-82078c4f7597","value":{"height":1600,"width":900}}
[Appium] New AndroidUiautomator2Driver session created successfully, session 56b02400-065d-4d7e-8a8f-a074c85ef643 added to master session list
[BaseDriver] Event 'newSessionStarted' logged at 1601112375537 (17:26:15 GMT+0800 (中国标准时间))
[W3C (56b02400)] Cached the protocol value 'W3C' for the new session 56b02400-065d-4d7e-8a8f-a074c85ef643
[W3C (56b02400)] Responding to client with driver.createSession() result: {"capabilities":{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","appActivity":"com.lemon.lemonban.activity.WelcomeActivity","appPackage":"com.lemon.lemonban","deviceName":"127.0.0.1:62001"},"platformName":"android","appActivity":"com.lemon.lemonban.activity.WelcomeActivity","appPackage":"com.lemon.lemonban","deviceName":"127.0.0.1:62001","deviceUDID":"127.0.0.1:62001","deviceApiLevel":25,"platformVersion":"7.1.2","deviceScreenSize":"900x1600","deviceScreenDensity":320,"deviceModel":"SM-N950N","deviceManufacturer":"samsung","pixelRatio":2,"statBarHeight":48,"viewportRect":{"left":0,"top":48,"width":900,"height":1552}}}
[HTTP] <-- POST /wd/hub/session 200 7445 ms - 869
[HTTP] 
[HTTP] --> GET /wd/hub/session/56b02400-065d-4d7e-8a8f-a074c85ef643
[HTTP] {}
[W3C (56b02400)] Calling AppiumDriver.getSession() with args: ["56b02400-065d-4d7e-8a8f-a074c85ef643"]
[UiAutomator2] Getting session details from server to mix in
[WD Proxy] Matched '/' to command name 'getSession'
[WD Proxy] Proxying [GET /] to [GET http://127.0.0.1:8200/wd/hub/session/9d7c96d1-9a56-41dc-ae9a-82078c4f7597] with body: {}
[WD Proxy] Got response with status 200: {"sessionId":"9d7c96d1-9a56-41dc-ae9a-82078c4f7597","value":{}}
[W3C (56b02400)] Responding to client with driver.getSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","appActivity":"com.lemon.lemonban.activity.WelcomeActivity","appPackage":"com.lemon.lemonban","deviceName":"127.0.0.1:62001"},"platformName":"android","appActivity":"com.lemon.lemonban.activity.WelcomeActivity","appPackage":"com.lemon.lemonban","deviceName":"127.0.0.1:62001","deviceUDID":"127.0.0.1:62001","deviceApiLevel":25,"platformVersion":"7.1.2","deviceScreenSize":"900x1600","deviceScreenDensity":320,"deviceModel":"SM-N950N","deviceManufacturer":"samsung","pixelRatio":2,"statBarHeight":48,"viewportRect":{"left":0,"top":48,"width":900,"height":1552}}
[HTTP] <-- GET /wd/hub/session/56b02400-065d-4d7e-8a8f-a074c85ef643 200 8 ms - 801
[HTTP] 
[HTTP] --> GET /wd/hub/session/56b02400-065d-4d7e-8a8f-a074c85ef643
[HTTP] {}
[W3C (56b02400)] Calling AppiumDriver.getSession() with args: ["56b02400-065d-4d7e-8a8f-a074c85ef643"]
[UiAutomator2] Getting session details from server to mix in
[WD Proxy] Matched '/' to command name 'getSession'
[WD Proxy] Proxying [GET /] to [GET http://127.0.0.1:8200/wd/hub/session/9d7c96d1-9a56-41dc-ae9a-82078c4f7597] with body: {}
[WD Proxy] Got response with status 200: {"sessionId":"9d7c96d1-9a56-41dc-ae9a-82078c4f7597","value":{}}
[W3C (56b02400)] Responding to client with driver.getSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","appActivity":"com.lemon.lemonban.activity.WelcomeActivity","appPackage":"com.lemon.lemonban","deviceName":"127.0.0.1:62001"},"platformName":"android","appActivity":"com.lemon.lemonban.activity.WelcomeActivity","appPackage":"com.lemon.lemonban","deviceName":"127.0.0.1:62001","deviceUDID":"127.0.0.1:62001","deviceApiLevel":25,"platformVersion":"7.1.2","deviceScreenSize":"900x1600","deviceScreenDensity":320,"deviceModel":"SM-N950N","deviceManufacturer":"samsung","pixelRatio":2,"statBarHeight":48,"viewportRect":{"left":0,"top":48,"width":900,"height":1552}}
[HTTP] <-- GET /wd/hub/session/56b02400-065d-4d7e-8a8f-a074c85ef643 200 10 ms - 801
[HTTP] 
[BaseDriver] Shutting down because we waited 60 seconds for a command
[Appium] Closing session, cause was 'New Command Timeout of 60 seconds expired. Try customizing the timeout using the 'newCommandTimeout' desired capability'
[Appium] Removing session '56b02400-065d-4d7e-8a8f-a074c85ef643' from our master session list
[UiAutomator2] Deleting UiAutomator2 session
[UiAutomator2] Deleting UiAutomator2 server session
[WD Proxy] Matched '/' to command name 'deleteSession'
[WD Proxy] Proxying [DELETE /] to [DELETE http://127.0.0.1:8200/wd/hub/session/9d7c96d1-9a56-41dc-ae9a-82078c4f7597] with no body
[WD Proxy] Got response with status 200: {"sessionId":"9d7c96d1-9a56-41dc-ae9a-82078c4f7597","value":null}
[ADB] Running '/Users/zhongxin/Library/Android/sdk/platform-tools/adb -P 5037 -s 127.0.0.1:62001 shell am force-stop com.lemon.lemonban'
[Instrumentation] .
[Instrumentation] Time: 63.052
[Instrumentation] 
[Instrumentation] OK (1 test)
[Instrumentation] The process has exited with code 0
[Logcat] Stopping logcat capture
[ADB] Removing forwarded port socket connection: 8200 
[ADB] Running '/Users/zhongxin/Library/Android/sdk/platform-tools/adb -P 5037 -s 127.0.0.1:62001 forward --remove tcp:8200'