Change Ibe4ceb1b224c5e8f3e1a8a59cfee89217765a901 caused kati to
regenerate on every build:
$(shell cat out/build_date.txt) was changed, regenerating...
Switch back to $(shell date +%s) which is special cased in kati
to not cause a regeneration. Everything besides DATE will still
use BUILD_DATETIME_FROM_FILE from soong_ui.
Once BUILD_NUMBER is moved to soong_ui $(DATE) is no longer
necessary and the whole thing can be removed.
Bug: 70351683
Bug: 73352417
Test: m && m doesn't regenerate
Test: m BUILD_DATETIME=1234 shows up in ro.build.version.incremental
Change-Id: I8444beb2b47a49095ef760083fc85f220821bffe
LOCAL_RES_LIBRARIES and LOCAL_APK_LIBRARIES should still be honored.
Test: make CtsDevicePrereleaseSdkApp
Change-Id: I3360d0fe2f7e2f3038e48f41905923a72609ceec
Move application of module flags to host_java_library_common.mk
so that dalvik host builds can also have flags.
Bug: 72451126
Test: m javac-check RUN_ERROR_PRONE=true
Change-Id: Idbf43afd886536cc7ea674aa4487da3c22987850
* Use the definitions of ClangDefaultBase and ClangDefaultVersion
in build/soong/cc/config/global.go.
* scan-build is too old;
replaced by better clang-tidy's -clang-analyzer-* checks.
* WITH_STATIC_ANALYZER is still effective
to invoke ccc-analyzer or c++-analyzer.
Test: make checkbuild
Change-Id: Ifd159dd28e529d5d3c9807f5e391911365da8cdb
There are too many duplicates warnings, disable them until someone
is actually looking at them.
Bug: 69316739
Test: m checkbuild
Change-Id: Ifb67dbf7734b5f53941d110f578c4fe642e36005
When LOCAL_NO_STANDARD_LIBRARIES is set to true, droiddoc only omits
framework libraries from the required libs. This enables us to use
droiddoc even when frameworks/base is absent (i.e. master-art branch).
Test: m -j core.current.stubs
Test: build in master-art branch
Change-Id: Ia9f0b8bda84b006881b3e62e6573a7784ca56a8c
Bug: 30561479
Test: Build from scratch and verify the library is present.
Change-Id: I53f30d694cff202ffc93491485ed3c845de07862
(cherry picked from commit 8c70d4de97)
When target defines 'BOARD_EXT4_SHARE_DUP_BLOCKS := true', the generated
system/vendor images may contain shared blocks (i.e. some blocks will
show up in multiple files' block list), which violates the current
assumptions in BBOTA script.
This CL allows generating BBOTAs by considering the first occurrence as
the "owner" of the shared blocks. All the later users of the shared
blocks will have an incomplete block list, whose RangeSet's will be
tagged with 'uses_shared_blocks'.
Files with 'uses_shared_blocks' tag will not be diff'd with imgdiff,
potentially with patch size penalty. Such files will be accounted for in
imgdiff stats report, where we can revisit for a better solution.
Bug: 64109868
Test: Generate BBOTA full and incremental package with targets defining
'BOARD_EXT4_SHARE_DUP_BLOCKS := true'.
Change-Id: I87fbc22eef7fafe2a470a03fdcfa1babf088ea8d
This CL uses the 'incomplete' tag to skip applying imgdiff to files with
incomplete block list. It's not the ideal fix to address the holes in
ext4 images, but would unhide other imgdiff issues covered by the
unconditional fallback.
Bug: 68016761
Test: Generate an incremental OTA package from images with incomplete
block list. Check the imgdiff stats report.
Test: `python -m unittest test_blockimgdiff`
Change-Id: Ice77686414e70f5e42de35c1757fb31cf02e4fd4
This variable can be set in BoardConfig.mk to specify a list of
additional paths that contain PGO profiles. These directories are
searched before the predefined paths in soong/cc/pgo.go while finding
PGO profiles.
Test: Set this variable in a BoardConfig and verify that such profiles
are found and that these paths are searched before the predefined paths
in soong/cc/pgo.go.
Change-Id: Ied3ebf0ce6e6e2ead57f4828998e9617424e4573
Create only one vdex file and share between different ISAs.
By sharing vdex file, zygote32 and zygote64 can share the same file and
the system partition size is reduced by about 32MB.
Test: make framework & check boot.vdex and boot-*.vdex files
Test: test system boots with no selinux violations
Bug: 64211239
Change-Id: I31ede4b6aa342f2047d9309b8c631217e6699202
pylint complains about undefined `diff_done`:
W:754, 8: Global variable 'diff_done' undefined at the module level (global-variable-undefined)
W:820,14: Global variable 'diff_done' undefined at the module level (global-variable-undefined)
It would still warn about using global statement after adding the
definition.
W:859, 8: Using the global statement (global-statement)
W:925,14: Using the global statement (global-statement)
This CL computes 'diff_done' via 'len(diff_queue)' instead. It also
moves the progress reporting _before_ the diff work. This way it avoids
showing 100% progress with still changing filenames (because multiple
workers could see an empty queue simultaneously upon finishing their own
works).
There're possible alternatives, such as using the 'nonlocal' keyword in
Python 3 (which we're not there yet), or by using mutable object instead
(e.g. 'diff_done = [0]'). This CL looks cleaner, since it just kills the
var.
Test: Generate a BBOTA incremental. Check the on-screen progress
report.
Test: `pylint --rcfile=pylintrc blockimgdiff.py` no longer complains
about the global diff_done.
Change-Id: I339824735527e1f794b5b1dc99ff3fdb2da85744
The secondary payload should always be applied with
SWITCH_SLOT_ON_REBOOT=0. This CL moves the 'secondary' parameter from
Payload.WriteToZip() to Payload.__init__(). So it can append the flag to
secondary/payload_properties.txt.
Bug: 35724498
Test: Generate an A/B OTA with --include_secondary. Check
secondary/payload_properties.txt entry in the generated ZIP.
Test: `python -m unittest test_ota_from_target_files`
Change-Id: I816c07ab57a1c8a52eff785801634b8b1cb134d4
We have a couple of active imgdiff workarounds (and likely with one more
inbounding that allows having shared blocks in ext4 image). Most of
these workarounds need extending imgdiff's capability. While us not
getting there anytime soon, collect the stats to better understand the
impact of each kind so we can prioritize accordingly.
A sample report is as follows.
Imgdiff Stats Report
========================
APK files diff'd with imgdiff (count: 88)
-------------------------------------------
/system/priv-app/Shell/Shell.apk
...
Large APK files split and diff'd with imgdiff (count: 4)
----------------------------------------------------------
/system/priv-app/Settings/Settings.apk
...
Bug: 68016761
Test: Generate an incremental BBOTA package. Check the stats report.
Test: python -m unittest test_blockimgdiff
Change-Id: I27ad862cde472ab2806db877632ce5a0607420f2
The bpfloader is a executable binary used by netd to load and attach
networking related bpf program at run time. It need to be flashed to
device when updating the system image. Currently this binary is only
used by devices with kernel version 4.9 or above.
Test: hikey boot and bpf program show up under sys/fs/bpf
Bug: 30950746
Change-Id: I3d14d270a04ea57319ad4292ff51b1cf933fc975
In Transfer class, unbundle 'intact' with the monotonicity of the input
ranges. Negate the logic of 'intact', and thus rename it to 'trimmed'.
Move this property from an attribute of Transfer class as the one in
RangeSet.extra. 'trimmed' indicates whether the source / target ranges
have been modified after creating the Transfer() instance.
The logic that determines whether we can apply imgdiff has been
refactored and consolidated into BlockImageDiff.CanUseImgdiff(). Now
both of the two paths call this single copy, i.e. the one that detects
large APKs (before creating Transfer()'s), and the other that's about to
generate the patch for a given Transfer instance.
Bug: 68016761
Test: python -m unittest test_blockimgdiff
Test: Generate an incremental BBOTA package.
Change-Id: Id07195f63f1fa6c3af6e9091940d251cf09fa104
There is an internal buffer in bionic for user/group names that is 32
characters long including the trailing null, so we must restrict the
length of these names during compile time.
Bug: 27999086
Test: Successfully compile a valid config.fs
Test: Fail to compile a config.fs with AID name > 31 characters
Change-Id: I7fe887c630dd4d1033b86a5d8332480eb3b0fa07
These entries are vendor provided and belong on the /vendor partition.
Bug: 27999086
Test: end to end user/group check via config.fs and getpwnam, etc.
Change-Id: I9a5d56da594bf0d04de2b9ce7fd7d9a8151d4682