uiautomator icon indicating copy to clipboard operation
uiautomator copied to clipboard

curl -d '{"jsonrpc":"2.0","method":"deviceInfo","id":1}' localhost:9008/jsonrpc/0

Open cuijinquan opened this issue 9 years ago • 3 comments

1.adb shell uiautomator runtest uiautomator-stub.jar bundle.jar -c com.github.uiautomatorstub.Stub

INSTRUMENTATION_STATUS: numtests=1 INSTRUMENTATION_STATUS: stream= com.github.uiautomatorstub.Stub: INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner INSTRUMENTATION_STATUS: test=testUIAutomatorStub INSTRUMENTATION_STATUS: class=com.github.uiautomatorstub.Stub INSTRUMENTATION_STATUS: current=1 INSTRUMENTATION_STATUS_CODE: 1

2.adb forward --list 4d002628ca0eb100 tcp:9008 tcp:9008

3.curl -d '{"jsonrpc":"2.0","method":"deviceInfo","id":1}' localhost:9008/jsonrpc/0 but i get the wrong message:{"jsonrpc":"jsonrpc","id":"null","error":{"code":-32700,"message":"Parse error"}}.

cuijinquan avatar Nov 15 '15 07:11 cuijinquan

json parsing error. What device are you testing? Please upload the logcat, else I have no change to fix it.

xiaocong avatar Nov 16 '15 04:11 xiaocong

here is the logcat

D/UIAutomatorStub(11094): URI: /jsonrpc/0, Method: POST, Header: {accept=/, content-length=38, remote-addr=127.0.0.1, host=localhost:9008, http-client-ip=127.0.0.1, user-agent=curl/7.48.0, content-type=application/x-www-form-urlencoded}, params, {NanoHttpd.QUERY_STRING='{jsonrpc:2.0,method:deviceInfo,id:1}', '{jsonrpc:2.0,method:deviceInfo,id:1}'=}, files: {} D/SSRM:n ( 1004): SIOP:: AP = 320 E/SMD ( 289): DCD OFF

thlengane avatar Mar 23 '17 12:03 thlengane

我遇到了这个问题,原因是本地开了代理,关闭代理即可。

PJ-One avatar Sep 16 '22 09:09 PJ-One