Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: blimp/docs/running.md

Issue 2104003003: Update Build and Running documentation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing Kevin's CR comments Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « blimp/docs/build.md ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Running Blimp 1 # Running Blimp
2 [TOC]
2 3
3 See [build](build.md) for instructions on how to build Blimp. 4 See [build](build.md) for instructions on how to build Blimp.
4 5
5 ## Running the client 6 ## Android Client
6 7
7 There are both Android and Linux clients. The Android client is the shipping 8 ### Installing the client
8 client while the Linux client is used for development purposes. 9
10 Install the Blimp APK with the following:
11
12 ```bash
13 ./build/android/adb_install_apk.py $(PRODUCT_DIR)/apks/Blimp.apk
14 ```
15
16 This is equivalent to just running:
17
18 ```bash
19 adb install $(PRODUCT_DIR)/apks/Blimp.apk
20 ```
21
22 ### Setting up command line flags
23
24 Set up any command line flags with:
25
26 ```bash
27 ./build/android/adb_blimp_command_line --your-flag-here
28 ```
29
30 To see your current command line, run `adb_blimp_command_line` without any
31 arguments.
32
33 The Blimp client reads command line arguments from the file
34 `/data/local/blimp-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`
36 directly to create the file:
37
38 ```bash
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' \
41 '--vmodule="*=1""' > /tmp/blimp-command-line
42 adb push /tmp/blimp-command-line /data/local/blimp-command-line
43 adb shell start chmod 0664 /data/local/blimp-command-line
44 ```
9 45
10 ### Instructing client to connect to specific host 46 ### Instructing client to connect to specific host
11 47
12 To have the client connect to a custom engine use the `--engine-ip`, 48 To have the client connect to a custom engine use the `--engine-ip`,
13 `--engine-port`, and `--engine-transport` flags. The possible valid 49 `--engine-port`, and `--engine-transport` flags. The possible valid
14 values for `--engine-transport` are 'tcp' and 'ssl'. 50 values for `--engine-transport` are 'tcp' and 'ssl'.
15 An example valid endpoint would be 51 An example valid endpoint would be
16 `--engine-ip=127.0.0.1 --engine-port=1234 --engine-transport=tcp`. 52 `--engine-ip=127.0.0.1 --engine-port=25467 --engine-transport=tcp`.
17 53
18 SSL-encrypted connections take an additional flag 54 SSL-encrypted connections take an additional flag
19 `--engine-cert-path` which specifies a path to a PEM-encoded certificate 55 `--engine-cert-path` which specifies a path to a PEM-encoded certificate
20 file (e.g. `--engine-cert-path=/path/to/file.pem`.) 56 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.
21 58
22 ### Requesting the complete page from the engine 59 ### Requesting the complete page from the engine
23 The engine sends partially rendered content to the client. To request the comple te 60 The engine sends partially rendered content to the client. To request the
24 page from the engine, use the `--download-whole-document` flag on the client. 61 complete page from the engine, use the `--download-whole-document` flag on the
62 client.
25 63
26 ### Specifying the client auth token file 64 ### Specifying the client auth token file
27 The client needs access to a file containing a client auth token. One should 65 The client needs access to a file containing a client auth token. One should
28 make sure this file is available by pushing it onto the device before running 66 make sure this file is available by pushing it onto the device before running
29 the client. One can do this by running the following command: 67 the client. One can do this by running the following command:
30 68
31 ```bash 69 ```bash
32 adb push /path/to/blimp_client_token \ 70 adb push /path/to/blimp_client_token \
33 /data/data/org.chromium.blimp/blimp_client_token 71 /data/data/org.chromium.blimp/blimp_client_token
34 ``` 72 ```
35 73
36 To have the client use the given client auth token file, use the 74 To have the client use the given client auth token file, use the
37 `--blimp-client-token-path` flag (e.g. 75 `--blimp-client-token-path` flag (e.g.
38 `--blimp-client-token-path=/data/data/org.chromium.blimp/blimp_client_token`) 76 `--blimp-client-token-path=/data/data/org.chromium.blimp/blimp_client_token`)
39 77
40 An example of a client token file is 78 An example of a client token file is
41 [test_client_token](https://code.google.com/p/chromium/codesearch#chromium/src/b limp/test/data/test_client_token). 79 [test_client_token](https://code.google.com/p/chromium/codesearch#chromium/src/b limp/test/data/test_client_token).
42 80
43 ### Android Client 81 ### Start the Client
44
45 Install the Blimp APK with the following:
46
47 ```bash
48 ./build/android/adb_install_apk.py $(PRODUCT_DIR)/apks/Blimp.apk
49 ```
50
51 Set up any command line flags with:
52
53 ```bash
54 ./build/android/adb_blimp_command_line --your-flag-here
55 ```
56
57 To see your current command line, run `adb_blimp_command_line` without any
58 arguments.
59
60 Run the Blimp APK with: 82 Run the Blimp APK with:
61 83
62 ```bash 84 ```bash
63 ./build/android/adb_run_blimp_client 85 ./build/android/adb_run_blimp_client
64 ``` 86 ```
65 87 The script under the cover uses adb to start the application:
66 ### Linux Client
67
68 The blimp client is built as part of the `blimp` target. To run it with local
69 logging enabled, execute:
70 88
71 ```bash 89 ```bash
72 ./out-linux/Debug/blimp_shell \ 90 adb shell am start -a android.intent.action.VIEW -n org.chromium.blimp/org.chrom ium.blimp.BlimpRendererActivity
73 --user-data-dir=/tmp/blimpclient \
74 --enable-logging=stderr \
75 --vmodule="*=1"
76 ``` 91 ```
77 92
78 ## Running the engine 93 ### Connecting to an Engine running on a workstation
79
80 ### In a container
81 For running the engine in a container, see [container](container.md).
82
83 ### On a workstation
84 To run the engine on a workstation and make your Android client connect to it, 94 To run the engine on a workstation and make your Android client connect to it,
85 you need to forward a port from the Android device to the host, and also 95 you need to forward a port from the Android device to the host, and also
86 instruct the client to connect using that port on its localhost address. 96 instruct the client to connect using that port on its localhost address.
87 97
88 #### Port forwarding 98 #### Port forwarding
89 If you are running the engine on your workstation and are connected to the 99 If you are running the engine on your workstation and are connected to the
90 client device via USB, you'll need remote port forwarding to allow the Blimp 100 client device via USB, you'll need remote port forwarding to allow the Blimp
91 client to talk to your computer. 101 client to talk to your computer.
92 102
93 ##### Option A 103 ##### Option A
94 Follow the 104 Follow the
95 [remote debugging instructions](https://developer.chrome.com/devtools/docs/remot e-debugging) 105 [remote debugging instructions](https://developer.chrome.com/devtools/docs/remot e-debugging)
96 to get started. You'll probably want to remap 25467 to "localhost:25467". 106 to get started. You'll probably want to remap 25467 to "localhost:25467".
97 *Note* This requires the separate `Chrome` application to be running on the 107 *Note* This requires the separate `Chrome` application to be running on the
98 device. Otherwise you will not see the green light for the port forwarding. 108 device. Otherwise you will not see the green light for the port forwarding.
99 109
100 ##### Option B 110 ##### Option B
101 If you are having issues with using the built-in Chrome port forwarding, you can 111 If you are having issues with using the built-in Chrome port forwarding, you can
102 also start a new shell and keep the following command running: 112 also start a new shell and keep the following command running:
103 113
104 ```bash 114 ```bash
105 ./build/android/adb_reverse_forwarder.py --debug -v 25467 25467 115 ./build/android/adb_reverse_forwarder.py --debug -v 25467 25467
106 ``` 116 ```
107 117
108 ### Required engine binary flags 118 ### Running the client in an Android emulator
119 Running the client using an Android emulator is similar to running it on device.
120 Here are a few gotchas:
121
122 * Build an APK matching the emulator cpu type. The emulator cpu type is most
123 likely x86, while the default Android build cpu type is ARM. Follow the
124 Android build instructions above to change the CPU type.
125
126 * Ensure that the emulator is running at least Android Marshmallow so that
127 fonts are rendered correctly. Also ensure that you have the latest Play
128 services binaries.
129
130 * Some of scripts under `build/android` will fail to run as it uses `adb scp`.
131 Follow the instruction above to use `adb` directly.
132
133 * To connect to an Engine running on the host machine, you should use
134 `10.0.2.2` as `engine-ip` instead of `127.0.0.1` as `127.0.0.1` will refer to
135 the emulator itself. There is no need of set up
136 [port forwarding](#Port-forwarding) when this approach is used.
137
138 ## Linux Client
139
140 The Linux client is used for development purpose while the Android client is
141 shipped. The Linux client is built as part of the `blimp` target.
142 To run it with local logging enabled, execute:
143
144 ```bash
145 ./out-linux/Debug/blimp_shell \
146 --user-data-dir=/tmp/blimpclient \
147 --enable-logging=stderr \
148 --vmodule="*=1"
149 ```
150
151 ## Running the engine
152
153 ### In a container
154 For running the engine in a container, see [container](container.md).
155
156 ### On a workstation
157 The following flags are required to start an Engine instance:
158
109 * `--blimp-client-token-path=$PATH`: Path to a file containing a nonempty 159 * `--blimp-client-token-path=$PATH`: Path to a file containing a nonempty
110 token string. If this is not present, the engine will fail to boot. 160 token string. If this is not present, the engine will fail to boot.
111 * `--use-remote-compositing`: Ensures that the renderer uses the remote 161 * `--use-remote-compositing`: Ensures that the renderer uses the remote
112 compositor. 162 compositor.
113 * `--disable-cached-picture-raster`: Ensures that rasterized content is not 163 * `--disable-cached-picture-raster`: Ensures that rasterized content is not
114 destroyed before serialization. 164 destroyed before serialization.
115 * `--android-fonts-path=$PATH`: Path to where the fonts are located. 165 * `--android-fonts-path=$PATH`: Path to where the fonts are located.
116 Typically this would be `out-linux/Debug/gen/third_party/blimp_fonts`. 166 Typically this would be `out-linux/Debug/gen/third_party/blimp_fonts`.
117 * `--disable-remote-fonts`: Disables downloading of custom web fonts in the 167 * `--disable-remote-fonts`: Disables downloading of custom web fonts in the
118 renderer. 168 renderer.
119 169
120 #### Typical invocation 170 #### Typical invocation
121 171
122 One can start the engine using these flags: 172 One can start the engine using these flags:
123 173
124 ```bash 174 ```bash
125 out-linux/Debug/blimp_engine_app \ 175 out-linux/Debug/blimp_engine_app \
126 --android-fonts-path=out-linux/Debug/gen/third_party/blimp_fonts \ 176 --android-fonts-path=out-linux/Debug/gen/third_party/blimp_fonts \
127 --blimp-client-token-path=/tmp/blimpengine-token \ 177 --blimp-client-token-path=/tmp/blimpengine-token \
128 --enable-logging=stderr \ 178 --enable-logging=stderr \
129 --vmodule="blimp*=1" 179 --vmodule="blimp*=1"
130 ``` 180 ```
OLDNEW
« no previous file with comments | « blimp/docs/build.md ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698