Commit graph

3516 commits

Author SHA1 Message Date
Dan Willemsen
822f20f933 Merge "Diff .art/.oat/.odex files now that they are deterministic"
am: 78861d7e6e

* commit '78861d7e6e56a770eb6c50370aa405992a3fab4c':
  Diff .art/.oat/.odex files now that they are deterministic
2016-02-01 22:42:50 +00:00
Dan Willemsen
734d78cdf6 Diff .art/.oat/.odex files now that they are deterministic
This also whitelists the ro.build.user property, which may change based
on host username.

Bug: 26687569
Change-Id: I8f3244c2325dd80a7961c474655f0c50670d1b46
2016-02-01 13:41:30 -08:00
Dan Willemsen
10b4db6f0e Merge "Use Jan 1 2009 as timestamp in APKs and OTA update ZIPs."
am: 0d85dab09a

* commit '0d85dab09a09de48535e4139b858e5e4bef8565f':
  Use Jan 1 2009 as timestamp in APKs and OTA update ZIPs.
2016-01-30 02:47:35 +00:00
Dan Willemsen
0d85dab09a Merge "Use Jan 1 2009 as timestamp in APKs and OTA update ZIPs." 2016-01-30 02:44:27 +00:00
Alex Klyubin
1cafe66be2 Merge "Revert "Sign APKs using SHA-256 instead of SHA-1 when possible." This is breaking CTS."
am: 01ac26d942

* commit '01ac26d9422d8d54d3992ba9dd4506896c8556dd':
  Revert "Sign APKs using SHA-256 instead of SHA-1 when possible." This is breaking CTS.
2016-01-30 00:02:34 +00:00
Alex Klyubin
01ac26d942 Merge "Revert "Sign APKs using SHA-256 instead of SHA-1 when possible." This is breaking CTS." 2016-01-29 23:58:27 +00:00
Alex Klyubin
061289c432 Revert "Sign APKs using SHA-256 instead of SHA-1 when possible." This is breaking CTS.
This reverts commit c2a36afd67.

Change-Id: I4389bf99aeb213198c1c501ba9462bd4a4540d0a
2016-01-29 23:56:44 +00:00
Lee Campbell
fd5d6f440a Merge "brillo: Remove dependency on java for Brillo"
am: 6c8e3e4108

* commit '6c8e3e41085d75184ae321c12e26cf26002552d3':
  brillo: Remove dependency on java for Brillo
2016-01-29 23:46:16 +00:00
Lee Campbell
6c8e3e4108 Merge "brillo: Remove dependency on java for Brillo" 2016-01-29 23:42:19 +00:00
Lee Campbell
3d8bf2994c brillo: Remove dependency on java for Brillo
Brillo does not require Java. Add a JAVA_NOT_REQUIRED
flag to the build system to make the jdk requirment optional

Also don't build signapk for Brillo

BUG: 25281898
Change-Id: I31e68cc7d076bf6c234699c77c0ea1ea428be4f5
2016-01-29 15:38:53 -08:00
Alex Klyubin
6c41036bcf Use Jan 1 2009 as timestamp in APKs and OTA update ZIPs.
Previously, the timestamp was one hour ahead of NotBefore of the
signer's certificate, adjusted for the current timezone. With this
change the MS-DOS timestamp in output APK/ZIP files is
Jan 1 2009 00:00:00.

Bug: 26864066
Change-Id: Id6263c38ac7042489ab695454f8e0fb2d85a3958
2016-01-29 13:10:03 -08:00
Alex Klyubin
7a86884a9a Merge "Sign APKs using SHA-256 instead of SHA-1 when possible."
am: 50f872c696

* commit '50f872c6967428cea172746af24506342745dcaa':
  Sign APKs using SHA-256 instead of SHA-1 when possible.
2016-01-29 20:22:29 +00:00
Alex Klyubin
c2a36afd67 Sign APKs using SHA-256 instead of SHA-1 when possible.
This changes the build system to provide the signapk tool with the
minSdkVersion of the APK being signed. signapk in turn will then use
SHA-256 instead of SHA-1 if minSdkVersion is 18 (JB MR2) or higher
(see c2c49ed0c1).

To avoid increasing incremental OTA update package sizes for already
released platforms, release build scripts disable the above logic when
signing target files ZIPs for pre-N platforms.

Bug: 25643280

(cherry picked from commit de5bc04717)

Change-Id: I4b100750e47788ab6ed897a0a5abfd33542e8676
2016-01-29 10:17:02 -08:00
Alex Klyubin
e40660247d Merge "Revert "Sign APKs using SHA-256 instead of SHA-1 when possible.""
am: 4a97cde443

* commit '4a97cde443829f1a3bf40fe6e820ba5b01e3bf87':
  Revert "Sign APKs using SHA-256 instead of SHA-1 when possible."
2016-01-27 17:52:55 +00:00
Alex Klyubin
4a97cde443 Merge "Revert "Sign APKs using SHA-256 instead of SHA-1 when possible."" 2016-01-27 17:49:40 +00:00
Alex Klyubin
a80a8085e0 Revert "Sign APKs using SHA-256 instead of SHA-1 when possible."
This reverts commit 74df828cb5. This commit is breaking a build, again...

Change-Id: I2df561d68302ba4c83e90a64a7bf203645033a3b
2016-01-27 17:45:42 +00:00
Alex Klyubin
5132fe2ef9 Merge "Sign APKs using SHA-256 instead of SHA-1 when possible."
am: 72d152f478

* commit '72d152f478a6a48c5e06053e440801f61d256a50':
  Sign APKs using SHA-256 instead of SHA-1 when possible.
2016-01-27 17:01:54 +00:00
Alex Klyubin
72d152f478 Merge "Sign APKs using SHA-256 instead of SHA-1 when possible." 2016-01-27 16:55:16 +00:00
Neil Fuller
e71759c8ff Merge "Doclava template changes associated with default methods"
am: 26990b0f64

* commit '26990b0f64e47c3f5366a03573f4d1e3408301d9':
  Doclava template changes associated with default methods
2016-01-27 13:32:37 +00:00
Neil Fuller
8f7d4b7474 Doclava template changes associated with default methods
The ordering of method declaration modifiers changed slightly
to reflect the ordering given in:

http://docs.oracle.com/javase/specs/jls/se8/html/jls-8.html#jls-8.4.3
http://docs.oracle.com/javase/specs/jls/se8/html/jls-9.html#jls-9.4

Bug: 26241119
(cherry-picked from commit ca59875e12)

Change-Id: I8489ad5010fc811b22167af50ba29221aac8b6cb
2016-01-27 11:57:34 +00:00
Alex Klyubin
74df828cb5 Sign APKs using SHA-256 instead of SHA-1 when possible.
This changes the build system to provide the signapk tool with the
minSdkVersion of the APK being signed. signapk in turn will then use
SHA-256 instead of SHA-1 if minSdkVersion is 18 (JB MR2) or higher
(see c2c49ed0c1).

To avoid increasing incremental OTA update package sizes for already
released platforms, release build scripts disable the above logic when
signing target files ZIPs for pre-N platforms.

Bug: 25643280
Change-Id: I058393e0971d0d6559dbd69ea902754c6c7cab14
(cherry picked from commit de5bc04717)
2016-01-26 18:41:57 +00:00
Alex Klyubin
2cf2509542 Merge "Revert "Sign APKs using SHA-256 instead of SHA-1 when possible.""
am: 7382bdf8c1

* commit '7382bdf8c1a755fe20c5979453bfeec0be73da27':
  Revert "Sign APKs using SHA-256 instead of SHA-1 when possible."
2016-01-25 17:24:27 +00:00
Alex Klyubin
7382bdf8c1 Merge "Revert "Sign APKs using SHA-256 instead of SHA-1 when possible."" 2016-01-25 17:19:02 +00:00
Alex Klyubin
1429d5e14c Revert "Sign APKs using SHA-256 instead of SHA-1 when possible."
This reverts commit de5bc04717 because it's breaking some builds. Turns out some APKs have multiple sdkVersion attributes returned by aapt.

Change-Id: I013d6ef5eac473dd3900e0b9edf4c32cdc838bab
2016-01-25 17:17:09 +00:00
Alex Klyubin
2a37afd32c Merge "Sign APKs using SHA-256 instead of SHA-1 when possible."
am: b763b29267

* commit 'b763b292671b9b18dcc9a5961c173667c674a3d5':
  Sign APKs using SHA-256 instead of SHA-1 when possible.
2016-01-25 16:46:43 +00:00
Alex Klyubin
b763b29267 Merge "Sign APKs using SHA-256 instead of SHA-1 when possible." 2016-01-25 16:42:27 +00:00
Tao Bao
4f3015f4a2 Merge "Generate OTA packages for A/B update."
am: bc6a66826a

* commit 'bc6a66826a56607c2e6a02f70b21e9faa0793719':
  Generate OTA packages for A/B update.
2016-01-22 17:27:52 +00:00
Tao Bao
bc6a66826a Merge "Generate OTA packages for A/B update." 2016-01-22 17:23:28 +00:00
Alex Klyubin
eafce4eefd Merge "Make signapk sign using APK Signature Scheme v2."
am: b86b5344a6

* commit 'b86b5344a6b7703bfa36a203f34ca3a117051587':
  Make signapk sign using APK Signature Scheme v2.
2016-01-22 04:12:30 +00:00
Alex Klyubin
de5bc04717 Sign APKs using SHA-256 instead of SHA-1 when possible.
This changes the build system to provide the signapk tool with the
minSdkVersion of the APK being signed. signapk in turn will then use
SHA-256 instead of SHA-1 if minSdkVersion is 18 (JB MR2) or higher
(see c2c49ed0c1).

To avoid increasing incremental OTA update package sizes for already
released platforms, release build scripts disable the above logic when
signing target files ZIPs for pre-N platforms.

Bug: 25643280
Change-Id: I048393e0971d0d6559dbd69ea902754c6c7cab14
2016-01-21 10:25:12 -08:00
Alex Klyubin
aafc1e9665 Merge "Command-line flag to disable signing with APK Signature Scheme v2."
am: 3cc3605010

* commit '3cc36050109fa1f310f11fca980ac415cb58bee7':
  Command-line flag to disable signing with APK Signature Scheme v2.
2016-01-21 01:28:23 +00:00
Alex Klyubin
dd910c5945 Make signapk sign using APK Signature Scheme v2.
APKs are now signed with the usual JAR signature scheme and then
with the APK Signature Scheme v2.

APK Signature Scheme v2 is a whole-file signature scheme which aims
to protect every single bit of the APK as opposed to the JAR signature
scheme which protects only the names and uncompressed contents of ZIP
entries.

The two main goals of APK Signature Scheme v2 are:
1. Detect any unauthorized modifications to the APK. This is achieved
   by making the signature cover every byte of the APK being signed.
2. Enable much faster signature and integrity verification. This is
   achieved by requiring only a minimal amount of APK parsing before
   the signature is verified, thus completely bypassing ZIP entry
   decompression and by making integrity verification parallelizable
   by employing a hash tree.

Bug: 25794543
Change-Id: I275d2a6d0a98504891985309b9dfff2e0e44b878
2016-01-20 13:35:21 -08:00
Alex Klyubin
9b54a565c9 Command-line flag to disable signing with APK Signature Scheme v2.
This change makes signapk not reject the --disable-v2 command-line
flag which may be used by build scripts in some branches. The flag
is currently ignored.

This change is landed separately from the actual support for APK
Signature Scheme v2 because of unbundled branches which use prebuilt
versions of signapk.

Bug: 25794543
Change-Id: I900966244b8b6296b1f443bf98830cc7f7cc81a8
2016-01-20 12:55:16 -08:00
Tao Bao
c098e9efd9 Generate OTA packages for A/B update.
It calls brillo_update_payload to generate the payload for A/B update.
And packages the payload according to Android OTA package format.

Note that it only supports generating full/incremental OTAs with this
CL. Signing for release may not work properly at the moment.

Bug: 25715402
Change-Id: I4ac8505bacad28a572a9320dc8b52dd0f1ce47f5
2016-01-19 15:46:34 -08:00
Neil Fuller
75bbddecaa Merge "Remove synchronized from the public API docs"
am: 8cb9be66b7

* commit '8cb9be66b7878478aa61e7b752e3c8b916811299':
  Remove synchronized from the public API docs
2016-01-18 19:40:31 +00:00
Neil Fuller
8cb9be66b7 Merge "Remove synchronized from the public API docs" 2016-01-18 19:36:27 +00:00
Tianjie Xu
dabcd36224 Merge "Fix print error of numbers of blocks"
am: 2acd8a2eef

* commit '2acd8a2eef88973ce222a4ed90efaa94ede1a30b':
  Fix print error of numbers of blocks
2016-01-15 19:21:00 +00:00
Neil Fuller
79a6f53d7d Remove synchronized from the public API docs
The information is not useful. Javadoc hasn't included this
information for years.

Bug: 25767152
(cherry-picked from commit a37bdc89b4)

Change-Id: Id03a6e383118ab716ce870a1d7a3740656420fe7
2016-01-15 04:52:22 +00:00
Tianjie Xu
ebe39a096a Fix print error of numbers of blocks
The total number of blocks to pack as new data was printed incorrectly.
Fix printing.

Change-Id: I6a6bb8dd6682d9c57943ceb1a728995f9529e2fd
2016-01-14 19:13:21 -08:00
Tianjie Xu
9ccf073210 Merge "Adjust the size limit for splitting large files"
am: 9b2fe7e0b8

* commit '9b2fe7e0b864a7fd2deae831674d97c72fe29f64':
  Adjust the size limit for splitting large files
2016-01-14 19:22:39 +00:00
Tianjie Xu
9b2fe7e0b8 Merge "Adjust the size limit for splitting large files" 2016-01-14 19:17:00 +00:00
Tianjie Xu
bb86e1d9c2 Adjust the size limit for splitting large files
Modify the number of max blocks per transfer to reduce splitting of
large files during patch generation. This will reduce the size of
final incremental OTA updater package. In specific, the size limit
for each file to transfer is set to 1/8 cachesize instead of a fix
number.

Bug: 26472126

Change-Id: Iffb135e378c4c7a91640f2fc4c40e9e93d1fe4bb
2016-01-13 18:21:26 -08:00
Dan Willemsen
766eeb747e Merge "Allow building kati & makeparallel with soong"
am: 77cde9e244

* commit '77cde9e244de9b043793ef528818de0ffea862e1':
  Allow building kati & makeparallel with soong
2016-01-14 02:05:24 +00:00
Dan Willemsen
3f60c4b6c0 Allow building kati & makeparallel with soong
This uses far fewer hacks in order to build these host tools, but will
require more libraries(libc++,etc) from unbundled and stripped down
branches.

Once this becomes the only option, all builds will happen after soong
runs. Then the toolchain / global cflags information will be able to be
moved from make to soong (and exported back to make).

Change-Id: I270b1d92bcef28a96fbc3ec9910d9bd0c101ac0f
2016-01-13 13:08:29 -08:00
Colin Cross
dc74441928 Merge "makeparallel: print path on exec failure"
am: e56ef1bee7

* commit 'e56ef1bee78f7b9a0c74c25087a869f382599080':
  makeparallel: print path on exec failure
2016-01-13 20:43:27 +00:00
Colin Cross
e56ef1bee7 Merge "makeparallel: print path on exec failure" 2016-01-13 20:32:45 +00:00
Alex Klyubin
45f1403b7e Merge "Unconditionally use SHA-256 when minSdkVersion is 18 or higher."
am: fbee4f2e42

* commit 'fbee4f2e42c31aa392869d813687c7648ae41e80':
  Unconditionally use SHA-256 when minSdkVersion is 18 or higher.
2016-01-13 18:46:25 +00:00
Alex Klyubin
c2c49ed0c1 Unconditionally use SHA-256 when minSdkVersion is 18 or higher.
SHA-1 is deprecated, but the replacement SHA-256 is only supported
for JAR/APK and OTA update package signatures on API Level 18 and
newer. This change thus adds a --min-sdk-version command-line
parameter to signapk. When this parameter is set to 18 or higher,
SHA-256 is used instead of SHA-1. When the parameter is not provided,
SHA-1 is used same as before.

This change also removes any other digests from the MANIFEST.MF.
This is to ignore any MANIFEST.MF digests already there in the APK,
such as when re-signing an already signed APK.

Build scripts will be modified to provide the --min-sdk-version
parameter in a follow-up change. This is not done in this change
because of prebuilts which require a prebuilt version of signapk
to support this parameter before the build scripts can be modified.

Bug: 25643280
Change-Id: I6a2782e465600fe2a3ad0c10bd80db2b80a6fb76
2016-01-12 13:31:59 -08:00
Alex Klyubin
bad18cd9cf Merge "List SHA-1 digests of APK entries\' contents in .SF files."
am: 6b452b2767

* commit '6b452b276773e7f1149845e99777e119cf9754ca':
  List SHA-1 digests of APK entries' contents in .SF files.
2016-01-12 21:26:01 +00:00
Alex Klyubin
6b452b2767 Merge "List SHA-1 digests of APK entries' contents in .SF files." 2016-01-12 21:22:12 +00:00