extract_utils: Add support for overriding packages
* An example of how this can be used is say a device
wants to use the original OEM camera, e.g. Essential PH-1.
Klik is required in order to use the external camera
module that you could buy for the device so it's preferred
to use it over Camera2 or Snap.
* An example of how to use this argument:
-system/priv-app/Klik/Klik.apk;OVERRIDES=Camera2
Change-Id: I2504cbb760b20ed86c2dc088cc4bd74b78ba64d9
This commit is contained in:
@@ -358,6 +358,7 @@ function write_blueprint_packages() {
|
|||||||
local EXTENSION=
|
local EXTENSION=
|
||||||
local PKGNAME=
|
local PKGNAME=
|
||||||
local SRC=
|
local SRC=
|
||||||
|
local OVERRIDEPKG=
|
||||||
|
|
||||||
for P in "${FILELIST[@]}"; do
|
for P in "${FILELIST[@]}"; do
|
||||||
FILE=$(target_file "$P")
|
FILE=$(target_file "$P")
|
||||||
@@ -423,12 +424,21 @@ function write_blueprint_packages() {
|
|||||||
SRC="$SRC/app"
|
SRC="$SRC/app"
|
||||||
fi
|
fi
|
||||||
printf '\tapk: "%s/%s",\n' "$SRC" "$FILE"
|
printf '\tapk: "%s/%s",\n' "$SRC" "$FILE"
|
||||||
if [ "$ARGS" = "PRESIGNED" ]; then
|
ARGS=(${ARGS//;/ })
|
||||||
printf '\tpresigned: true,\n'
|
if [ -z "$ARGS" ]; then
|
||||||
elif [ ! -z "$ARGS" ]; then
|
|
||||||
printf '\tcertificate: "%s",\n' "$ARGS"
|
|
||||||
else
|
|
||||||
printf '\tcertificate: "platform",\n'
|
printf '\tcertificate: "platform",\n'
|
||||||
|
else
|
||||||
|
for ARG in "${ARGS[@]}"; do
|
||||||
|
if [ "$ARG" = "PRESIGNED" ]; then
|
||||||
|
printf '\tpresigned: true,\n'
|
||||||
|
elif [[ "$ARG" =~ "OVERRIDES" ]]; then
|
||||||
|
OVERRIDEPKG=${ARG#*=}
|
||||||
|
OVERRIDEPKG=${OVERRIDEPKG//,/ }
|
||||||
|
printf '\toverrides: ["%s"],\n' "$OVERRIDEPKG"
|
||||||
|
elif [ ! -z "$ARG" ]; then
|
||||||
|
printf '\tcertificate: "%s",\n' "$ARG"
|
||||||
|
fi
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
elif [ "$CLASS" = "JAVA_LIBRARIES" ]; then
|
elif [ "$CLASS" = "JAVA_LIBRARIES" ]; then
|
||||||
printf 'dex_import {\n'
|
printf 'dex_import {\n'
|
||||||
|
|||||||
Reference in New Issue
Block a user