Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #!/bin/bash | |
| 2 | |
| 3 if [[ $# -ne 2 ]]; then | |
| 4 cat <<'EOF' | |
| 5 Usage: adb_remote_setup.sh REMOTE_HOST REMOTE_ADB | |
| 6 | |
| 7 Configures adb on a remote machine to communicate with a device attached to the | |
| 8 local machine. This is useful for installing APKs, running tests, etc while | |
| 9 working remotely. | |
| 10 | |
| 11 Arguments: | |
| 12 REMOTE_HOST hostname of remote machine | |
| 13 REMOTE_ADB path to adb on the remote machine | |
| 14 EOF | |
| 15 exit 1 | |
| 16 fi | |
| 17 | |
| 18 remote_host="$1" | |
| 19 remote_adb="$2" | |
| 20 | |
| 21 if which kinit >/dev/null; then | |
| 22 # Allow ssh to succeed without typing your password multiple times. | |
| 23 kinit -R || kinit | |
| 24 fi | |
| 25 | |
| 26 # Kill the adb server on the remote host. | |
| 27 ssh "$remote_host" "$remote_adb kill-server" | |
| 28 | |
| 29 # Start the adb server locally. | |
| 30 adb start-server | |
| 31 | |
| 32 # Forward various ports from the remote host to the local host: | |
| 33 # 5037: adb | |
| 34 # 8001: http server | |
| 35 # 9031: sync server | |
| 36 # 10000: net unittests | |
| 37 # 10201: net unittests | |
| 38 ssh -C \ | |
| 39 -R 5037:localhost:5037 \ | |
|
nyquist
2013/12/20 23:18:59
Could you read these ports out from build/android/
| |
| 40 -L 8001:localhost:8001 \ | |
| 41 -L 9031:localhost:9031 \ | |
| 42 -R 10000:localhost:10000 \ | |
| 43 -R 10201:localhost:10201 \ | |
| 44 "$remote_host" | |
| OLD | NEW |