* The write_product_copy_files() and write_product_packages() functions
rely on its undocumented behavior of keeping target_args in the
returned list, because they are users of target_args (such as
";PRESIGNED" etc).
* Make the behavior documented.
Change-Id: If71595dca32abd40039706d4fed2d7f12e005365
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
* Strip target_args from target_file at callee instead of at caller
* WARNING! Changes (improperly documented) behavior of prefix_match()
function, which is expected to not strip target_args(), and the root
cause why stripping target_args was currently done at caller. Will be
addressed in next patch.
Change-Id: I820d2350aa64ff41374809fcb22f812257132652
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
This reverts commit c982836ca6.
This breaks extracting from src in "src:dst", such as from a disk image.
Will be addressed in the cleanup commit that follows.
Change-Id: Iff84a926f0c3bf908320b43ba40235e0a89db644
* This ensures the prop is set correctly for devices
that build a vendor image by placing the prop in
/system/etc/prop.default, rather than /vendor/default.prop
so it'll be in a prop file that is run for mangle_default_prop
in build/make/tools/post_process_props.py, therby
setting persist.sys.usb.config correctly to "none".
Change-Id: I4027541cf1eae9dd967636efe35de9578922b725
Recent devices (e.g. Pixel 2XL aka taimen) do not define any "system"
partition in their fstab, so a plain "mount /system" fails.
Furthermore, trying to get the entry from /etc/recovery.fstab also fails
because the partitions have slot suffixes (e.g. system_a).
So for these devices, we need to figure out the active slot, mount the
system partition (which really contains the whole root) and lastly mount
the actual system partition from the rootfs.
Change-Id: Ibb73a82896c1f6ce6af9c334b8d0908a183913b9
* Since A/B addon.d scripts are going to need to do things in a
specific way or things could go horribly wrong for a user, let's
introduce versioning so that scripts can claim to be compatible.
* A script can denote it is compatible with addon.d version 2 by
adding: "# ADDOND_VERSION=2" somewhere in its script.
* Only A/B will require version 2 scripts for now, and version 2
scripts will still run on non-A/B. Additionally if a script does
not explicitly denote its version, assume its version 1.
* Version 1: The same old scripts we've always used. We cannot assume
these will all work with A/B backuptools.
* Version 2: Scripts that denote they are compatible with version 2
must be aware of the fact that A/B devices will run this
script for a rom, during a seamless update, mounted at
/postinstall. The best way to ensure compatibility would
be to use the pre-designated functions found in the
backuptool[,_ab].functions scripts.
Change-Id: I5573018dabd21bb64c7c964e2081806072a75243
* A/B OTA devices wont run backuptools in recovery (because they don't
go in to recovery to do an OTA). In these cases let's use a modified
version to backup/restore from within android upon postinstall.
* Add backuptool_postinstall.sh which will be run prior to the normal
postinstall script in order to backup/restore via addon.d scripts.
* This needs to be done in such a manner because we need /postinstall
mounted rw instead of the ro with context= options which are used for
the normal postinstall (dexopt) script.
Change-Id: I51511870634dd1ec5388adafddb446f95cc5a950
* Include MTK/QCOM rules directly from the build/core/config.mk hook.
* Place main.mk hook and main_version.mk into build/core with the rest
of the make system hooks.
Change-Id: Iad2f808f3e3eefbd2be2ca5facb907ff31babbb7
* It appears the only user of this was Gello, which is no longer using
it.
* Remove this deprecated directive
Change-Id: I6ab869c2f2c3b891b58b9a750e7ce882f169f296
* Due to both following commits, backuptool went permissive
and lineage properties got lost from the system on devices
that do not have BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED
"backuptool: Take into account new location for system default props"
Change-Id: I62046447876c2198a0c4f88a4f36f4723d417617
"lineage: Move to Google's method of defining system default props"
Change-Id: I6cb0e28a7599b010b389cc541015a37010a00f4b
* Once the properties issue is properly resolved in the sources,
a period of time is required for "most" of the users to upgrade
their system with fixed lineage properties before we break addons
by repairing the backuptool script globally
Change-Id: Iea8865ea9bb05eed56a8a0a7b95e3f04b01c4bae
* Our properties were supposed to go to /system/etc/prop.default
after the following commit:
"lineage: Move to Google's method of defining system default props"
Change-Id: I6cb0e28a7599b010b389cc541015a37010a00f4b
* However if BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED is not true,
only /default.prop will retain the properties contents of
ADDITIONAL_DEFAULT_PROPERTIES and PRODUCT_SYSTEM_DEFAULT_PROPERTIES,
and none of our versioning identification was held in the system
* Enabling BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED globally would
break all properties on devices that handle partitions usually
at the device level rather than the kernel due to mounting races
* Create a new main_version.mk file to isolate LineageOS properties
that define the system's versions identifications, and use the
ADDITIONAL_BUILD_PROPERTIES internal build variable to include
from build/make through a common vendor main.mk entrypoint
Change-Id: I0060141c097b3d14c3710eee1e0caf7110634967
Signed-off-by: Adrian DC <radian.dc@gmail.com>
This allows for toggling block device verification at runtime.
Both A/B and non-A/B devices as well as VB1.0 and VB2.0 (AVB)
are supported.
Change-Id: If6bec67a000074804f71fa098ad46ba395cac635
* This is now needed for the latest legacy HAL1 hacks, which were
previously the only devices not using media extensions.
* Enable it for all QC devices to avoid running into
issues with devices not having this enabled in the future.
Change-Id: I484840e712f7da6d0064a5f8016e8061b9cba838
- Add missing ims apn. Without this, pixel and nexus users were not
able to use ims features.
- Set the mtu value. This improves data connection reliability.
- These changes match with pixel's aosp apn.
Change-Id: I170de2c92cc916424c266dc972a6538599640b7c
Some ROMs may want to track Google's master branch, which has Clang 6
and 7 toolchains available, as it gets rid of some hacks in the kernel
source. Unfortunately, with the current default choosing logic, the
latest one would be chosen, which it shouldn't be. Use the variable set
in build/make/core/clang/versions.mk, as that's what was intended.
Change-Id: I607c7f750f62caabee4cdccea67846feb7f632fa
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Android for Work (AfW) has 'Work Profiles' that allow separated profiles
to be created so employers can allow employees to have work e-mail on
their phones (for example).
To work properly the 'ManagedProvisioning' module needs to have a proper
set of vendor required apps specified in the
'vendor_required_apps_managed_profile.xml' file. This is the task of the
OEM so that they can specify which apps will replace stock apps. This is
the reason why the stock AOSP code is blank.
There is a set of minimum defaults needed as specified in Android documentation:
https://source.android.com/devices/tech/admin/implement#required_apps
(They give an example from a Nexus phone)
With the default set apps correctly specified Google's open source test code
'Test DPC' should be able to complete successfully.
https://github.com/googlesamples/android-testdpc/
(Also available on Google Play: Example code distributed by
Google to help developers implement)
The changes contained here allow LineageOS to successfully create a
'Work Profile' with 'Test DPC'.
Change-Id: I6b8ccb53149e9070712eac329e44f6c72f812410
(cherry picked from commit ac0cb02076386aff20c0af164845a89308b4dff9)
Pixels will only establish a data connection to these carriers using
IPv6, so this fixes the reports of no cellular data and no mms.
Also, this matches with what aosp has.
Change-Id: I07768f817cf6bb4997dd737cc467fb146c959434
If for whatever reason we need a prebuilt DT image,
it has to end up in target files for the signing slave.
Change BOARD_KERNEL_PREBUILT_DT to hold the path of the
prebuilt DT image, if it's going to be used.
Change-Id: I8042d347d271da5c3963824777d399bbc4229aa9
* proprietary-files.txt entries such as
"-app/TimeService/TimeService.apk:priv-app/TimeService/TimeService.apk" should
generate a "LOCAL_SRC_FILES := proprietary/priv-app/TimeService/TimeService.apk"
in the Makefile definition.
* However, currently, the prefix_match function is being called on the whole
PRODUCT_PACKAGES_LIST entry (whole line, including ":"), and therefore,
TimeService.apk would be included in the APPS list instead of PRIV_APPS.
* Furthermore, because of the incorrect prefix_match, the generated
LOCAL_SRC_FILES is "proprietary/app/priv-app/TimeService/TimeService.apk",
which breaks the build because there is no file at that wrong path.
* The fix is to make the extract function match up with write_product_packages
by applying the target_file function on all BUILD_PREBUILT source files.
Change-Id: Ib4859b8854db0f2142bb3f28cce8dd25f7141732
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Trailing slashes cause 'patchset' to be an empty string, which
cannot be converted to an int. If we have a trailing slash, ignore
it and pick the current patchset.
Change-Id: Ifad60b7f6ff3dcfd9dd80b2e93b1f909aa360666