init-vendor.sh 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/bash -
  2. #
  3. set -e
  4. # Verisons modify here
  5. ATX_AGENT_VERSION=0.3.0
  6. UIAUTOMATOR_APK_VERSION=1.0.13
  7. # Download resources
  8. mkdir -p vendor
  9. download_apk(){
  10. APK_BASE_URL="https://github.com/openatx/android-uiautomator-server/releases/download/${UIAUTOMATOR_APK_VERSION}"
  11. wget -O vendor/app-uiautomator.apk "$APK_BASE_URL/app-uiautomator.apk"
  12. wget -O vendor/app-uiautomator-test.apk "$APK_BASE_URL/app-uiautomator-test.apk"
  13. }
  14. download_stf(){
  15. ## minicap+minitouch
  16. wget -O vendor/stf-binaries.zip "https://github.com/codeskyblue/stf-binaries/archive/master.zip"
  17. unzip -o -d vendor/ vendor/stf-binaries.zip
  18. }
  19. download_atx(){
  20. ## atx-agent
  21. wget -O vendor/atx-agent-$ATX_AGENT_VERSION.tar.gz "https://github.com/openatx/atx-agent/releases/download/$ATX_AGENT_VERSION/atx-agent_${ATX_AGENT_VERSION}_linux_armv6.tar.gz"
  22. tar -C vendor/ -xzvf vendor/atx-agent-$ATX_AGENT_VERSION.tar.gz atx-agent
  23. }
  24. download_atx
  25. download_apk
  26. download_stf
  27. echo "Everything is downloaded. ^_^"