Commit Graph

6708 Commits

Author SHA1 Message Date
Daniel Norman
b144b1f637 Merge "Adds support for optional config files to configure the merge." am: cf9509df01 am: f03c76d047
am: 186ae7abb2

Change-Id: I1c110236e0f26c6a550d780f7bdfcd3285fda791
2019-03-12 10:15:36 -07:00
Daniel Norman
f03c76d047 Merge "Adds support for optional config files to configure the merge."
am: cf9509df01

Change-Id: I67c1b99c582027e9993d9fe92acb94b4a66b80cd
2019-03-12 10:07:13 -07:00
Daniel Norman
2c99c5bbd2 Adds support for optional config files to configure the merge.
Bug: 124467065
Test: Running `python merge_target_files.py` using the three new flags
and observing that their contents are passed to the merge_target_files() function.
Change-Id: I4de46f041f5ae8bc8be2730313ce873a952bf78e
2019-03-12 16:51:18 +00:00
Pavel Salomatov
3fe23692ea Merge "releasetools: Add compatibility for custom out directory." am: b6f2f8b2d9 am: 0c470d3b8c
am: 9a5bc48596

Change-Id: Icfe258cfcda7a11505c53bdefd18c6bc322df844
2019-03-11 14:41:41 -07:00
Pavel Salomatov
0c470d3b8c Merge "releasetools: Add compatibility for custom out directory."
am: b6f2f8b2d9

Change-Id: I93b394aed846563a54a9c83a3705f91ffbc2cc01
2019-03-11 13:14:37 -07:00
Treehugger Robot
b6f2f8b2d9 Merge "releasetools: Add compatibility for custom out directory." 2019-03-11 19:51:14 +00:00
Pavel Salomatov
3267655004 releasetools: Add compatibility for custom out directory.
sign_target_files_apks script looks for the signapk.jar inside the out dir.
If the our dir is set to a different directory via OUT_DIR_COMMON_BASE the script does not work properly.

From now script checks if the OUT_DIR_COMMON_BASE is set, then searches the jar in the proper path.
If OUT_DIR_COMMON_BASE is unset, searches in "out" like it did before.

Test: Build with OUT_DIR_COMMON_BASE set and unset and verify that sign_target_files_apks works in both cases

Change-Id: I9218b98ff79526184f8353705640193405afac9e
2019-03-11 19:22:29 +03:00
Tao Bao
f05a054ce3 Merge "releasetools: Include retrofit info into package metadata." am: 28a11ef040 am: dff72247d8
am: 5242934a9c

Change-Id: I5b6900e9fcfcccfbb1a252c65a18c4ac602825de
2019-03-07 12:06:08 -08:00
Tao Bao
dff72247d8 Merge "releasetools: Include retrofit info into package metadata."
am: 28a11ef040

Change-Id: I76c8f757efea6bb2ce8d0dc084083e5c8f6f6bc6
2019-03-07 11:04:35 -08:00
Tao Bao
28a11ef040 Merge "releasetools: Include retrofit info into package metadata." 2019-03-07 18:11:30 +00:00
Yifan Hong
158138cd68 Merge "Remove logical partitions from ab_partitions.txt in retrofit package." am: fa2e796ce2 am: 8c2ec2f061
am: e9923a31d9

Change-Id: Idc120e9ed67dad13518b1a7006ad6b3936e81478
2019-03-06 17:45:33 -08:00
Yifan Hong
8c2ec2f061 Merge "Remove logical partitions from ab_partitions.txt in retrofit package."
am: fa2e796ce2

Change-Id: I18cd55ca0fd440d0df97328695db425600ad1688
2019-03-06 17:29:07 -08:00
Treehugger Robot
fa2e796ce2 Merge "Remove logical partitions from ab_partitions.txt in retrofit package." 2019-03-07 01:06:42 +00:00
Tao Bao
393eeb4918 releasetools: Include retrofit info into package metadata.
Fixes: 126754990
Test: Generate retrofit and non-retrofit OTAs. Check the package
      metadata entry.
Test: python -m unittest test_ota_from_target_files
Change-Id: I076a013a6224a2ffea8e0b8581890b66f847f165
2019-03-06 16:19:11 -08:00
Yifan Hong
b433eba6a6 Remove logical partitions from ab_partitions.txt in retrofit package.
For retrofit updates:
ab_partitions -= dynamic_partition_list
ab_partitions += super_block_devices

For example,
if super_block_devices == ["system", "vendor", "odm"] and
   dynamic_partition_list == ["system", "vendor", "product"],
product partition needs to be removed from ab_partitions.txt
otherwise brillo_update_payload will generate a payload with
product partition in it.

Test: retrofit update that adds a partition
Fixes: 127425410

Change-Id: Id79a410cee3c611ac50d27f14282916aea34f938
2019-03-06 13:35:20 -08:00
Baligh Uddin
b3517c0d18 Add ability to sign bundled APEX into device signing process.
Bug: 123716522
Change-Id: I58a8b03e5a636338317302f254403c88dec61f8c
2019-02-27 12:00:40 -08:00
Bill Peckham
3a21cc6a50 Merge "Extract common.UnzipToDir, invoke that from merge_target_files.py" am: a2f536f9fa am: 0ea998133c
am: 5f2ae4e685

Change-Id: Ife1cc6f0fdca99c27aed06b69d7d371e73b098e2
2019-02-25 22:25:12 -08:00
Bill Peckham
0ea998133c Merge "Extract common.UnzipToDir, invoke that from merge_target_files.py"
am: a2f536f9fa

Change-Id: I10fcfc3008d0699c92c53405d488c66571ef66ec
2019-02-25 15:55:39 -08:00
Bill Peckham
d8c9c2d58f Merge "Convert common.RunAndWait method to raise an exception on subprocess failure." am: dd4e2e59aa am: ecd47a1991
am: 108afbcde6

Change-Id: Ic1b389d8114229aaa3d45ebdcdfb74f4ebad85b3
2019-02-22 20:52:42 -08:00
Bill Peckham
108afbcde6 Merge "Convert common.RunAndWait method to raise an exception on subprocess failure." am: dd4e2e59aa
am: ecd47a1991

Change-Id: Ie0609d3e09dcc060bb98b9b67d70a7128e6da420
2019-02-22 20:37:30 -08:00
Xin Li
1cc579adef Merge "DO NOT MERGE - Merge pi-dev@5234907 into stage-aosp-master" into stage-aosp-master 2019-02-23 00:39:21 +00:00
Bill Peckham
8ff3fbdd08 Extract common.UnzipToDir, invoke that from merge_target_files.py
This change adds another utility function to common.py: UnzipToDir, which is
generally useful. Refactor merge_target_files.py to use it, and also refactor
other uses in common.py to use it.

Test: ota_from_target_files.py, validate_target_files.py, test_common.py
Bug: 124464492
Change-Id: Ia571070bceb7d3c8002304836bdf688485bf0dd9
2019-02-22 10:57:43 -08:00
Bill Peckham
889b0c6b09 Convert common.RunAndWait method to raise an exception on subprocess failure.
Then refactor the code in merge_target_files.py to adapt to this semantic
change. This makes the code more consistent with existing releasetools code,
and it's easier to follow.

Test: Failure cases (verify exception), success cases (merged target generated)
Bug: 124521133
Change-Id: I56f04e360d8ff8ffcd6245359cdeb79f4565a9c4
2019-02-21 19:02:07 -08:00
Xin Li
0e2ccf21c9 DO NOT MERGE - Merge pi-dev@5234907 into stage-aosp-master
Bug: 120848293
Change-Id: Ic9e8ff5af22140dc6ef8ff87a09f9292f9d30dc5
2019-02-21 09:32:40 -08:00
Bill Peckham
ab2f68f38a Merge "Include merge_target_files.py deps in otatools.zip, use common argv processing." am: 30ee35f908 am: a3c90f2ac7
am: 68ac3ecf15

Change-Id: I3d9a1179d05cdbf1261a30f70869ca32041b5f09
2019-02-20 20:27:02 -08:00
Bill Peckham
68ac3ecf15 Merge "Include merge_target_files.py deps in otatools.zip, use common argv processing." am: 30ee35f908
am: a3c90f2ac7

Change-Id: I61cb000759ffdf012ce570ba20f83d060164310c
2019-02-20 20:22:53 -08:00
Bill Peckham
30ee35f908 Merge "Include merge_target_files.py deps in otatools.zip, use common argv processing." 2019-02-21 04:13:23 +00:00
Tianjie Xu
28a8ca98d0 Merge "Check the completeness of original blocks during target files validation" am: ef7737f921 am: 1f80b12aa0
am: 9312c2acc0

Change-Id: I7e49152b65ca4a96339ad7e83527a8a537f66165
2019-02-20 20:06:53 -08:00
Tianjie Xu
9312c2acc0 Merge "Check the completeness of original blocks during target files validation" am: ef7737f921
am: 1f80b12aa0

Change-Id: Ieaa5d86aa24b220df42ac639408bcc659e2359fd
2019-02-20 19:58:07 -08:00
Tianjie Xu
ef7737f921 Merge "Check the completeness of original blocks during target files validation" 2019-02-21 03:41:35 +00:00
Tianjie Xu
6e25835bd8 Merge "OTA: Add an option to dump the metadata in ota package" am: 65cd6be679 am: f95abe47e4
am: 7934f14849

Change-Id: Ie7a33e28c2edae1df1577969f0872b27751a2eba
2019-02-20 19:23:49 -08:00
Tianjie Xu
7934f14849 Merge "OTA: Add an option to dump the metadata in ota package" am: 65cd6be679
am: f95abe47e4

Change-Id: Id54d08210242dc9c6d5fccd7b6ed8d310564129b
2019-02-20 19:20:44 -08:00
Bill Peckham
f753e15791 Include merge_target_files.py deps in otatools.zip, use common argv processing.
The merge_target_files.py script needs fc_sort and sefcontext_compile, so
include these tools into otatools.zip via core/Makefile.

Modify tools/releasetools/merge_target_files.py to use the otatools common argv
processing to take advantage of the '--path' option so that we add point the
'--path' option to an extracted otatools.zip package to gain access to fc_sort,
sefcontext_compile, and soong_zip (previously included in otatools.zip).

Bug: 123600124
Test: extract otatools.zip, use --path option to point to it, verify result
Change-Id: I7d84525981b8741c6bdbcac9984256920fc7f417
2019-02-21 00:50:54 +00:00
xunchang
c0f77ee489 Check the completeness of original blocks during target files validation
The validate_target_files.py checks the 'incomplete' field of the range
in file_map. And range has already considered the shared blocks and
could be smaller in size than the original file range. Therefore, the
'incomplete' flag was set on the original range in common.py; and we
should switch to use the original range also during validation.

I also checked another flag usage in CanUseImgdiff(), and it has
explicitly rejected cases of shared blocks.

Bug: 124868891
Test: unit tests pass
Change-Id: I03959625d7b81fd83420db98f01d23f54064bcd2
2019-02-20 15:47:30 -08:00
xunchang
1cfe25155e OTA: Add an option to dump the metadata in ota package
Add a flag to write a copy of the metadata to a separate file. Therefore,
users can read the post build fingerprint without extracting the OTA package.

Bug: 124783265
Test: Check the dumped metadata file after generate A/B and non-A/B OTA.
Change-Id: I8918aec87bb81906ef0a7eee774178e9f689d91d
2019-02-20 15:32:09 -08:00
Tianjie Xu
8b8de7470e Merge "Add a flag to skip compatibility check" am: 79b52c9ce1 am: 2d97c96527
am: 0875e002aa

Change-Id: Ieaf6975f1ac2eb6d344b89334e8d040f8b24d769
2019-02-19 21:26:06 -08:00
Tianjie Xu
0875e002aa Merge "Add a flag to skip compatibility check" am: 79b52c9ce1
am: 2d97c96527

Change-Id: Iaac01a8fa0a37e623f32cc93416a6eafcf264ab2
2019-02-19 21:17:34 -08:00
xunchang
abfa265f81 Add a flag to skip compatibility check
This serves as a workaround to skip the compatibility check for devices
with incompatible kernels.

Bug: 114240221
Test: generate and check the OTA package for wear device
Change-Id: I65b523a66648af7a77fc3ea79176764fe8ae8d02
2019-02-19 16:27:10 -08:00
Bowgo Tsai
9f09ae4223 Merge "Support verifying system_other" am: 01a05483ed am: f509e54bd0
am: a18a5fe46f

Change-Id: If1862045cbaf8ad207adad3d54733cb7dda693a9
2019-02-17 21:42:50 -08:00
Bowgo Tsai
a18a5fe46f Merge "Support verifying system_other" am: 01a05483ed
am: f509e54bd0

Change-Id: I16f65c01659fa1664451a25395c340e55f0b39b5
2019-02-17 21:38:41 -08:00
Treehugger Robot
01a05483ed Merge "Support verifying system_other" 2019-02-18 05:21:27 +00:00
Bill Peckham
4a978d3ec1 Merge "Adding initial merge_target_files.py script to merge two target files packages." am: 194b1c8508 am: 7591615cb4
am: ad2967f980

Change-Id: I71ec7422e2e9ea20b491b15b38bf5cc3037b8c80
2019-02-15 17:53:31 -08:00
Bill Peckham
ad2967f980 Merge "Adding initial merge_target_files.py script to merge two target files packages." am: 194b1c8508
am: 7591615cb4

Change-Id: I3c15c100c32999896bcfdb49827758b91b1b4f02
2019-02-15 17:49:20 -08:00
Bill Peckham
194b1c8508 Merge "Adding initial merge_target_files.py script to merge two target files packages." 2019-02-16 01:40:36 +00:00
Tom Cherry
527e194d18 Merge "Use fs_config_generator.py to generate fs_config_files/dirs directly" am: b21b108ddf am: b133ed8e18
am: 5fff1244be

Change-Id: I936cacfcdb8fdd8915a327ca73b16a326d24e0ff
2019-02-15 15:01:15 -08:00
Tom Cherry
5fff1244be Merge "Use fs_config_generator.py to generate fs_config_files/dirs directly" am: b21b108ddf
am: b133ed8e18

Change-Id: I9ce904fbe25fd4bfbf20e5775767f6f8dd5aa5d9
2019-02-15 14:56:05 -08:00
Bill Peckham
e9eb5f96e0 Adding initial merge_target_files.py script to merge two target files packages.
This script takes as input two partial target files (one contains system bits,
and the other contains non-system, or other, bits). The script merges the
contents of the two partial target files packages to produce a complete target
files package.

Bug: 123430711
Test: Build two partial target files, merge, compare with full target files.
Test: Validate merged target files via validate_target_files.py.
Change-Id: Ic24acf43b86fc703fb4c970688b006291a1861f8
2019-02-15 13:25:16 -08:00
Tom Cherry
9d924f67d3 Use fs_config_generator.py to generate fs_config_files/dirs directly
We want to remove target specific host tools and since
fs_config_generate is compiled with a target specific header file, we
instead remove fs_config_generate entirely and allow python to build
the fs_config_files/dirs files directly from config.fs files and
parsed C headers.

Test: associated unit tests and new end to end test
Test: aosp_sailfish, aosp_crosshatch build produces valid fs_config files
Test: aosp_cf_x86_phone build correctly produces empty fs_config files
Change-Id: Idbc63ff56c0979e1e4c17721371de9d9d02dc8ff
2019-02-15 09:44:09 -08:00
Tom Cherry
d33b3198c3 Merge "Error if $(TARGET_DEVICE_DIR)/android_filesystem_config.h exists" am: 506a796bd8 am: 201f5e5a3c
am: 560a8101af

Change-Id: Id84d05ed82fe10d21694823662e7ccc19519976e
2019-02-14 13:15:36 -08:00
Tom Cherry
560a8101af Merge "Error if $(TARGET_DEVICE_DIR)/android_filesystem_config.h exists" am: 506a796bd8
am: 201f5e5a3c

Change-Id: I8262d77366d1dabf552ba6286b7c4f4b7ecff601
2019-02-14 13:11:23 -08:00