Commit Graph

4255 Commits

Author SHA1 Message Date
Mohamad Ayyash
c3484f7f64 Pass block_list param to mksquashfs
Needed to generate image.map and to optimize the OTA size

BUG: 22322817
Change-Id: I7802f4dbb9116a94ea99a00b68c3a7ff180ef08a
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2016-06-13 09:48:05 -07: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
Alex Deymo
dbae67fac8 Merge \\"Redirect subprocess stderr to stdout in verbose mode.\\" am: 1318ec93e7
am: 74d7b31f7d

Change-Id: Ia9757f09dead577349b0cf4b97cb062f30d0f45d
2016-06-11 01:12:06 +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
Tianjie Xu
c201d28713 Add build.version.incremental to metadata
am: d06f07eef4

Change-Id: I4f0b89d69154ef32bbb04fa905fdc014c911d571
2016-06-10 17:24:52 +00:00
Tianjie Xu
d06f07eef4 Add build.version.incremental to metadata
Add the build property "build.version.incremental" of the source (if
present) and target files to the metadata of the ota update package.

Example of metadata:
....
post-build-incremental=2951741
post-timestamp=1465345123
pre-build-incremental=2943039
pre-device=bullhead
...

Bug: 28658632
Change-Id: I889e8ccf39633b1b35590751001a42d1b05d5514
2016-06-09 17:54:46 -07:00
Alex Klyubin
42c4f541ae Merge \\"APK Signature Scheme v2 APK verifier.\\" am: 4f8bde47ae
am: 9cf15a318b

Change-Id: Iada08b1831d737ab702b6f7aee7cb21648a06bf0
2016-06-08 21:06:41 +00:00
Alex Klyubin
914b771e2f Merge \\"Fix DSA APK signatures for API Level 8 and lower.\\" am: ebe68ec237
am: b926969a84

Change-Id: Ie93b77c066e7637cdb704d3167dc65936aca16b1
2016-06-08 15:31:24 +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
Dan Willemsen
6fe82857b5 Merge "Switch some build tools to Soong" am: c52d09e694
am: 8a78c90a95

* commit '8a78c90a95a3a0c5886b333e90994721eeb92734':
  Switch some build tools to Soong

Change-Id: I481784785375dfb6790d14681eb110e0f67bf65c
2016-06-06 23:05:06 +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
Dan Willemsen
029da90bf4 Merge "Remove dead rgb2565" am: a571e83095
am: d1f0eb15c8

* commit 'd1f0eb15c812b8c4ea8697b9e2171846e6510884':
  Remove dead rgb2565

Change-Id: I6a95c5cf31a05822d85fce16d1e9b311dd759cee
2016-06-06 21:43:16 +00:00
Treehugger Robot
a571e83095 Merge "Remove dead rgb2565" 2016-06-06 21:35:47 +00:00
Alex Klyubin
31e3dab7bb Merge "Improve efficiency of using the DataSource abstraction." am: 7353eabd14
am: 732b29a5c3

* commit '732b29a5c38a3a33bdffea662875e6a8dab894b3':
  Improve efficiency of using the DataSource abstraction.

Change-Id: I4b2e05ffc80d59ef19a1b78c3560f0d21c5b04b2
2016-06-06 21:23:05 +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
Alex Klyubin
56d75bb19d Merge "Switch signapk to apksigner-core." am: 1a39e8eb34
am: 2f24b771ea

* commit '2f24b771eac14924ba9d5ab1a0e69da1641df582':
  Switch signapk to apksigner-core.

Change-Id: I3b8ddfcf2369247713b1570cb901cc5604622c75
2016-06-06 19:59:12 +00: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
Colin Cross
116a8ef96b Merge "Add --dir option to findleaves.py" am: 40623e2a99
am: 1d7930b2be

* commit '1d7930b2bedad092189bca3336a9cf717b9b4f37':
  Add --dir option to findleaves.py

Change-Id: Id2027d82ae83efd1ca05379b200b7f48ac44b6be
2016-05-28 01:04:52 +00: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
fe2470994e Merge "Improve DataSource interface." am: ce4c9d7108
am: f41e840250

* commit 'f41e840250e2c0e5cce9263edbcb43fec4163d85':
  Improve DataSource interface.

Change-Id: Ibf017a47be707dbd0576021832ce760a7dcaa21a
2016-05-27 20:12:27 +00:00
Alex Klyubin
ef6b69d741 Merge "Store entry alignment information in APK." am: 85f004c6c5
am: 4ea527597e

* commit '4ea527597e72ddff825a32fc24c6e4970d50da8f':
  Store entry alignment information in APK.

Change-Id: I3ab22f58eba48743a6533265217f09ab007840f6
2016-05-27 20:07:40 +00:00
Alex Klyubin
ce4c9d7108 Merge "Improve DataSource interface." 2016-05-27 20:00:59 +00:00
Alex Klyubin
7b977ea0e9 Improve DataSource interface.
1. This adds way to obtain a DataSource which represents a region of
   data contained in the DataSource.
2. This fixes a design bug in "feed" method where the size parameter
   was an int instead of long.
3. This fixes a bug in ByteBufferDataSource where its mSize field was
   a long instead of an int (ByteBuffer's length cannot be more than
   2^31).

Bug: 27461702
Change-Id: Ib0812784beb581f19d2412e667b8bd018f0a3c78
2016-05-27 10:28:52 -07:00
Dirk Dougherty
bf886f4f3b Fix improper date reference in blog reader. am: 2732bb762a am: 0f6d425804 am: 53cd365b2d
am: a5bce98621

* commit 'a5bce98621ef4aa7632ead4de267118f4832d6c2':
  Fix improper date reference in blog reader.

Change-Id: Iedec1fc31a923e12a9733427a7ee2666c761b3e5
2016-05-26 23:52:30 +00:00
Dirk Dougherty
a5bce98621 Fix improper date reference in blog reader. am: 2732bb762a am: 0f6d425804
am: 53cd365b2d

* commit '53cd365b2d2c2b074d628147a8a382275075bd1d':
  Fix improper date reference in blog reader.

Change-Id: I300892c3c4439354917872839c18e4c029160df1
2016-05-26 23:49:38 +00:00
Dirk Dougherty
53cd365b2d Fix improper date reference in blog reader. am: 2732bb762a
am: 0f6d425804

* commit '0f6d425804d7fd60dc82b9fe0c4ce585aa9e5eed':
  Fix improper date reference in blog reader.

Change-Id: I9641b21d8841f2847836c691eba8bfb89497417d
2016-05-26 23:46:18 +00:00
Dirk Dougherty
0f6d425804 Fix improper date reference in blog reader.
am: 2732bb762a

* commit '2732bb762a00828f36bda77c43c7fd14c7495cde':
  Fix improper date reference in blog reader.

Change-Id: I5ff0d1d2b16ae712b6e92ef64c023574d2e7bfe5
2016-05-26 23:43:35 +00:00
Dirk Dougherty
2732bb762a Fix improper date reference in blog reader.
Change-Id: I9f1a32a68da2d21ea02b95df8cd7dfc4396a445f
2016-05-26 13:05:10 -07:00
Amanda Kassay
b4da199b68 Revert "Updated default.css and docs.js for DoD transition fallback." am: 8bac6eb880 am: 0eefec03a7 am: ecaacf87cd
am: 7bea848abd

* commit '7bea848abda31862aad104657f87859b7e67677d':
  Revert "Updated default.css and docs.js for DoD transition fallback."

Change-Id: If9055f540e174fde5732f36fd47eec0ed2d1f7cb
2016-05-26 18:36:55 +00:00
Amanda Kassay
7bea848abd Revert "Updated default.css and docs.js for DoD transition fallback." am: 8bac6eb880 am: 0eefec03a7
am: ecaacf87cd

* commit 'ecaacf87cd038beb4aad5d6ddc6c1cc1725dca4a':
  Revert "Updated default.css and docs.js for DoD transition fallback."

Change-Id: I07e3e36f3dd322fde3067e63a66ac9f5e87e7385
2016-05-26 18:33:54 +00:00
Amanda Kassay
ecaacf87cd Revert "Updated default.css and docs.js for DoD transition fallback." am: 8bac6eb880
am: 0eefec03a7

* commit '0eefec03a76e5e0201293331dd67baf52dc13ceb':
  Revert "Updated default.css and docs.js for DoD transition fallback."

Change-Id: I9dc0292d9615d5cd1f888a4ac92b45b0b3d6ffb4
2016-05-26 18:28:40 +00:00
Amanda Kassay
0eefec03a7 Revert "Updated default.css and docs.js for DoD transition fallback."
am: 8bac6eb880

* commit '8bac6eb880992e0a4dd37b0f1cf039feebb483ae':
  Revert "Updated default.css and docs.js for DoD transition fallback."

Change-Id: I33f169f14f2e7b993e30c00fe59016357242f288
2016-05-26 18:22:56 +00:00
Amanda Kassay
8bac6eb880 Revert "Updated default.css and docs.js for DoD transition fallback."
This reverts commit 4d5bcbf62a.

Change-Id: I45dc33a7711f435fd35b51bb0cb44445e6edd918
2016-05-26 17:58:23 +00:00
Tianjie Xu
97be5b9b6e Merge "Report error codes in the OTA update script" into nyc-dev
am: 654e4fb023

* commit '654e4fb02368b05cbfba3246b4c634512fa84464':
  Report error codes in the OTA update script

Change-Id: I333bd45886d5915858b762e086d8a263f81b26e2
2016-05-25 21:11:12 +00:00
Tianjie Xu
209db46be1 Report error codes in the OTA update script
Modify the abort() function in the OTA update generation script to
report an error code. The recoveryimage will parse the code and write it
into last_install for further data analysis.

Bug: 28934032
Change-Id: I2d62f81fd352c3102fb84f054972ac0ecb965a21
2016-05-25 12:22:31 -07:00
Alex Klyubin
26f00cda4b Store entry alignment information in APK.
Data of uncompressed APK entries is often aligned to a multiple of 4
or 4096 in the APK to make it easier to mmap the data. Unfortunately,
the current method for achieving alignment suffers from two issues:
(1) the way it uses the Local File Header extra field is not compliant
with ZIP format (for example, this prevents older versions of Python's
zipfile from reading APKs: https://bugs.python.org/issue14315), and
(2) it does not store information about the alignment multiple in the
APK, making it harder/impossible to preserve the intended alignment
when rearranging entries in the APK.

This change solves these issues by switching to a different method for
aligning data of uncompressed APK entries. Same as before, alignment
is achieved using Local File Header entry field. What's different is
that alignment is achieved by placing a well-formed extensible data
field/block into the extra field. The new field/block contains the
alignment multiple (e.g., 4 or 4096) as well as the necessary padding
(if any). Compared to the original alignment method, the new method
uses 6 more bytes for each uncompressed entry.

Bug: 27461702
Change-Id: I8cffbecc50bf634b28fca5bc39eb23f671961cf9
2016-05-23 17:46:18 -07:00
Alex Klyubin
c08fc58061 Merge "Improve concurrency for JAR entry inspection requests." am: ac68c28831
am: 304cb0f015

* commit '304cb0f015889334d6f7e75a92cc6ed8c4ce6c52':
  Improve concurrency for JAR entry inspection requests.

Change-Id: I837fbdfdd3d3af654a8cc31ecd89ec0077e1fba1
2016-05-23 19:34:12 +00:00
Alex Klyubin
ac68c28831 Merge "Improve concurrency for JAR entry inspection requests." 2016-05-23 19:26:14 +00:00
Billy Lamberta
f4ebc875e5 docs: work minisite am: 09304b21b3 am: 05f772fe6b
am: f06c24f0c1

* commit 'f06c24f0c1b06aaf24637c1392cd61f9bb52f66f':
  docs: work minisite

Change-Id: I14e93ea722cef48c8dd4ee056fa8cdb1056128ec
2016-05-16 22:26:58 +00:00
Billy Lamberta
f06c24f0c1 docs: work minisite am: 09304b21b3
am: 05f772fe6b

* commit '05f772fe6bb53190477d6b92e8098d53994cfdbf':
  docs: work minisite

Change-Id: Ifff07a8a5d6b5aa9011226ec8d512f5e800ff4df
2016-05-16 22:21:47 +00:00
Billy Lamberta
05f772fe6b docs: work minisite
am: 09304b21b3

* commit '09304b21b33f13480d4df58b53df89e6e1356537':
  docs: work minisite

Change-Id: I3ee5ddd408506dbdce2168e8aeaa3a1a87442005
2016-05-16 22:15:52 +00:00
Billy Lamberta
09304b21b3 docs: work minisite
Changes needed to build the new directory
frameworks/base/docs/html/work. Support for
resource cards and navigation.

bug: 27744376
Change-Id: I8556eb0e2cf86eb83be395a97306d220394827cd
2016-05-16 14:15:06 -07:00
Alex Klyubin
cd3ee4ce6c Merge "No need to JAR-sign OTA update packages." am: 094caf99aa
am: 5e09800c76

* commit '5e09800c7623f172368ebc426ee7987ea787cba7':
  No need to JAR-sign OTA update packages.

Change-Id: I0da7e308c93a459a1152f95bdafad4e67997275d
2016-05-16 17:21:37 +00:00