Also, create a python_binary_host so that it runs using the hermetic
python toolchain.
Test: m check-elf-files
Bug: 203436762
Change-Id: I964342a27f6b6c9dcdbbe910d4dc6c9ec00c2213
There are no usages of LOCAL_JAVA_LAYERS_FILE,
and java-layers.py was written in python 2.
Bug: 203436762
Test: Presubmits
Change-Id: I1be0f2547757a853e20811f28529479487037e94
This script is only ever manually run, and it's written
in python 2. Just delete it instead of updating to python
3 because it's unlikely anyone uses it anymore.
Bug: 203436762
Test: Presubmits
Change-Id: Ib55b3bf43a8066822308f49d1a948d27c520c5b2
Kati special-cases findleaves.py to an internal
C++ implementation, so I don't think this python
script is even used. Update it anyways, and
test by manually running findleaves.py.
Bug: 203436762
Test: ./build/make/tools/findleaves.py --mindepth=2 --dir=build/make/target Android.mk
Change-Id: If27cc37d8f673388c0e31b9491e792b98ca59da4
Additionaly,
1. Run it as a python_binary_host so that it uses the hermetic python
toolchain
2. Fix an existing bug where if `board_info_txt` was empty, $^ would
evaluate to its own path, and it would try to parse the relevant
configuration from the wrong file
Bug: 196300985
Test: m out/target/product/vsoc_arm64/android-info.txt
Change-Id: Ie1e51a93041591829da4351dd57f37106e15d764
When performing a deep copy of info dict, input_file is serialized as
filename. Make ExtractFromInputFile support reading from filename of a
ZipFile.
Test: build OTA with partner provided target_files
Bug: 253549364
Change-Id: I366a076c32d638d61b83a1df9bf864807cf5257c
These tests were failing at TOT. Also add a
python_test_host target so the tests will be
run on CI in the future.
Bug: 203436762
Test: m libc, prebuilts/build-tools/linux-x86/bin/py2-cmd build/make/tools/fs_config/test_fs_config_generator.py
Change-Id: I6dda841023a2f5e76d59360d08626fc1a8842ffe
When trying to make a deep copy of PartitionBuildProps, execution fails
with picle error because PartitionBuildProps stores a ZipFile object,
which stores a lock object, which doesn't support pickling.
To fix it, pickle ZipFile object as a str to its path.
Test: generate ota with boot variable files
Bug: 253549364
Change-Id: I92c5d78ce65045495203c85862922d33d886e9ea
Replace regular expressions to extract fields from a text proto with
and actual parsed protobuf.
Refactor TestFS into its own package, and implement StatFS.
Test: m droid dist cts alllicensemetadata
Test: repo forall -c 'echo -n "$REPO_PATH " && $ANDROID_BUILD_TOP/out/host/linux-x86/bin/compliance_checkmetadata . 2>&1' | fgrep -v PASS
Change-Id: Icd17a6a2b6a4e2b6ffded48e964b9c9d6e4d64d6
Flattened apexes are extracted and copytree()'d to /apex directory to
simulate "activation" on device.
Bug: 242314000
Bug: 239055765
Test: m otapackage # target with "flattened" apexe
Change-Id: I90cc37b5f64ebad1e15f6fc5fa245d0f5955095d
Change-Id: I7e8c3fdf8e4620344d23cee0de509e574206ad9b
ZipClose() was introduced to work with large zip without switching to
ZIP64. It is a hacky patch. Now we have moved to python3 and zip64
completely, no need to keep using it.
Test: th
Bug: 246504616
Change-Id: I1ff15171bb26887b819f655e32817627ecad1132
Flattened apexes should be handled differently. For now just skip
flattened apexes to fix the build breakage.
Bug: 253669548
Bug: 253700117
Bug: 239055765
Test: m otapackage for targets with "flattened apexes"
Change-Id: I102a961fc1365f42881ca9ee6546e71246792d2a
'zip' is a host command, and it can not be provided as a dependency when some release tools are used in Bazel rules.
Test: atest --host releasetools_test
Bug: 243748589
Change-Id: Ie5f42eadbd316ccd018b19194c466a908971af82
This variable is always false or empty now, so clean up remaining
references of the variable.
Remove "buildvariant=" kernel commandline as it was used by
system-as-root kernels to determine the system build variant. It is
unsupported now.
Bug: 241346584
Test: Presubmit
Change-Id: I0f97b6e0bf8b03429f65366119ff78f9c7983516
Directories are entries with uncompressed size zero and ending with
character '/' or '\' are allowed in apks since b/204425803. These
entries should not be considered for alignment since they are not
mmap by the framework.
Test: align_test.cpp
Bug: 250872480
Change-Id: I964aad118a82839f9ed230acc4c2c76f51888c67
Care maps need to store the original image size, which excludes bytes
used by hash tree or FEC code.
We used to propagate original image size using the global OPTIONS
dictionary. This is bad coding practice, and also fragile because we
have to make sure what's stored in dictionary and what's on disk are
consistent. Instead, let's read the content of images on disk, and parse
the AVB footer. The AVB footer contains the ground truth original image
size.
Test: build OTA, make sure the care maps have valid range
Bug: 246504616
Change-Id: I9250b478ab34dda60578a6b8c23ae6d7a9385788
More output is now produced on stdout by checkvintf.
Update logic to compare against the last line for incompatible.
Fixes the following tests:
test_check_target_files_vintf.CheckTargetFilesVintfTest#test_CheckVintf_kernel_incompat
test_check_target_files_vintf.CheckTargetFilesVintfTest#test_CheckVintf_matrix_incompat
test_check_target_files_vintf.CheckTargetFilesVintfTest#test_CheckVintf_sku_incompat
Bug: 251221029
Test: atest releasetools_test
Change-Id: I592acf9a3868e2a60e203b2201e7fadcbb0e7f04
SafePathPrefixes contains "prebuilts/" which is a prefix of another
entry "prebuilts/module_sdk" which can both match the same path.
SafePathPrefixes is a map, so the iteration order is nondeterminisitic.
Move both SafePathPrefixes and SafePrebuiltPrefixes into lists that
will always have a deterministic iteration order.
Bug: 230357391
Test: build NOTICE.xml.gz multiple times
Change-Id: Ibfcd6715b70f26164e0ef4d59f73b240f47f8db7