Skip to content

Force Start Json Server

thlengane edited this page Mar 24, 2017 · 4 revisions

Trying to get the server running but struggling?? Maybe you are getting "Parse error", or "Connection reset".....or even gradlew cC get stuck at 96% or so???

The following steps will get you working even with all this troubles, I have tested this several times on Windows. It should work as well on Linux. Please follow them exactly, otherwise it will not work.

  1. Create a batch file and name it start_server.bat

  2. Paste the following in order into your start_server.bat

    • adb shell pm uninstall com.github.uiautomator
    • adb shell pm uninstall com.github.uiautomator.test
    • adb forward tcp:9008 tcp:9008
    • cd c:\Android\android-uiautomator-server-master\
    • gradlew cC
  3. Replace the "android-uiautomator-server-master" dir and point it to where yours is placed

  4. Save and run the batch file

Note that gradlew cC will get stuck at 96% or so but the server has started. Go and try it in python, everything should be working.

If adb server stops, or disconnected or unplug and plug phone....just run the batch file again and continue.

NB: This works with one device connected, the problem is I don't know how to specify the device in the gradlew staff. If anyone knows, please edit on this.

Clone this wiki locally