Loading build/tools/extract_utils.sh +55 −3 Original line number Diff line number Diff line Loading @@ -284,6 +284,14 @@ function write_product_copy_files() { local OUTTARGET=$(truncate_file $TARGET) printf ' %s/proprietary/%s:$(TARGET_COPY_OUT_PRODUCT)/%s%s\n' \ "$OUTDIR" "$TARGET" "$OUTTARGET" "$LINEEND" >> "$PRODUCTMK" elif prefix_match_file "system_ext/" $TARGET ; then local OUTTARGET=$(truncate_file $TARGET) printf ' %s/proprietary/%s:$(TARGET_COPY_OUT_SYSTEM_EXT)/%s%s\n' \ "$OUTDIR" "$TARGET" "$OUTTARGET" "$LINEEND" >> "$PRODUCTMK" elif prefix_match_file "system/system_ext/" $TARGET ; then local OUTTARGET=$(truncate_file $TARGET) printf ' %s/proprietary/%s:$(TARGET_COPY_OUT_SYSTEM_EXT)/%s%s\n' \ "$OUTDIR" "$TARGET" "$OUTTARGET" "$LINEEND" >> "$PRODUCTMK" elif prefix_match_file "odm/" $TARGET ; then local OUTTARGET=$(truncate_file $TARGET) printf ' %s/proprietary/%s:$(TARGET_COPY_OUT_ODM)/%s%s\n' \ Loading Loading @@ -320,7 +328,7 @@ function write_product_copy_files() { # write_blueprint_packages: # # $1: The LOCAL_MODULE_CLASS for the given module list # $2: /system, /odm, /product, or /vendor partition # $2: /system, /odm, /product, /system_ext, or /vendor partition # $3: type-specific extra flags # $4: Name of the array holding the target list # Loading Loading @@ -364,6 +372,8 @@ function write_blueprint_packages() { SRC+="/vendor" elif [ "$PARTITION" = "product" ]; then SRC+="/product" elif [ "$PARTITION" = "system_ext" ]; then SRC+="/system_ext" elif [ "$PARTITION" = "odm" ]; then SRC+="/odm" fi Loading Loading @@ -476,6 +486,8 @@ function write_blueprint_packages() { printf '\tsoc_specific: true,\n' elif [ "$PARTITION" = "product" ]; then printf '\tproduct_specific: true,\n' elif [ "$PARTITION" = "system_ext" ]; then printf '\tsystem_ext_specific: true,\n' elif [ "$PARTITION" = "odm" ]; then printf '\tdevice_specific: true,\n' fi Loading @@ -487,7 +499,7 @@ function write_blueprint_packages() { # write_makefile_packages: # # $1: The LOCAL_MODULE_CLASS for the given module list # $2: /odm, /product, or /vendor partition # $2: /odm, /product, /system_ext, or /vendor partition # $3: type-specific extra flags # $4: Name of the array holding the target list # Loading Loading @@ -537,6 +549,8 @@ function write_makefile_packages() { SRC+="/vendor" elif [ "$PARTITION" = "product" ]; then SRC+="/product" elif [ "$PARTITION" = "system_ext" ]; then SRC+="/system_ext" elif [ "$PARTITION" = "odm" ]; then SRC+="/odm" fi Loading Loading @@ -620,6 +634,8 @@ function write_makefile_packages() { printf 'LOCAL_VENDOR_MODULE := true\n' elif [ "$PARTITION" = "product" ]; then printf 'LOCAL_PRODUCT_MODULE := true\n' elif [ "$PARTITION" = "system_ext" ]; then printf 'LOCAL_SYSTEM_EXT_MODULE := true\n' elif [ "$PARTITION" = "odm" ]; then printf 'LOCAL_ODM_MODULE := true\n' fi Loading Loading @@ -710,6 +726,22 @@ function write_product_packages() { write_blueprint_packages "SHARED_LIBRARIES" "product" "64" "P_LIB64" >> "$ANDROIDBP" fi local T_SE_LIB32=( $(prefix_match "system_ext/lib/") ) local T_SE_LIB64=( $(prefix_match "system_ext/lib64/") ) local SE_MULTILIBS=( $(comm -12 <(printf '%s\n' "${T_SE_LIB32[@]}") <(printf '%s\n' "${T_SE_LIB64[@]}")) ) local SE_LIB32=( $(comm -23 <(printf '%s\n' "${T_SE_LIB32[@]}") <(printf '%s\n' "${SE_MULTILIBS[@]}")) ) local SE_LIB64=( $(comm -23 <(printf '%s\n' "${T_SE_LIB64[@]}") <(printf '%s\n' "${SE_MULTILIBS[@]}")) ) if [ "${#SE_MULTILIBS[@]}" -gt "0" ]; then write_blueprint_packages "SHARED_LIBRARIES" "system_ext" "both" "SE_MULTILIBS" >> "$ANDROIDBP" fi if [ "${#SE_LIB32[@]}" -gt "0" ]; then write_blueprint_packages "SHARED_LIBRARIES" "system_ext" "32" "SE_LIB32" >> "$ANDROIDBP" fi if [ "${#SE_LIB64[@]}" -gt "0" ]; then write_blueprint_packages "SHARED_LIBRARIES" "system_ext" "64" "SE_LIB64" >> "$ANDROIDBP" fi local T_O_LIB32=( $(prefix_match "odm/lib/") ) local T_O_LIB64=( $(prefix_match "odm/lib64/") ) local O_MULTILIBS=( $(comm -12 <(printf '%s\n' "${T_O_LIB32[@]}") <(printf '%s\n' "${T_O_LIB64[@]}")) ) Loading Loading @@ -759,6 +791,14 @@ function write_product_packages() { if [ "${#P_PRIV_APPS[@]}" -gt "0" ]; then write_blueprint_packages "APPS" "product" "priv-app" "P_PRIV_APPS" >> "$ANDROIDBP" fi local SE_APPS=( $(prefix_match "system_ext/app/") ) if [ "${#SE_APPS[@]}" -gt "0" ]; then write_blueprint_packages "APPS" "system_ext" "" "SE_APPS" >> "$ANDROIDBP" fi local SE_PRIV_APPS=( $(prefix_match "system_ext/priv-app/") ) if [ "${#SE_PRIV_APPS[@]}" -gt "0" ]; then write_blueprint_packages "APPS" "system_ext" "priv-app" "SE_PRIV_APPS" >> "$ANDROIDBP" fi local O_APPS=( $(prefix_match "odm/app/") ) if [ "${#O_APPS[@]}" -gt "0" ]; then write_blueprint_packages "APPS" "odm" "" "O_APPS" >> "$ANDROIDBP" Loading @@ -785,6 +825,10 @@ function write_product_packages() { if [ "${#P_FRAMEWORK[@]}" -gt "0" ]; then write_blueprint_packages "JAVA_LIBRARIES" "product" "" "P_FRAMEWORK" >> "$ANDROIDBP" fi local SE_FRAMEWORK=( $(prefix_match "system_ext/framework/") ) if [ "${#P_FRAMEWORK[@]}" -gt "0" ]; then write_blueprint_packages "JAVA_LIBRARIES" "system_ext" "" "SE_FRAMEWORK" >> "$ANDROIDBP" fi local O_FRAMEWORK=( $(prefix_match "odm/framework/") ) if [ "${#O_FRAMEWORK[@]}" -gt "0" ]; then write_blueprint_packages "JAVA_LIBRARIES" "odm" "" "O_FRAMEWORK" >> "$ANDROIDBP" Loading @@ -807,6 +851,10 @@ function write_product_packages() { if [ "${#P_ETC[@]}" -gt "0" ]; then write_blueprint_packages "ETC" "product" "" "P_ETC" >> "$ANDROIDBP" fi local SE_ETC=( $(prefix_match "system_ext/etc/") ) if [ "${#SE_ETC[@]}" -gt "0" ]; then write_blueprint_packages "ETC" "system_ext" "" "SE_ETC" >> "$ANDROIDBP" fi local O_ETC=( $(prefix_match "odm/etc/") ) if [ "${#O_ETC[@]}" -gt "0" ]; then write_blueprint_packages "ETC" "odm" "" "O_ETC" >> "$ANDROIDBP" Loading @@ -829,6 +877,10 @@ function write_product_packages() { if [ "${#P_BIN[@]}" -gt "0" ]; then write_blueprint_packages "EXECUTABLES" "product" "" "P_BIN" >> "$ANDROIDBP" fi local SE_BIN=( $(prefix_match "system_ext/bin/") ) if [ "${#SE_BIN[@]}" -gt "0" ]; then write_blueprint_packages "EXECUTABLES" "system_ext" "" "SE_BIN" >> "$ANDROIDBP" fi local O_BIN=( $(prefix_match "odm/bin/") ) if [ "${#O_BIN[@]}" -gt "0" ]; then write_blueprint_packages "EXECUTABLES" "odm" "" "O_BIN" >> "$ANDROIDBP" Loading Loading @@ -1481,7 +1533,7 @@ function extract() { exit 1 fi for PARTITION in "system" "odm" "product" "vendor" for PARTITION in "system" "odm" "product" "system_ext" "vendor" do # If OTA is block based, extract it. if [ -a "$DUMPDIR"/"$PARTITION".new.dat.br ]; then Loading Loading
build/tools/extract_utils.sh +55 −3 Original line number Diff line number Diff line Loading @@ -284,6 +284,14 @@ function write_product_copy_files() { local OUTTARGET=$(truncate_file $TARGET) printf ' %s/proprietary/%s:$(TARGET_COPY_OUT_PRODUCT)/%s%s\n' \ "$OUTDIR" "$TARGET" "$OUTTARGET" "$LINEEND" >> "$PRODUCTMK" elif prefix_match_file "system_ext/" $TARGET ; then local OUTTARGET=$(truncate_file $TARGET) printf ' %s/proprietary/%s:$(TARGET_COPY_OUT_SYSTEM_EXT)/%s%s\n' \ "$OUTDIR" "$TARGET" "$OUTTARGET" "$LINEEND" >> "$PRODUCTMK" elif prefix_match_file "system/system_ext/" $TARGET ; then local OUTTARGET=$(truncate_file $TARGET) printf ' %s/proprietary/%s:$(TARGET_COPY_OUT_SYSTEM_EXT)/%s%s\n' \ "$OUTDIR" "$TARGET" "$OUTTARGET" "$LINEEND" >> "$PRODUCTMK" elif prefix_match_file "odm/" $TARGET ; then local OUTTARGET=$(truncate_file $TARGET) printf ' %s/proprietary/%s:$(TARGET_COPY_OUT_ODM)/%s%s\n' \ Loading Loading @@ -320,7 +328,7 @@ function write_product_copy_files() { # write_blueprint_packages: # # $1: The LOCAL_MODULE_CLASS for the given module list # $2: /system, /odm, /product, or /vendor partition # $2: /system, /odm, /product, /system_ext, or /vendor partition # $3: type-specific extra flags # $4: Name of the array holding the target list # Loading Loading @@ -364,6 +372,8 @@ function write_blueprint_packages() { SRC+="/vendor" elif [ "$PARTITION" = "product" ]; then SRC+="/product" elif [ "$PARTITION" = "system_ext" ]; then SRC+="/system_ext" elif [ "$PARTITION" = "odm" ]; then SRC+="/odm" fi Loading Loading @@ -476,6 +486,8 @@ function write_blueprint_packages() { printf '\tsoc_specific: true,\n' elif [ "$PARTITION" = "product" ]; then printf '\tproduct_specific: true,\n' elif [ "$PARTITION" = "system_ext" ]; then printf '\tsystem_ext_specific: true,\n' elif [ "$PARTITION" = "odm" ]; then printf '\tdevice_specific: true,\n' fi Loading @@ -487,7 +499,7 @@ function write_blueprint_packages() { # write_makefile_packages: # # $1: The LOCAL_MODULE_CLASS for the given module list # $2: /odm, /product, or /vendor partition # $2: /odm, /product, /system_ext, or /vendor partition # $3: type-specific extra flags # $4: Name of the array holding the target list # Loading Loading @@ -537,6 +549,8 @@ function write_makefile_packages() { SRC+="/vendor" elif [ "$PARTITION" = "product" ]; then SRC+="/product" elif [ "$PARTITION" = "system_ext" ]; then SRC+="/system_ext" elif [ "$PARTITION" = "odm" ]; then SRC+="/odm" fi Loading Loading @@ -620,6 +634,8 @@ function write_makefile_packages() { printf 'LOCAL_VENDOR_MODULE := true\n' elif [ "$PARTITION" = "product" ]; then printf 'LOCAL_PRODUCT_MODULE := true\n' elif [ "$PARTITION" = "system_ext" ]; then printf 'LOCAL_SYSTEM_EXT_MODULE := true\n' elif [ "$PARTITION" = "odm" ]; then printf 'LOCAL_ODM_MODULE := true\n' fi Loading Loading @@ -710,6 +726,22 @@ function write_product_packages() { write_blueprint_packages "SHARED_LIBRARIES" "product" "64" "P_LIB64" >> "$ANDROIDBP" fi local T_SE_LIB32=( $(prefix_match "system_ext/lib/") ) local T_SE_LIB64=( $(prefix_match "system_ext/lib64/") ) local SE_MULTILIBS=( $(comm -12 <(printf '%s\n' "${T_SE_LIB32[@]}") <(printf '%s\n' "${T_SE_LIB64[@]}")) ) local SE_LIB32=( $(comm -23 <(printf '%s\n' "${T_SE_LIB32[@]}") <(printf '%s\n' "${SE_MULTILIBS[@]}")) ) local SE_LIB64=( $(comm -23 <(printf '%s\n' "${T_SE_LIB64[@]}") <(printf '%s\n' "${SE_MULTILIBS[@]}")) ) if [ "${#SE_MULTILIBS[@]}" -gt "0" ]; then write_blueprint_packages "SHARED_LIBRARIES" "system_ext" "both" "SE_MULTILIBS" >> "$ANDROIDBP" fi if [ "${#SE_LIB32[@]}" -gt "0" ]; then write_blueprint_packages "SHARED_LIBRARIES" "system_ext" "32" "SE_LIB32" >> "$ANDROIDBP" fi if [ "${#SE_LIB64[@]}" -gt "0" ]; then write_blueprint_packages "SHARED_LIBRARIES" "system_ext" "64" "SE_LIB64" >> "$ANDROIDBP" fi local T_O_LIB32=( $(prefix_match "odm/lib/") ) local T_O_LIB64=( $(prefix_match "odm/lib64/") ) local O_MULTILIBS=( $(comm -12 <(printf '%s\n' "${T_O_LIB32[@]}") <(printf '%s\n' "${T_O_LIB64[@]}")) ) Loading Loading @@ -759,6 +791,14 @@ function write_product_packages() { if [ "${#P_PRIV_APPS[@]}" -gt "0" ]; then write_blueprint_packages "APPS" "product" "priv-app" "P_PRIV_APPS" >> "$ANDROIDBP" fi local SE_APPS=( $(prefix_match "system_ext/app/") ) if [ "${#SE_APPS[@]}" -gt "0" ]; then write_blueprint_packages "APPS" "system_ext" "" "SE_APPS" >> "$ANDROIDBP" fi local SE_PRIV_APPS=( $(prefix_match "system_ext/priv-app/") ) if [ "${#SE_PRIV_APPS[@]}" -gt "0" ]; then write_blueprint_packages "APPS" "system_ext" "priv-app" "SE_PRIV_APPS" >> "$ANDROIDBP" fi local O_APPS=( $(prefix_match "odm/app/") ) if [ "${#O_APPS[@]}" -gt "0" ]; then write_blueprint_packages "APPS" "odm" "" "O_APPS" >> "$ANDROIDBP" Loading @@ -785,6 +825,10 @@ function write_product_packages() { if [ "${#P_FRAMEWORK[@]}" -gt "0" ]; then write_blueprint_packages "JAVA_LIBRARIES" "product" "" "P_FRAMEWORK" >> "$ANDROIDBP" fi local SE_FRAMEWORK=( $(prefix_match "system_ext/framework/") ) if [ "${#P_FRAMEWORK[@]}" -gt "0" ]; then write_blueprint_packages "JAVA_LIBRARIES" "system_ext" "" "SE_FRAMEWORK" >> "$ANDROIDBP" fi local O_FRAMEWORK=( $(prefix_match "odm/framework/") ) if [ "${#O_FRAMEWORK[@]}" -gt "0" ]; then write_blueprint_packages "JAVA_LIBRARIES" "odm" "" "O_FRAMEWORK" >> "$ANDROIDBP" Loading @@ -807,6 +851,10 @@ function write_product_packages() { if [ "${#P_ETC[@]}" -gt "0" ]; then write_blueprint_packages "ETC" "product" "" "P_ETC" >> "$ANDROIDBP" fi local SE_ETC=( $(prefix_match "system_ext/etc/") ) if [ "${#SE_ETC[@]}" -gt "0" ]; then write_blueprint_packages "ETC" "system_ext" "" "SE_ETC" >> "$ANDROIDBP" fi local O_ETC=( $(prefix_match "odm/etc/") ) if [ "${#O_ETC[@]}" -gt "0" ]; then write_blueprint_packages "ETC" "odm" "" "O_ETC" >> "$ANDROIDBP" Loading @@ -829,6 +877,10 @@ function write_product_packages() { if [ "${#P_BIN[@]}" -gt "0" ]; then write_blueprint_packages "EXECUTABLES" "product" "" "P_BIN" >> "$ANDROIDBP" fi local SE_BIN=( $(prefix_match "system_ext/bin/") ) if [ "${#SE_BIN[@]}" -gt "0" ]; then write_blueprint_packages "EXECUTABLES" "system_ext" "" "SE_BIN" >> "$ANDROIDBP" fi local O_BIN=( $(prefix_match "odm/bin/") ) if [ "${#O_BIN[@]}" -gt "0" ]; then write_blueprint_packages "EXECUTABLES" "odm" "" "O_BIN" >> "$ANDROIDBP" Loading Loading @@ -1481,7 +1533,7 @@ function extract() { exit 1 fi for PARTITION in "system" "odm" "product" "vendor" for PARTITION in "system" "odm" "product" "system_ext" "vendor" do # If OTA is block based, extract it. if [ -a "$DUMPDIR"/"$PARTITION".new.dat.br ]; then Loading