blob: 1d2dacccae04fbaa904506da77347403cf1e609f [file] [log] [blame] [view]
dpranke1a70d0c2016-12-01 02:42:291# Checking out and building Chromium for Android
2
estevenson75e9b862017-01-05 16:49:233There are instructions for other platforms linked from the
dpranke1a70d0c2016-12-01 02:42:294[get the code](get_the_code.md) page.
tfarina2c773222016-04-05 18:43:355
dpranke1a70d0c2016-12-01 02:42:296## Instructions for Google Employees
7
8Are you a Google employee? See
Eric Stevenson36459112018-07-06 20:12:389[go/building-android-chrome](https://goto.google.com/building-android-chrome)
10instead.
dpranke0ae7cad2016-11-30 07:47:5811
tfarina2c773222016-04-05 18:43:3512[TOC]
13
dpranke0ae7cad2016-11-30 07:47:5814## System requirements
tfarina2c773222016-04-05 18:43:3515
dpranke0ae7cad2016-11-30 07:47:5816* A 64-bit Intel machine running Linux with at least 8GB of RAM. More
17 than 16GB is highly recommended.
18* At least 100GB of free disk space.
19* You must have Git and Python installed already.
tfarina2c773222016-04-05 18:43:3520
dpranke0ae7cad2016-11-30 07:47:5821Most development is done on Ubuntu. Other distros may or may not work;
Tom Anderson93e49e492019-12-23 19:55:3722see the [Linux instructions](linux/build_instructions.md) for some suggestions.
tfarina2c773222016-04-05 18:43:3523
dpranke0ae7cad2016-11-30 07:47:5824Building the Android client on Windows or Mac is not supported and doesn't work.
tfarina2c773222016-04-05 18:43:3525
Nate Fischer540458a2019-06-12 20:45:3626## Install depot\_tools
tfarina2c773222016-04-05 18:43:3527
sdy93387fa2016-12-01 01:03:4428Clone the `depot_tools` repository:
dpranke0ae7cad2016-11-30 07:47:5829
sdy93387fa2016-12-01 01:03:4430```shell
Andrew Grievec81af4a2017-07-26 18:02:1331git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
sdy93387fa2016-12-01 01:03:4432```
dpranke0ae7cad2016-11-30 07:47:5833
sdy93387fa2016-12-01 01:03:4434Add `depot_tools` to the end of your PATH (you will probably want to put this
35in your `~/.bashrc` or `~/.zshrc`). Assuming you cloned `depot_tools`
36to `/path/to/depot_tools`:
dpranke0ae7cad2016-11-30 07:47:5837
sdy93387fa2016-12-01 01:03:4438```shell
Andrew Grievec81af4a2017-07-26 18:02:1339export PATH="$PATH:/path/to/depot_tools"
sdy93387fa2016-12-01 01:03:4440```
dpranke0ae7cad2016-11-30 07:47:5841
42## Get the code
43
sdy93387fa2016-12-01 01:03:4444Create a `chromium` directory for the checkout and change to it (you can call
dpranke0ae7cad2016-11-30 07:47:5845this whatever you like and put it wherever you like, as
46long as the full path has no spaces):
47
sdy93387fa2016-12-01 01:03:4448```shell
Andrew Grievec81af4a2017-07-26 18:02:1349mkdir ~/chromium && cd ~/chromium
50fetch --nohooks android
sdy93387fa2016-12-01 01:03:4451```
dpranke0ae7cad2016-11-30 07:47:5852
53If you don't want the full repo history, you can save a lot of time by
sdy93387fa2016-12-01 01:03:4454adding the `--no-history` flag to `fetch`.
dpranke0ae7cad2016-11-30 07:47:5855
56Expect the command to take 30 minutes on even a fast connection, and many
57hours on slower ones.
58
59If you've already installed the build dependencies on the machine (from another
sdy93387fa2016-12-01 01:03:4460checkout, for example), you can omit the `--nohooks` flag and `fetch`
dpranke0ae7cad2016-11-30 07:47:5861will automatically execute `gclient runhooks` at the end.
62
sdy93387fa2016-12-01 01:03:4463When `fetch` completes, it will have created a hidden `.gclient` file and a
64directory called `src` in the working directory. The remaining instructions
65assume you have switched to the `src` directory:
dpranke0ae7cad2016-11-30 07:47:5866
sdy93387fa2016-12-01 01:03:4467```shell
Andrew Grievec81af4a2017-07-26 18:02:1368cd src
sdy93387fa2016-12-01 01:03:4469```
dpranke0ae7cad2016-11-30 07:47:5870
71### Converting an existing Linux checkout
tfarina2c773222016-04-05 18:43:3572
73If you have an existing Linux checkout, you can add Android support by
sdy93387fa2016-12-01 01:03:4474appending `target_os = ['android']` to your `.gclient` file (in the
75directory above `src`):
tfarina2c773222016-04-05 18:43:3576
sdy93387fa2016-12-01 01:03:4477```shell
Andrew Grievec81af4a2017-07-26 18:02:1378echo "target_os = [ 'android' ]" >> ../.gclient
sdy93387fa2016-12-01 01:03:4479```
tfarina2c773222016-04-05 18:43:3580
sdy93387fa2016-12-01 01:03:4481Then run `gclient sync` to pull the new Android dependencies:
tfarina2c773222016-04-05 18:43:3582
sdy93387fa2016-12-01 01:03:4483```shell
Andrew Grievec81af4a2017-07-26 18:02:1384gclient sync
sdy93387fa2016-12-01 01:03:4485```
tfarina2c773222016-04-05 18:43:3586
sdy93387fa2016-12-01 01:03:4487(This is the only difference between `fetch android` and `fetch chromium`.)
tfarina2c773222016-04-05 18:43:3588
dpranke0ae7cad2016-11-30 07:47:5889### Install additional build dependencies
tfarina2c773222016-04-05 18:43:3590
dpranke0ae7cad2016-11-30 07:47:5891Once you have checked out the code, run
tfarina2c773222016-04-05 18:43:3592
sdy93387fa2016-12-01 01:03:4493```shell
Andrew Grievec81af4a2017-07-26 18:02:1394build/install-build-deps-android.sh
sdy93387fa2016-12-01 01:03:4495```
tfarina2c773222016-04-05 18:43:3596
sdy93387fa2016-12-01 01:03:4497to get all of the dependencies you need to build on Linux, *plus* all of the
dpranke0ae7cad2016-11-30 07:47:5898Android-specific dependencies (you need some of the regular Linux dependencies
sdy93387fa2016-12-01 01:03:4499because an Android build includes a bunch of the Linux tools and utilities).
tfarina2c773222016-04-05 18:43:35100
dpranke0ae7cad2016-11-30 07:47:58101### Run the hooks
tfarinaba2792fa2016-04-07 15:50:42102
dpranke0ae7cad2016-11-30 07:47:58103Once you've run `install-build-deps` at least once, you can now run the
sdy93387fa2016-12-01 01:03:44104Chromium-specific hooks, which will download additional binaries and other
dpranke0ae7cad2016-11-30 07:47:58105things you might need:
tfarinaba2792fa2016-04-07 15:50:42106
sdy93387fa2016-12-01 01:03:44107```shell
Andrew Grievec81af4a2017-07-26 18:02:13108gclient runhooks
sdy93387fa2016-12-01 01:03:44109```
tfarinaba2792fa2016-04-07 15:50:42110
sdy93387fa2016-12-01 01:03:44111*Optional*: You can also [install API
112keys](https://www.chromium.org/developers/how-tos/api-keys) if you want your
113build to talk to some Google services, but this is not necessary for most
114development and testing purposes.
tfarinaba2792fa2016-04-07 15:50:42115
dpranke1a70d0c2016-12-01 02:42:29116## Setting up the build
tfarinaba2792fa2016-04-07 15:50:42117
Tom Bridgwatereef401542018-08-17 00:54:43118Chromium uses [Ninja](https://ninja-build.org) as its main build tool along with
119a tool called [GN](https://gn.googlesource.com/gn/+/master/docs/quick_start.md)
120to generate `.ninja` files. You can create any number of *build directories*
121with different configurations. To create a build directory which builds Chrome
Nate Fischerae5fd3222019-01-11 07:33:18122for Android, run `gn args out/Default` and edit the file to contain the
123following arguments:
tfarinaba2792fa2016-04-07 15:50:42124
Nate Fischerae5fd3222019-01-11 07:33:18125```gn
126target_os = "android"
127target_cpu = "arm64" # See "Figuring out target_cpu" below
sdy93387fa2016-12-01 01:03:44128```
dpranke0ae7cad2016-11-30 07:47:58129
sdy93387fa2016-12-01 01:03:44130* You only have to run this once for each new build directory, Ninja will
131 update the build files as needed.
132* You can replace `Default` with another name, but
133 it should be a subdirectory of `out`.
134* For other build arguments, including release settings, see [GN build
135 configuration](https://www.chromium.org/developers/gn-build-configuration).
Nate Fischerae5fd3222019-01-11 07:33:18136 The default will be a debug component build.
dpranke0ae7cad2016-11-30 07:47:58137* For more info on GN, run `gn help` on the command line or read the
Eric Roman01446752019-09-03 23:45:08138 [quick start guide](https://gn.googlesource.com/gn/+/master/docs/quick_start.md).
dpranke0ae7cad2016-11-30 07:47:58139
sdy93387fa2016-12-01 01:03:44140Also be aware that some scripts (e.g. `tombstones.py`, `adb_gdb.py`)
dpranke0ae7cad2016-11-30 07:47:58141require you to set `CHROMIUM_OUTPUT_DIR=out/Default`.
142
Nate Fischerae5fd3222019-01-11 07:33:18143### Figuring out target\_cpu
144
145The value of
146[`target_cpu`](https://gn.googlesource.com/gn/+/master/docs/reference.md#target_cpu)
147determines what instruction set to use for native code. Given a device (or
148emulator), you can determine the correct instruction set with `adb shell getprop
149ro.product.cpu.abi`:
150
151| `getprop ro.product.cpu.abi` output | `target_cpu` value |
152|-------------------------------------|--------------------|
153| `arm64-v8a` | `arm64` |
154| `armeabi-v7a` | `arm` |
155| `x86` | `x86` |
156| `x86_64` | `x64` |
157
158*** promo
159`arm` and `x86` may optionally be used instead of `arm64` and `x64` for
160non-WebView targets. This is also allowed for Monochrome, but only when not set
Nate Fischer6402abdc2019-07-19 21:50:19161as the WebView provider.
Nate Fischerae5fd3222019-01-11 07:33:18162***
163
dpranke0ae7cad2016-11-30 07:47:58164## Build Chromium
165
166Build Chromium with Ninja using the command:
167
sdy93387fa2016-12-01 01:03:44168```shell
Max Morozf5b31fcd2018-08-10 21:55:48169autoninja -C out/Default chrome_public_apk
sdy93387fa2016-12-01 01:03:44170```
dpranke0ae7cad2016-11-30 07:47:58171
Dirk Pranke8bd55f22018-10-24 21:22:10172(`autoninja` is a wrapper that automatically provides optimal values for the
173arguments passed to `ninja`.)
Max Morozf5b31fcd2018-08-10 21:55:48174
sdy93387fa2016-12-01 01:03:44175You can get a list of all of the other build targets from GN by running `gn ls
176out/Default` from the command line. To compile one, pass the GN label to Ninja
Dirk Pranke8bd55f22018-10-24 21:22:10177with no preceding "//" (so, for `//chrome/test:unit_tests` use `autoninja -C
sdy93387fa2016-12-01 01:03:44178out/Default chrome/test:unit_tests`).
179
Peter Wenbe712e642019-11-14 21:36:58180### Multiple Chrome Targets
Andrew Grieve052376a2017-09-26 01:54:11181
Peter Wenbe712e642019-11-14 21:36:58182The Google Play Store allows apps to send customized `.apk` or `.aab` files
183depending on the version of Android running on a device. Chrome uses this
Andrew Grievef6069feb2021-04-29 18:29:17184feature to package optimized versions for different OS versions.
Andrew Grieve052376a2017-09-26 01:54:11185
Andrew Grievef6069feb2021-04-29 18:29:171861. `chrome_modern_public_bundle` (ChromeModernPublic.aab)
Andrew Grieve052376a2017-09-26 01:54:11187 * `minSdkVersion=21` (Lollipop).
188 * Uses [Crazy Linker](https://cs.chromium.org/chromium/src/base/android/linker/BUILD.gn?rcl=6bb29391a86f2be58c626170156cbfaa2cbc5c91&l=9).
Andrew Grieve84bf1dd2020-07-06 20:31:50189 * Stores native library with "crazy." prefix to prevent extraction.
Andrew Grievef6069feb2021-04-29 18:29:17190 * WebView packaged independently (`system_webview_bundle`).
1912. `monochrome_public_bundle` (MonochromePublic.aab)
Andrew Grieve052376a2017-09-26 01:54:11192 * `minSdkVersion=24` (Nougat).
Andrew Grievef6069feb2021-04-29 18:29:17193 * Contains both Chrome and WebView (to save disk space).
Torne (Richard Coles)d8bc2922019-05-01 21:26:52194 * Does not use Crazy Linker (WebView requires system linker).
Andrew Grievef6069feb2021-04-29 18:29:171953. `trichrome_chrome_bundle` (TrichromeChrome.aab)
196 * `minSdkVersion=29` (Android 10).
197 * Native code shared with WebView through a "Static Shared Library APK": `trichrome_library_apk`
198 * Corresponding WebView target: `trichrome_webview_bundle`
1994. `chrome_public_apk` (ChromePublic.apk)
200 * Used for only local development and tests (simpler than using bundle
201 targets).
202 * Same configuration as chrome_modern_public_bundle, except without
203 separating things into modules.
Andrew Grieve052376a2017-09-26 01:54:11204
Andrew Grievef6069feb2021-04-29 18:29:17205*** note
206**Notes:**
207* These instructions use `chrome_public_apk`, but any of the other targets can
208 be substituted.
209* For more about bundles, see [android_dynamic feature modules.md](android_dynamic_feature_modules.md).
210* For more about native library packaging & loading, see [android_native_libraries.md](android_native_libraries.md).
211* There are closed-source equivalents to these targets (for Googlers), which
212 are identical but link in some extra code.
213***
Andrew Grieved2ec82d2018-05-22 14:28:43214
Mark Pearsone9042242018-02-20 23:49:33215## Updating your checkout
216
217To update an existing checkout, you can run
218
219```shell
220$ git rebase-update
221$ gclient sync
222```
223
224The first command updates the primary Chromium source repository and rebases
225any of your local branches on top of tip-of-tree (aka the Git branch
226`origin/master`). If you don't want to use this script, you can also just use
227`git pull` or other common Git commands to update the repo.
228
229The second command syncs dependencies to the appropriate versions and re-runs
230hooks as needed.
231
dpranke0ae7cad2016-11-30 07:47:58232## Installing and Running Chromium on a device
tfarinaba2792fa2016-04-07 15:50:42233
tfarinaba2792fa2016-04-07 15:50:42234### Plug in your Android device
235
236Make sure your Android device is plugged in via USB, and USB Debugging
237is enabled.
238
239To enable USB Debugging:
240
241* Navigate to Settings \> About Phone \> Build number
242* Click 'Build number' 7 times
243* Now navigate back to Settings \> Developer Options
244* Enable 'USB Debugging' and follow the prompts
245
246You may also be prompted to allow access to your PC once your device is
247plugged in.
248
249You can check if the device is connected by running:
250
251```shell
Yun Liuf57cceaf2019-03-18 21:31:23252third_party/android_sdk/public/platform-tools/adb devices
tfarinaba2792fa2016-04-07 15:50:42253```
254
255Which prints a list of connected devices. If not connected, try
256unplugging and reattaching your device.
tfarinaa68eb902016-04-12 19:43:05257
Thiemo Nagele03fb6c2018-07-31 08:29:31258### Enable apps from unknown sources
259
260Allow Android to run APKs that haven't been signed through the Play Store:
261
262* Enable 'Unknown sources' under Settings \> Security
263
264In case that setting isn't present, it may be possible to configure it via
265`adb shell` instead:
266
267```shell
Yun Liuf57cceaf2019-03-18 21:31:23268third_party/android_sdk/public/platform-tools/adb shell settings put global verifier_verify_adb_installs 0
Thiemo Nagele03fb6c2018-07-31 08:29:31269```
270
tfarinaa68eb902016-04-12 19:43:05271### Build the full browser
272
tfarinaa68eb902016-04-12 19:43:05273```shell
Max Morozf5b31fcd2018-08-10 21:55:48274autoninja -C out/Default chrome_public_apk
tfarinaa68eb902016-04-12 19:43:05275```
276
277And deploy it to your Android device:
278
279```shell
Andrew Grievec81af4a2017-07-26 18:02:13280out/Default/bin/chrome_public_apk install
tfarinaa68eb902016-04-12 19:43:05281```
282
283The app will appear on the device as "Chromium".
284
285### Build Content shell
286
287Wraps the content module (but not the /chrome embedder). See
xiaoyin.l1003c0b2016-12-06 02:51:17288[https://www.chromium.org/developers/content-module](https://www.chromium.org/developers/content-module)
tfarinaa68eb902016-04-12 19:43:05289for details on the content module and content shell.
290
291```shell
Max Morozf5b31fcd2018-08-10 21:55:48292autoninja -C out/Default content_shell_apk
Andrew Grievec81af4a2017-07-26 18:02:13293out/Default/bin/content_shell_apk install
tfarinaa68eb902016-04-12 19:43:05294```
295
296this will build and install an Android apk under
Yipeng Wang613ba692017-04-25 18:24:39297`out/Default/apks/ContentShell.apk`.
tfarinaa68eb902016-04-12 19:43:05298
ntfschr29a7adab2017-03-23 21:17:08299### Build WebView
tfarinaa68eb902016-04-12 19:43:05300
xiaoyin.l1003c0b2016-12-06 02:51:17301[Android WebView](https://developer.android.com/reference/android/webkit/WebView.html)
tfarinaa68eb902016-04-12 19:43:05302is a system framework component. Since Android KitKat, it is implemented using
xiaoyin.l1003c0b2016-12-06 02:51:17303Chromium code (based off the [content module](https://dev.chromium.org/developers/content-module)).
tfarinaa68eb902016-04-12 19:43:05304
ntfschr29a7adab2017-03-23 21:17:08305If you want to build the complete Android WebView framework component and test
306the effect of your chromium changes in Android apps using WebView, you should
307follow the [Android AOSP + chromium WebView
308instructions](https://www.chromium.org/developers/how-tos/build-instructions-android-webview)
tfarinaa68eb902016-04-12 19:43:05309
310### Running
311
tfarinaa68eb902016-04-12 19:43:05312For Content shell:
313
314```shell
Andrew Grievec81af4a2017-07-26 18:02:13315out/Default/bin/content_shell_apk launch [--args='--foo --bar'] http://example.com
tfarinaa68eb902016-04-12 19:43:05316```
317
318For Chrome public:
319
320```shell
Andrew Grievec81af4a2017-07-26 18:02:13321out/Default/bin/chrome_public_apk launch [--args='--foo --bar'] http://example.com
tfarinaa68eb902016-04-12 19:43:05322```
323
tfarinaa68eb902016-04-12 19:43:05324### Logging and debugging
325
326Logging is often the easiest way to understand code flow. In C++ you can print
Andrew Grievec81af4a2017-07-26 18:02:13327log statements using the LOG macro. In Java, refer to
328[android_logging.md](android_logging.md).
tfarinaa68eb902016-04-12 19:43:05329
Andrew Grievec81af4a2017-07-26 18:02:13330You can see these log via `adb logcat`, or:
tfarinaa68eb902016-04-12 19:43:05331
332```shell
Andrew Grievec81af4a2017-07-26 18:02:13333out/Default/bin/chrome_public_apk logcat
tfarinaa68eb902016-04-12 19:43:05334```
335
Tomasz Wiszkowski6467f1c92021-04-08 21:54:42336Logcat supports an additional feature of filtering and highlighting user-defined patterns. To use
337this mechanism, define a shell variable: `CHROMIUM_LOGCAT_HIGHLIGHT` and assign your desired
338pattern. The pattern will be used to search for any substring (ie. no need to prefix or suffix it
339with `.*`), eg:
340
341```shell
342export CHROMIUM_LOGCAT_HIGHLIGHT='(WARNING|cr_Child)'
343out/Default.bin/chrome_public_apk logcat
344# Highlights messages/tags containing WARNING and cr_Child strings.
345```
346
347Note: both _Message_ and _Tag_ portion of logcat are matched against the pattern.
348
Andrew Grievec81af4a2017-07-26 18:02:13349To debug C++ code, use one of the following commands:
tfarinaa68eb902016-04-12 19:43:05350
351```shell
Andrew Grievec81af4a2017-07-26 18:02:13352out/Default/bin/content_shell_apk gdb
353out/Default/bin/chrome_public_apk gdb
tfarinaa68eb902016-04-12 19:43:05354```
355
Philip Jägenstedt17f89962017-05-18 08:25:54356See [Android Debugging Instructions](android_debugging_instructions.md)
tfarinaa68eb902016-04-12 19:43:05357for more on debugging, including how to debug Java code.
358
359### Testing
360
Ken Rockot35028ca2019-05-30 18:50:45361For information on running tests, see
362[Android Test Instructions](testing/android_test_instructions.md).
tfarinaa68eb902016-04-12 19:43:05363
Andrew Grievec81af4a2017-07-26 18:02:13364### Faster Edit/Deploy
tfarinaa68eb902016-04-12 19:43:05365
agrieveb0861f522018-10-17 19:48:36366#### GN Args
367Args that affect build speed:
368 * `is_component_build = true` *(default=`is_debug`)*
369 * What it does: Uses multiple `.so` files instead of just one (faster links)
370 * `is_java_debug = true` *(default=`is_debug`)*
371 * What it does: Disables ProGuard (slow build step)
Andrew Grieve4978e8d2020-07-21 14:29:56372 * `treat_warnings_as_errors = false` *(default=`true`)*
373 * Causes any compiler warnings or lint checks to not fail the build.
374 * Allows you to iterate without needing to satisfy static analysis checks.
Peter Wenca2ff5392020-07-22 15:35:22375 * `use_errorprone_java_compiler = false` *(default=`true`)*
Andrew Grieve4978e8d2020-07-21 14:29:56376 * Don't run Errorprone checks when compiling Java files.
377 * Speeds up Java compiles by ~30% at the cost of not seeing ErrorProne
378 warnings.
379 * `disable_android_lint = true` *(default=`false`)*
380 * Don't run Android Lint when building APK / App Bundle targets.
381 * Lint usually takes > 60 seconds to run, so disabling it dramatically
382 reduces incremental build times.
agrieveb0861f522018-10-17 19:48:36383
Peter Wenc4bf57622021-04-12 22:12:36384#### Running analysis build steps in the background
385Normally analysis build steps like lint and errorprone will run in parallel with
386the rest of the build. The build will then wait for all analysis steps to
387complete successfully. By offloading analysis build steps to a separate build
388server to be run lazily at a low priority when the machine is idle, the actual
389build can complete up to 50-80% faster.
390
391To take advantage of this speedup, run the script at
392[//build/android/fast_local_dev_server.py][fast_local_dev] in a separate
393terminal window. All your local builds will now forward analysis
394steps to this server. Analysis steps include android lint, errorprone, bytecode
395processor, etc. The output of these analysis checks will then be displayed in
396the terminal window running the server.
397
398**Note**: Since the build completes before the analysis checks finish, the build
399will not fail if an analysis check fails. Make sure to check the terminal that
400the server is running in at regular intervals to fix outstanding issues caught
401by these analysis checks.
402
John Palmer046f9872021-05-24 01:24:56403[fast_local_dev]: https://source.chromium.org/chromium/chromium/src/+/main:build/android/fast_local_dev_server.py
Peter Wenc4bf57622021-04-12 22:12:36404
agrieveb0861f522018-10-17 19:48:36405#### Incremental Install
Andrew Grievee1dc23f2019-10-22 16:26:36406[Incremental Install](/build/android/incremental_install/README.md) uses
Andrew Grievec45749e52019-10-22 20:59:56407reflection and sideloading to speed up the edit & deploy cycle (normally < 10
Andrew Grievee1dc23f2019-10-22 16:26:36408seconds). The initial launch of the apk will be a lot slower on older Android
409versions (pre-N) where the OS needs to pre-optimize the side-loaded files, but
410then be only marginally slower after the first launch.
tfarinaa68eb902016-04-12 19:43:05411
Andrew Grievee1dc23f2019-10-22 16:26:36412To enable Incremental Install, add the gn args:
tfarinaa68eb902016-04-12 19:43:05413
Andrew Grievee1dc23f2019-10-22 16:26:36414```gn
415incremental_install = true
tfarinaa68eb902016-04-12 19:43:05416```
417
Andrew Grievee1dc23f2019-10-22 16:26:36418Some APKs (e.g. WebView) do not work with incremental install, and are
Andrew Grievec45749e52019-10-22 20:59:56419blacklisted from being built as such (via `never_incremental = true`), so are
420build as normal APKs even when `incremental_install = true`.
tfarinaa68eb902016-04-12 19:43:05421
Andrew Grieveae094e392018-06-15 16:10:22422## Installing and Running Chromium on an Emulator
423
424Running on an emulator is the same as on a device. Refer to
Raphael Kubo da Costafe411ff2018-06-20 08:16:50425[android_emulator.md](android_emulator.md) for setting up emulators.
Andrew Grieveae094e392018-06-15 16:10:22426
estevenson75e9b862017-01-05 16:49:23427
dpranke0ae7cad2016-11-30 07:47:58428## Tips, tricks, and troubleshooting
tfarinaa68eb902016-04-12 19:43:05429
dpranke0ae7cad2016-11-30 07:47:58430### Rebuilding libchrome.so for a particular release
tfarinaa68eb902016-04-12 19:43:05431
yfriedman9b4327b2016-05-04 16:36:24432These instructions are only necessary for Chrome 51 and earlier.
433
tfarinaa68eb902016-04-12 19:43:05434In the case where you want to modify the native code for an existing
435release of Chrome for Android (v25+) you can do the following steps.
436Note that in order to get your changes into the official release, you'll
437need to send your change for a codereview using the regular process for
438committing code to chromium.
439
4401. Open Chrome on your Android device and visit chrome://version
4412. Copy down the id listed next to "Build ID:"
4423. Go to
443 [http://storage.googleapis.com/chrome-browser-components/BUILD\_ID\_FROM\_STEP\_2/index.html](http://storage.googleapis.com/chrome-browser-components/BUILD_ID_FROM_STEP_2/index.html)
4444. Download the listed files and follow the steps in the README.