OLD | NEW |
---|---|
1 # Running Blimp | 1 # Running Blimp |
2 [TOC] | 2 [TOC] |
3 | 3 |
4 See [build](build.md) for instructions on how to build Blimp. | 4 See [build](build.md) for instructions on how to build Blimp. |
5 | 5 |
6 ## Android Client | 6 ## Android Client |
7 | 7 |
8 ### Installing the client | 8 ### Installing the client |
9 | 9 |
10 Install the Blimp APK with the following: | 10 Install the Chrome Public APK with the following: |
11 | 11 |
12 ```bash | 12 ```bash |
13 ./build/android/adb_install_apk.py $(PRODUCT_DIR)/apks/Blimp.apk | 13 ./build/android/adb_install_apk.py $(PRODUCT_DIR)/apks/ChromePublic.apk |
14 ``` | 14 ``` |
15 | 15 |
16 This is equivalent to just running: | 16 This is mostly equivalent to just running: |
17 | 17 |
18 ```bash | 18 ```bash |
19 adb install $(PRODUCT_DIR)/apks/Blimp.apk | 19 adb install $(PRODUCT_DIR)/apks/ChromePublic.apk |
20 ``` | 20 ``` |
21 | 21 |
22 ### Setting up command line flags | 22 ### Setting up command line flags |
23 | 23 |
24 Set up any command line flags with: | 24 Set up any command line flags with: |
25 | 25 |
26 ```bash | 26 ```bash |
27 ./build/android/adb_blimp_command_line --your-flag-here | 27 ./build/android/adb_chrome_public_command_line --your-flag-here |
28 ``` | 28 ``` |
29 | 29 |
30 To see your current command line, run `adb_blimp_command_line` without any | 30 To see your current command line, run `adb_blimp_command_line` without any |
31 arguments. | 31 arguments. |
32 | 32 |
33 The Blimp client reads command line arguments from the file | 33 The Chrome APK blimp client reads command line arguments from the file |
34 `/data/local/blimp-command-line` and the above script reads/writes that file. | 34 `/data/local/chrome-command-line` and the above script reads/writes that file. |
35 Typical format of the file is `chrome --your-flag-here`. So one can use `adb` | 35 Typical format of the file is `chrome --your-flag-here`. So one can use `adb` |
36 directly to create the file: | 36 directly to create the file: |
37 | 37 |
38 ```bash | 38 ```bash |
39 echo 'chrome --engine-ip=10.0.2.2 --engine-port=25467 --engine-transport=tcp' \ | 39 echo 'chrome --engine-ip=10.0.2.2 --engine-port=25467 --engine-transport=tcp' \ |
40 '--blimp-client-token-path=/data/data/org.chromium.blimp/blimp_client_token' \ | 40 '--blimp-client-token-path=/data/data/org.chromium.chrome/blimp_client_token' \ |
41 '--vmodule="*=1""' > /tmp/blimp-command-line | 41 '--vmodule="*=1""' > /tmp/chrome-command-line |
42 adb push /tmp/blimp-command-line /data/local/blimp-command-line | 42 adb push /tmp/chrome-command-line /data/local/chrome-command-line |
43 adb shell start chmod 0664 /data/local/blimp-command-line | 43 adb shell start chmod 0664 /data/local/chrome-command-line |
44 ``` | |
45 | |
46 ### Forcefully enabling the blimp client | |
47 | |
48 Usually, the end user will have to manually enable blimp by using the Blimp | |
49 panel in the application settings, but for developers it might be beneficial to | |
50 skip this check by forcefully enabling the blimp client. | |
David Trainor- moved to gerrit
2016/09/09 18:32:38
Note that this does not mean assignment auth will
nyquist
2016/09/12 22:00:42
Done.
| |
51 | |
52 You can do this by adding the command line flag: | |
53 ``` | |
54 --enable-blimp | |
44 ``` | 55 ``` |
45 | 56 |
46 ### Instructing client to connect to specific host | 57 ### Instructing client to connect to specific host |
47 | 58 |
48 To have the client connect to a custom engine use the `--engine-ip`, | 59 To have the client connect to a custom engine use the `--engine-ip`, |
49 `--engine-port`, and `--engine-transport` flags. The possible valid | 60 `--engine-port`, and `--engine-transport` flags. The possible valid |
50 values for `--engine-transport` are 'tcp' and 'ssl'. | 61 values for `--engine-transport` are 'tcp' and 'ssl'. |
51 An example valid endpoint would be | 62 An example valid endpoint would be |
52 `--engine-ip=127.0.0.1 --engine-port=25467 --engine-transport=tcp`. | 63 `--engine-ip=127.0.0.1 --engine-port=25467 --engine-transport=tcp`. |
53 | 64 |
54 SSL-encrypted connections take an additional flag | 65 SSL-encrypted connections take an additional flag |
55 `--engine-cert-path` which specifies a path to a PEM-encoded certificate | 66 `--engine-cert-path` which specifies a path to a PEM-encoded certificate |
56 file (e.g. `--engine-cert-path=/path_on_device_to/file.pem`). Remember to also | 67 file (e.g. `--engine-cert-path=/path_on_device_to/file.pem`). Remember to also |
57 copy the file to the device when using this option. | 68 copy the file to the device when using this option. |
58 | 69 |
59 ### Requesting the complete page from the engine | 70 ### Requesting the complete page from the engine |
60 The engine sends partially rendered content to the client. To request the | 71 The engine sends partially rendered content to the client. To request the |
61 complete page from the engine, use the `--download-whole-document` flag on the | 72 complete page from the engine, use the `--download-whole-document` flag on the |
62 client. | 73 client. |
63 | 74 |
64 ### Specifying the client auth token file | 75 ### Specifying the client auth token file |
65 The client needs access to a file containing a client auth token. One should | 76 The client needs access to a file containing a client auth token. One should |
66 make sure this file is available by pushing it onto the device before running | 77 make sure this file is available by pushing it onto the device before running |
67 the client. One can do this by running the following command: | 78 the client. One can do this by running the following command: |
68 | 79 |
69 ```bash | 80 ```bash |
70 adb push /path/to/blimp_client_token \ | 81 adb push /path/to/blimp_client_token \ |
71 /data/data/org.chromium.blimp/blimp_client_token | 82 /data/data/org.chromium.chrome/blimp_client_token |
72 ``` | 83 ``` |
73 | 84 |
74 To have the client use the given client auth token file, use the | 85 To have the client use the given client auth token file, use the |
75 `--blimp-client-token-path` flag (e.g. | 86 `--blimp-client-token-path` flag (e.g. |
76 `--blimp-client-token-path=/data/data/org.chromium.blimp/blimp_client_token`) | 87 `--blimp-client-token-path=/data/data/org.chromium.chrome/blimp_client_token`) |
77 | 88 |
78 An example of a client token file is | 89 An example of a client token file is |
79 [test_client_token](https://code.google.com/p/chromium/codesearch#chromium/src/b limp/test/data/test_client_token). | 90 [test_client_token](https://code.google.com/p/chromium/codesearch#chromium/src/b limp/test/data/test_client_token). |
80 | 91 |
81 ### Start the Client | 92 ### Start the Client |
82 Run the Blimp APK with: | 93 Run the Chrome Public APK with: |
83 | 94 |
84 ```bash | 95 ```bash |
85 ./build/android/adb_run_blimp_client | 96 ./build/android/adb_run_chrome_public |
86 ``` | 97 ``` |
87 The script under the cover uses adb to start the application: | 98 The script under the cover uses adb to start the application: |
88 | 99 |
89 ```bash | 100 ```bash |
90 adb shell am start -a android.intent.action.VIEW -n org.chromium.blimp/org.chrom ium.blimp.BlimpRendererActivity | 101 adb shell am start -a android.intent.action.VIEW -n org.chromium.chrome/com.goog le.android.apps.chrome.Main |
91 ``` | 102 ``` |
92 | 103 |
93 ### Connecting to an Engine running on a workstation | 104 ### Connecting to an Engine running on a workstation |
94 To run the engine on a workstation and make your Android client connect to it, | 105 To run the engine on a workstation and make your Android client connect to it, |
95 you need to forward a port from the Android device to the host, and also | 106 you need to forward a port from the Android device to the host, and also |
96 instruct the client to connect using that port on its localhost address. | 107 instruct the client to connect using that port on its localhost address. |
97 | 108 |
98 #### Port forwarding | 109 #### Port forwarding |
99 If you are running the engine on your workstation and are connected to the | 110 If you are running the engine on your workstation and are connected to the |
100 client device via USB, you'll need remote port forwarding to allow the Blimp | 111 client device via USB, you'll need remote port forwarding to allow the Blimp |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
216 ```bash | 227 ```bash |
217 out-linux/Debug/bin/client_engine_integration load -p/--apk-path /path/to/ap k | 228 out-linux/Debug/bin/client_engine_integration load -p/--apk-path /path/to/ap k |
218 ``` | 229 ``` |
219 | 230 |
220 You are now ready to run tests or do development. | 231 You are now ready to run tests or do development. |
221 | 232 |
222 Instead of `{load}`, if want to manually install/launch the client can also do | 233 Instead of `{load}`, if want to manually install/launch the client can also do |
223 e.g. the incremental install: | 234 e.g. the incremental install: |
224 | 235 |
225 ```bash | 236 ```bash |
226 ninja -C out-android/Debug blimp && \ | 237 ninja -C out-android/Debug blimp chrome_public_apk && \ |
227 out-android/Debug/bin/install_blimp_apk_incremental | 238 out-android/Debug/bin/install_chrome_public_apk_incremental |
228 ``` | 239 ``` |
229 | 240 |
230 3. `{stop}` Stops the engine & the forwarder: | 241 3. `{stop}` Stops the engine & the forwarder: |
231 | 242 |
232 ```bash | 243 ```bash |
233 out-linux/Debug/bin/client_engine_integration stop | 244 out-linux/Debug/bin/client_engine_integration stop |
234 ``` | 245 ``` |
235 | 246 |
236 #### Option B | 247 #### Option B |
237 | 248 |
238 1. `{run}` Start and keep running engine & forwarder. | 249 1. `{run}` Start and keep running engine & forwarder. |
239 Script keeps running and auto-checking engine process. Is responsible for | 250 Script keeps running and auto-checking engine process. Is responsible for |
240 killing engine if keyboard interrupts or client gets killed. | 251 killing engine if keyboard interrupts or client gets killed. |
241 | 252 |
242 ```bash | 253 ```bash |
243 out-linux/Debug/bin/client_engine_integration run | 254 out-linux/Debug/bin/client_engine_integration run |
244 ``` | 255 ``` |
245 | 256 |
246 2. Same as step 2 in Option A. | 257 2. Same as step 2 in Option A. |
247 | 258 |
248 3. Engine should be auto-killed by keyboard stopping the `{run}` script or the client | 259 3. Engine should be auto-killed by keyboard stopping the `{run}` script or the client |
249 gets wiped out. `{stop}` works as well. | 260 gets wiped out. `{stop}` works as well. |
OLD | NEW |