Commit Graph

1016 Commits

Author SHA1 Message Date
Tianjie Xu 4f09900e67 Replace META/care_map.txt when signing target files
Do not copy the "META/care_map.txt" from the source zipfile when
signing the target files with sign_target_files_apks. Because we'll
generate a new care_map after rebuilding the system/vendor images;
and we'll write the new "META/care_map.txt" to the signed-target-file.

Change-Id: I6919cfdf8314a4084b5f612a9c89469f391486a4
Test: Run sign_target_files_apks locally, and the entry is updated.
Bug: 30812253
2016-08-11 18:04:27 -07:00
Tao Bao 6a0451f4e1 Merge "releasetools: Update the path to /default.prop for A/B devices." am: 6d64ff1bf7 am: 6eb5564025
am: cd6ce6182b

Change-Id: I53fffa12f748ebf97462cd0f5bc70d4478e027d5
2016-08-11 20:49:12 +00:00
Tao Bao 6eb5564025 Merge "releasetools: Update the path to /default.prop for A/B devices."
am: 6d64ff1bf7

Change-Id: I1deeff5d22454c1fae5b450dbf2e6a35ffbc6227
2016-08-11 20:42:34 +00:00
Tao Bao 28e2fa1726 releasetools: Update the path to /default.prop for A/B devices.
On A/B devices (i.e. system_root_image="true"), /default.prop is
packaged at ROOT/default.prop (as opposed to BOOT/RAMDISK/default.prop
for non-A/B devices). Update the path so that we handle properties like
ro.bootimage.build.fingerprint properly.

The one for recovery is not affected, which stays at
BOOT/RAMDISK/default.prop for A/B devices and gets updated correctly.

Bug: 30811237
Test: Verify the property in the generated signed-TF.zip.
Change-Id: Id201a042d7ea988a64f89c6d04f43326a9851e27
2016-08-11 11:28:51 -07:00
Alex Deymo e8fbea342f Merge changes from topic 'ab_sideload' am: 3750ed3e17 am: 93ff77ad1a
am: 820bc82bed

Change-Id: I0dcac2e3cdbc3114a88d7ca49054a15bd9ccb292
2016-08-10 05:07:24 +00:00
Alex Deymo 93ff77ad1a Merge changes from topic 'ab_sideload'
am: 3750ed3e17

Change-Id: I4afbecc40068c7a87c7532b22a404319c24e2c05
2016-08-10 05:00:57 +00:00
Alex Deymo b3e8ce6d1d Replace OTA sideload verification key when signing A/B devices.
The update-payload-key is used by update_engine_sideload from recovery
to verify an update payload.

Bug: 27178350
Change-Id: I7a0a307ae565e5e9cbf2c9b58fbcc055e87771ce
2016-08-04 16:06:12 -07:00
Tao Bao 9220a725bd Merge \\\"Handle multiple APKs from the same package in check_target_files_signatures.py.\\\" am: 653980bfe4 am: 88f7e6a867
am: c57f2e6f65

Change-Id: I8a634684509bbb91f6311a1e8ffb0e95174af5e5
2016-07-28 04:46:47 +00:00
Tao Bao 88f7e6a867 Merge \"Handle multiple APKs from the same package in check_target_files_signatures.py.\"
am: 653980bfe4

Change-Id: I9b47c241b8d8c879b6e1794e5c84ad9fd8541613
2016-07-28 04:41:18 +00:00
Tao Bao 6a54299fbd Handle multiple APKs from the same package in check_target_files_signatures.py.
We were using the package name as the key to index APKs. APKs from the
same package got messed up and gave wrong signature summary. Switch to
using the package filename as the key, which is identical in a given build.

Also fix the trailing space when printing the signature summary.

Bug: 30418268
Test: Run with a target_files.zip that has multiple APKs from the same package.

Change-Id: I6317e8c05e987c5690915e05c294153d10e2f0ab
2016-07-27 19:52:28 -07:00
Tianjie Xu 737afb98c9 resolve merge conflicts of 333df6c to nyc-mr1-dev-plus-aosp
Change-Id: Ibe66a7c78073a9c3e9f139bd6b00a0afab075190
2016-07-11 11:42:53 -07:00
Tianjie Xu 333df6c1d1 Merge "Add care_map to target_files package" into nyc-mr1-dev 2016-07-11 17:59:47 +00:00
Tao Bao 538ed261eb resolve merge conflicts of 4058a71 to stage-aosp-master
Change-Id: I0816bfc5d8adb20e175617d97651f1474ce4e916
2016-07-11 09:08:24 -07:00
Tao Bao 62a6c464a2 releasetools: Fix the detection of using squashfs.
We should disable using imgdiff if *any* of the source and target
partitions uses squashfs.

Bug: 30004734
Test: Create an incremental with two builds with one of them uses squashfs.
Change-Id: I826cd13d7b852c548e4b45e61f5ae00f6407cac3
(cherry picked from commit f8acad1480)
2016-07-10 23:16:14 -07:00
Tao Bao b6568cd4be releasetools: Disable using imgdiff for squashfs.
We use imgdiff to handle files in zip format (e.g. jar/zip/apk) for
higher compression ratio.

For system/vendor in squashfs, a) all files are compressed in LZ4
format; b) we use 4096-byte block size in their sparse images, but the
files in squashfs may not be laid out as 4K-aligned. So the blocks for
a given file as listed in block map may not form a valid zip file, which
may fail the patch generation with imgdiff.

Disable using imgdiff for squashfs images, and use bsdiff instead.

Bug: 22322817
Change-Id: Ie76aa4cece5c9d38cb1d1a34c505a4a8f37512d3
(cherry picked from commit 293fd135c7)
2016-07-10 23:15:48 -07:00
Tianjie Xu cfa86223d6 Add care_map to target_files package
Generate a new file containing care_data of system (and vendor)
partition, and add it under META/ of target file package. For
A/B update, copy this file to OTA package for later use by
update_verifier.

Bug: 27175949

Change-Id: I90bb972703afaeb94bc3efe718fd81b1cfbcabcc
2016-07-08 16:53:59 -07:00
Tao Bao c4449f819c Merge \"releasetools: Fix the payload public key replacement.\"
am: 8a09095c34

Change-Id: I464ec9dd1a12dcb06bc1dcbf340fdcbac04b9575
2016-07-08 21:09:20 +00:00
Tao Bao 98c90d1efa Merge \"releasetools: Fix the payload public key replacement.\" into nyc-mr1-dev
am: 0821fab13a

Change-Id: I15ef57cc520cc2d55ea382688da737d57281358b
2016-07-08 20:02:20 +00:00
Tao Bao 13b6962e8d releasetools: Fix the payload public key replacement.
update_engine expects the extracted public key instead of the
certificate.

Bug: 28701652
Change-Id: I292d39da9e039f96d01a4214226aeb46f8cb881d
(cherry picked from commit afaf295cb8)
2016-07-08 12:52:45 -07:00
Tao Bao 0821fab13a Merge "releasetools: Fix the payload public key replacement." into nyc-mr1-dev 2016-07-08 19:47:10 +00:00
Tao Bao ae974f289b releasetools: Fix the detection of using squashfs.
am: f8acad1480

Change-Id: I654730ef8566d12ad17a81261b450a695b79686d
2016-07-07 18:24:12 +00:00
Tao Bao f8acad1480 releasetools: Fix the detection of using squashfs.
We should disable using imgdiff if *any* of the source and target
partitions uses squashfs.

Bug: 30004734
Test: Create an incremental with two builds with one of them uses squashfs.
Change-Id: I826cd13d7b852c548e4b45e61f5ae00f6407cac3
2016-07-07 09:10:25 -07:00
Tao Bao afaf295cb8 releasetools: Fix the payload public key replacement.
update_engine expects the extracted public key instead of the
certificate.

Bug: 28701652
Change-Id: I292d39da9e039f96d01a4214226aeb46f8cb881d
2016-07-06 15:31:36 -07:00
Alex Light a3e8e9c6f3 resolve merge conflicts of 3f7c348 to nyc-mr1-dev-plus-aosp
Bug: 29278988

Change-Id: Icffb9a280311c7d3c45f096243ddf18f7ebecd9d
2016-06-29 15:43:54 -07:00
Alex Light 3f7c34859e Merge "Add system_other partition, install odex files" into nyc-mr1-dev 2016-06-29 20:26:06 +00:00
Tianjie Xu 1cfa3f05c7 Merge \\\"Skip copying existing vendor images\\\" am: 1767d3f918 am: 85da4d3566
am: 317d1594e4

Change-Id: I609170449d1312537fd40496075c0b60a2bf9e13
2016-06-29 18:50:53 +00:00
Tianjie Xu 85da4d3566 Merge \"Skip copying existing vendor images\"
am: 1767d3f918

Change-Id: I5f929adedb17b6d32d2e0e284aa37c39c643c3ea
2016-06-29 18:45:57 +00:00
Tianjie Xu aaca421ec1 Skip copying existing vendor images
add_img_to_target_files.py has an option of "-a" to add missing
images only. Under this option, the script should skip copying
the radio images for A/B devices when given image exists already
under "IMAGES/".

Test: Run the command on an A/B device, the existing radio images under "IMAGES/" don't get overwritten; and missing images are added correctly.
Bug: 29608905
Change-Id: Ie034b85a5d777d53e367f99470cea4d19cb1aaaf
2016-06-29 18:32:30 +00:00
Ethan Xia 886846300d Merge \\\"releasetools: Change the default key path for bvbtool\\\" am: 7c7571d510 am: 090e8eff5e
am: e4efe69fae

Change-Id: If1d96c88a42d3894d7c9bccef6064f159bf185d2
2016-06-28 02:02:12 +00:00
Ethan Xia e4efe69fae Merge \\"releasetools: Change the default key path for bvbtool\\" am: 7c7571d510
am: 090e8eff5e

Change-Id: I34f3cc1a38b860fd3100548f55a38af9faf69e19
2016-06-28 01:59:47 +00:00
Ethan Xia 090e8eff5e Merge \"releasetools: Change the default key path for bvbtool\"
am: 7c7571d510

Change-Id: Ic02f432c689edba37ecce684662d8f5f1cfc32b6
2016-06-28 01:57:26 +00:00
Ethan Xia 37b4a9819b releasetools: Change the default key path for bvbtool
The bvb path has been changed from 'system/bvb' to 'external/bvb'

Change-Id: I8587351b7d702a287883c6bd3c9de1cd3540435b
2016-06-27 17:19:01 +08:00
Tianjie Xu 5af8cf9732 Merge \"Avoid writing too much new data per transfer\" into nyc-mr1-dev
am: 21e6dde63c

Change-Id: I4d9fae702e81cea01a0a602247e629e71dd4efc7
2016-06-24 18:12:13 +00:00
Alex Light 4e358ab2c3 Add system_other partition, install odex files
For AB devices, support flashing two system partitions for factory use.
The normal system image on one partition, but without dex preopt. And a
system_other image that just contains the odex files. The dex files will
not be stripped out of the system image, in case the second system
partition is wiped.

Setting BOARD_USES_SYSTEM_OTHER_ODEX := true in the BoardConfig.mk
enables this behavior.

One can control which directories are placed in system_other by the
SYSTEM_OTHER_ODEX_FILTER configuration variable. Currently we default
to only copying only app and priv-app odexs.

Bug: 29278988
Change-Id: I7f4e87da919e7dc6a89fd8c668193cd4e98631bc
2016-06-24 11:07:15 -07:00
Tianjie Xu 21e6dde63c Merge "Avoid writing too much new data per transfer" into nyc-mr1-dev 2016-06-24 18:06:22 +00:00
Tao Bao 1ea603491f Merge \\"Fix the path for verity_key replacement when signing.\\" am: 46abc55954
am: 5b9921369e

Change-Id: Iae1fbc6e07d1cada56d0f34b87dad2074b4664a6
2016-06-24 05:30:31 +00:00
Tao Bao c8338f1c35 Merge \\"Add ability to pass in payload_signer args\\" am: 8e6582b238
am: 8f9df9efb9

Change-Id: I3603ac55a8836406ca60c05959efffffb7ffca3a
2016-06-24 05:30:31 +00:00
Tao Bao 63cc08f93d Merge \\"releasetools: Support using payload_signer.\\" am: 983a42bdf1
am: 9322317ee7

Change-Id: I13c5eede68149c1dda6da9bb33a2527adc05dd8c
2016-06-24 05:30:31 +00:00
Tao Bao fb45739c55 Merge \\"releasetools: replace verity keyid\\" am: 6efa887f9b
am: 45d28d7392

Change-Id: I2104805b0de9ca28fde19f2c460b540977260dc2
2016-06-24 05:30:30 +00:00
Tao Bao b2814336a0 Merge \\"Replace OTA keys when signing for A/B devices.\\" am: f2c34ece3c
am: deb116a65d

Change-Id: Ib57f472bdd232a908e0399dc1365f9aaf8ddf3ba
2016-06-24 05:30:30 +00:00
Tao Bao 5b9921369e Merge \"Fix the path for verity_key replacement when signing.\"
am: 46abc55954

Change-Id: I9496d5826e077a470ac0ddd3565e3547611e6bf1
2016-06-24 05:27:03 +00:00
Baligh Uddin 8f9df9efb9 Merge \"Add ability to pass in payload_signer args\"
am: 8e6582b238

Change-Id: I83ab46e365fd09c7bf3d4a97fddf289e5d819ce0
2016-06-24 05:27:02 +00:00
Tao Bao 9322317ee7 Merge \"releasetools: Support using payload_signer.\"
am: 983a42bdf1

Change-Id: I027ae0f71c3a57ffad476791721b111605844f1d
2016-06-24 05:27:02 +00:00
Badhri Jagan Sridharan 45d28d7392 Merge \"releasetools: replace verity keyid\"
am: 6efa887f9b

Change-Id: I63b11e2e0d27100a58a05ea91c0e7c29bb0597ff
2016-06-24 05:27:01 +00:00
Tao Bao deb116a65d Merge \"Replace OTA keys when signing for A/B devices.\"
am: f2c34ece3c

Change-Id: I7eb287bd486d197b3c2c96616b558e7bc9536329
2016-06-24 05:27:00 +00:00
Tao Bao 8adcfd1688 Fix the path for verity_key replacement when signing.
system_root_image expects the key at ROOT/verity_key as opposed to
BOOT/verity_key. Also refactor the verity key replacement lines.

Bug: 29397395
Test: 'sign_target_files_apks.py --replace_verity_private_key newkey --replace_verity_public_key newkey.pub target_files.zip signed-target_files.zip' and verify the replaced key in boot.img.
Change-Id: I58a5defff4be008ad55d4b5a5b7148569c3b8d66
(cherry picked from commit e0ee794fa1)
2016-06-23 22:17:46 -07:00
Baligh Uddin 34eb000de5 Add ability to pass in payload_signer args
Bug: 28701652
Change-Id: I110d5fc14446e4a6a0f8e25dcb0d300decdf09a4
(cherry picked from commit 2abbbd0333)
2016-06-23 22:16:46 -07:00
Tao Bao 1a5e1d18a7 releasetools: Support using payload_signer.
For A/B OTAs, by default it calls 'openssl pkeyutl' to sign the payload
and metadata with the package private key. If the private key cannot be
accessed directly, a payload signer that knows how to do that should be
supplied via "--payload_signer <signer>".

The signer will be called with "-inkey <path_to_private_key>",
"-in <input_file>" and "-out <output_file>" parameters.

Test: Use a dummy signer, call 'ota_from_target_files.py --payload_signer <signer> <target_files.zip> <ota.zip>' and verify the signatures in the generated package.
Bug: 28701652
Change-Id: I26cfdd3fdba6fc90799221741b75426988e46fd3
(cherry picked from commit dea0f8bfed)
2016-06-23 22:15:30 -07:00
Badhri Jagan Sridharan 35c9b1243f releasetools: replace verity keyid
Replace verity keyid with the keyid extracted from cert
passed through --replace_verity_keyid. The veritykeyid in the
BOOT/cmdline of input target files is replaced with keyid
extracted from --replace_verity_keyid and written to the
output target files.

BUG: 28384658
Change-Id: Ic683f36f543c4fcd94b6f95e40f01200fbf45ee1
(cherry picked from commit b58d23fe00)
2016-06-23 22:13:12 -07:00
Tao Bao a80ed221b8 Replace OTA keys when signing for A/B devices.
It replaces the package verification key (change of path due to
system_root_image flag), as well as the payload verification key.

Bug: 29397395
Change-Id: I10435072aaf4356f2d8b5e1b6e82eb9cead7ad62
(cherry picked from commit 24a7206430)
2016-06-23 22:12:31 -07:00
Tao Bao 9e71a9e1a1 Merge \"Fix the path for verity_key replacement when signing.\" into nyc-mr1-dev
am: 5fdbfac337

Change-Id: Id66964a5659c17f87404baaa73f9b90b98fac7fe
2016-06-24 05:02:02 +00:00
Tao Bao b79e31756b resolve merge conflicts of 2abbbd0 to nyc-mr1-dev-plus-aosp
Change-Id: I2d06f0cec793185533ef2fc78428dfd99815030c
2016-06-23 19:48:40 -07:00
Tianjie Xu 37e29301e6 Avoid writing too much new data per transfer
Limit the number of blocks in each 'new' command to 1024. This should
decrease the chance of fsync error during an OTA update, similiar to
what we have done in b/29535618.

Bug: 29607757
Change-Id: I89f0a845d71eb810766e39860ab667c61b61a417
2016-06-23 18:00:16 -07:00
Tao Bao e0ee794fa1 Fix the path for verity_key replacement when signing.
system_root_image expects the key at ROOT/verity_key as opposed to
BOOT/verity_key. Also refactor the verity key replacement lines.

Bug: 29397395
Test: 'sign_target_files_apks.py --replace_verity_private_key newkey --replace_verity_public_key newkey.pub target_files.zip signed-target_files.zip' and verify the replaced key in boot.img.
Change-Id: I58a5defff4be008ad55d4b5a5b7148569c3b8d66
2016-06-23 16:23:14 -07:00
Baligh Uddin 2abbbd0333 Add ability to pass in payload_signer args
Bug: 28701652
Change-Id: I110d5fc14446e4a6a0f8e25dcb0d300decdf09a4
2016-06-23 10:34:51 -07:00
Badhri Jagan Sridharan ed25565e63 Merge \"releasetools: replace verity keyid\" into nyc-mr1-dev
am: 05dcc3718a

Change-Id: I0e9e1b1b2b9ca826de09b81925760c19697b39dc
2016-06-22 20:59:55 +00:00
Badhri Jagan Sridharan 05dcc3718a Merge "releasetools: replace verity keyid" into nyc-mr1-dev 2016-06-22 20:54:21 +00:00
Tianjie Xu 5371829b86 Merge \"Limit the number of blocks in command zero\" into nyc-dev
am: 0eade3f027

Change-Id: I7f5cc1319863eb1ec1d87b6bf3e9cb62f3401e41
2016-06-22 05:17:42 +00:00
Tianjie Xu 8fe72d5479 Merge \"Limit the number of blocks in command zero\" into nyc-mr1-dev
am: 7112b50252

Change-Id: I30e4a669f0d7b819acc97ad6ca4ed5af666d994a
2016-06-21 23:37:25 +00:00
Tianjie Xu b64439b291 Limit the number of blocks in command zero
Limit the number of blocks in command zero to 1024 blocks. This
prevents the target size of one command from being too large and
might help to avoid fsync errors during the OTA update.

Bug: 29535618
Change-Id: Ic630cea2599138516162bd0029e2e4b2af75bf4f
(cherry picked from commit bb848c54a7)
2016-06-21 23:19:30 +00:00
Tianjie Xu 7112b50252 Merge "Limit the number of blocks in command zero" into nyc-mr1-dev 2016-06-21 23:19:12 +00:00
Tianjie Xu bb848c54a7 Limit the number of blocks in command zero
Limit the number of blocks in command zero to 1024 blocks. This
prevents the target size of one command from being too large and
might help to avoid fsync errors during the OTA update.

Bug: 29535618
Change-Id: Ic630cea2599138516162bd0029e2e4b2af75bf4f
2016-06-21 16:13:06 -07:00
Tao Bao 6047c24fae resolve merge conflicts of 9cbe37e to nyc-mr1-dev-plus-aosp
Change-Id: I9643386f714fe520e5732d0e6dbe821131ea6d02
2016-06-21 13:37:26 -07:00
Tao Bao dea0f8bfed releasetools: Support using payload_signer.
For A/B OTAs, by default it calls 'openssl pkeyutl' to sign the payload
and metadata with the package private key. If the private key cannot be
accessed directly, a payload signer that knows how to do that should be
supplied via "--payload_signer <signer>".

The signer will be called with "-inkey <path_to_private_key>",
"-in <input_file>" and "-out <output_file>" parameters.

Test: Use a dummy signer, call 'ota_from_target_files.py --payload_signer <signer> <target_files.zip> <ota.zip>' and verify the signatures in the generated package.
Bug: 28701652
Change-Id: I26cfdd3fdba6fc90799221741b75426988e46fd3
2016-06-20 20:32:37 -07:00
Elliott Hughes 1e070434c7 Merge \\\"Remove --no_prereq flag from OTA script.\\\" am: bc450fc9c8 am: bd30d5fa16
am: 38f9a845ca

Change-Id: Id2149bae492959ba44a520efe7ec73d55fe1e823
2016-06-21 00:10:55 +00:00
Elliott Hughes 38f9a845ca Merge \\"Remove --no_prereq flag from OTA script.\\" am: bc450fc9c8
am: bd30d5fa16

Change-Id: Ic083c9b038bd5a31f9b52ebd6fc498e0353239ca
2016-06-21 00:08:23 +00:00
Elliott Hughes bd30d5fa16 Merge \"Remove --no_prereq flag from OTA script.\"
am: bc450fc9c8

Change-Id: I35a4400afc829bf2b269135fa99f00979affd3bd
2016-06-21 00:05:51 +00:00
Badhri Jagan Sridharan b58d23fe00 releasetools: replace verity keyid
Replace verity keyid with the keyid extracted from cert
passed through --replace_verity_keyid. The veritykeyid in the
BOOT/cmdline of input target files is replaced with keyid
extracted from --replace_verity_keyid and written to the
output target files.

BUG: 28384658
Change-Id: Ic683f36f543c4fcd94b6f95e40f01200fbf45ee1
2016-06-20 21:52:32 +00:00
Elliott Hughes d8a52f9785 Remove --no_prereq flag from OTA script.
Bug: http://b/29393071
Test: aosp_flounder "make dist"
Change-Id: I9ec85210e118f7e525291e31ab4081a2bd10f998
2016-06-20 14:44:18 -07:00
Tao Bao 827e9dfd38 Merge \"Replace OTA keys when signing for A/B devices.\" into nyc-mr1-dev
am: 008babb191

Change-Id: I7062b5245187446c686ff58391dda7286e5ac887
2016-06-17 22:10:04 +00:00
Tao Bao 008babb191 Merge "Replace OTA keys when signing for A/B devices." into nyc-mr1-dev 2016-06-17 22:03:34 +00:00
Tao Bao 24a7206430 Replace OTA keys when signing for A/B devices.
It replaces the package verification key (change of path due to
system_root_image flag), as well as the payload verification key.

Bug: 29397395
Change-Id: I10435072aaf4356f2d8b5e1b6e82eb9cead7ad62
2016-06-17 12:16:31 -07:00
Elliott Hughes 2d208075c6 Merge \\\"Remove obsolete MTD support from the releasetools scripts.\\\" am: 63fc2b6766 am: ece6ff869c
am: f66d3e61f8

Change-Id: Ib754bc3e9b1c895d431e3b7be9e5435bb6b05fb5
2016-06-17 05:05:08 +00:00
Elliott Hughes f66d3e61f8 Merge \\"Remove obsolete MTD support from the releasetools scripts.\\" am: 63fc2b6766
am: ece6ff869c

Change-Id: I4b5f5b6a622a2fbb996861e8832e1fc1d12e6bf4
2016-06-17 05:02:05 +00:00
Elliott Hughes ece6ff869c Merge \"Remove obsolete MTD support from the releasetools scripts.\"
am: 63fc2b6766

Change-Id: I26ed21479ab52d535bcc99b13e55a1476a02f76c
2016-06-17 04:59:26 +00:00
Elliott Hughes 305b088729 Remove obsolete MTD support from the releasetools scripts.
Bug: http://b/29250988
Change-Id: I653dc306485c6b35411840b53211d42eb6d19e34
2016-06-16 20:48:47 -07:00
Mohamad Ayyash 44dc2a973f resolve merge conflicts of 8ebbc4e to nyc-mr1-dev
am: 423862500b

Change-Id: I8f8dd48e52c1ab7cb3462725569cf7c1e0443d38
2016-06-16 20:22:30 +00:00
Mohamad Ayyash 423862500b resolve merge conflicts of 8ebbc4e to nyc-mr1-dev
Change-Id: I2349bb3fede317487227b16cb7c7b093a93a3876
2016-06-16 13:11:45 -07:00
Mohamad Ayyash 3336f9ae67 Merge \"squashfs: make disable-4k-align a parameter\" into nyc-dev
am: 8ebbc4e7e2

Change-Id: Ia5c59b7bfc7f2b25fa9b13c2ce52c1bd75ccecce
2016-06-16 16:39:39 +00:00
Mohamad Ayyash 8ebbc4e7e2 Merge "squashfs: make disable-4k-align a parameter" into nyc-dev 2016-06-16 16:24:34 +00:00
Tao Bao 7e5205f929 Merge \\"Support wiping userdata for A/B OTA packages.\\" am: b727d5bb32
am: 4f2b227fae

Change-Id: Icf157b44ecda14a2c289d4826e5a55af67e805d5
2016-06-16 15:53:20 +00:00
Tao Bao 4f2b227fae Merge \"Support wiping userdata for A/B OTA packages.\"
am: b727d5bb32

Change-Id: I9d6e67c5e71b025f7cb9119b45f05c51f2cfd340
2016-06-16 15:50:47 +00:00
Tao Bao 7c5dc578b3 Support wiping userdata for A/B OTA packages.
update_engine now accepts POWERWASH=1 to schedule a factory reset in
the post-install phase. Hook up with the --wipe_user_data flag in the
OTA script.

Bug: 28700985
Change-Id: Ie73876a61db90d124d2af588d674757376e9aabc
(cherry picked from commit 38ca0be399)
2016-06-15 23:19:52 -07:00
Tao Bao 73621c8214 Support wiping userdata for A/B OTA packages.
am: 38ca0be399

Change-Id: Id1908bbbb475f5ae3bc16fc2da5120e7d205b0b6
2016-06-16 03:49:34 +00:00
Tao Bao 38ca0be399 Support wiping userdata for A/B OTA packages.
update_engine now accepts POWERWASH=1 to schedule a factory reset in
the post-install phase. Hook up with the --wipe_user_data flag in the
OTA script.

Bug: 28700985
Change-Id: Ie73876a61db90d124d2af588d674757376e9aabc
2016-06-15 17:07:03 -07:00
Mohamad Ayyash 1b6d3485fc squashfs: make disable-4k-align a parameter
BUG: 29388879
Change-Id: I121d2b76db5fb269e2f7152abb2e78098437a0d5
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2016-06-15 16:37:21 -07:00
Mohamad Ayyash c3216ac077 Merge \\"Pass block_list param to mksquashfs\\" into nyc-dev am: 3bddf74752
am: 52cef0d4f0

Change-Id: I0fe16c6b9728acf7b46f412d705fa0aacd2b4655
2016-06-15 17:02:47 +00:00
Mohamad Ayyash b54038689e Merge \\"releasetools: Disable using imgdiff for squashfs.\\" into nyc-dev am: a8d3741f1a
am: 46ff838582

Change-Id: I8e0e9f9b116da0b07ad89968eb8346aa1a0f04a8
2016-06-15 17:02:44 +00:00
Mohamad Ayyash f80e55b821 Merge \"Pass block_list param to mksquashfs\" into nyc-dev
am: 3bddf74752

Change-Id: I713c6a60d10ef1e85475e462bb34c89751f74e7d
2016-06-15 16:58:36 +00:00
Tao Bao df56506d30 Merge \"releasetools: Disable using imgdiff for squashfs.\" into nyc-dev
am: a8d3741f1a

Change-Id: Iec58dd45df569d4c558ed0114b576db0f5cb101a
2016-06-15 16:58:35 +00:00
Mohamad Ayyash 52cef0d4f0 Merge \"Pass block_list param to mksquashfs\" into nyc-dev
am: 3bddf74752

Change-Id: I1679c255b297a36bc10b50ff9d6214c92d763489
2016-06-15 16:12:55 +00:00
Tao Bao 46ff838582 Merge \"releasetools: Disable using imgdiff for squashfs.\" into nyc-dev
am: a8d3741f1a

Change-Id: If8392b72a865f53449a1d5ca7b52de7697c4b412
2016-06-15 16:12:52 +00:00
Mohamad Ayyash 3bddf74752 Merge "Pass block_list param to mksquashfs" into nyc-dev 2016-06-15 16:03:08 +00:00
Tao Bao 293fd135c7 releasetools: Disable using imgdiff for squashfs.
We use imgdiff to handle files in zip format (e.g. jar/zip/apk) for
higher compression ratio.

For system/vendor in squashfs, a) all files are compressed in LZ4
format; b) we use 4096-byte block size in their sparse images, but the
files in squashfs may not be laid out as 4K-aligned. So the blocks for
a given file as listed in block map may not form a valid zip file, which
may fail the patch generation with imgdiff.

Disable using imgdiff for squashfs images, and use bsdiff instead.

Bug: 22322817
Change-Id: Ie76aa4cece5c9d38cb1d1a34c505a4a8f37512d3
2016-06-13 10:04:23 -07:00
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 Deymo 361cc8c8e0 Merge \\\"Redirect subprocess stderr to stdout in verbose mode.\\\" am: 1318ec93e7 am: 74d7b31f7d
am: dbae67fac8

Change-Id: I6a690861e22041a67bb5b17aff474ee8f0e8aa41
2016-06-11 01:15:42 +00: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 884e274103 Add build.version.incremental to metadata am: d06f07eef4
am: c201d28713

Change-Id: Ib8a9dcc4441af7bed6374401deb0dc8c3aa92127
2016-06-10 17:30:30 +00:00
Tianjie Xu 21c8d29ee1 Add build.version.incremental to metadata
am: d06f07eef4

Change-Id: Id13fbae7fdc6232cd44b8a3cceba0d936a890f92
2016-06-10 17:30:29 +00: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
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 7d1dd8e310 Merge "Report error codes in the OTA update script" into nyc-dev am: 654e4fb023
am: 6a912c14dd

* commit '6a912c14ddc39e3ef70ba2b4b484ef080ef61d3b':
  Report error codes in the OTA update script

Change-Id: I2fc44e04861523d21724d39ab7e5fa2c0d6a4af7
2016-05-25 21:06:31 +00:00
Tianjie Xu 6a912c14dd 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: Ic8d04a484bdf6d08af5109a71967c3d5f8f0be27
2016-05-25 21:02:21 +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
Mohamad Ayyash 000d71dc1d Pass squashfs block size as a parameter
am: dfec815882

* commit 'dfec815882d2253c6c9130e3241a1906161f3824':
  Pass squashfs block size as a parameter

Change-Id: Ie767254ce653b6a0d21ca9922434ad350fd61a48
2016-05-24 21:08:17 +00:00
Mohamad Ayyash dfec815882 Pass squashfs block size as a parameter
BUG: 28920352
Change-Id: Ifed02bd1565131814047991ec87fa61691bfe240
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2016-05-24 20:55:13 +00:00
Mohamad Ayyash 465acf8631 Use fs_config files for mksquashfs
BUG: 27467028
Change-Id: I7648030ad4b31d70a5d439e9552fd2cbfe288b74
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
BUG: 28704419
2016-05-12 18:44:48 -07:00
Wei Wang 2c5e71fbe8 Merge "Include BRILLO_VENDOR_PARTITIONS in target zip generation" am: 648ea82b04
am: a22d0a88ba

* commit 'a22d0a88ba74bba43a8683e542b5f46eb9afce22':
  Include BRILLO_VENDOR_PARTITIONS in target zip generation

Change-Id: I44390a1512b24880183d40d35087409b9693435f
2016-05-11 22:03:31 +00:00
Wei Wang 2e735ca34e Include BRILLO_VENDOR_PARTITIONS in target zip generation
This change will enable the target zip to include partition defined in
BRILLO_VENDOR_PARTITIONS. This is necessary for OTA to support
partitions other than boot and system in ab_partitions.txt.

The target zip will include images in BRILLO_VENDOR_PARTITIONS if
defined, under VENDOR_IMAGES/ with path kept. Also any vendor partitions
defined in AB_OTA_PARTITIONS will be copied to IMAGES/ in the target zip.

BUG: 28623063
Change-Id: Ic479048dfb8ac506acf827865e784fcb0432a1d5
2016-05-11 12:26:04 -07:00
Tao Bao ec960e2b55 Merge "Revert "Include vendor partitions in target zip generation"" am: 7ff7c2d870
am: b1963b65a4

* commit 'b1963b65a45ddef3159b542ee49d82a6c310f1d4':
  Revert "Include vendor partitions in target zip generation"

Change-Id: I468caee113cba2b51ca225a9d8de8b791ed502fd
2016-05-11 15:21:28 +00:00
Wei Wang 05e6f679e6 Revert "Include vendor partitions in target zip generation"
This reverts commit 421fe44ae8.

Change-Id: Id45781de73735783bc7dfb6fc2838957578d00d3
2016-05-11 14:49:50 +00:00
Wei Wang 90b4658904 Merge "Include vendor partitions in target zip generation" am: bb05fd768c
am: eb06b4d3b3

* commit 'eb06b4d3b3862759ca15e9c52802808debc0a295':
  Include vendor partitions in target zip generation

Change-Id: I9646c90fbe5c57a1f8c6022b8aad03f4e19f56e7
2016-05-11 02:27:00 +00:00
Wei Wang 421fe44ae8 Include vendor partitions in target zip generation
This change will enable the target zip to include partition defined in
BRILLO_VENDOR_PARTITIONS. This is necessary for OTA to support
partitions other than boot and system in ab_partitions.txt.

BUG: 28623063
Change-Id: I6e0969c31c9ad2e8285c6f560825c160aa8c4d55
2016-05-10 11:00:09 -07:00
Tao Bao ce0c7f8840 Merge "releasetools: Perform erase commands first." into nyc-dev
am: 25fe877c61

* commit '25fe877c6138afc122331038a271cc80bd78f394':
  releasetools: Perform erase commands first.

Change-Id: Ia8b081097bb98adbf5acfd57d05368f9ca7eb4fa
2016-05-04 22:36:15 +00:00
Tao Bao 25fe877c61 Merge "releasetools: Perform erase commands first." into nyc-dev 2016-05-04 22:32:39 +00:00
Tao Bao 66f1fa6565 releasetools: Perform erase commands first.
We used to erase all the unused blocks at the end of an update. In order
to work around the eMMC issue in b/28347095, we move part of the erase
commands, which won't be used during the update, to the beginning. The
reset would be erased at the end. This is in hopes of avoiding eMMC
getting starved for clean blocks which would otherwise fail an OTA.

Bug: 28347095
Change-Id: Ia96b06216b35d6700858687a66734af36d0ec213
2016-05-04 12:21:42 -07:00
Tao Bao e094740249 releasetools: Change the base_fs assertion into warnings.
am: b079b50e2a

* commit 'b079b50e2ae2748f77139618cd5dfb8ef06d8418':
  releasetools: Change the base_fs assertion into warnings.

Change-Id: Iaa24f81e864886ef6f4ebe05ea514fa977306fb4
2016-05-03 16:59:17 +00:00
Tao Bao b079b50e2a releasetools: Change the base_fs assertion into warnings.
commit f54216f292 packed the base_fs files
into target_files.zip and added assertion to ensure the existence of the
files. We don't want to fail the OTA generation for the target_files.zip
without the base_fs files. Change the assertion into warnings instead.

Bug: 28547368
Change-Id: I6fd758a0a4fdfff02d1640fa46cf43d971627e26
2016-05-03 08:05:09 -07:00
Tao Bao be9457cad2 Pack base_fs files into target_files.zip.
am: f54216f292

* commit 'f54216f29238a67aad1199a0e85d09e443740bf0':
  Pack base_fs files into target_files.zip.

Change-Id: Ia68c3a707def1865151f071ca33a3bdc513f9045
2016-05-02 16:45:31 +00:00
Tao Bao f54216f292 Pack base_fs files into target_files.zip.
Pack the base_fs files ({system,vendor}.map) into target_files.zip,
which would be needed when rebuilding the images at signing.

Reset the base_fs paths to point to the files in META/.

Also add blk_alloc_to_base_fs into otatools.zip.

Bug: 27698960
Change-Id: If4eb274b3f3d839c4365624f46f0dc89bd2fa440
2016-04-30 23:56:10 -07:00
Tao Bao 6e1b35d625 target_files_diff: Fix the issue with file type change.
am: f31a6de

* commit 'f31a6deeeeb896cc516c2f2f91ceff1fd0702938':
  target_files_diff: Fix the issue with file type change.

Change-Id: I4f13b01aa009d7f33692eb20d6ff2c6de241b728
2016-04-25 18:35:20 +00:00
Tao Bao 00dbe29173 target_files_diff: Fix the issue with file type change.
When a file is switched from a regular file to a symlink, we should skip
the comparasion.

Bug: 28373409
Change-Id: I8fef00ab9f2d6f811fde1cadf595e8bd46af2dfd
(cherry picked from commit f31a6deeee)
2016-04-25 11:29:48 -07:00
Tao Bao f31a6deeee target_files_diff: Fix the issue with file type change.
When a file is switched from a regular file to a symlink, we should skip
the comparasion.

Bug: 28373409
Change-Id: I8fef00ab9f2d6f811fde1cadf595e8bd46af2dfd
2016-04-25 10:07:20 -07:00
Tao Bao 314719a0b6 Merge "Skip verifying the partition with no changed blocks." into nyc-dev
am: 05ce0a9

* commit '05ce0a94a5a6eec3113b62a39f97401e6a3fb3a0':
  Skip verifying the partition with no changed blocks.

Change-Id: I8a3a9f8fe7bcf25fd719940d883a22a7adcfdef9
2016-04-15 03:29:42 +00:00
Tao Bao 962dfdcdac Skip verifying the partition with no changed blocks.
For incremental BBOTAs, commit [1] changed to verify only the touched
blocks to reduce the update time. This CL fixes the bug when there's no
changed block between the two builds.

[1]: commit d522bdc9ed

Bug: 27813356
Bug: 28195498
Change-Id: Ia752d3cf034c544517458ed15df509d4596e21fa
(cherry picked from commit f9efe284a4)
2016-04-14 20:23:17 -07:00
Tao Bao f9efe284a4 Skip verifying the partition with no changed blocks.
For incremental BBOTAs, commit [1] changed to verify only the touched
blocks to reduce the update time. This CL fixes the bug when there's no
changed block between the two builds.

[1]: commit d522bdc9ed

Bug: 27813356
Bug: 28195498
Change-Id: Ia752d3cf034c544517458ed15df509d4596e21fa
2016-04-14 16:12:06 -07:00
David Zeuthen 39b6a8db6a Merge "Add support for Brillo partitioning." am: 2528968
am: 93a3423

* commit '93a34234c6a032251163992728def631c14a6e90':
  Add support for Brillo partitioning.

Change-Id: I349463c75e8ddb312cf83bad845864e530c50405
2016-04-14 16:20:15 +00:00
David Zeuthen 2528968871 Merge "Add support for Brillo partitioning." 2016-04-14 16:04:30 +00:00
Tao Bao 24105eaab8 Merge "releasetools: Only verify the blocks to be touched." into nyc-dev
am: 21528c5

* commit '21528c5e053e28cd52d603eded53ffaf36d22637':
  releasetools: Only verify the blocks to be touched.

Change-Id: I053c7da789c44916456109c5153f6628fe38c849
2016-04-14 00:02:41 +00:00
Tao Bao d4caaae160 releasetools: Only verify the blocks to be touched.
For incremental BBOTAs, we used to verify the integrity of all the
blocks in the source partition. In order to reduce the time cost under
recovery, this CL changes to only verify the blocks that will be touched
in the given OTA package (BBOTA >= 3 only). This is a trade-off between
performance and reliability.

Bug: 27813356
Change-Id: I3975ae6f461f0f7e58d24f1df7df46a449d2988b
(cherry picked from commit d522bdc9ed)
2016-04-13 17:00:34 -07:00
Tao Bao 21528c5e05 Merge "releasetools: Only verify the blocks to be touched." into nyc-dev 2016-04-13 23:59:36 +00:00
Tianjie Xu c6e9dc5343 Merge "Monotonic flag sets incorrectly in rangelib" am: 323e3d4
am: afc92d1

* commit 'afc92d1d45a8ee4de14a059fa4039b5a6dbe072a':
  Monotonic flag sets incorrectly in rangelib

Change-Id: I9b8eeb6e357aee66720c1776a383533016aa1269
2016-04-13 22:06:55 +00:00
Tianjie Xu 8e1fb06f38 Monotonic flag sets incorrectly in rangelib
After applying update_target_files_incr_ext4.sh, some files may end up
occupying unsorted block fragments. In one example, an apk file has the
block range [258768-259211,196604]. The monotonic flag in rangelib sets
incorrectly for this example and leads to a bad input file for imgdiff.
After fixing the flag, bsdiff is called instead of imgdiff and the
incremental OTA package generates successfully.

Bug:28053885
(cherry picked from commit cd1e16a761)

Change-Id: If286eb382e59b3084a8313ae853b807e4648e5a2
2016-04-13 15:02:20 -07:00
Tianjie Xu 323e3d4c18 Merge "Monotonic flag sets incorrectly in rangelib" 2016-04-13 21:48:53 +00:00
Tianjie Xu cd1e16a761 Monotonic flag sets incorrectly in rangelib
After applying update_target_files_incr_ext4.sh, some files may end up
occupying unsorted block fragments. In one example, an apk file has the
block range [258768-259211,196604]. The monotonic flag in rangelib sets
incorrectly for this example and leads to a bad input file for imgdiff.
After fixing the flag, bsdiff is called instead of imgdiff and the
incremental OTA package generates successfully.

Bug:28053885
Change-Id: Ib841bf449ff6a29314fc4a1b8fba941a6dc532ac
2016-04-13 12:36:14 -07:00
Tianjie Xu dea8b94f98 Merge "Remove post-install verification" 2016-04-13 19:19:03 +00:00
David Zeuthen 25328627ba Add support for Brillo partitioning.
To generate partition tables in the Android build system, simply add
the path to a .bpt file to the BOARD_BPT_INPUT_FILES variable.

 BOARD_BPT_INPUT_FILES += "hardware/bsp/vendor/soc/board/board-specific.bpt"

The variable BOARD_BPT_DISK_SIZE can be used to specify or override
the disk size, for example:

 BOARD_BPT_DISK_SIZE := "10 GiB"

Additional arguments to 'bpttool make_table' can be specified in the
variable BOARD_BPT_MAKE_TABLE_ARGS.

If BOARD_BPT_INPUT_FILES is set, the build system generates two files

 partition-table.img
 partition-table.bpt

in ${ANDROID_PRODUCT_OUT} using 'bpttool make_table'. The former is
the binary partition tables generated using bptool's --output_gpt
option and the latter is a JSON file generated using the --output_json
option. These files will also be put in the IMAGES/ directory of
target-files.zip when running 'm dist'.

BUG=27831397
TEST=Manually tested.

Change-Id: Iedd15354afb2dd483dcb9bc001360b2a37fd6dc0
2016-04-13 12:45:20 -04:00
Tao Bao d522bdc9ed releasetools: Only verify the blocks to be touched.
For incremental BBOTAs, we used to verify the integrity of all the
blocks in the source partition. In order to reduce the time cost under
recovery, this CL changes to only verify the blocks that will be touched
in the given OTA package (BBOTA >= 3 only). This is a trade-off between
performance and reliability.

Bug: 27813356
Change-Id: I3975ae6f461f0f7e58d24f1df7df46a449d2988b
2016-04-12 16:41:01 -07:00
Tianjie Xu bf7981c24f Merge "Remove post-install verification" into nyc-dev
am: 3ebddd4

* commit '3ebddd40e0b3c0848bb066e1e39c406c7a852100':
  Remove post-install verification

Change-Id: I9622385ef80c32a2a98dbac492fcc45f48f1918d
2016-04-12 22:49:49 +00:00
Tianjie Xu 618a81e818 Remove post-install verification
post-install verification calls range_sha1() and checks if the given
partition has expected contents. It takes roughly 20 seconds on
angler with 2.8G system image. Remove it to speed up OTA update. Also
abort the update if block_image_update() fails, as we were relying on
post-install verification to capture block_image_update() failures.

cherry-picked from commit b2deb22033
Bug: 27729678
Change-Id: I8123cd8929295ec26df247acf6bb51df813771d9
2016-04-12 15:41:14 -07:00
Tianjie Xu 3ebddd40e0 Merge "Remove post-install verification" into nyc-dev 2016-04-12 22:38:24 +00:00
Tianjie Xu b2deb22033 Remove post-install verification
post-install verification calls range_sha1() and checks if the given
partition has expected contents. It takes roughly 20 seconds on
angler with 2.8G system image. Remove it to speed up OTA update. Also
abort the update if block_image_update() fails, as we were relying on
post-install verification to capture block_image_update() failures.

Bug: 27729678
Change-Id: I8123cd8929295ec26df247acf6bb51df813771d9
2016-04-12 11:40:03 -07:00
Tao Bao 41e5c4e065 releasetools: Use fixed timestamp in otacerts.zip.
am: 7ee3a96

* commit '7ee3a9678e7191c48f0ba4e04792fe97925c1aa1':
  releasetools: Use fixed timestamp in otacerts.zip.

Change-Id: I9e8260491819e00eea6f4eb55b1722ae1670ae85
2016-04-12 15:44:31 +00:00
Tao Bao 83cd79d340 releasetools: Use fixed timestamp in otacerts.zip.
We were using zipfile.write() to write system/etc/security/otacerts.zip
when signing for release. It led to unexpected timestamp change in the
generated otacerts.zip and non-idempotent signed images when signing the
same target_files.zip.

Replace with common.ZipWrite() to always use a fixed timestamp.

Bug: 28122968
Change-Id: Ia6cf4b7d380cbf72ed7050ebb60c932dc8826d87
(cherry picked from commit 7ee3a9678e)
2016-04-12 08:34:43 -07:00
Tao Bao 7ee3a9678e releasetools: Use fixed timestamp in otacerts.zip.
We were using zipfile.write() to write system/etc/security/otacerts.zip
when signing for release. It led to unexpected timestamp change in the
generated otacerts.zip and non-idempotent signed images when signing the
same target_files.zip.

Replace with common.ZipWrite() to always use a fixed timestamp.

Bug: 28122968
Change-Id: Ia6cf4b7d380cbf72ed7050ebb60c932dc8826d87
2016-04-11 23:10:00 -07:00
Mohamad Ayyash 230ef583b0 Merge "Use fs_config files for mksquashfs" into nyc-dev
am: b354a61

* commit 'b354a61f3ec3b4c6463aac2a80f23e5772b6b164':
  Use fs_config files for mksquashfs

Change-Id: I422bd6f5b8e7e587bec3caef1525497904268a96
2016-04-08 17:52:24 +00:00
Mohamad Ayyash 8837882fb9 Use fs_config files for mksquashfs
BUG: 27467028
Change-Id: I7648030ad4b31d70a5d439e9552fd2cbfe288b74
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2016-04-07 22:10:51 -07:00
Ying Wang be667a1128 Merge "Correct usage message for build_image.py" am: d63ec28
am: 334a418

* commit '334a4185a5ca29086963a8d450fb7a9e972cbd77':
  Correct usage message for build_image.py

Change-Id: Iee000ee9974b4cb7329fab87dc81fdba2affe93d
2016-04-07 22:24:15 +00:00