Make vendor partition a first-class member of the OTA system (for
target_files that contain a VENDOR/ subdirectory).
Build vendor images in a way that is compatible with block-based OTA.
Support updating the vendor partition in both full and incremental,
block and file OTAs. In most cases this is handled by refactoring the
existing code to handle the system partition to handle either, and
then calling it twice.
Currently we don't support incremental OTAs from a target-files
without a VENDOR subdirectory to one with one, or vice versa. To add
or remove a vendor partition a full OTA will need to be done.
Bug: 15544685
Change-Id: I9cb9a1267060bd9683a9bea19b43a26b5a43800d
- Remove the incorrectly used (and unused) 3rd arg to assert-max-image-size
- Remove test for fstype in assert-max-file-size() as it was always
set to a value leading to 0.
Change-Id: I0a1182fcc85c6c3801d45731e691b9bb38657606
Signed-off-by: JP Abgrall <jpa@google.com>
Execute the build_font.py script to rename the PS name of the fonts to
be shipped with the SDK.
Also edited the list of font directories to include in the build.
Change-Id: I023fb0dfcf50698f80e26b7d476969c453fc4cc7
(cherry picked from commit 887cd0c71e)
Also we don't need to force LLVM built from source, for we already force
LLVM to be built as 32-bit.
Bug: 13751317
Change-Id: Ifadf1988d28b60cb06316de50f5bdc1834f1acc0
img_from_target_files.py just skips the boot.img and recovery.img since
there is no kernel or recovery.fstab for emulator.
Bug: 15383279
Change-Id: I4035193e6ab933194ff1417dfae4eab963fe5301
img_from_target_files.py just skipps the boot.img and recovery.img since
there is no kernel or recovery.fstab for emulator.
Bug: 15383279
Change-Id: I4035193e6ab933194ff1417dfae4eab963fe5301
So we can do incremental build across different SDK products.
(cherry picked from commit d7af176199)
Change-Id: I30ebed5328123629519a64c793f94fc8d5aa09a8
Only the recovery image needs to include the recovery domain
in its policy, so create a separate policy for the recovery image
and replace the root policy with this one when building the
recovery image.
Depends on the change with the same Change-Id in external/sepolicy.
Change-Id: I444107f9821eabf4164ba07a44d03bd71e719989
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Some recovery UI assets are available in different sizes; we need to
pick the right ones for the device's density. Use
PRODUCT_AAPT_PREF_CONFIG if it is available (it is empty for older
devices), and fall back to the highest density in PRODUCT_AAPT_CONFIG
if the PREF_ version is not available.
Change-Id: Ia1eb7d5409cda17b0fc5c0bcfc33dfa6a50893e8
Without this, system images will be built that do not contain the
necessary bits for verification.
Change-Id: I87c15282b26377d7a2a1540e3d0e30b0299622e3
But not install them.
This prevents "make tests" polluting system.img or userdata.img.
We have new mechanism to build and package up modules into zip file in
build/core/tasks/tools.
Change package-modules.mk to install DATA/ instead of data/ in the
zip file; Better handle of module name conflicting.
Bug: 13585955
Change-Id: I7586a8c7995b984c9ead0ba2fa84dd5d2dd20bd1
But not install them.
This prevents "make tests" polluting system.img or userdata.img.
We have new mechanism to build and package up modules into zip file in
build/core/tasks/tools.
Change package-modules.mk to install DATA/ instead of data/ in the
zip file; Better handle of module name conflicting.
Bug: 13585955
Change-Id: I7586a8c7995b984c9ead0ba2fa84dd5d2dd20bd1
Without this, system images will be built that do not contain the
necessary bits for verification.
Change-Id: Icaa636085dbfd386424c90dfbe404c5960df0fe4
A separate OEM file must be specified to provide the expected
values for these properties. The list of properties comes from
the "oem_fingerprint_properties" list in misc_info.txt
Bug: b/13367676
Change-Id: I1a3eaf108492132cf6f595a5d1c9f7e0c3cb3142
The C++ version avoids the need to unsparse the image to generate
the verity image, and is much faster for images with large regions
of don't care (treated as zeroes).
Change-Id: I8396b08a5fdb93f27d8c71c9c1ac23cb75cf1f7f
Move image dependencies out of PRODUCT_PACKAGES and into direct
dependencies for the image building rules.
Fix the test for PRODUCT_SUPPORTS_VERITY, it needs to check for
the current project as the global is no longer set.
Change-Id: I811501834ae5ec658229bd505fcc48275ff578c9
To build oem.img:
- You must define BOARD_OEMIMAGE_PARTITION_SIZE in your BoardConfig.mk
- The file system type will be the same as system.img and userdata.img.
- To install a module to oem.img, use "LOCAL_OEM_MODULE := true"
- run "make -j48 showcommands oem_image dist". By default it's not
built.
Bug: 13367676
Change-Id: I1a26d4d0c61b72ecffe60279667b1b3de050780d
The OTA generation scripts need to know what system properties to
read from the OEM partition, so pass along from product definition.
Also define "thumbprint" which is only the build-specific parts of
the fingerprint. (Thumbs are smaller than fingers.)
Bug: 13367676
Change-Id: Iae051dcd2b1c67a7c8554d8ae318a4c54a86d614
Introduce ro.product.cpu.abilist32 / abilist64, which are
comma separated lists of the 32 and 64 bit ABIs that the
device supports. These properties are used by the zygote and
system server to determine what ABI an app should be
started with.
This changes move abilist related make steps out of envsetup.mk
and into config.mk because they depend on variables set by
core/combo/***. Additionally, config.mk performs a few additional
cleanups of these variables (like stripping them) after the
inclusion of envsetup.mk so this seems like a better place to
put them.
bug: 13647418
Change-Id: I3db39bdd761220c5b4966f651892fb592396f9a1
Recovery now has different res-*dpi directories for different display
densities. Select one based on the highest density specified in
PRODUCT_AAPT_CONFIG.
Change-Id: Ieb0657a08e5df87f914fdda78a038cbbf82619e9
Add a (read only) system property that is a comma
separated list of ABIs supported by the device in order
of preference. For example, typical arm-v8 device might
define:
ro.cpu.abilist = arm64-v8a,armeabi-v7a,armeabi
For most purposes, a single flattened list like the above is
probably more useful than the parallel system of variables
TARGET_CPU_ABI{2} / TARGET_2ND_ARCH_CPU_ABI{2} that we use
in the build system.
Change-Id: If9102669ad9f5f8fd89a8bcc5bf88cca1acadc3c
Certain products can define a list of system properties that should be
delegated to the OEM. Since these properties may be ro.*, we give
them first shot at defining.
Also support blacklist of properties that should never be defined by
build.prop, used to delegate to runtime fingerprint generation.
Bug: 13367676
Change-Id: I3f00db732f485818205a7b76b31edbdc3a89aac0
After building a patch for the system image (for incremental block
OTAs), apply it to a local copy of the file and test that it succeeds.
This is an imperfect test as it's using the local client's
syspatch_host, which may differ from the syspatch library actually
used in the target build, but it's somewhat better than nothing.
Change-Id: Ic0001b0145881e2ebd4b5b36ce9b5bcebd76deb4
The system partitions has regions that we shouldn't write and can't
depend on the contents of. Adds a new script to generate a map of
these regions (using the sparse image as input), and include the map
in the package zip so it can be used when writing or patching the
system partition.
Also fixes a bug where the wrong SELinux file contexts are used when
generating incrementals.
Change-Id: Iaca5b967a3b7d1df843c7c21becc19b3f1633dad
Include apps that appear under /system/priv-app
to also be included with the zip of all the apps.
Change-Id: If4687cf4c471877f11d78b68bad96f1842e49d87
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
Add the --block flag to this script to control whether block-based OTA
packages are generated (defaults to off). Make the full OTA package
produced by "make otapackage" continue to produce a block-based OTA.
Also fix a problem where block incremental OTAs didn't ever succeed,
and the --no_signing option never worked.
Change-Id: I610d0b4abed4b8b65fbe8ce0abaeec6cf52e14a1
Currently, the "img" zip files generated by the build system lack the
script and data needed to rewrite the recovery partition, while the
"ota" zip files do (when installed).
In order to move towards block-based OTAs, we want the result of
flashing an image and the result of installing the corresponding OTA
package to be identical.
Generate the recovery-from-boot patch and install script as part of
the process of building the target-files. This requires breaking the
code to generate that out of ota_from_target_files into its own tool
that we can run from the Makefile. (ota_from_target_files can still
do this, so it continues to work with older target-files.)
Bug: 12893978
Change-Id: I80e62268840780b81216e548be89b47baf81b4ac
PRODUCT_COPY_FILES entries can include the src:dest:owner
syntax versus src:dest. This causes the filter to miss
certain cases. Instead use the word-colon function to
grab the dest regardless of syntax.
Change-Id: I1f4e57a236c1db148bada0cfe5bd1e87bb1194d6
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
/system/lib always contains 32-bit libraries, and /system/lib64 (if
present) always contains 64-bit libraries.
Move things around a little bit, so TARGET_ARCH can be used to define
the build paths.
Bug: 11654773
Change-Id: I2edd91e162c7a20d7719d7bae15e5fa6c2a5b498
To run emma on a host Java library, in the module definition use:
LOCAL_EMMA_INSTRUMENT := true
then run make with "EMMA_INSTRUMENT=true".
Bug: 12178695
Change-Id: Ie31582b94f5c45381f534912e810f88d21dde9b2
Building recovery requires building a host .jar file. Change
platform.zip to always include the necessary host java prebuilts,
instead of only when building the 'platform-java' target.
Bug: 12186985
Change-Id: Ic823d764cb6b39bbf8c5d90c94b5dc99b55d34dc
When run with the -2 option, ota_from_target_files will generate a
package (full or incremental) that does some extra reboots in order to
install the new recovery first, so that the rest of the installation
is done with the new recovery. This can be useful if (say) the
package installation needs some features from the newer kernel.
For incremental packages, the verification phase is still done with
the old recovery.
This is only supported on devices where the misc partition is EMMC
(not MTD).
Two-step packages are slower to install and possibly confusing to
users (they will see their device reboot four times instead of twice),
so only use this option if necessary.
Change-Id: I3267d905e5e8eb1a1eb61bf48255b8b24ffc4ad1
Save the device-specific releasetools.py module in the target_files
zip so that the OTA tools can use it without needing to get it from a
client.
Change-Id: I2dd5f4628290a8f2f56bd519b07d4ca8d92fddcd
* commit 'c3644114805150eef2f5035085878e5f860c7436':
Revert "Enable incremental builder to find files that moved, and try to process them via patch + rename, instead of delete + add."
* commit '8ea83e902d931591af37e747763e768e7a6990be':
Revert "Enable incremental builder to find files that moved, and try to process them via patch + rename, instead of delete + add."
* commit '3b44339d6a443fde57db4ae84a7e46823da6d162':
Enable incremental builder to find files that moved, and try to process them via patch + rename, instead of delete + add.
* commit '37335b42385970d957d48056145a3d4c4dbc6087':
Enable incremental builder to find files that moved, and try to process them via patch + rename, instead of delete + add.
Update the OTA generation script to understand SELinux file
labels and file capabilities.
Make fs_config aware of SELinux labels and file capabilities, and
optionally output those elements whenever we output the
UID / GID / file perms. The information is emitted as a key=value pair
to allow for future extensibility.
Pass the SELinux file label and capabilities to the newly created
set_metadata() and set_metadata_recursive() calls. When the OTA
script fixes up filesystem permissions, it will also fix up the SELinux
labels and file capabilities.
If no SELinux label and capabilities are available for the file, use
the old set_perm and set_perm_recursive calls.
Bug: 8985290
Bug: 10183961
Bug: 10186213
Change-Id: I4fcfb2c234dbfb965cee9e62f060092a4274d22d
The existing logic in common.py breaks string arguments incorrectly:
e.g. --para1 val1 --para2 "val2 is a string" will be output as:
'--para', 'val1, '--para2', 'val2' 'is' 'a' 'string'
This will cause mkbootimg command fails due to the invalid arguments
generated from the wrong parsing.
The patch fixes this issue to get:
'--para', 'val1, '--para2', 'val2 is a string'
Change-Id: Ia34ec357550f11ae9d6adc719d86a0c6a9099fbc
Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
In apps_only build (after running tapas or exporting TARGET_BUILD_APPS),
run "make notice_files" to collect and combine the NOTICE files of
modules that are needed by the apps.
Bug: 10445634
Change-Id: I6555bba1104e43b48c723c82143c46d444a75e80
Collect and store proguard obfuscation dictionary files.
Only do this for apps_only build for now.
Bug: 9407666
Change-Id: I51c78bf0f42f959dc920de230e60e0f71ed0d0ea