Commit Graph

27076 Commits

Author SHA1 Message Date
Treehugger Robot a6f510c776 Merge "Fix kati --no_ignore_dirty usage" 2016-06-15 22:41:32 +00:00
Dan Willemsen 7fba3347b9 Merge "Forbid libstdc++ on Linux and Darwin" 2016-06-15 22:38:30 +00:00
Dan Willemsen 3773b45c3b 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
2016-06-15 14:55:58 -07:00
Dan Willemsen 327fa9c411 Forbid libstdc++ on Linux and Darwin
The last user has been removed, forbid any modules from selecting this.

Change-Id: Idd9ef6ca4b6c6754935d59c4a09c7d213ae481c1
2016-06-15 13:41:45 -07:00
Alex Klyubin 1fb96c3ff5 Merge "Don't depend on Bouncy Castle." 2016-06-15 20:32:35 +00:00
Treehugger Robot 98b4f07dfc Merge "Faster and cleaner way to obtain UTF-8 encoded form." 2016-06-14 22:37:10 +00:00
Treehugger Robot 6c0c720389 Merge "Use more prebuilt build-tools" 2016-06-14 22:14:07 +00:00
Alex Klyubin d4761a19b8 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
2016-06-14 14:18:21 -07:00
Alex Klyubin cf89865b95 Merge "APK JAR signature verifier." 2016-06-14 20:56:28 +00:00
Dan Willemsen 7c2d228701 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
2016-06-14 13:50:38 -07:00
Treehugger Robot 06f3e8349f Merge "Add a libc++ version of ijar for prebuilt use" 2016-06-14 18:34:38 +00:00
Alex Klyubin 7f770c0963 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
2016-06-14 11:20:49 -07:00
Dan Willemsen e19d451f49 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
2016-06-14 10:30:06 -07:00
Alex Klyubin 8b47001e9b APK JAR signature verifier.
This adds JAR signature verification to ApkVerifier.

Bug: 27461702
Change-Id: Id2b72bea7869be66268f6bc1387e1559ee02ff9d
2016-06-14 10:28:36 -07:00
Treehugger Robot 7b4c07f1d5 Merge "Skip uses-library check for preopted apps." 2016-06-14 17:22:25 +00:00
Jeff Hao 00b75bc41a Skip uses-library check for preopted apps.
Bug: 26880306

(cherry-picked from commit b00263f96a)

Change-Id: I22beccaf61ca30cf1487a25f80e1c3fd7bdf2c62
2016-06-13 18:14:27 -07:00
Yabin Cui e6fae50455 Merge "Add option to link static lite protobuf library." 2016-06-14 00:16:34 +00:00
Alex Klyubin dca955a9bd Merge "More general OutputStreamDataSink." 2016-06-13 19:49:01 +00:00
Alex Klyubin a85e0aa883 Merge "Fix inefficiency in APK entry data alignment." 2016-06-13 18:14:18 +00:00
Alex Klyubin e54b2753e4 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
2016-06-13 10:19:26 -07:00
David Zeuthen 8b3b1727da Merge "bvb: Update path to key since repo was moved." 2016-06-13 15:54:36 +00:00
David Zeuthen bca24302bb 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
2016-06-13 11:26:26 -04:00
Yohann Roussel 0a26fc0ace Merge "Do not force turn off of Jack warning" 2016-06-13 14:33:48 +00:00
Alex Klyubin ab2a3b0061 Fix inefficiency in APK entry data alignment.
26f00cda4b 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
2016-06-11 17:47:20 -07:00
Treehugger Robot 1318ec93e7 Merge "Redirect subprocess stderr to stdout in verbose mode." 2016-06-11 00:56:32 +00:00
Alex Deymo d8d96ecdae 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
2016-06-10 16:38:31 -07:00
David Turner 7a866d783c Merge "goldfish_setup: grant /system/bin/sh exec access" 2016-06-10 18:04:26 +00:00
Nick Kralevich 03bfdea1a3 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 501c88c029)

Bug: 28941573
Change-Id: I22d26e90f107c8d801229354a5e0513c37e6c31d
2016-06-09 09:52:39 -07:00
Vikas Marwaha e5c1af2dd0 Merge "Add variable PRODUCT_SHIPPING_API_LEVEL and make files with the new read only product property ro.product.first_api_level." 2016-06-09 02:30:57 +00:00
Dan Willemsen a8d13592ac Merge "Rewrite LDLIBS and SHARED_LIBRARIES" 2016-06-08 21:09:34 +00:00
Alex Klyubin 4f8bde47ae Merge "APK Signature Scheme v2 APK verifier." 2016-06-08 20:51:58 +00:00
Alex Klyubin 8740e9df19 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
2016-06-08 08:23:30 -07:00
Alex Klyubin ebe68ec237 Merge "Fix DSA APK signatures for API Level 8 and lower." 2016-06-08 15:17:42 +00:00
Yohann Roussel bf17172521 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
2016-06-08 17:00:09 +02:00
Dan Willemsen 6731b495ca 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
2016-06-07 21:59:55 -07:00
Yabin Cui 72a1156efb Add option to link static lite protobuf library.
Bug: 28114205

Change-Id: Id2b7e42017a53138c60b92de8d196ca92bc38053
2016-06-07 21:24:06 -07:00
Dan Willemsen e72fc63901 Merge "Add NATIVE_TESTS class, move host native tests" 2016-06-06 23:59:23 +00:00
Treehugger Robot c52d09e694 Merge "Switch some build tools to Soong" 2016-06-06 22:51:57 +00:00
Alex Klyubin 819b5354e0 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
2016-06-06 15:05:08 -07:00
Dan Willemsen 56eb2f9f54 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
2016-06-06 14:51:52 -07:00
Treehugger Robot a571e83095 Merge "Remove dead rgb2565" 2016-06-06 21:35:47 +00:00
Treehugger Robot 27a55cd3c7 Merge "Drop CLANG and CLANG_CXX in the environment" 2016-06-06 21:22:57 +00:00
Alex Klyubin 7353eabd14 Merge "Improve efficiency of using the DataSource abstraction." 2016-06-06 21:07:52 +00:00
Dan Willemsen 08b12dc2c8 Remove dead rgb2565
Change-Id: I2397dc97768f24a7c416bff96dd983fc796cbb53
2016-06-06 13:32:11 -07:00
Dan Willemsen 6e22c756fc 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
2016-06-06 13:13:50 -07:00
Alex Klyubin 1a39e8eb34 Merge "Switch signapk to apksigner-core." 2016-06-06 19:40:23 +00:00
Alex Klyubin b02eefacbf 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
2016-06-06 11:17:03 -07:00
Dan Willemsen 4b33f51043 Merge "Error on external includes" 2016-06-04 01:03:20 +00:00
Vikas Marwaha 404ccc83c4 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
2016-06-03 23:02:27 +00:00
Treehugger Robot 6a7cf55a7d Merge "Default to enable tidy warnings in header files." 2016-06-02 23:18:00 +00:00