diff options
author | Bill Yi <byi@google.com> | 2019-02-04 16:33:32 -0800 |
---|---|---|
committer | Bill Yi <byi@google.com> | 2019-02-04 16:33:32 -0800 |
commit | 905dd3d103a2c024b87d8234bf449bdb0a0624a9 (patch) | |
tree | 6e0a392edaa7f1acacb1fa7fb1495de9b1027f8d | |
parent | 0b45b1e7620678c01db2cc09f58b7944d4eb4aac (diff) | |
download | device_common-905dd3d103a2c024b87d8234bf449bdb0a0624a9.tar.gz device_common-905dd3d103a2c024b87d8234bf449bdb0a0624a9.tar.bz2 device_common-905dd3d103a2c024b87d8234bf449bdb0a0624a9.zip |
Refactor the logic for vendor blobs APKsandroid-9.0.0_r47android-9.0.0_r45android-9.0.0_r42pie-qpr3-b-release
The APKs makefiles are more complex now than then. We will add
the makefiles in the device self-extract directory.
Just copy over to the same directoy as of the APK file
BUG:117168130
Change-Id: Ie8daa054d683cd42f0f8761c87048f27a088a7e6
-rwxr-xr-x | generate-packages.sh | 51 |
1 files changed, 13 insertions, 38 deletions
diff --git a/generate-packages.sh b/generate-packages.sh index 1eb1677..288880f 100755 --- a/generate-packages.sh +++ b/generate-packages.sh @@ -55,14 +55,6 @@ do TO_EXTRACT=`sed -n -e '/'" $COMPANY"'/,/;;/ p' $EXTRACT_LIST_FILENAME | tail -n+3 | head -n-2 | sed -e 's/\\\//g'` - # Check if TO_EXTRACT list has any APK files - if [[ ${TO_EXTRACT} == *.apk* ]] - then - APK_MAKEFILE=${FILEDIR}/Android.mk - echo "LOCAL_PATH := \$(call my-dir)" > ${APK_MAKEFILE} - echo "" >> ${APK_MAKEFILE} - fi - echo \ \ Extracting files from OTA package for ONE_FILE in $TO_EXTRACT do @@ -84,36 +76,6 @@ do FILEDIR_NEW=$FILEDIR fi - # apk makefile - if [[ ${ONE_FILE} == *.apk ]] - then - TMP_ONE_FILE_NAME=$(basename ${ONE_FILE} | sed 's/.apk//g') - - echo "include \$(CLEAR_VARS)" >> ${APK_MAKEFILE} - - echo "LOCAL_MODULE_SUFFIX := \$(COMMON_ANDROID_PACKAGE_SUFFIX)" >> ${APK_MAKEFILE} - echo "LOCAL_MODULE := ${TMP_ONE_FILE_NAME}" >> ${APK_MAKEFILE} - echo "LOCAL_MODULE_TAGS := optional" >> ${APK_MAKEFILE} - echo "LOCAL_BUILT_MODULE_STEM := package.apk" >> ${APK_MAKEFILE} - echo "LOCAL_MODULE_OWNER := ${COMPANY}" >> ${APK_MAKEFILE} - echo "LOCAL_MODULE_CLASS := APPS" >> ${APK_MAKEFILE} - echo "LOCAL_SRC_FILES := \$(LOCAL_MODULE).apk" >> ${APK_MAKEFILE} - echo "LOCAL_CERTIFICATE := PRESIGNED" >> ${APK_MAKEFILE} - - if [[ ${ONE_FILE} == *priv-app/* ]] - then - echo "LOCAL_PRIVILEGED_MODULE := true" >> ${APK_MAKEFILE} - fi - - if [[ ${TMP_ONE_FILE_NAME} == "LeanbackLauncher" ]] - then - echo "LOCAL_OVERRIDES_PACKAGES := Launcher2" >> ${APK_MAKEFILE} - fi - - echo "include \$(BUILD_PREBUILT)" >> ${APK_MAKEFILE} - echo "" >> ${APK_MAKEFILE} - fi - echo \ \ \ \ Extracting $ONE_FILE unzip -j -o $ZIP $ONE_FILE -d $FILEDIR_NEW> /dev/null || echo \ \ \ \ Error extracting $ONE_FILE if test ${ONE_FILE,,} = system/vendor/bin/gpsd -o ${ONE_FILE,,} = system/vendor/bin/pvrsrvinit -o ${ONE_FILE,,} = system/bin/fRom @@ -191,6 +153,19 @@ do mv ${FILEDIR_ROOT}/proprietary/device-vendor.mk ${FILEDIR_ROOT_SHARE} fi + if [[ ${COMPANY} == qcom ]] + then + case ${ROOTDEVICE} in + marlin|sailfish|taimen|walleye|crosshatch|blueline|bonito|sargo) + if [[ -e "${MAKEFILEDIR}/Android.mk" ]] + then + mv ${MAKEFILEDIR}/Android.mk ${FILEDIR}/ + fi + ;; + *) ;; + esac + fi + echo \ \ Generating self-extracting script SCRIPT=extract-$COMPANY-$DEVICE.sh cat PROLOGUE > tmp/$SCRIPT || echo \ \ \ \ Error generating script |