Reason for revert:
crbug.com/342539 is likely happening because of the patch that this patch depends on. I need to ensure that logcats work on the bots before relanding (and that the corresponding steps fail if they don't.)
Original issue's description:
> I broke something by removing an apparently unused import that actually was used elsewhere. I addressed the issue by having the client code just call android_commands.GetAttachedDevices explicitly.
>
> BUG=168518
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=250206TBR=craigdh@chromium.org,frankf@chromium.org,cjhopman@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=168518
Review URL: https://codereview.chromium.org/159453002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@250264 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This adds a build step to generate mirrored images for use in
right-to-left (RTL) languages. Images are mirrored by flipping the
original image over the vertical axis. Every image must be explicitly
listed as mirrorable or non-mirrorable in a config file.
The goal: ensure that our RTL image assets are always up-to-date.
BUG=290225
NOTRY=true
Review URL: https://codereview.chromium.org/106173002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@243332 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Calling sys.exit() in a thread spawned by
multiprocessing.pool.ThreadPool causes an infinite hang that even SIGINT
can't fix. This is bad. Instead of calling sys.exit(), raise an
exception, crafted so that the important information (the failed
command's stdout and stderr) comes after the stacktrace and the copyable
command.
This also renames CheckCallDie() to CheckOutput() and changes it to
print stderr but not stdout by default. Suppressing stderr has hid bugs
in the past (e.g. aapt crunch failures), and hiding stdout is what we
usually want anyway.
R=cjhopman@chromium.org
Review URL: https://codereview.chromium.org/106923002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@239276 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This CL modifies the build to incorporate the expected C++ library version
in the Java code. This is then checked when the library is loaded, to
make sure that the C++ and Java builds match.
This CL also implements error handling when library loads fail or the
loaded version doesn't match the expected version.
BUG=311644
Review URL: https://codereview.chromium.org/59533009
git-svn-id: http://src.chromium.org/svn/trunk/src/build@237779 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This patch adds a new Chrome-specific dynamic linker for Android,
that implements RELRO section sharing in order to save about 1.3 MB
of RAM per renderer process in content-based programs (ContentShell,
ChromiumTestShell, Chrome, etc...)
The linker is disabled by default. For more details, see the corresponding bug entry.
This introduces a new test package (content_linker_test_apk) as well as a new test category. To build and test this feature, do the following:
ninja -C out/Debug content_linker_test_apk
build/android/test_runner.py linker
BUG=287739
R=qsr@chromium.org
Review URL: https://codereview.chromium.org/23717023
git-svn-id: http://src.chromium.org/svn/trunk/src/build@229921 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Currently, we are generating v14 layout and style resources from v17
resources by replacing Start and End attributes to Left and Right
attributes. However, it is not necessary for all cases, so make an
option to disable generate_v14_compatible_resources.py script and
only verify that there is no RTL attributes in the pre-v17 resources.
BUG=247049
Review URL: https://chromiumcodereview.appspot.com/18653002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@210555 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
When doing a gyp_managed_install, we install APKs to the attached
device. Currently this can fail in many ways (no device attached,
multiple devices attached, device offline, device doesn't have root,
etc.). In addition, we need to detect changes to the attached device
(particularly when the device is switched, when an APK is
uninstalled/updated).
The current approach is to check all this information in the action
interacting with the device. This means that when there is some
problem we print the same warning messages for every APK that is built,
and, in some cases, multiple times for each APK. Also, we have to run
every install/push action every build because we detect changes to the
attached device in that action.
This change creates a new build action, "get device configurations".
This action inspects the attached devices, filters out offline devices,
filters out devices without root, and then writes a configuration
file with the id+metadata for the first non-filtered device. This
configuration is then used by each of the build steps that interacts
with the device. This consolidates all the device checking to a single
place, and the build actions don't need to do any checking. In
addition, to detect changes in the attached device, we only need to run
this single action every build and the install/push actions will only
change when the device/metadata changes.
Also, with this change we can now gracefully handle the case where
multiple devices are attached (currently just write the configuration
for the first valid device and install to that one).
Review URL: https://chromiumcodereview.appspot.com/16831013
git-svn-id: http://src.chromium.org/svn/trunk/src/build@209582 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Many people's workflows assume that they can install the APK created in
out/Debug/apks. With the component build that APK is actually an
"incomplete" APK that cannot be manually installed (or rather causes
obscure errors when manually installed).
This change does two things. First, it moves the "incomplete" APK
output to out/Debug/<package_name>/<ApkName>.apk. This should prevent
accidental installs of the "incomplete" APK. Second, it introduces an
option (create_standalone_apk) that when doing a component build, if
set, will merge the shared libraries into the "incomplete" APK to
create a standalone APK. This standalone APK will be created in
out/Debug/apks/.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=207345
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=207516
Review URL: https://chromiumcodereview.appspot.com/14843017
git-svn-id: http://src.chromium.org/svn/trunk/src/build@208529 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This breaks the Android component build.
This reverts commit 125e64a9eb6406446fb864aea9fa887521f19616.
>> [Android] Support building standalone APK in component build
>>
>> Many people's workflows assume that they can install the APK created in
>> out/Debug/apks. With the component build that APK is actually an
>> "incomplete" APK that cannot be manually installed (or rather causes
>> obscure errors when manually installed).
>>
>> This change does two things. First, it moves the "incomplete" APK
>> output to out/Debug/<package_name>/<ApkName>.apk. This should prevent
>> accidental installs of the "incomplete" APK. Second, it introduces an
>> option (create_standalone_apk) that when doing a component build, if
>> set, will merge the shared libraries into the "incomplete" APK to
>> create a standalone APK. This standalone APK will be created in
>> out/Debug/apks/.
>>
>> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=207345
>>
>> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=207516
BUG=
R=cjhopman@chromium.org
Review URL: https://codereview.chromium.org/17291013
git-svn-id: http://src.chromium.org/svn/trunk/src/build@207587 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Many people's workflows assume that they can install the APK created in
out/Debug/apks. With the component build that APK is actually an
"incomplete" APK that cannot be manually installed (or rather causes
obscure errors when manually installed).
This change does two things. First, it moves the "incomplete" APK
output to out/Debug/<package_name>/<ApkName>.apk. This should prevent
accidental installs of the "incomplete" APK. Second, it introduces an
option (create_standalone_apk) that when doing a component build, if
set, will merge the shared libraries into the "incomplete" APK to
create a standalone APK. This standalone APK will be created in
out/Debug/apks/.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=207345
Review URL: https://chromiumcodereview.appspot.com/14843017
git-svn-id: http://src.chromium.org/svn/trunk/src/build@207516 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Many people's workflows assume that they can install the APK created in
out/Debug/apks. With the component build that APK is actually an
"incomplete" APK that cannot be manually installed (or rather causes
obscure errors when manually installed).
This change does two things. First, it moves the "incomplete" APK
output to out/Debug/<package_name>/<ApkName>.apk. This should prevent
accidental installs of the "incomplete" APK. Second, it introduces an
option (create_standalone_apk) that when doing a component build, if
set, will merge the shared libraries into the "incomplete" APK to
create a standalone APK. This standalone APK will be created in
out/Debug/apks/.
Review URL: https://chromiumcodereview.appspot.com/14843017
git-svn-id: http://src.chromium.org/svn/trunk/src/build@207345 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
If styles.xml has paddingStart and exists in values/, it will cause
crashes on Galaxy Tab&Note because style resources are not overrided by
the generated styles.xml (generate_v14_compatible_resources.py), which is to
avoid crashes on Galaxy Tab&Note (crbug.com/235118). So make
generate_v14_compatible_resource.py use styles.xml under values-v17/ not values/
BUG=243952
Review URL: https://chromiumcodereview.appspot.com/16125003
git-svn-id: http://src.chromium.org/svn/trunk/src/build@202812 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Gyp supports only very limited ways of changing behavior based upon
CONFIGURATION_NAME. Particularly, it does not support the way that was
supposed to enable/disable use of proguard.
Instead of trying to switch behavior in gyp, instead pass
CONFIGURATION_NAME, proguard_enabled, and
proguard_enabled_dex_input_path to dex.py and switch the behavior
there.
This also extracts the dex actions into build/android/dex_action.gypi
and uses that for the actions in both build/java.gypi and
build/java_apk.gypi.
BUG=240837
Review URL: https://chromiumcodereview.appspot.com/15231006
git-svn-id: http://src.chromium.org/svn/trunk/src/build@200958 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
There are several attributes introduced in API 17, mostly for BiDi(RTL) support, e.g., paddingStart.
This build script will generate another set of resource that is API 14 compatible by
converting those API 17 attributes to API 14 attributes, e.g., paddingStart -> paddingLeft.
The goal of this script is for programmers to use those attributes without worrying
about backward-compatibility care and related bugs. About the bugs, please refer to crbug.com/235118 .
BUG=235118
Review URL: https://chromiumcodereview.appspot.com/14476011
git-svn-id: http://src.chromium.org/svn/trunk/src/build@198325 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
If a user reinstalls/uninstalls/etc an APK, then the next build of that
APK should always install it (regardless of whether the md5sum of the
inputs matches the recording or not).
Adds an option to CheckCallAndRecord to force the call.
NOTRY=true
BUG=158821,234048
Review URL: https://codereview.chromium.org/14254005
git-svn-id: http://src.chromium.org/svn/trunk/src/build@196170 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
If the device folder is not specific to debug/release, then switching
configurations changes the state on the device without updating the
corresponding records on the host (i.e. it only updates the ones for
that configuration).
NOTRY=true
BUG=158821
Review URL: https://chromiumcodereview.appspot.com/14238023
git-svn-id: http://src.chromium.org/svn/trunk/src/build@195852 4ff67af0-8c30-449e-8e8b-ad334ec8d88c