summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authornavabi@chromium.org <navabi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-08 04:47:02 +0000
committernavabi@chromium.org <navabi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-08 04:47:02 +0000
commit456b296afb13e11cd98241e009bdb35c566aa7c3 (patch)
treea360eaabf920b34cff3805e5ee8f68ae92e691d7 /build
parentcc510d7e39a86c7409eaaa1af8ee33df3b5ac7dc (diff)
downloadchromium_src-456b296afb13e11cd98241e009bdb35c566aa7c3.zip
chromium_src-456b296afb13e11cd98241e009bdb35c566aa7c3.tar.gz
chromium_src-456b296afb13e11cd98241e009bdb35c566aa7c3.tar.bz2
Roll Android SDK in android_tools repo to api version 16.
The install-build-deps-android-sdk.sh is no longer necessary, since the SDK is checked out as part of the tree. It is still useful as an easy way to install the SDK/NDK if we want to use an alternate (i.e. if we explicitly export ANDROID_SDK_ROOT it won't use the tree version). BUG= Review URL: https://chromiumcodereview.appspot.com/10823174 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150499 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rwxr-xr-xbuild/android/buildbot_functions.sh19
-rwxr-xr-xbuild/android/buildbot_fyi_builder.sh1
-rwxr-xr-xbuild/android/buildbot_fyi_tester.sh1
-rwxr-xr-xbuild/android/buildbot_main.sh1
-rwxr-xr-xbuild/android/buildbot_try_builder.sh1
-rwxr-xr-xbuild/android/buildbot_try_compile.sh1
-rwxr-xr-xbuild/android/buildbot_try_compile_test.sh1
-rwxr-xr-xbuild/android/buildbot_try_tester.sh1
-rwxr-xr-xbuild/android/buildbot_webkit_main.sh1
-rwxr-xr-xbuild/android/emulator.py2
-rwxr-xr-xbuild/android/envsetup.sh3
-rwxr-xr-xbuild/android/envsetup_functions.sh5
-rwxr-xr-xbuild/install-build-deps-android-sdk.sh179
13 files changed, 4 insertions, 212 deletions
diff --git a/build/android/buildbot_functions.sh b/build/android/buildbot_functions.sh
index 4fb5f28..a848d282 100755
--- a/build/android/buildbot_functions.sh
+++ b/build/android/buildbot_functions.sh
@@ -43,20 +43,6 @@ function bb_setup_environment {
export ANDROID_NDK_ROOT=/usr/local/google/android-ndk-r7
}
-# Install the build deps by running
-# build/install-build-deps-android-sdk.sh. This may update local tools.
-# $1: source root.
-function bb_install_build_deps {
- echo "@@@BUILD_STEP install build deps android@@@"
- local script="$1/build/install-build-deps-android-sdk.sh"
- if [[ -f "$script" ]]; then
- "$script"
- else
- echo "@@@STEP_WARNINGS@@@"
- echo "Cannot find $script; why?"
- fi
-}
-
# Function to force-green a bot.
function bb_force_bot_green_and_exit {
echo "@@@BUILD_STEP Bot forced green.@@@"
@@ -109,11 +95,6 @@ function bb_baseline_setup {
NEED_CLOBBER=1
fi
- # Setting up a new bot? Must do this before envsetup.sh
- if [ ! -d "${ANDROID_NDK_ROOT}" ] ; then
- bb_install_build_deps $SRC_ROOT
- fi
-
. build/android/envsetup.sh
if [ "$NEED_CLOBBER" -eq 1 ]; then
diff --git a/build/android/buildbot_fyi_builder.sh b/build/android/buildbot_fyi_builder.sh
index 5eb872c..519093d 100755
--- a/build/android/buildbot_fyi_builder.sh
+++ b/build/android/buildbot_fyi_builder.sh
@@ -14,6 +14,5 @@ BB_SRC_ROOT="$(cd "$(dirname $0)/../.."; pwd)"
. "${BB_SRC_ROOT}/build/android/buildbot_functions.sh"
bb_baseline_setup "$BB_SRC_ROOT" "$@"
-bb_install_build_deps "$BB_SRC_ROOT"
bb_compile
bb_zip_build
diff --git a/build/android/buildbot_fyi_tester.sh b/build/android/buildbot_fyi_tester.sh
index 86b4998..2f52765 100755
--- a/build/android/buildbot_fyi_tester.sh
+++ b/build/android/buildbot_fyi_tester.sh
@@ -13,7 +13,6 @@ BB_SRC_ROOT="$(cd "$(dirname $0)/../.."; pwd)"
. "${BB_SRC_ROOT}/build/android/buildbot_functions.sh"
bb_baseline_setup "$BB_SRC_ROOT" "$@"
-bb_install_build_deps "$BB_SRC_ROOT"
bb_extract_build
bb_run_tests
bb_run_content_shell_instrumentation_test
diff --git a/build/android/buildbot_main.sh b/build/android/buildbot_main.sh
index a5897d2..a66a197 100755
--- a/build/android/buildbot_main.sh
+++ b/build/android/buildbot_main.sh
@@ -14,6 +14,5 @@ ROOT=$(cd "$(dirname $0)"; pwd)
## bb_force_bot_green_and_exit
bb_baseline_setup "${ROOT}"/../..
-bb_install_build_deps "${ROOT}"/../..
bb_compile
diff --git a/build/android/buildbot_try_builder.sh b/build/android/buildbot_try_builder.sh
index 15fe311..fc58f0f 100755
--- a/build/android/buildbot_try_builder.sh
+++ b/build/android/buildbot_try_builder.sh
@@ -14,6 +14,5 @@ BB_SRC_ROOT="$(cd "$(dirname $0)/../.."; pwd)"
# You will also need to change buildbot_try_tester.sh
bb_baseline_setup "$BB_SRC_ROOT" "$@"
-bb_install_build_deps "$BB_SRC_ROOT"
bb_compile
bb_zip_build
diff --git a/build/android/buildbot_try_compile.sh b/build/android/buildbot_try_compile.sh
index 49a7743..27b09fc 100755
--- a/build/android/buildbot_try_compile.sh
+++ b/build/android/buildbot_try_compile.sh
@@ -13,5 +13,4 @@ ROOT=$(cd "$(dirname $0)"; pwd)
## bb_force_bot_green_and_exit
bb_baseline_setup "${ROOT}"/../..
-bb_install_build_deps "${ROOT}"/../..
bb_compile
diff --git a/build/android/buildbot_try_compile_test.sh b/build/android/buildbot_try_compile_test.sh
index 53c3c6a..b8d89a3 100755
--- a/build/android/buildbot_try_compile_test.sh
+++ b/build/android/buildbot_try_compile_test.sh
@@ -13,7 +13,6 @@ ROOT=$(cd "$(dirname $0)"; pwd)
## bb_force_bot_green_and_exit
bb_baseline_setup "${ROOT}"/../..
-bb_install_build_deps "${ROOT}"/../..
bb_compile
bb_run_tests
bb_run_content_shell_instrumentation_test
diff --git a/build/android/buildbot_try_tester.sh b/build/android/buildbot_try_tester.sh
index acbbf18..dccfe3b 100755
--- a/build/android/buildbot_try_tester.sh
+++ b/build/android/buildbot_try_tester.sh
@@ -13,7 +13,6 @@ BB_SRC_ROOT="$(cd "$(dirname $0)/../.."; pwd)"
# You will also need to change buildbot_try_builder.sh
bb_baseline_setup "$BB_SRC_ROOT" "$@"
-bb_install_build_deps "$BB_SRC_ROOT"
bb_extract_build
bb_run_tests
bb_run_content_shell_instrumentation_test
diff --git a/build/android/buildbot_webkit_main.sh b/build/android/buildbot_webkit_main.sh
index d331bc6..cae1ef1 100755
--- a/build/android/buildbot_webkit_main.sh
+++ b/build/android/buildbot_webkit_main.sh
@@ -14,6 +14,5 @@ ROOT=$(cd "$(dirname $0)"; pwd)
## bb_force_bot_green_and_exit
bb_baseline_setup "${ROOT}"/../..
-bb_install_build_deps "${ROOT}"/../..
bb_compile
diff --git a/build/android/emulator.py b/build/android/emulator.py
index 0d7c96b..532b570 100755
--- a/build/android/emulator.py
+++ b/build/android/emulator.py
@@ -175,7 +175,7 @@ class Emulator(object):
'create', 'avd',
'--name', avd_name,
'--abi', self.abi,
- '--target', 'android-15',
+ '--target', 'android-16',
'-c', '64M',
'--force',
]
diff --git a/build/android/envsetup.sh b/build/android/envsetup.sh
index 2c19dba..6d453f1 100755
--- a/build/android/envsetup.sh
+++ b/build/android/envsetup.sh
@@ -55,6 +55,9 @@ the one you want."
echo "${CHROME_SRC}"
fi
+# Android sdk platform version to use
+export ANDROID_SDK_VERSION=16
+
# Source functions script. The file is in the same directory as this script.
. "$(dirname $BASH_SOURCE)"/envsetup_functions.sh
diff --git a/build/android/envsetup_functions.sh b/build/android/envsetup_functions.sh
index 9b8083d..0c7a2a0 100755
--- a/build/android/envsetup_functions.sh
+++ b/build/android/envsetup_functions.sh
@@ -165,8 +165,6 @@ sdk_build_init() {
# Set default target.
export TARGET_PRODUCT="${TARGET_PRODUCT:-trygon}"
- # Android sdk platform version to use
- export ANDROID_SDK_VERSION=15
# Unset toolchain so that it can be set based on TARGET_PRODUCT.
# This makes it easy to switch between architectures.
unset ANDROID_TOOLCHAIN
@@ -226,9 +224,6 @@ non_sdk_build_init() {
# We export "ANDROID_NDK_ROOT" for building Chromium for Android by NDK.
export ANDROID_NDK_ROOT=${ANDROID_BUILD_TOP}/prebuilts/ndk/android-ndk-r7
- # Android sdk platform version to use
- export ANDROID_SDK_VERSION=15
-
# We export "ANDROID_SDK_ROOT" for building Java source with the SDK.
export ANDROID_SDK_ROOT=${ANDROID_BUILD_TOP}/prebuilts/sdk/\
${ANDROID_SDK_VERSION}
diff --git a/build/install-build-deps-android-sdk.sh b/build/install-build-deps-android-sdk.sh
deleted file mode 100755
index 69ea3e5..0000000
--- a/build/install-build-deps-android-sdk.sh
+++ /dev/null
@@ -1,179 +0,0 @@
-#!/bin/bash -x
-
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-set -e
-
-# The script is to install Android SDK, NDK for build chromium on Android, and
-# doesn't need to run as root.
-
-# Using Android 4.0, API Level: 14 (ice cream sandwich). The SDK package is
-# about 25M.
-SDK_TARGET_VER=20
-
-SDK_FILE_NAME="android-sdk_r${SDK_TARGET_VER}-linux.tgz"
-SDK_DOWNLOAD_URL="http://dl.google.com/android/${SDK_FILE_NAME}"
-SDK_MD5SUM="22a81cf1d4a951c62f71a8758290e9bb"
-
-# Using "ANDROID_SDK_ROOT/tools/android list targets" to get the matching target
-# id which will be loaded in simulator for testing.
-# For example: the output of the listed the target could be below, and the
-# 'android-13' is the SDK_TARGET_ID in this case.
-# id: 9 or "android-13"
-# Name: Android 3.2
-# Type: Platform
-# API level: 13
-# Revision: 1
-# Skins: WXGA (default)
-SDK_TARGET_ID=android-15
-
-# Using NDK r7; The package is about 64M.
-# *** DO NOT UPDATE THE NDK without updating the 64-bit linker changes ***
-# *** at the end of this file ***
-NDK_FILE_NAME="android-ndk-r7-linux-x86.tar.bz2"
-NDK_DOWNLOAD_URL="http://dl.google.com/android/ndk/${NDK_FILE_NAME}"
-NDK_MD5SUM="bf15e6b47bf50824c4b96849bf003ca3"
-
-# The temporary directory used to store the downloaded file.
-TEMPDIR=$(mktemp -d)
-cleanup() {
- local status=${?}
- trap - EXIT
- rm -rf "${TEMPDIR}"
- exit ${status}
-}
-trap cleanup EXIT
-
-##########################################################
-# Download and install a tgz package by wget and tar -xvf.
-# The current directory is changed in this function.
-# Arguments:
-# local_file_name, the name of downloaded file.
-# download_url, the url to download the package.
-# md5, the package's md5 which could be found in download page.
-# install_path, where the package should be installed.
-# Returns:
-# None
-##########################################################
-install_dev_kit() {
- local local_file_name="${1}"
- local download_url="${2}"
- local md5="${3}"
- local install_path="${4}"
-
- cd "${TEMPDIR}"
- wget "${download_url}"
-
- local computed_md5=$(md5sum "${local_file_name}" | cut -d' ' -f1)
- if [[ "${computed_md5}" != "${md5}" ]]; then
- echo "Downloaded ${local_file_name} has bad md5sum, which is expected" >& 2
- echo "to be ${md5} but was ${computed_md5}" >& 2
- exit 1
- fi
-
- echo "Install ${local_file_name}"
- mv "${local_file_name}" "${install_path}"
- cd "${install_path}"
- tar -xf "${local_file_name}"
-}
-
-if [[ -z "${ANDROID_SDK_ROOT}" ]]; then
- echo "Please set ANDROID_SDK_ROOT to where they should installed to." >& 2
- echo "For example: /usr/local/android-sdk-linux_x86" >& 2
- exit 1
-fi
-
-if [[ -z "${ANDROID_NDK_ROOT}" ]]; then
- echo "Please set ANDROID_NDK_ROOT to where they should installed to." >& 2
- echo "For example: /usr/local/android-ndk-r6b" >& 2
- exit 1
-fi
-
-# Install Android SDK if it doesn't exist.
-if [[ ! -d "${ANDROID_SDK_ROOT}" ]]; then
- echo 'Install ANDROID SDK ...'
- (install_dev_kit "${SDK_FILE_NAME}" "${SDK_DOWNLOAD_URL}" "${SDK_MD5SUM}" \
- $(dirname "${ANDROID_SDK_ROOT}"))
-fi
-
-# Check the installed SDK revision
-SDK_VER=$(sed '/^\#/d' ${ANDROID_SDK_ROOT}/tools/source.properties | \
- grep 'Pkg.Revision' |tail -n 1 | cut -d "=" -f2- | \
- sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
-
-# Install the target if it doesn't exist. The package installed above contains
-# no platform, platform-tool or tool, all those should be installed by
-# ${ANDROID_SDK_ROOT}/tools/android.
-# Also, if current SDK version is lower than ${SDK_TARGET_VER}, upgrade the SDK.
-found=$("${ANDROID_SDK_ROOT}/tools/android" list targets \
- | grep "${SDK_TARGET_ID}" | wc -l)
-if [[ "$found" = "0" || ${SDK_VER} -lt ${SDK_TARGET_VER} ]]; then
- # Updates the SDK by installing the necessary components.
- # From current configuration, all android platforms will be installed.
- # This will take a little bit long time.
- echo "Upgrade SDK and install platform, platform-tool and tool ..."
-
- if [[ ${SDK_VER} -lt 17 ]]; then
- update_flag=" -o "
- else
- update_flag=" --all "
- fi
- # Updates the SDK to latest version firstly.
- "${ANDROID_SDK_ROOT}"/tools/android update sdk ${update_flag} --no-ui \
- --filter platform-tool,tool,system-image,${SDK_TARGET_ID}
-fi
-
-# Create a Android Virtual Device named 'buildbot' with default hardware
-# configuration and override the existing one, since there is no easy way to
-# check whether current AVD has correct configuration and it takes almost no
-# time to create a new one. Create one ARM AVD and one x86 AVD.
-export ANDROID_SDK_HOME=${ANDROID_SDK_ROOT}
-"${ANDROID_SDK_ROOT}/tools/android" --silent create avd --name avd_armeabi \
- --abi armeabi-v7a --target ${SDK_TARGET_ID} -c 64M --force <<< "no"
-
-"${ANDROID_SDK_ROOT}/tools/android" --silent create avd --name avd_x86 \
- --abi x86 --target ${SDK_TARGET_ID} -c 64M --force <<< "no"
-
-# Install Android NDK if it doesn't exist.
-if [[ ! -d "${ANDROID_NDK_ROOT}" ]]; then
- echo 'Install ANDROID NDK ...'
- (install_dev_kit "${NDK_FILE_NAME}" "${NDK_DOWNLOAD_URL}" "${NDK_MD5SUM}" \
- $(dirname "${ANDROID_NDK_ROOT}"))
-fi
-
-# Install the 64-bit linker if needed.
-ROOT=$(cd "$(dirname $0)/.."; pwd)
-LINKER_DIR_PREFIX="$ANDROID_NDK_ROOT/toolchains/\
-arm-linux-androideabi-4.4.3/prebuilt/linux-x86"
-LINKER_DIRNAME_1="$LINKER_DIR_PREFIX/bin"
-LINKER_BASENAME_1=arm-linux-androideabi-ld
-LINKER_DIRNAME_2="$LINKER_DIR_PREFIX/arm-linux-androideabi/bin"
-LINKER_BASENAME_2=ld
-NEW_LINKER=arm-linux-androideabi-ld.e4df3e0a5bb640ccfa2f30ee67fe9b3146b152d6
-
-# $1: destination directory
-# $2: destination binary
-function replace_linker {
- local linker_dirname=$1
- local linker_basename=$2
- if [[ -f "$ROOT/third_party/aosp/$NEW_LINKER" ]]; then
- if [[ -d "$linker_dirname" ]]; then
- if [[ ! -f "$linker_dirname/$NEW_LINKER" ]]; then
- echo "Installing linker in $linker_dirname"
- cp $ROOT/third_party/aosp/$NEW_LINKER "$linker_dirname/$NEW_LINKER"
- mv "$linker_dirname/$linker_basename" \
- "$linker_dirname/$linker_basename.orig"
- ( cd "$linker_dirname" ; ln -s "$NEW_LINKER" "$linker_basename" )
- fi
- if [[ ! -f "$linker_dirname/$NEW_LINKER" ]]; then
- echo "Could not copy linker"
- exit 1
- fi
- fi
- fi
-}
-
-replace_linker $LINKER_DIRNAME_1 $LINKER_BASENAME_1
-replace_linker $LINKER_DIRNAME_2 $LINKER_BASENAME_2