OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # Copyright 2015 The Chromium Authors. All rights reserved. | 2 # Copyright 2015 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 if [[ $# -ne 1 && $# -ne 2 ]]; then | 6 if [[ $# -ne 1 && $# -ne 2 ]]; then |
7 cat <<'EOF' | 7 cat <<'EOF' |
8 Usage: remote_adb_setup REMOTE_HOST [REMOTE_ADB] | 8 Usage: remote_adb_setup REMOTE_HOST [REMOTE_ADB] |
9 | 9 |
10 Configures adb on a remote machine to communicate with a device attached to the | 10 Configures adb on a remote machine to communicate with a device attached to the |
(...skipping 26 matching lines...) Expand all Loading... |
37 ssh "$remote_host" "$remote_adb kill-server" | 37 ssh "$remote_host" "$remote_adb kill-server" |
38 | 38 |
39 # Start the adb server locally. | 39 # Start the adb server locally. |
40 adb start-server | 40 adb start-server |
41 | 41 |
42 # Forward various ports from the remote host to the local host: | 42 # Forward various ports from the remote host to the local host: |
43 # 5037: adb | 43 # 5037: adb |
44 # and from the local host to the remote host: | 44 # and from the local host to the remote host: |
45 # 9998: http server for Sky | 45 # 9998: http server for Sky |
46 # 31840: http server for the local mojo: origin | 46 # 31840: http server for the local mojo: origin |
| 47 # 31839: http server for https://core.mojoapps.io |
47 ssh -C \ | 48 ssh -C \ |
48 -R 5037:127.0.0.1:5037 \ | 49 -R 5037:127.0.0.1:5037 \ |
49 -L 9998:127.0.0.1:9998 \ | 50 -L 9998:127.0.0.1:9998 \ |
| 51 -L 31839:127.0.0.1:31839 \ |
50 -L 31840:127.0.0.1:31840 \ | 52 -L 31840:127.0.0.1:31840 \ |
51 "$remote_host" | 53 "$remote_host" |
OLD | NEW |