Commit graph

3434 commits

Author SHA1 Message Date
Alex Klyubin
dfd2199ef6 Merge "Make signapk use Conscrypt."
am: 7884a63731

* commit '7884a63731a876f483c13288c87d8e7af7a533e4':
  Make signapk use Conscrypt.
2015-12-11 10:37:16 -08:00
Alex Klyubin
9667b18f23 Make signapk use Conscrypt.
This makes the signapk tool use Conscrypt (where possible) instead of
the platform-default JCA providers and the Bouncy Castle JCA provider.
This speeds up (by 10-30%) APK and OTA update signing because
Conscrypt's crypto primitives are backed by BoringSSL.

Previously, the signapk tool consisted only of the signapk.jar.
Because Conscrypt is backed by native code, signapk now consists of
signapk.jar and crypto_openjdk_jni shared library. This requires that
users of the tool be updated to provide a suitable -Djava.library.path
argument to the Java runtime. This change updates all known users of
the tool inside the Android source tree to do so.

Bug: 26097626
Change-Id: I8411b37d7f771ed99269751a3007dff103083552
2015-12-11 08:36:42 -08:00
Alex Klyubin
95ba90d1f0 Merge "Do not run zipalign when re-signing APKs."
am: 31066abfde

* commit '31066abfde08abdefe00be67074a2c7401917f97':
  Do not run zipalign when re-signing APKs.
2015-12-08 20:23:37 +00:00
Alex Klyubin
eb756d7b7b Do not run zipalign when re-signing APKs.
Running zipalign is no longer needed because signapk takes care of
alignment.

Bug: 25794543
Change-Id: I1080240a67ea6f1b41585fff83d18d57fdcf44e2
2015-12-08 11:05:13 -08:00
Alex Klyubin
3ad587e9ff Merge "Make signapk align .so entries to 4096 bytes." am: dbb5527a9e
am: 7f1eda800d

* commit '7f1eda800d8cdb793b521e20798eaacb3fe410ad':
  Make signapk align .so entries to 4096 bytes.
2015-12-04 17:13:36 +00:00
Alex Klyubin
7f1eda800d Merge "Make signapk align .so entries to 4096 bytes."
am: dbb5527a9e

* commit 'dbb5527a9ef27f292794d1e51ae56d1df68c328b':
  Make signapk align .so entries to 4096 bytes.
2015-12-04 17:10:01 +00:00
Alex Klyubin
dbb5527a9e Merge "Make signapk align .so entries to 4096 bytes." 2015-12-04 17:05:27 +00:00
Shinichiro Hamaji
ba1277549d Merge "Remove warnings from ijar/classfile.cc" am: 128053b91b
am: 8707422e4e

* commit '8707422e4ee24ca96befbf2bf54deca2590bedfa':
  Remove warnings from ijar/classfile.cc
2015-12-03 05:45:48 +00:00
Shinichiro Hamaji
8707422e4e Merge "Remove warnings from ijar/classfile.cc"
am: 128053b91b

* commit '128053b91b959d0664c33659063c5246eb57a594':
  Remove warnings from ijar/classfile.cc
2015-12-03 05:42:52 +00:00
Shinichiro Hamaji
128053b91b Merge "Remove warnings from ijar/classfile.cc" 2015-12-03 05:39:24 +00:00
Alex Klyubin
924a683760 Make signapk align .so entries to 4096 bytes.
This makes signapk align uncompressed .so entries to memory page
boundary (4096 bytes) to enable such libraries to be loaded at runtime
through memory-mapping the APK.

With this change in place, there should no longer be a need to run
zipalign after (or before) signapk.

Bug: 25794543
Change-Id: I74775af15a683791f57fcbd3497a79951b3f63a1
2015-12-02 19:02:01 -08:00
Tao Bao
50aa7c731b Merge "releasetools: Always use recovery mount options." am: 643d466f7b
am: 1709cf3768

* commit '1709cf3768b54c1abc267b5ee92f57023e206c26':
  releasetools: Always use recovery mount options.
2015-12-03 01:35:04 +00:00
Tao Bao
1709cf3768 Merge "releasetools: Always use recovery mount options."
am: 643d466f7b

* commit '643d466f7b853ab4009723e2da200e3a6642d2ad':
  releasetools: Always use recovery mount options.
2015-12-03 01:30:40 +00:00
Tao Bao
269d785ce0 releasetools: Always use recovery mount options.
Change-Id: I6e96c417ffb5ad36405f4a6f5342f80f358f375f
2015-12-02 15:51:47 -08:00
Tao Bao
21362f024b Merge "releasetools: Abort the update on apply_patch failures." am: 2a23c0c859
am: d77af53fc6

* commit 'd77af53fc673229a1e9b59d99592272f689df10f':
  releasetools: Abort the update on apply_patch failures.
2015-12-02 22:05:02 +00:00
Tao Bao
d77af53fc6 Merge "releasetools: Abort the update on apply_patch failures."
am: 2a23c0c859

* commit '2a23c0c85919bada137985f9e3b32514185b38c5':
  releasetools: Abort the update on apply_patch failures.
2015-12-02 22:00:18 +00:00
Tao Bao
c386890d0e releasetools: Abort the update on apply_patch failures.
We used to silently ignore the return value from apply_patch() even if
it had failed. It gives us more trouble to investigate the failure when
the affected file/partition gets touched in subsequent OTAs. This CL
adds the checking of the return value and aborts the update accordingly.

Bug: 25893277
Change-Id: Ie5e1c563576e503343e6a5b28ed4d7039f6f919c
2015-12-02 12:26:57 -08:00
Shinichiro Hamaji
8f2968f095 Remove warnings from ijar/classfile.cc
Also add -Werror.

Change-Id: I2f9fda288d31bd34735856ade33916c93c45922a
2015-12-01 16:44:32 +09:00
Colin Cross
dbeab8de65 Merge changes I1de10391,I4399ca26,Iec3b2b0b am: bff3c9b4c1
am: bae8872294

* commit 'bae88722945130a0c8ebbb1ef27eaa845e9f03fd':
  Use libstdc++ for ijar
  Build ijar for apps build
  Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files
2015-12-01 00:05:38 +00:00
Colin Cross
bae8872294 Merge changes I1de10391,I4399ca26,Iec3b2b0b
am: bff3c9b4c1

* commit 'bff3c9b4c10dcb3ce3820d3a5e144e3df20313dc':
  Use libstdc++ for ijar
  Build ijar for apps build
  Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files
2015-12-01 00:03:27 +00:00
Colin Cross
bff3c9b4c1 Merge changes I1de10391,I4399ca26,Iec3b2b0b
* changes:
  Use libstdc++ for ijar
  Build ijar for apps build
  Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files
2015-12-01 00:00:36 +00:00
Tao Bao
94792ca281 Merge "releasetools: Allow logging the diff for incrementals." am: 6d6e0481fa
am: e88245ddf0

* commit 'e88245ddf0a4920ff90866b9d66b2a3e4bd89f18':
  releasetools: Allow logging the diff for incrementals.
2015-11-30 20:18:45 +00:00
Tao Bao
e88245ddf0 Merge "releasetools: Allow logging the diff for incrementals."
am: 6d6e0481fa

* commit '6d6e0481fa86cb552e1b386e5449fe1fde2325cf':
  releasetools: Allow logging the diff for incrementals.
2015-11-30 20:15:39 +00:00
Tao Bao
d62c603573 releasetools: Allow logging the diff for incrementals.
Add an option "--log_diff <filename>" to ota_from_target_files.py
script. When enabled, it logs the differences between the source
and target builds into <filename> when generating incremental OTAs.

Also move target_files_diff.py into releasetools/ so that it can be
packed into otatools.zip.

Bug: 25372309
Change-Id: Ifd4ed0f2f12ef040ee377621ec8c35a873cec34f
2015-11-30 11:26:40 -08:00
Colin Cross
b15149cb2f Use libstdc++ for ijar
For some reason ijar won't build against libc++ for TARGET_BUILD_APPS
builds, but does build with libstdc++.

(cherry picked from commit 718bab6aec)

Bug: 25904002
Change-Id: I1de103918faa5bb574af6f12cc954e7fed44dc62
2015-11-30 11:16:30 -08:00
Shinichiro Hamaji
80876a6303 Build ijar for apps build
This fixes git_master-linux-apps build.

(cherry picked from commit 9084705744)

Change-Id: I4399ca2662e08c9b3cc2ad5a317e84d91b728115
2015-11-30 11:16:28 -08:00
Shinichiro Hamaji
89b255ab71 Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files
The same optimization was done for binaries in

https://android-review.googlesource.com/#/c/175250/

To create a TOC file from .jar files, this change introduces
ijar, which is designed for this purpose. Only #include lines
were modified from the original version.

https://github.com/bazelbuild/bazel/tree/master/third_party/ijar

Performance:

$ m && touch
frameworks/base/core/java/com/google/android/util/Procedure.java && time
m
Before: 4m30s (1580 targets)
After: 3m57s (772 targets)

Unfortunately, the improvement is small yet, but local
experiments showed we can cut ~2 more minutes if the similar
optimization is done for .dex files.

(cherry picked from commit c1f5d9c203)

Bug: 24597504
Change-Id: Iec3b2b0b0e674bee5d80cce3c300dc8fad6e7c13
2015-11-30 11:16:23 -08:00
Shinichiro Hamaji
371b8c7f77 Merge "Revert "Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files"" am: 2ff3ad9045
am: 51ef51c4ad

* commit '51ef51c4ad283198d5fb4a2ec9caecdc7a677838':
  Revert "Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files"
2015-11-27 04:05:01 +00:00
Shinichiro Hamaji
15bead2c59 Merge "Revert "Build ijar for apps build"" am: d17c3a57f6
am: c3725c256b

* commit 'c3725c256b5d786007f2565324324b386287725a':
  Revert "Build ijar for apps build"
2015-11-27 04:04:53 +00:00
Shinichiro Hamaji
51ef51c4ad Merge "Revert "Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files""
am: 2ff3ad9045

* commit '2ff3ad90455e868a1805d065f0aa2b8babbc6660':
  Revert "Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files"
2015-11-27 04:02:09 +00:00
Shinichiro Hamaji
c3725c256b Merge "Revert "Build ijar for apps build""
am: d17c3a57f6

* commit 'd17c3a57f6f183b97cc557e10e221b4dc1acf47f':
  Revert "Build ijar for apps build"
2015-11-27 04:02:01 +00:00
Shinichiro Hamaji
2ff3ad9045 Merge "Revert "Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files"" 2015-11-27 03:59:30 +00:00
Shinichiro Hamaji
d17c3a57f6 Merge "Revert "Build ijar for apps build"" 2015-11-27 03:59:18 +00:00
Shinichiro Hamaji
3ae7f66bab Revert "Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files"
This reverts commit c1f5d9c203.

Change-Id: I7e9969a060e3f1380154da65e76134168aee15d8
2015-11-27 03:58:51 +00:00
Shinichiro Hamaji
ea2da50e17 Revert "Build ijar for apps build"
This reverts commit 9084705744.

Change-Id: I8a9958788c51dcec5028ef396cb67abd541ce31f
2015-11-27 03:57:17 +00:00
Colin Cross
06c44241da Merge "Revert "Use libstdc++ for ijar"" am: 41dca40376
am: 6cd88d7514

* commit '6cd88d75147217bc42fed67b558f9e4c836a20a0':
  Revert "Use libstdc++ for ijar"
2015-11-26 22:25:12 +00:00
Colin Cross
6cd88d7514 Merge "Revert "Use libstdc++ for ijar""
am: 41dca40376

* commit '41dca403766d22373ba469d99ba1625d0930d02e':
  Revert "Use libstdc++ for ijar"
2015-11-26 22:23:02 +00:00
Colin Cross
39cca23d41 Revert "Use libstdc++ for ijar"
This reverts commit 718bab6aec.

Change-Id: I9aa222fc2936d7d89ae0700eeef505c6b317d777
2015-11-26 22:20:22 +00:00
Colin Cross
8713fde1c3 Merge "Use libstdc++ for ijar" am: c97b5272d7
am: 4c1944083f

* commit '4c1944083f03e1ddf55f16f815b89a337ffc60f6':
  Use libstdc++ for ijar
2015-11-26 22:14:40 +00:00
Colin Cross
4c1944083f Merge "Use libstdc++ for ijar"
am: c97b5272d7

* commit 'c97b5272d715ab9f4ff52748bd2f403235f94426':
  Use libstdc++ for ijar
2015-11-26 22:12:38 +00:00
Colin Cross
718bab6aec Use libstdc++ for ijar
For some reason ijar won't build against libc++ for TARGET_BUILD_APPS
builds, but does build with libstdc++.

Change-Id: I8e900b0f764f0bb8f827705cb9173f07e4f33862
2015-11-26 14:09:50 -08:00
Colin Cross
93e138b723 Merge "Build ijar for apps build" am: ec4db56e58
am: 3b5dbebe8d

* commit '3b5dbebe8d9a8beac49a8c16605df6afbec4de72':
  Build ijar for apps build
2015-11-26 17:38:34 +00:00
Colin Cross
3b5dbebe8d Merge "Build ijar for apps build"
am: ec4db56e58

* commit 'ec4db56e5802171bc2d0237f496e97ec093f0be0':
  Build ijar for apps build
2015-11-26 17:36:29 +00:00
Colin Cross
ec4db56e58 Merge "Build ijar for apps build" 2015-11-26 17:34:50 +00:00
Shinichiro Hamaji
9084705744 Build ijar for apps build
This fixes git_master-linux-apps build.

Change-Id: I1a77b2495d98d89f570cb165d7f25f617c9af9aa
2015-11-26 17:24:40 +09:00
Shinichiro Hamaji
b42da32564 Merge "Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files" am: c9a1b27845
am: 27770abe27

* commit '27770abe272eb54de5eea5fa94342c1393b681a0':
  Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files
2015-11-26 05:33:54 +00:00
Shinichiro Hamaji
27770abe27 Merge "Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files"
am: c9a1b27845

* commit 'c9a1b278458eddd3065c0e9fc06e12b2cb1c38cb':
  Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files
2015-11-26 05:30:54 +00:00
Shinichiro Hamaji
c9a1b27845 Merge "Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files" 2015-11-26 05:25:58 +00:00
Tao Bao
fe1373e194 Merge "target_files_diff: Allow writing outputs to file." am: 7b5eddd52b
am: acd1b8e160

* commit 'acd1b8e160c8114bd07be2175388f7dcefe09687':
  target_files_diff: Allow writing outputs to file.
2015-11-25 00:06:08 +00:00
Tao Bao
acd1b8e160 Merge "target_files_diff: Allow writing outputs to file."
am: 7b5eddd52b

* commit '7b5eddd52bfb70485488458a115a33f1af92759a':
  target_files_diff: Allow writing outputs to file.
2015-11-25 00:03:01 +00:00