OSDN Git Service

android-x86/build.git
8 years agoMerge "Fix path escaping for aidl generated java"
Christopher Wiley [Fri, 24 Jun 2016 16:00:33 +0000 (16:00 +0000)]
Merge "Fix path escaping for aidl generated java"

8 years agoMerge "Fix the path for verity_key replacement when signing."
Tao Bao [Fri, 24 Jun 2016 05:20:20 +0000 (05:20 +0000)]
Merge "Fix the path for verity_key replacement when signing."

8 years agoMerge "Add ability to pass in payload_signer args"
Tao Bao [Fri, 24 Jun 2016 05:20:06 +0000 (05:20 +0000)]
Merge "Add ability to pass in payload_signer args"

8 years agoMerge "releasetools: Support using payload_signer."
Tao Bao [Fri, 24 Jun 2016 05:19:53 +0000 (05:19 +0000)]
Merge "releasetools: Support using payload_signer."

8 years agoMerge "releasetools: replace verity keyid"
Tao Bao [Fri, 24 Jun 2016 05:19:40 +0000 (05:19 +0000)]
Merge "releasetools: replace verity keyid"

8 years agoMerge "Replace OTA keys when signing for A/B devices."
Tao Bao [Fri, 24 Jun 2016 05:19:22 +0000 (05:19 +0000)]
Merge "Replace OTA keys when signing for A/B devices."

8 years agoFix the path for verity_key replacement when signing.
Tao Bao [Sat, 18 Jun 2016 00:01:22 +0000 (17:01 -0700)]
Fix the path for verity_key replacement when signing.

system_root_image expects the key at ROOT/verity_key as opposed to
BOOT/verity_key. Also refactor the verity key replacement lines.

Bug: 29397395
Test: 'sign_target_files_apks.py --replace_verity_private_key newkey --replace_verity_public_key newkey.pub target_files.zip signed-target_files.zip' and verify the replaced key in boot.img.
Change-Id: I58a5defff4be008ad55d4b5a5b7148569c3b8d66
(cherry picked from commit e0ee794fa16b206e792eac0942f448df34247fd8)

8 years agoAdd ability to pass in payload_signer args
Baligh Uddin [Wed, 22 Jun 2016 19:14:16 +0000 (12:14 -0700)]
Add ability to pass in payload_signer args

Bug: 28701652
Change-Id: I110d5fc14446e4a6a0f8e25dcb0d300decdf09a4
(cherry picked from commit 2abbbd03339947327ada0becba5bd4ef41f1bdab)

8 years agoreleasetools: Support using payload_signer.
Tao Bao [Tue, 21 Jun 2016 00:55:06 +0000 (17:55 -0700)]
releasetools: Support using payload_signer.

For A/B OTAs, by default it calls 'openssl pkeyutl' to sign the payload
and metadata with the package private key. If the private key cannot be
accessed directly, a payload signer that knows how to do that should be
supplied via "--payload_signer <signer>".

The signer will be called with "-inkey <path_to_private_key>",
"-in <input_file>" and "-out <output_file>" parameters.

Test: Use a dummy signer, call 'ota_from_target_files.py --payload_signer <signer> <target_files.zip> <ota.zip>' and verify the signatures in the generated package.
Bug: 28701652
Change-Id: I26cfdd3fdba6fc90799221741b75426988e46fd3
(cherry picked from commit dea0f8bfed01fa620d23d7dd8ff533246f26e8a0)

8 years agoreleasetools: replace verity keyid
Badhri Jagan Sridharan [Fri, 17 Jun 2016 02:58:44 +0000 (19:58 -0700)]
releasetools: replace verity keyid

Replace verity keyid with the keyid extracted from cert
passed through --replace_verity_keyid. The veritykeyid in the
BOOT/cmdline of input target files is replaced with keyid
extracted from --replace_verity_keyid and written to the
output target files.

BUG: 28384658
Change-Id: Ic683f36f543c4fcd94b6f95e40f01200fbf45ee1
(cherry picked from commit b58d23fe00697a0cf9c7c9c75639fd8c7b5bb016)

8 years agoReplace OTA keys when signing for A/B devices.
Tao Bao [Thu, 16 Jun 2016 21:41:24 +0000 (14:41 -0700)]
Replace OTA keys when signing for A/B devices.

It replaces the package verification key (change of path due to
system_root_image flag), as well as the payload verification key.

Bug: 29397395
Change-Id: I10435072aaf4356f2d8b5e1b6e82eb9cead7ad62
(cherry picked from commit 24a72064309dd55d4aa80b70480eed55c54f818d)

8 years agoFix path escaping for aidl generated java
Christopher Wiley [Thu, 23 Jun 2016 23:44:47 +0000 (16:44 -0700)]
Fix path escaping for aidl generated java

Bug: 29619260
Change-Id: I806044573661c61e691adf36a47092188db87ab6
Test: Generated java with ../ in paths appears in the right place.

8 years agoMerge "Use Builder pattern for ApkVerifier parameters."
Treehugger Robot [Thu, 23 Jun 2016 00:31:53 +0000 (00:31 +0000)]
Merge "Use Builder pattern for ApkVerifier parameters."

8 years agoUse Builder pattern for ApkVerifier parameters.
Alex Klyubin [Tue, 21 Jun 2016 17:46:56 +0000 (10:46 -0700)]
Use Builder pattern for ApkVerifier parameters.

This should make it easier to add parameters/options without breaking
existing clients.

Bug: 27461702
Change-Id: Ia4577f78d703a6b91828dd08492c78d5e9afb110

8 years agoMerge "Finish refactoring tests to NATIVE_TESTS"
Treehugger Robot [Wed, 22 Jun 2016 20:37:40 +0000 (20:37 +0000)]
Merge "Finish refactoring tests to NATIVE_TESTS"

8 years agoFinish refactoring tests to NATIVE_TESTS
Dan Willemsen [Wed, 22 Jun 2016 07:27:54 +0000 (00:27 -0700)]
Finish refactoring tests to NATIVE_TESTS

Now that the source trees all use NATIVE_TESTS for intermediate files
and generated sources, make it a requirement.

Change-Id: Id5718fabe63f6e8dde7981a6f0f5bd89e0ec7ee5

8 years agoMerge "move test artifact build rules into open source location"
Treehugger Robot [Wed, 22 Jun 2016 00:47:27 +0000 (00:47 +0000)]
Merge "move test artifact build rules into open source location"

8 years agomove test artifact build rules into open source location
Guang Zhu [Tue, 21 Jun 2016 05:03:24 +0000 (22:03 -0700)]
move test artifact build rules into open source location

Bug: 29404304
Change-Id: I5553d275fe478fac0d6fe00a931a1c1f1e3bdd59
(cherry picked from commit 8322be725282d4ac64a65b44e2f6b0c681e35819)

8 years agoMerge "Clean up vendor image handling"
Dan Willemsen [Tue, 21 Jun 2016 21:54:40 +0000 (21:54 +0000)]
Merge "Clean up vendor image handling"

8 years agoMerge "Remove --no_prereq flag from OTA script."
Elliott Hughes [Mon, 20 Jun 2016 23:57:56 +0000 (23:57 +0000)]
Merge "Remove --no_prereq flag from OTA script."

8 years agoRemove --no_prereq flag from OTA script.
Elliott Hughes [Mon, 20 Jun 2016 21:35:47 +0000 (14:35 -0700)]
Remove --no_prereq flag from OTA script.

Bug: http://b/29393071
Test: aosp_flounder "make dist"
Change-Id: I9ec85210e118f7e525291e31ab4081a2bd10f998

8 years agoMerge "Also turn down the logging for dex2oat on the boot image"
David Sehr [Mon, 20 Jun 2016 19:50:54 +0000 (19:50 +0000)]
Merge "Also turn down the logging for dex2oat on the boot image"

8 years agoAlso turn down the logging for dex2oat on the boot image
Joe Onorato [Thu, 17 Mar 2016 17:12:36 +0000 (10:12 -0700)]
Also turn down the logging for dex2oat on the boot image

Bug: 27499257
Change-Id: I190ce72b44e49451dab44902e2ca33dd5c2815ce
(cherry picked from commit 632db649fb16c0a8259c36dcf7534c8596273d89)

8 years agoClean up vendor image handling
Dan Willemsen [Fri, 17 Jun 2016 21:07:37 +0000 (14:07 -0700)]
Clean up vendor image handling

Standardize symlinking /system/vendor -> /vendor for aosp_* devices,
since some /vendor binaries still use /system/vendor/... paths.

Support using a prebuilt vendor image and including it into all the
normal packaging steps.

Bug: 28987532
Change-Id: I27040e8a8d1df0777e16cd1e3c3a9f1b28695e96

8 years agoMerge "Let caller handle NoSuchAlgorithmException."
Alex Klyubin [Fri, 17 Jun 2016 20:36:00 +0000 (20:36 +0000)]
Merge "Let caller handle NoSuchAlgorithmException."

8 years agoLet caller handle NoSuchAlgorithmException.
Alex Klyubin [Thu, 16 Jun 2016 16:21:54 +0000 (09:21 -0700)]
Let caller handle NoSuchAlgorithmException.

This surfaces relevant NoSuchAlgorithmExceptions to the caller instead
of rethrowing as other exception types. Some setups need to be able to
distringuish issues due to their own misconfiguration
(required crypto algorithm mising -- NoSuchAlgorithmException) from
issues with the APK being signed or verified.

Bug: 27461702
Change-Id: I993f73edb29b2cd4cc485734a89a924ec357ef19

8 years agoMerge "maxSdkVersion can be specified for APK verification."
Alex Klyubin [Fri, 17 Jun 2016 19:10:42 +0000 (19:10 +0000)]
Merge "maxSdkVersion can be specified for APK verification."

8 years agomaxSdkVersion can be specified for APK verification.
Alex Klyubin [Fri, 17 Jun 2016 16:38:32 +0000 (09:38 -0700)]
maxSdkVersion can be specified for APK verification.

This enables verification of APKs which are served to a specific
range of Android platform versions, or to replicate behavior of
particular platform versions.

Bug: 27461702
Change-Id: I44ab4c99419eb97d72c4ccd109137fe1efda577d

8 years agoMerge "Reject PKCS#7 SignerInfo with unsupported parameters."
Alex Klyubin [Fri, 17 Jun 2016 15:56:51 +0000 (15:56 +0000)]
Merge "Reject PKCS#7 SignerInfo with unsupported parameters."

8 years agoMerge "Remove obsolete MTD support from the releasetools scripts."
Treehugger Robot [Fri, 17 Jun 2016 04:47:47 +0000 (04:47 +0000)]
Merge "Remove obsolete MTD support from the releasetools scripts."

8 years agoRemove obsolete MTD support from the releasetools scripts.
Elliott Hughes [Thu, 16 Jun 2016 00:04:54 +0000 (17:04 -0700)]
Remove obsolete MTD support from the releasetools scripts.

Bug: http://b/29250988
Change-Id: I653dc306485c6b35411840b53211d42eb6d19e34

8 years agoMerge "Add new Android.mk to handle repo move"
Treehugger Robot [Thu, 16 Jun 2016 23:25:45 +0000 (23:25 +0000)]
Merge "Add new Android.mk to handle repo move"

8 years agoMerge "Remove build/libs"
Treehugger Robot [Thu, 16 Jun 2016 22:49:35 +0000 (22:49 +0000)]
Merge "Remove build/libs"

8 years agoAdd new Android.mk to handle repo move
Dan Willemsen [Thu, 16 Jun 2016 22:30:19 +0000 (15:30 -0700)]
Add new Android.mk to handle repo move

We're moving the platform/build repository down a level, then symlinking
the directories and necessary files back into build/. So if we're still
in build/, keep searching for Android.mk files, otherwise stop, since
they'll be found through the symlinks.

Bug: 28001743
Change-Id: Ieea6e3b1fca265b548395c6af148ebb4efa43b0f

8 years agoRemove build/libs
Dan Willemsen [Thu, 16 Jun 2016 21:52:47 +0000 (14:52 -0700)]
Remove build/libs

There's only a single library, libhost, and it's only used by acp and
atree in build/tools, move it there.

Bug: 28001743
Change-Id: Ie404d2793710de4e265a6fa95d462c32d4042623

8 years agoReject PKCS#7 SignerInfo with unsupported parameters.
Alex Klyubin [Wed, 15 Jun 2016 16:58:53 +0000 (09:58 -0700)]
Reject PKCS#7 SignerInfo with unsupported parameters.

This addresses the TODO to mimic the behavior of Android when
verifying APK JAR signatures. Unfortunately, the behavior of Android
kept changing in interesting ways between different platform versions.
This is hard-coded as a big lookup.

Bug: 27461702
Change-Id: I49bc181ee05f774ef8ee041af870385b35212c23

8 years agoMerge "Support wiping userdata for A/B OTA packages."
Treehugger Robot [Thu, 16 Jun 2016 15:39:23 +0000 (15:39 +0000)]
Merge "Support wiping userdata for A/B OTA packages."

8 years agoMerge changes Ib6ffcc38,Ia58e6bc1
Dan Willemsen [Thu, 16 Jun 2016 15:38:02 +0000 (15:38 +0000)]
Merge changes Ib6ffcc38,Ia58e6bc1

* changes:
  Check that NDK-built modules only link to NDK-built modules
  Add macros for printing pretty warnings/errors in rules

8 years agoSupport wiping userdata for A/B OTA packages.
Tao Bao [Wed, 15 Jun 2016 00:48:11 +0000 (17:48 -0700)]
Support wiping userdata for A/B OTA packages.

update_engine now accepts POWERWASH=1 to schedule a factory reset in
the post-install phase. Hook up with the --wipe_user_data flag in the
OTA script.

Bug: 28700985
Change-Id: Ie73876a61db90d124d2af588d674757376e9aabc
(cherry picked from commit 38ca0be399df26514f0412c7b7fca8050d36e9e2)

8 years agoCheck that NDK-built modules only link to NDK-built modules
Dan Willemsen [Tue, 7 Jun 2016 21:25:14 +0000 (14:25 -0700)]
Check that NDK-built modules only link to NDK-built modules

Modules built against the NDK should only link against modules also
built against the NDK (or link to the NDK prebuilts). This patch
attempts to catch these cases, and prints a large warning when this is
violated. Once the tree is cleaned up, this will change to an error.

Change-Id: Ib6ffcc38d9161abdbe45a58af26ba429fb6f1876

8 years agoAdd macros for printing pretty warnings/errors in rules
Dan Willemsen [Thu, 16 Jun 2016 02:20:57 +0000 (19:20 -0700)]
Add macros for printing pretty warnings/errors in rules

Change-Id: Ia58e6bc1328c84e5f4ba1f6a2fd2d650e94e127e

8 years agoMerge "Fix kati --no_ignore_dirty usage"
Treehugger Robot [Wed, 15 Jun 2016 22:41:32 +0000 (22:41 +0000)]
Merge "Fix kati --no_ignore_dirty usage"

8 years agoMerge "Forbid libstdc++ on Linux and Darwin"
Dan Willemsen [Wed, 15 Jun 2016 22:38:30 +0000 (22:38 +0000)]
Merge "Forbid libstdc++ on Linux and Darwin"

8 years agoFix kati --no_ignore_dirty usage
Dan Willemsen [Wed, 15 Jun 2016 21:55:58 +0000 (14:55 -0700)]
Fix kati --no_ignore_dirty usage

Kati only supports a single use of --no_ignore_dirty, so we were
ignoring the SOONG_ANDROID_MK file, and only detecting changes to
SOONG_MAKEVARS_MK. Fix this by using a pattern that should apply to both
of those makefiles.

Change-Id: I46390f9887f95f1db0efe4e93339667f35ebc67c

8 years agoForbid libstdc++ on Linux and Darwin
Dan Willemsen [Wed, 15 Jun 2016 20:41:45 +0000 (13:41 -0700)]
Forbid libstdc++ on Linux and Darwin

The last user has been removed, forbid any modules from selecting this.

Change-Id: Idd9ef6ca4b6c6754935d59c4a09c7d213ae481c1

8 years agoMerge "Don't depend on Bouncy Castle."
Alex Klyubin [Wed, 15 Jun 2016 20:32:34 +0000 (20:32 +0000)]
Merge "Don't depend on Bouncy Castle."

8 years agoMerge "Faster and cleaner way to obtain UTF-8 encoded form."
Treehugger Robot [Tue, 14 Jun 2016 22:37:10 +0000 (22:37 +0000)]
Merge "Faster and cleaner way to obtain UTF-8 encoded form."

8 years agoMerge "Use more prebuilt build-tools"
Treehugger Robot [Tue, 14 Jun 2016 22:14:06 +0000 (22:14 +0000)]
Merge "Use more prebuilt build-tools"

8 years agoFaster and cleaner way to obtain UTF-8 encoded form.
Alex Klyubin [Tue, 14 Jun 2016 21:18:21 +0000 (14:18 -0700)]
Faster and cleaner way to obtain UTF-8 encoded form.

Instead of specifying character encoding by name, the faster, cleaner,
and safer way is to use StandardCharsets.UTF_8.

Bug: 27461702
Change-Id: I897284d3ceeb44a21cc74de09a9b25f6aec8c205

8 years agoMerge "APK JAR signature verifier."
Alex Klyubin [Tue, 14 Jun 2016 20:56:27 +0000 (20:56 +0000)]
Merge "APK JAR signature verifier."

8 years agoUse more prebuilt build-tools
Dan Willemsen [Mon, 6 Jun 2016 21:44:00 +0000 (14:44 -0700)]
Use more prebuilt build-tools

For acp, we've been using an old prebuilt in prebuilts/sdk, but it's not
part of the SDK. Instead, we'll use a prebuilt in the build-tools
repository.

For ijar, we've been using the host libstdc++ to workaround the lack of
libc++ on some unbundled branches. Instead, use a prebuilt that can use
libc++.

For ziptime, we've been disabling it on unbundled branches, due to the
lack of libc++. Instead, use a prebuilt version of ziptime that can use
the prebuilt libc++.

Change-Id: If80f845ea06f76e3fe6765964e77c864eaf303d0

8 years agoMerge "Add a libc++ version of ijar for prebuilt use"
Treehugger Robot [Tue, 14 Jun 2016 18:34:38 +0000 (18:34 +0000)]
Merge "Add a libc++ version of ijar for prebuilt use"

8 years agoDon't depend on Bouncy Castle.
Alex Klyubin [Tue, 14 Jun 2016 17:26:41 +0000 (10:26 -0700)]
Don't depend on Bouncy Castle.

This switches PKCS#7 SignedData generation code from Bouncy Castle to
OpenJDK's proprietary internal API. This is to avoid depending on a
huge library that's not really needed. In the longer term, it's best
to add our own implementation of PKCS#7 SignedData building, parsing,
and verification. This will give the code more power to mimic what the
Android platform does.

Bug: 27461702
Change-Id: I29f1ceea1293e35424fde69c0f2969d551345100

8 years agoAdd a libc++ version of ijar for prebuilt use
Dan Willemsen [Tue, 14 Jun 2016 17:30:06 +0000 (10:30 -0700)]
Add a libc++ version of ijar for prebuilt use

I'll remove the old version once we've moved over to the prebuilts.

Change-Id: Ifd8d396f8b653abbe958cd34e69831a6ca378649

8 years agoAPK JAR signature verifier.
Alex Klyubin [Wed, 8 Jun 2016 21:54:28 +0000 (14:54 -0700)]
APK JAR signature verifier.

This adds JAR signature verification to ApkVerifier.

Bug: 27461702
Change-Id: Id2b72bea7869be66268f6bc1387e1559ee02ff9d

8 years agoMerge "Skip uses-library check for preopted apps."
Treehugger Robot [Tue, 14 Jun 2016 17:22:25 +0000 (17:22 +0000)]
Merge "Skip uses-library check for preopted apps."

8 years agoSkip uses-library check for preopted apps.
Jeff Hao [Mon, 13 Jun 2016 23:53:11 +0000 (16:53 -0700)]
Skip uses-library check for preopted apps.

Bug: 26880306

(cherry-picked from commit b00263f96a90c9f77cf7d8d90742a0884290bf60)

Change-Id: I22beccaf61ca30cf1487a25f80e1c3fd7bdf2c62

8 years agoMerge "Add option to link static lite protobuf library."
Yabin Cui [Tue, 14 Jun 2016 00:16:34 +0000 (00:16 +0000)]
Merge "Add option to link static lite protobuf library."

8 years agoMerge "More general OutputStreamDataSink."
Alex Klyubin [Mon, 13 Jun 2016 19:49:01 +0000 (19:49 +0000)]
Merge "More general OutputStreamDataSink."

8 years agoMerge "Fix inefficiency in APK entry data alignment."
Alex Klyubin [Mon, 13 Jun 2016 18:14:18 +0000 (18:14 +0000)]
Merge "Fix inefficiency in APK entry data alignment."

8 years agoMore general OutputStreamDataSink.
Alex Klyubin [Mon, 13 Jun 2016 17:19:26 +0000 (10:19 -0700)]
More general OutputStreamDataSink.

This replaces the less general DataSink which outputs into a
ByteArrayOutputStream with a more general DataSink which outputs into
an OutputStream.

Bug: 27461702
Change-Id: I9467f38c41f586b71f35edb3602fd6e57153184f

8 years agoMerge "bvb: Update path to key since repo was moved."
David Zeuthen [Mon, 13 Jun 2016 15:54:36 +0000 (15:54 +0000)]
Merge "bvb: Update path to key since repo was moved."

8 years agobvb: Update path to key since repo was moved.
David Zeuthen [Mon, 13 Jun 2016 15:26:26 +0000 (11:26 -0400)]
bvb: Update path to key since repo was moved.

We recently moved Brillo verified boot from system/bvb to external/bvb
so update the path accordingly.

TEST=Build with 'BOARD_BVB_ENABLE := true' succeeds.
BUG=29099910

Change-Id: I66f3b90e23d6b2afc09f81af571ede7b573325e9

8 years agoMerge "Do not force turn off of Jack warning"
Yohann Roussel [Mon, 13 Jun 2016 14:33:47 +0000 (14:33 +0000)]
Merge "Do not force turn off of Jack warning"

8 years agoFix inefficiency in APK entry data alignment.
Alex Klyubin [Sun, 12 Jun 2016 00:42:29 +0000 (17:42 -0700)]
Fix inefficiency in APK entry data alignment.

26f00cda4b979d7e74db6872990682335b36612b introduced a bug where an
APK entry's extra field is padded for alignment purposes when no
padding is necessary because the entry is aligned without any padding
bytes.

Bug: 27461702
Change-Id: Icb164dbaa26d9686412e2920318a9f40c5ce9751

8 years agoMerge "Redirect subprocess stderr to stdout in verbose mode."
Treehugger Robot [Sat, 11 Jun 2016 00:56:31 +0000 (00:56 +0000)]
Merge "Redirect subprocess stderr to stdout in verbose mode."

8 years agoRedirect subprocess stderr to stdout in verbose mode.
Alex Deymo [Fri, 10 Jun 2016 23:38:31 +0000 (16:38 -0700)]
Redirect subprocess stderr to stdout in verbose mode.

This patch uses subprocess.communicate instead of subprocess.wait to
prevent deadlock if any of the child processes outputs too much data,
and redirects the subprocess output to stdout when running in verbose
mode.

With this patch `ota_from_target_files -v` prints the delta_generator
output in stdout, and no output if '-v' is not passed.

Bug: None
TEST=ota_from_target_files -v ...

Change-Id: Id66e4f3360a6f91d61a3ce96d53afbccdaa19da5

8 years agoMerge "goldfish_setup: grant /system/bin/sh exec access"
David Turner [Fri, 10 Jun 2016 18:04:26 +0000 (18:04 +0000)]
Merge "goldfish_setup: grant /system/bin/sh exec access"

8 years agogoldfish_setup: grant /system/bin/sh exec access
Nick Kralevich [Wed, 25 May 2016 00:36:23 +0000 (17:36 -0700)]
goldfish_setup: grant /system/bin/sh exec access

The goldfish_setup shell script needs the ability to execute
the shell script interpreter. Allow it.

Addresses the following denial:

avc: denied { getattr } for pid=1220 comm="init.goldfish.s"
path="/system/bin/sh" dev="vda" ino=442 scontext=u:r:goldfish_setup:s0
tcontext=u:object_r:shell_exec:s0 tclass=file permissive=0

(cherrypicked from commit 501c88c0290eb2308c110398f106411260863bb8)

Bug: 28941573
Change-Id: I22d26e90f107c8d801229354a5e0513c37e6c31d

8 years agoMerge "Add variable PRODUCT_SHIPPING_API_LEVEL and make files with the new read only...
Vikas Marwaha [Thu, 9 Jun 2016 02:30:57 +0000 (02:30 +0000)]
Merge "Add variable PRODUCT_SHIPPING_API_LEVEL and make files with the new read only product property ro.product.first_api_level."

8 years agoMerge "Rewrite LDLIBS and SHARED_LIBRARIES"
Dan Willemsen [Wed, 8 Jun 2016 21:09:34 +0000 (21:09 +0000)]
Merge "Rewrite LDLIBS and SHARED_LIBRARIES"

8 years agoMerge "APK Signature Scheme v2 APK verifier."
Alex Klyubin [Wed, 8 Jun 2016 20:51:58 +0000 (20:51 +0000)]
Merge "APK Signature Scheme v2 APK verifier."

8 years agoAPK Signature Scheme v2 APK verifier.
Alex Klyubin [Tue, 7 Jun 2016 20:18:57 +0000 (13:18 -0700)]
APK Signature Scheme v2 APK verifier.

This adds the ApkVerifier class which verifies APKs using APK
Signature Scheme v2 only. In a follow-up commit this class will be
extended to verify APKs using JAR signature scheme when necessary.

The APK verifier is designed to not just verify an APK, but also
report errors, warnings, and information about signers in a structured
way, to enable tools to surface this information to users in various
ways.

Bug: 27461702
Change-Id: I10c6ba436021d86b6dbf6d3cf44494652adacb66

8 years agoMerge "Fix DSA APK signatures for API Level 8 and lower."
Alex Klyubin [Wed, 8 Jun 2016 15:17:42 +0000 (15:17 +0000)]
Merge "Fix DSA APK signatures for API Level 8 and lower."

8 years agoDo not force turn off of Jack warning
Yohann Roussel [Wed, 8 Jun 2016 15:00:09 +0000 (17:00 +0200)]
Do not force turn off of Jack warning

When ANDROID_JACK_EXTRA_ARGS is defined there is no reason to still turn
off those warnings.

Change-Id: Ic7ac02c72ed3b7b0eaca9394c9fc7d92d5dfa871

8 years agoRewrite LDLIBS and SHARED_LIBRARIES
Dan Willemsen [Tue, 7 Jun 2016 23:55:57 +0000 (16:55 -0700)]
Rewrite LDLIBS and SHARED_LIBRARIES

LOCAL_LDLIBS was the only correct way to use NDK libraries, but few used
it correctly. It also often got confused with LOCAL_LDFLAGS, so move the
flags to the correct variable.

For binaries that weren't using the NDK (empty LOCAL_SDK_VERSION), it
was never valid to use LOCAL_LDLIBS, as dependencies would not be
properly set up, and could lead to random build failures. So convert any
-l linker flags to using LOCAL_SHARED_LIBRARIES automatically.

For binaries built using the NDK (LOCAL_SDK_VERSION set), they were
required to use LOCAL_LDLIBS for prebuilt NDK libraries, otherwise they
would get headers and dependencies to the platform versions. Any
non-prebuilt LOCAL_LDLIBS would miss dependencies. So move the NDK
prebuilt libraries to LDLIBS from SHARED_LIBRARIES, and move everything
else to SHARED_LIBRARIES.

So now, for device modules, LOCAL_SHARED_LIBRARIES should always be
used, and we'll do the right thing. LOCAL_LDLIBS should only be used for
host libraries from the system.

Change-Id: Ide34c7afdcfb6507a378d45a42471729e489a9e0

8 years agoAdd option to link static lite protobuf library.
Yabin Cui [Wed, 8 Jun 2016 02:21:12 +0000 (19:21 -0700)]
Add option to link static lite protobuf library.

Bug: 28114205

Change-Id: Id2b7e42017a53138c60b92de8d196ca92bc38053

8 years agoMerge "Add NATIVE_TESTS class, move host native tests"
Dan Willemsen [Mon, 6 Jun 2016 23:59:23 +0000 (23:59 +0000)]
Merge "Add NATIVE_TESTS class, move host native tests"

8 years agoMerge "Switch some build tools to Soong"
Treehugger Robot [Mon, 6 Jun 2016 22:51:56 +0000 (22:51 +0000)]
Merge "Switch some build tools to Soong"

8 years agoFix DSA APK signatures for API Level 8 and lower.
Alex Klyubin [Mon, 6 Jun 2016 21:58:23 +0000 (14:58 -0700)]
Fix DSA APK signatures for API Level 8 and lower.

This modifies JAR signing code to produce DSA signatures which are
accepted by all Android platforms rather than only API Level 9 and
higher.

The issue is that by default Bouncy Castle uses OID 1.2.840.10040.4.3
(dsaWithSha1) in PKCS #7 CMS SignerInfo whereas Android accepts that
only since API Level 9. However, OID 1.2.840.10040.4.1 (dsa) is
accepted by all Android platforms.

Bug: 27461702
Change-Id: I24256a255bcdc2108bdb447557af7568a2c096e3

8 years agoSwitch some build tools to Soong
Dan Willemsen [Mon, 6 Jun 2016 21:41:32 +0000 (14:41 -0700)]
Switch some build tools to Soong

In preparation for including them in prebuilts/build-tools.

acp: We use a prebuilt in prebuilts/sdk, but it's not part of the sdk.

ijar: We use the host libstdc++ to workaround the lack of libc++ on
some unbundled branches.

ziptime: We disable this on unbundled builds, due to the lack of libc++.

Change-Id: Ib9766b1dbddd151c38ff27c529865200ab37fce1

8 years agoMerge "Remove dead rgb2565"
Treehugger Robot [Mon, 6 Jun 2016 21:35:47 +0000 (21:35 +0000)]
Merge "Remove dead rgb2565"

8 years agoMerge "Drop CLANG and CLANG_CXX in the environment"
Treehugger Robot [Mon, 6 Jun 2016 21:22:57 +0000 (21:22 +0000)]
Merge "Drop CLANG and CLANG_CXX in the environment"

8 years agoMerge "Improve efficiency of using the DataSource abstraction."
Alex Klyubin [Mon, 6 Jun 2016 21:07:52 +0000 (21:07 +0000)]
Merge "Improve efficiency of using the DataSource abstraction."

8 years agoRemove dead rgb2565
Dan Willemsen [Mon, 6 Jun 2016 20:32:11 +0000 (13:32 -0700)]
Remove dead rgb2565

Change-Id: I2397dc97768f24a7c416bff96dd983fc796cbb53

8 years agoDrop CLANG and CLANG_CXX in the environment
Dan Willemsen [Mon, 6 Jun 2016 19:21:06 +0000 (12:21 -0700)]
Drop CLANG and CLANG_CXX in the environment

We'll explicitly pass these variables to the static analyzer builds in
binary.mk

Bug: 29071982
Change-Id: Ifc7633d36f5785fe16b63f54b885396c2cab542a

8 years agoMerge "Switch signapk to apksigner-core."
Alex Klyubin [Mon, 6 Jun 2016 19:40:23 +0000 (19:40 +0000)]
Merge "Switch signapk to apksigner-core."

8 years agoImprove efficiency of using the DataSource abstraction.
Alex Klyubin [Mon, 6 Jun 2016 18:12:50 +0000 (11:12 -0700)]
Improve efficiency of using the DataSource abstraction.

This adds getByteBuffer and copyTo methods to the DataSource
abstraction. These methods enable the client to avoid unnecessary
copying of the data source's data.

Bug: 27461702
Change-Id: If4e9f902ea75c1ca5c7be0e20c0e7218faf9c504

8 years agoMerge "Error on external includes"
Dan Willemsen [Sat, 4 Jun 2016 01:03:20 +0000 (01:03 +0000)]
Merge "Error on external includes"

8 years agoAdd variable PRODUCT_SHIPPING_API_LEVEL and make files with the
Vikas Marwaha [Fri, 3 Jun 2016 22:02:06 +0000 (15:02 -0700)]
Add variable PRODUCT_SHIPPING_API_LEVEL and make files with the
new read only product property ro.product.first_api_level.

PRODUCT_SHIPPING_API_LEVEL declares which API level a device first
shipped with. We use this variable to set a read-only property that
can be used in CTS/GTS tests.

Change-Id: If54202075d3b92ed380655cde8b3fc50c5ba73b3

8 years agoMerge "Default to enable tidy warnings in header files."
Treehugger Robot [Thu, 2 Jun 2016 23:17:59 +0000 (23:17 +0000)]
Merge "Default to enable tidy warnings in header files."

8 years agoMerge "Add support for TARGET_RECOVERY_BRICK."
Treehugger Robot [Thu, 2 Jun 2016 22:44:55 +0000 (22:44 +0000)]
Merge "Add support for TARGET_RECOVERY_BRICK."

8 years agoDefault to enable tidy warnings in header files.
Chih-Hung Hsieh [Thu, 2 Jun 2016 22:20:05 +0000 (15:20 -0700)]
Default to enable tidy warnings in header files.

Change-Id: I3831f03facbbd6d17117d82f9ccac49bc2645237

8 years agoAdd support for TARGET_RECOVERY_BRICK.
Tao Bao [Wed, 1 Jun 2016 06:56:23 +0000 (23:56 -0700)]
Add support for TARGET_RECOVERY_BRICK.

TARGET_RECOVERY_BRICK specifies the file that lists all the partitions
to be bricked under recovery. The file, if present, will be copied to
'$(TARGET_RECOVERY_ROOT_OUT)/etc/recovery.brick'.

Bug: 27253717
Change-Id: Id84195b5ee1031a83bf7a077be070a3728416580
(cherry picked from commit 3051f4f11aef75af1d7cf623506ad6b4b648f3bd)

8 years agoMerge "Add LOCAL_LOGTAGS_FILES that prebuilts can use"
Treehugger Robot [Wed, 1 Jun 2016 23:28:10 +0000 (23:28 +0000)]
Merge "Add LOCAL_LOGTAGS_FILES that prebuilts can use"

8 years agoMerge "disable unpriv perf by default in user{,debug} builds"
Jeffrey Vander Stoep [Wed, 1 Jun 2016 23:18:45 +0000 (23:18 +0000)]
Merge "disable unpriv perf by default in user{,debug} builds"

8 years agoAdd LOCAL_LOGTAGS_FILES that prebuilts can use
Dan Willemsen [Wed, 1 Jun 2016 22:27:11 +0000 (15:27 -0700)]
Add LOCAL_LOGTAGS_FILES that prebuilts can use

Soong modules can define logtags files that need to be combined into
/system/etc/event-log-tags, so add a new LOCAL_LOGTAGS_FILES variable
that can be used to specify *.logtags file outside of LOCAL_SRC_FILES.

Bug: 28989759
Change-Id: I53c5d396dfb7c6006806758f351eb5cdde90fe74

8 years agoMerge "Update default NINJA_STATUS to show finished edges"
Colin Cross [Wed, 1 Jun 2016 04:52:59 +0000 (04:52 +0000)]
Merge "Update default NINJA_STATUS to show finished edges"

8 years agoMerge "Update Android.mk finder to work with Android.bp files"
Colin Cross [Wed, 1 Jun 2016 04:52:47 +0000 (04:52 +0000)]
Merge "Update Android.mk finder to work with Android.bp files"

8 years agoMerge "Add Soong tools to PATH"
Dan Willemsen [Wed, 1 Jun 2016 02:37:18 +0000 (02:37 +0000)]
Merge "Add Soong tools to PATH"