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

Side by Side Diff: docs/android_build_instructions.md

Issue 2611843007: Update incremental install docs. (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | 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 # Checking out and building Chromium for Android 1 # Checking out and building Chromium for Android
2 2
3 There are instructions for other platforms linked from the 3 There are instructions for other platforms linked from the
4 [get the code](get_the_code.md) page. 4 [get the code](get_the_code.md) page.
5 5
6 ## Instructions for Google Employees 6 ## Instructions for Google Employees
7 7
8 Are you a Google employee? See 8 Are you a Google employee? See
9 [go/building-chrome](https://goto.google.com/building-chrome) instead. 9 [go/building-chrome](https://goto.google.com/building-chrome) instead.
10 Google employee? See [go/building-chrome](https://goto.google.com/building-chrom e) instead. 10 Google employee? See [go/building-chrome](https://goto.google.com/building-chrom e) instead.
11 11
12 [TOC] 12 [TOC]
13 13
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 See [Debugging Chromium on Android](https://www.chromium.org/developers/how-tos/ debugging-on-android) 304 See [Debugging Chromium on Android](https://www.chromium.org/developers/how-tos/ debugging-on-android)
305 for more on debugging, including how to debug Java code. 305 for more on debugging, including how to debug Java code.
306 306
307 ### Testing 307 ### Testing
308 308
309 For information on running tests, see [android\_test\_instructions.md](https://c hromium.googlesource.com/chromium/src/+/master/docs/android_test_instructions.md ). 309 For information on running tests, see [android\_test\_instructions.md](https://c hromium.googlesource.com/chromium/src/+/master/docs/android_test_instructions.md ).
310 310
311 ### Faster Edit/Deploy (GN only) 311 ### Faster Edit/Deploy (GN only)
312 312
313 GN's "incremental install" uses reflection and side-loading to speed up the edit 313 GN's "incremental install" uses reflection and side-loading to speed up the edit
314 & deploy cycle (normally < 10 seconds). 314 & deploy cycle (normally < 10 seconds). The initial launch of the apk will be
315 a little slower since updated dex files are installed manually.
315 316
316 * Make sure to set` is_component_build = true `in your GN args 317 * Make sure to set` is_component_build = true `in your GN args
317 * All apk targets have \*`_incremental` targets defined (e.g. 318 * All apk targets have \*`_incremental` targets defined (e.g.
318 `chrome_public_apk_incremental`) 319 `chrome_public_apk_incremental`) except for Webview and Monochrome
319 320
320 Here's an example: 321 Here's an example:
321 322
322 ```shell 323 ```shell
323 ninja -C out/Default chrome_public_apk_incremental 324 ninja -C out/Default chrome_public_apk_incremental
324 out/Default/bin/install_chrome_public_apk_incremental -v 325 out/Default/bin/install_chrome_public_apk_incremental -v
325 ``` 326 ```
326 327
327 For gunit tests (note that run_*_incremental automatically add 328 For gunit tests (note that run_*_incremental automatically add
328 --fast-local-dev when calling test\_runner.py): 329 --fast-local-dev when calling test\_runner.py):
329 330
330 ```shell 331 ```shell
331 ninja -C out/Default base_unittests_incremental 332 ninja -C out/Default base_unittests_incremental
332 out/Default/bin/run_base_unittests_incremental 333 out/Default/bin/run_base_unittests_incremental
333 ``` 334 ```
334 335
335 For instrumentation tests: 336 For instrumentation tests:
336 337
337 ```shell 338 ```shell
338 ninja -C out/Default chrome_public_test_apk_incremental 339 ninja -C out/Default chrome_public_test_apk_incremental
339 out/Default/bin/run_chrome_public_test_apk_incremental 340 out/Default/bin/run_chrome_public_test_apk_incremental
340 ``` 341 ```
341 342
342 To uninstall: 343 To uninstall:
343 344
344 ```shell 345 ```shell
345 out/Default/bin/install_chrome_public_apk_incremental -v --uninstall 346 out/Default/bin/install_chrome_public_apk_incremental -v --uninstall
346 ``` 347 ```
347 348
349 A subtly erroneous flow arises when you build a regular apk but install an
350 incremental apk (e.g.
351 ```ninja -C out/Default foo_apk out/Default/bin/install_foo_apk_incremental```).
agrieve 2017/01/05 16:26:40 nit: these commands need either a && or a ; to sep
estevenson 2017/01/05 16:36:48 Done.
352 Setting incremental_apk_by_default = true in your GN args aliases regular
agrieve 2017/01/05 16:26:39 nit: add `` arround incremental_apk_by_default = t
estevenson 2017/01/05 16:36:47 Done.
353 targets as their incremental counterparts. With this arg set, the commands
354 above become:
355
356 ```shell
357 ninja -C out/Default chrome_public_apk
358 out/Default/bin/install_chrome_public_apk
359
360 ninja -C out/Default base_unittests
361 out/Default/bin/run_base_unittests
362
363 ninja -C out/Default chrome_public_test_apk
364 out/Default/bin/run_chrome_public_test_apk
365 ```
366
367 If you want to build a non-incremental apk you'll need to remove
368 ```incremental_apk_by_default``` from your GN args.
369
348 ## Tips, tricks, and troubleshooting 370 ## Tips, tricks, and troubleshooting
349 371
350 ### Rebuilding libchrome.so for a particular release 372 ### Rebuilding libchrome.so for a particular release
351 373
352 These instructions are only necessary for Chrome 51 and earlier. 374 These instructions are only necessary for Chrome 51 and earlier.
353 375
354 In the case where you want to modify the native code for an existing 376 In the case where you want to modify the native code for an existing
355 release of Chrome for Android (v25+) you can do the following steps. 377 release of Chrome for Android (v25+) you can do the following steps.
356 Note that in order to get your changes into the official release, you'll 378 Note that in order to get your changes into the official release, you'll
357 need to send your change for a codereview using the regular process for 379 need to send your change for a codereview using the regular process for
358 committing code to chromium. 380 committing code to chromium.
359 381
360 1. Open Chrome on your Android device and visit chrome://version 382 1. Open Chrome on your Android device and visit chrome://version
361 2. Copy down the id listed next to "Build ID:" 383 2. Copy down the id listed next to "Build ID:"
362 3. Go to 384 3. Go to
363 [http://storage.googleapis.com/chrome-browser-components/BUILD\_ID\_FROM\_ST EP\_2/index.html](http://storage.googleapis.com/chrome-browser-components/BUILD_ ID_FROM_STEP_2/index.html) 385 [http://storage.googleapis.com/chrome-browser-components/BUILD\_ID\_FROM\_ST EP\_2/index.html](http://storage.googleapis.com/chrome-browser-components/BUILD_ ID_FROM_STEP_2/index.html)
364 4. Download the listed files and follow the steps in the README. 386 4. Download the listed files and follow the steps in the README.
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698