Android: Remove mentions of envsetup.sh from docs
Having it listed in the docs implies that running the script is necessary to have things work; it's not. Also - fewer instructions the better! Change-Id: I993821cc6a11267cdc54fa99075ae5979f622520 Reviewed-on: https://chromium-review.googlesource.com/788132 Reviewed-by: John Budorick <jbudorick@chromium.org> Commit-Queue: agrieve <agrieve@chromium.org> Cr-Commit-Position: refs/heads/master@{#518965}
This commit is contained in:

committed by
Commit Bot

parent
530b5e7f91
commit
b747e71bfb
@ -4,7 +4,8 @@
|
||||
# found in the LICENSE file.
|
||||
|
||||
# Adds Android SDK tools and related helpers to PATH, useful for development.
|
||||
# Not used on bots. Use like `. build/android/envsetup.sh`.
|
||||
# Not used on bots, nor required for any commands to succeed.
|
||||
# Use like: source build/android/envsetup.sh
|
||||
|
||||
# Make sure we're being sourced.
|
||||
if [[ -n "$BASH_VERSION" && "${BASH_SOURCE:-$0}" == "$0" ]]; then
|
||||
|
@ -184,12 +184,6 @@ closed-source targets that get shipped to the Play Store.
|
||||
|
||||
## Installing and Running Chromium on a device
|
||||
|
||||
Prepare the environment:
|
||||
|
||||
```shell
|
||||
. build/android/envsetup.sh
|
||||
```
|
||||
|
||||
### Plug in your Android device
|
||||
|
||||
Make sure your Android device is plugged in via USB, and USB Debugging
|
||||
|
@ -149,12 +149,6 @@ $ ninja -C out/Default cast_shell_apk
|
||||
|
||||
## Installing and Running `cast_shell_apk` on a device
|
||||
|
||||
Prepare the environment:
|
||||
|
||||
```shell
|
||||
$ . build/android/envsetup.sh
|
||||
```
|
||||
|
||||
### Plug in your Android device
|
||||
|
||||
Make sure your Android device is plugged in via USB, and USB Debugging
|
||||
|
@ -8,6 +8,12 @@
|
||||
|
||||
#### ADB Debugging
|
||||
|
||||
The adb executable exists within the Android SDK:
|
||||
|
||||
```shell
|
||||
third_party/android_tools/sdk/platform-tools/adb
|
||||
```
|
||||
|
||||
In order to allow the ADB to connect to the device, you must enable USB
|
||||
debugging:
|
||||
|
||||
@ -57,13 +63,7 @@ with `INSTALL_FAILED_NO_MATCHING_ABIS`.
|
||||
|
||||
1. Enable Intel Virtualization support in the BIOS.
|
||||
|
||||
2. Set up your environment:
|
||||
|
||||
```shell
|
||||
. build/android/envsetup.sh
|
||||
```
|
||||
|
||||
3. Install emulator deps:
|
||||
2. Install emulator deps:
|
||||
|
||||
```shell
|
||||
build/android/install_emulator_deps.py --api-level=23
|
||||
@ -75,7 +75,7 @@ with `INSTALL_FAILED_NO_MATCHING_ABIS`.
|
||||
Note that this is a different SDK download than the Android SDK in the
|
||||
chromium source checkout (i.e. `src/third_party/android_emulator_sdk`).
|
||||
|
||||
4. Run the avd.py script. To start up _num_ emulators use -n. For non-x86 use
|
||||
3. Run the avd.py script. To start up _num_ emulators use -n. For non-x86 use
|
||||
--abi.
|
||||
|
||||
```shell
|
||||
|
@ -13,47 +13,19 @@ don’t mind erasing all data, rooting, and installing a userdebug build on.
|
||||
|
||||
## Get and build `content_shell_apk` for Android
|
||||
|
||||
(These instructions have been carefully distilled from the
|
||||
[Android Build Instructions](android_build_instructions.md).)
|
||||
More detailed insturctions in [android_build_instructions.md](android_build_instructions.md).
|
||||
|
||||
1. Get the code! You’ll want a second checkout as this will be
|
||||
Android-specific. You know the drill:
|
||||
https://www.chromium.org/developers/how-tos/get-the-code
|
||||
1. Append this to your `.gclient` file: `target_os = ['android']`
|
||||
1. Create `chromium.gyp_env` next to your `.gclient` file:
|
||||
`echo "{ 'GYP_DEFINES': 'OS=android', }" > chromium.gyp_env`
|
||||
1. (Note: All these scripts assume you’re using "bash" (default) as your
|
||||
shell.)
|
||||
1. Sync and runhooks (be careful not to run hooks on the first sync):
|
||||
|
||||
```
|
||||
gclient sync --nohooks
|
||||
. build/android/envsetup.sh
|
||||
gclient runhooks
|
||||
```
|
||||
|
||||
1. No need to install any API Keys.
|
||||
1. Install Oracle’s Java: http://goo.gl/uPRSq. Grab the appropriate x64 .bin
|
||||
file, `chmod +x`, and then execute to extract. You then move that extracted
|
||||
tree into /usr/lib/jvm/, rename it java-6-sun and set:
|
||||
|
||||
```
|
||||
export JAVA_HOME=/usr/lib/jvm/java-6-sun
|
||||
export ANDROID_JAVA_HOME=/usr/lib/jvm/java-6-sun
|
||||
```
|
||||
|
||||
1. Type ‘`java -version`’ and make sure it says java version `1.6.0_35` without
|
||||
any mention of openjdk before proceeding.
|
||||
1. `sudo build/install-build-deps-android.sh`
|
||||
1. Time to build!
|
||||
|
||||
```
|
||||
ninja -C out/Release content_shell_apk
|
||||
```
|
||||
```shell
|
||||
ninja -C out/Release content_shell_apk
|
||||
```
|
||||
|
||||
## Setup the physical device
|
||||
|
||||
Plug in your device. Make sure you can talk to your device, try "`adb shell ls`"
|
||||
Plug in your device. Make sure you can talk to your device, try:
|
||||
|
||||
```shell
|
||||
third_party/android_tools/sdk/platform-tools/adb shell ls
|
||||
```
|
||||
|
||||
## Root your device and install a userdebug build
|
||||
|
||||
@ -118,23 +90,13 @@ Telemetry" steps below).
|
||||
adb sync
|
||||
adb shell perf top # check that perf can get samples (don’t expect symbols)
|
||||
|
||||
## Install ContentShell
|
||||
## Install and Run ContentShell
|
||||
|
||||
Install with the following:
|
||||
|
||||
build/android/adb_install_apk.py \
|
||||
--apk out/Release/apks/ContentShell.apk \
|
||||
--apk_package org.chromium.content_shell
|
||||
out/Release/bin/content_shell_apk run
|
||||
|
||||
## Run ContentShell
|
||||
|
||||
Run with the following:
|
||||
|
||||
./build/android/adb_run_content_shell
|
||||
|
||||
If `content_shell` “stopped unexpectedly” use `adb logcat` to debug. If you see
|
||||
ResourceExtractor exceptions, a clean build is your solution.
|
||||
https://crbug.com/164220
|
||||
If `content_shell` “stopped unexpectedly” use `adb logcat` to debug.
|
||||
|
||||
## Setup a `symbols` directory with symbols from your build (not needed for Telemetry)
|
||||
|
||||
@ -177,7 +139,7 @@ from the device.
|
||||
|
||||
Run the following:
|
||||
|
||||
adb shell ps | grep content (look for the pid of the sandboxed_process)
|
||||
out/Release/content_shell_apk ps (look for the pid of the sandboxed_process)
|
||||
adb shell perf record -g -p 12345 sleep 5
|
||||
adb pull /data/perf.data
|
||||
|
||||
|
@ -29,9 +29,7 @@ laptop$ sshfs your.host.machine:/usr/local/code/chrome/src ./chrome_sshfs
|
||||
# Setup environment.
|
||||
|
||||
laptop$ cd chrome_sshfs
|
||||
laptop$ . build/android/envsetup.sh
|
||||
laptop$ adb devices
|
||||
laptop$ adb root
|
||||
laptop$ third_party/android_tools/sdk/platform-tools/adb devices
|
||||
|
||||
# Run tests.
|
||||
|
||||
|
Reference in New Issue
Block a user