* Root cause of the issue is improper naming of variables. Turns out,
there was no variable to even denote where the blob should have been
searched for, at "src".
* Previously there was one such variable, suggestively called "TARGET", that
was desperately trying to serve as both, depending on who +2d hacks harder.
* One such example is "c982836 extract_utils: Fix makefile generation issues".
That patch deliberately trimmed the "src:" from a spec (therefore
obviously breaking the search at src) but enabling the searching at
dst, via the good-for-all TARGET variable.
* This patch introduces the following variables:
- SRC_FILE: absolute path corresponding to SPEC_SRC_FILE in the
Android filesystem.
- DST_FILE: absolute path corresponding to SPEC_DST_FILE in the
Android filesystem. Somewhat analogous to the old TARGET variable,
but actually contains the leading / as well (/system/bin/adsprpcd
instead of system/bin/adsprpcd).
* Use existing common get_file() function (which previously was
impossible to use, because it was impossible to determine calling
arguments properly) to reduce complexity of handling adb and disk
image as blob sources.
* Via the new SRC_FILE and DST_FILE variables, search for a blob in all
possible locations (including paths stripped of "/system" which
transforms an absolute path in the Android filesystem into a proper
relative path to that file in a disk image).
Change-Id: Ic40fb4dc93541d8b3f33fde586b773199cf4ded2
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
* This denotes the path of the file that results from the extraction
process, relative to the "proprietary" directory.
* This is a cleanup patch.
Change-Id: I38e759bb6ed697f0a31ca35a7aa9b9b92f8b6793
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
* 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