Commit Graph

27056 Commits

Author SHA1 Message Date
Alex Klyubin a85e0aa883 Merge "Fix inefficiency in APK entry data alignment." 2016-06-13 18:14:18 +00: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
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
Treehugger Robot daf55776be Merge "Add support for TARGET_RECOVERY_BRICK." 2016-06-02 22:44:56 +00:00
Chih-Hung Hsieh 870f087867 Default to enable tidy warnings in header files.
Change-Id: I3831f03facbbd6d17117d82f9ccac49bc2645237
2016-06-02 15:20:05 -07:00
Tao Bao a062c7e62d 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 3051f4f11a)
2016-06-02 14:46:53 -07:00
Treehugger Robot 476b5b1616 Merge "Add LOCAL_LOGTAGS_FILES that prebuilts can use" 2016-06-01 23:28:10 +00:00
Jeffrey Vander Stoep 4bc8280a98 Merge "disable unpriv perf by default in user{,debug} builds" 2016-06-01 23:18:46 +00:00
Dan Willemsen b0a08b874c 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
2016-06-01 15:31:44 -07:00
Colin Cross 27032630c0 Merge "Update default NINJA_STATUS to show finished edges" 2016-06-01 04:52:59 +00:00
Colin Cross 520442f053 Merge "Update Android.mk finder to work with Android.bp files" 2016-06-01 04:52:47 +00:00
Dan Willemsen b09e644e1d Merge "Add Soong tools to PATH" 2016-06-01 02:37:19 +00:00
Dan Willemsen 60d9c673d7 Add Soong tools to PATH
Change-Id: I8f8649106df4ba7cefbfa37a724ebe0635d90b76
2016-05-31 18:32:35 -07:00
Treehugger Robot fcaae6bee8 Merge "Allow arm prebuilts for x86_arm builds" 2016-05-31 22:08:15 +00:00
Daniel Micay f2ac912b19 disable unpriv perf by default in user{,debug} builds
Bug: 29054680

Change-Id: If04bc63fc366006cde842a50b7c764f89d7449a6
2016-05-31 17:43:48 -04:00
Dan Willemsen b40d9ece5f Allow arm prebuilts for x86_arm builds
But only for static and shared libraries -- we disable building other
types of modules for arm, so don't support the prebuilts for them
either.

This is needed so that we can build these libraries under Soong, and
expose them to Make using BUILD_PREBUILT.

Bug: 27526885
Change-Id: I4f6ec922aed37591b6257b7022b81fb65d05b0fe
2016-05-31 14:01:34 -07:00
Colin Cross b9dd243b1c Update default NINJA_STATUS to show finished edges
Update default NINJA_STATUS that includes percentage to match
6c2c2eecbf

Change-Id: I5694308abe26b71999d944c40962d59d50a73077
2016-05-31 12:38:04 -07:00
Colin Cross 4cbf8eb9f5 Update Android.mk finder to work with Android.bp files
The Android.mk finder should stop traversing when it finds an Android.bp
file, and any Android.soong.mk file at the same path should be included.

Update filter-soong-makefiles to accept a mixed list of Android.bp files
and Android.mk files, convert Android.bp files to Android.soong.mk files
if they exist, and ignore Android.mk files that have an Android.bp file.

Update first-makefiles-under to use the new --dir syntax for
findleaves.py and search for both Android.bp and Android.mk files.

Update all-makefiles-under and all-named-subdir-makefiles to search for
both Android.bp and Android.mk files.

Change-Id: Iddc51bf84593d5de3add02f2b2c065da08962af4
2016-05-30 13:42:19 -07:00
Treehugger Robot 40623e2a99 Merge "Add --dir option to findleaves.py" 2016-05-28 00:53:47 +00:00
Colin Cross 9808645cd9 Add --dir option to findleaves.py
findleaves.py needs to be able to search multiple directories for
multiple filenames (Android.bp and Android.mk).  Add support for a new
--dir= option to specify one or more directories to search, and then
treat any remaining options as filenames.  If no directories are
specified, fall back to treating only the last option as a filename and
the rest as directories.

Change-Id: Ie879facd49192c6b4fafae070ad00eb21b1faa32
2016-05-27 16:05:10 -07:00
Alex Klyubin fa1da6c311 Switch signapk to apksigner-core.
This switches signapk's APK signing from its own signing logic to that
offered by apksigner-core library. OTA update package signing logic
remains inside signapk codebase.

Bug: 27461702
Change-Id: Ibf8435c555fe3f2b621d5189e7ae44f79082c810
2016-05-27 14:45:51 -07:00
Alex Klyubin ce4c9d7108 Merge "Improve DataSource interface." 2016-05-27 20:00:59 +00:00
Alex Klyubin 85f004c6c5 Merge "Store entry alignment information in APK." 2016-05-27 19:57:11 +00:00