Due to the change in https://lwn.net/Articles/546473/, kernel reserves a
few extra blocks (lesser of 2% and 4096 blocks) on ext4 FS which leads to
OTA update failures. Adjust the size computation if the device has
BOARD_HAS_EXT4_RESERVED_BLOCKS := true.
Bug: 21522719
Bug: 22023465
Change-Id: I49f16adbf2dedc5279fbb8622bf99ef71dcc494f
Set the initial (version 1!) value for the preview SDK version
readable by apps. If we're on a release version, force it to be 0.
Change-Id: Ib3e6cad1f59cea8e4a781827d4a35dd3620b90f1
shamu has a 560dpi density, which is between xxhdpi and xxxhdpi. It
deserves the large font (18x32), otherwise it falls back to use the
small one and makes it mostly unreadable under recovery mode. Amend
the list to include 560dpi and 400dpi that are higher than xhdpi.
Ideally we should map string formats back to numbers for easy
comparison (and to handle any high but odd density values).
Change-Id: Ie08d9ce5e1c8850ff30a79bcbfd1b89e971b7e07
With this, you can easily add more executables, jars or shared libraries
to the package. Also now it automatically takes care of
32-bit-v.s.-64-bit library issue.
Change-Id: I5afe00fadc978d0da229b192eca1a4b1c149764e
Allow dm-verity to be enabled without boot and recovery images being
signed. This makes it possible to enable only dm-verity to detect
corruption without confusing bootloaders that do not understand signed
images.
Bug: 19985143
Change-Id: Ie52c6ff595faa7a5c1f1bc1b37f6899c4d0c7001
Add vboot properties to the dictionary file, which will be packed into
the target_files zip. Add support in packaging and OTA scripts to
sign the generated bootable images (boot.img and recovery.img) when
vboot is enabled.
Change-Id: I08758ced03d173219415bca762bbdb66c464a9f5
(cherry picked from commit 5d5a3bd9e8d8b14b71d1b2105417a2958d13d3d2)
Added support to build system.img that combines contents of /system and
the ramdisk, and can be mounted at the root of the file system.
To enable this feature, define BoardConfig.mk variable:
BOARD_BUILD_SYSTEM_ROOT_IMAGE := true
Ideally we would just change TARGET_OUT (the path of the staging system
directory) to under TARGET_ROOT_OUT. But at this point many places in
the build system assume TARGET_OUT is independent of TARGET_ROOT_OUT and
we can't make it easily configurable.
Instead this implementation takes the least intrusive approach:
We don't change TARGET_OUT or TARGET_ROOT_OUT. We just assemble a
temporary staging directory that contains contents of both TARGET_OUT
and TARGET_ROOT_OUT, in build_image.BuildImage() of
tools/releasetools/build_image.py.
When build_image.py is directly called from the makefile, we pass in the
parameters from the global dictionary; when build_image.BuildImage() is
called from add_img_to_target_files.py, we need to override values to
point to files extracted from the target_files zip file.
We need to combine the fs_config files of both /system and ramdisk,
when fs_config is enabled.
Also this change refactored build_image.BuildImage() by moving the extra
parameters to the image property dictionary.
(cherry-picked from commit 0eabd4f2c5)
Bug:19868522
Change-Id: Iafc467a0e3427b0d6ad3b575abcc98ddcc9ea0f1
The change follows the patten found in "Package OTA" and other places
to allow for overriding the mkbootimg command.
Now pass MKBOOTIMG variable to get make_recovery_patch and add_image_to_target
to use the tool set in BOARD_CUSTOM_MKBOOTIMG for boot/recovery image
generation.
Change-Id: I78533c25e87c2750eb24ac1bf39e4b7ca321a441
Added support to build system.img that combines contents of /system and
the ramdisk, and can be mounted at the root of the file system.
To enable this feature, define BoardConfig.mk variable:
BOARD_BUILD_SYSTEM_ROOT_IMAGE := true
Ideally we would just change TARGET_OUT (the path of the staging system
directory) to under TARGET_ROOT_OUT. But at this point many places in
the build system assume TARGET_OUT is independent of TARGET_ROOT_OUT and
we can't make it easily configurable.
Instead this implementation takes the least intrusive approach:
We don't change TARGET_OUT or TARGET_ROOT_OUT. We just assemble a
temporary staging directory that contains contents of both TARGET_OUT
and TARGET_ROOT_OUT, in build_image.BuildImage() of
tools/releasetools/build_image.py.
When build_image.py is directly called from the makefile, we pass in the
parameters from the global dictionary; when build_image.BuildImage() is
called from add_img_to_target_files.py, we need to override values to
point to files extracted from the target_files zip file.
We need to combine the fs_config files of both /system and ramdisk,
when fs_config is enabled.
Also this change refactored build_image.BuildImage() by moving the extra
parameters to the image property dictionary.
Bug:19868522
Change-Id: Iafc467a0e3427b0d6ad3b575abcc98ddcc9ea0f1
Some releasetools python sripts rely on $PATH to search for the
executables. With this change, you don't need to run lunch even after you
change the build system variable OUT_DIR.
Bug: 19320328
Change-Id: Ia44b11084fb1bdcceb60b1d33cb7e460c9b705a8
(cherry picked from commit 9d252e1009)
Add a target to zip up all the otatools and releasetools, for easy
copying to the OTA builder machine.
Change-Id: If14b4afefcc1a20ea19dfca3f3b9f9fae73189a6
(cherry picked from commit f22b0f43ef)
"cp -Rf" fails on Mac OS when some broken symlinks exist in the dest
dir.
Also switch to better shell error handling when copying
init.recovery.*.rc.
Change-Id: Idd05f7604736b234619f62be12dd108fac91fed1
"cp -Rf" fails on Mac OS when some broken symlinks exist in the dest
dir.
Also switch to better shell error handling when copying
init.recovery.*.rc.
Change-Id: Idd05f7604736b234619f62be12dd108fac91fed1
Previously the recovery binary was configured to be installed to the
system.img and then got copied to recovery.img in the recovery.img's
build rule.
With this change, a module, such as the recovery binary, can configure
itself to be installed directly to the recovery.img, just like how other
modules get installed to system.img.
Bug: 19667686
Change-Id: I46b0b4a95cf078a68999db9c0f6635d6a3f5cd86
Add source and target block hashes as parameters to transfer list
commands that copy or patch data to a partition. This allows the
updater to verify the status of each command in the transfer list
and makes resuming block based OTAs possible. Due to the changes,
update the transfer list version to 3.
Needs matching changes from
I1e752464134aeb2d396946348e6041acabe13942
Bug: 18262110
Change-Id: Ia5c56379f570047f10f0aa7373a1025439495c98
(cherry picked from commit cac671a9d1)
Previously the recovery binary was configured to be installed to the
system.img and then got copied to recovery.img in the recovery.img's
build rule.
With this change, a module, such as the recovery binary, can configure
itself to be installed directly to the recovery.img, just like how other
modules get installed to system.img.
Bug: 19667686
Change-Id: I46b0b4a95cf078a68999db9c0f6635d6a3f5cd86
Previously if user has a directory with name dummy in the root of the
source tree, "zip -qd package.apk dummy" fails with:
"zip error: Nothing to do!".
This change mitigates the error.
Change-Id: I642e3bf0378e5b9911a068ecb72f795b3e92f1fe
We don't use EXT2 for bootimage anymore.
This will allow getting rid of external/genext2fs
Bug: 19282953
Change-Id: Ie56528c7877036d2501a09888a4420637f9cd647
Some releasetools python sripts rely on $PATH to search for the
executables. With this change, you don't need to run lunch even after you
change the build system variable OUT_DIR.
Bug: 19320328
Change-Id: Ia44b11084fb1bdcceb60b1d33cb7e460c9b705a8
When incremental builds only affect the system partition,
the build.prop file for other partitions might go out of
date.
Add a dependency on system/build.prop s.t. when
it's rebuilt,
the fingerprints are updated on the other
partition's build.prop's.
Bug:19058575
Change-Id: Iea7b761e0800c402eb4ce1154e8f6af5a17f7b06
Add source and target block hashes as parameters to transfer list
commands that copy or patch data to a partition. This allows the
updater to verify the status of each command in the transfer list
and makes resuming block based OTAs possible. Due to the changes,
update the transfer list version to 3.
Needs matching changes from
I1e752464134aeb2d396946348e6041acabe13942
Bug: 18262110
Change-Id: Ia5c56379f570047f10f0aa7373a1025439495c98
This is a BCP-47 language tag representing the default locale for a
given device. Support for the earlier mechanism of supplying a language
and region via ro.product.locale.region/language has been removed. This
change also removes support for supplying these properties via
PRODUCT_ADDITIONAL_PROPERTY_OVERRIDES. Devices that need to override
this should either rearrange their PRODUCT_LANGUAGES or supply a custom
.prop file.
bug: 17691569
Change-Id: I00c74098542b49b9c514a6ca39ea8d08179546c1
ro.build.flavor is set to "$(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)" in
system.img build.prop at build time,
and it won't be overridden by oem partition's build.prop.
Bug: 18605832
Change-Id: Ic917623dd43b74d9c601119db0b457483e8c4472
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