A device can set up BOARD_SYSTEMIMAGE_JOURNAL_SIZE (number of journal blocks)
in its BoardConfig.mk.
To disable journaling, set "BOARD_SYSTEMIMAGE_JOURNAL_SIZE := 0".
BOARD_VENDORIMAGE_JOURNAL_SIZE and BOARD_OEMIMAGE_JOURNAL_SIZE work in
similar way.
Bug: 18430740
Change-Id: I0594814fe19ffc54dff41ec2464e2e3a802b9419
Change boot, recovery, and verity metadata signing keys to use the
same PKCS8 / X.509 PEM format as the other signing keys, and update
build scripts to use correct arguments for the updated signing
tools.
Bug: 15984840
Bug: 18120110
Change-Id: I23ed5a004ecdad6cf7696487935ad5031eb8adf8
(cherry picked from commit 72d90eb189)
Change boot, recovery, and verity metadata signing keys to use the
same PKCS8 / X.509 PEM format as the other signing keys, and update
build scripts to use correct arguments for the updated signing
tools.
Change-Id: I23ed5a004ecdad6cf7696487935ad5031eb8adf8
Some ext4 options were not suitable for all kernel versions.
The current option were checked against kernels 3.0 3.4 3.10.
Bug: 18092222
Change-Id: I30883706e5c8ac7a318f4b448d4becde50de808f
Currently recovery install/patch will mount /system++ with only default
options.
The default options are not very suitable for dealing with crashes.
We now use
TARGET_RECOVERY_FSTYPE_MOUNT_OPTIONS
that can specify which mount options to use for a given fs-type.
# <fstype>=<fstype_opts>[|<fstype_opts>]...
# fstype_opts := <opt>[,<opt>]...
# opt := <name>[=<value>]
If only defaults are to be used, then the BoardConfig.mk can just have
an empty (must have ""):
TARGET_RECOVERY_FSTYPE_MOUNT_OPTIONS := ""
The default is
"ext4=match_batch_time=0,commit=1,data=journal,barrier=1,errors=panic,nodelalloc"
The release tools will pick them up with
https://googleplex-android-review.git.corp.google.com/#/c/573628
Bug: 18092222
Change-Id: Iaa59099b0edf5af8835d1862fada089cff58882c
Add oem_fingerprint_properties to misc_info.txt only when it is not empty.
Shamu does not have OEM specific OTA config and oem_fingerprint_properties
does not need to be set in misc_info.txt.
For sprout, it stays the same.
Bug: 16635599
Change-Id: I7e6c6f5ce1f94f8f1b6da0c2f56bc67ff9fc0f1c
When building for 32p, we need to be explicit that we wish to build the 32bit
version of the binaries that will be placed in the recovery image. The recovery
image doesn't actually care... but if we are not explicit in this, the makefiles
will ask for the 64bit binaries but the Android.mk for the binaries will supply
the 32bit images (causing the build to fail)..
Change-Id: I728912bc8e07726888fe8bed4352cbb373911cb7
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Add a target to zip up all the otatools and releasetools, for easy
copying to the OTA builder machine.
Change-Id: If14b4afefcc1a20ea19dfca3f3b9f9fae73189a6
Because we already have rule to store installed-files.txt in DIST_DIR,
to avoid the slim chance of race condition, this copy is named as
installed-files-rescued.txt
Change-Id: I9fa6d8aded0ad5de1f1422d70a4224b3fc308e75
Java has a problem loading OpenType fonts. This change updates the list
of fonts to include by omitting the otf fonts and adding their
replacement.
This change also moves the code for configuring the fonts for the SDK in
a separate file so that the core Makefile remains cleaner.
Change-Id: Iaf30a3ec59adf251b79cb20f27ad88fc92205ac1
This removes the explicit list of fonts for the SDK and replaces it with
the fonts built for the generic device.
Also, the symlinked fonts are copied becuase Windows doesn't support
symlinks.
Change-Id: I8b18b2ab0149ab24448f27dbd5f9716e5d360029
Store sparse images in the target-files, and use those (when they're
available) for building block OTAs.
- New script add_img_to_target_files is added to make the images and
add them to the IMAGES/ subdir in the target-files. It gets run
from the Makefile when building a target-files.
- img_from_target_files becomes mostly vestigial: it creates the
img.zip by just copying the images out of the target-files. (It
still knows how to build images for use on older target-files.)
- ota_from_target_files uses images from the target-files in
preference to rebuilding images from the source files.
- sign_apk_target_files builds images and includes them in its output
target files (even if the input target-files didn't have them).
Bug: 16488065
Change-Id: I444e0d722d636978209467ffc01750a585c6db75
The vendor build.prop contains the fingerprint for the build, and
timestamps. It allows you to tell if the vendor partition matches
the system partition.
Change-Id: Icf261571e82823928b2562e66e48fbcb0da55801
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Fail build if non-symlink /system/vendor detected while we are building
a separate vendor.img.
Bug: 16360411
Change-Id: I96cb6d0b654d6632cd820ba193423e9a16214638
- Add the stuff in /vendor to platform.zip.
- Pull things of vendor.img from platform.zip when doing PDK fusion
build.
Bug: 16354024
Change-Id: I4f3fd392af8c357a5614b3e26ceac15fd3e6a0d0
Workaround to report armv7 abis for arm64 devices until the play store
looks at the new android.os.Build.SUPPORTED_ABIS list.
Bug: 15018047
Change-Id: If5f4081073ee80433aae51ef15ccbfa1c6ae624c
- Support TARGET_USERIMAGES_USE_F2FS.
- Support BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE.
- Support "userdata_fs_type" in the prop dict.
- Update build_image to recognize f2fs and call the correct command.
Change-Id: If31cc8bd235f93a4c7814fab36e6e2d13d3037ad
Signed-off-by: JP Abgrall <jpa@google.com>
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
Collect and store proguard obfuscation dictionary files.
Only do this for apps_only build for now.
Bug: 9407666
Change-Id: I0324eed6bb236abb0d3725f8d2a0b6c5c31935fe
Support using custom mkbootimg to allow boards to specify custom
boot image formats. Also export this as the environment variable
MKBOOTIMG to the *_from_target_files releasetools scripts.
Change-Id: I2084273b1175de097fb7da5c4f2264ea8014d74f
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Don't bother going through the source tree in more circumstances:
all cleaning goals, helping goals, no-deps goals.
Bug: 10244578
Change-Id: Id53a249085c62838e4193962a85e0ac34f46954f
Add "dev-keys" or "test-keys" to the value of ro.build.display.id for
user builds. (This is the property that is displayed under "Build
number" in the Settings UI.) Modify the signing script to remove the
keys tag from this value when signing.
Change-Id: I3d9d92056f8567d7f84b1be047619be7c6e4c419