diff options
author | Bill Yi <byi@google.com> | 2019-02-06 12:10:57 -0800 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-02-06 12:10:57 -0800 |
commit | 741eabda9801a37364f6c59a5b3439b651d8ec43 (patch) | |
tree | 7e5fa7ca17a5d8096e77c47b18a56938f21c7006 | |
parent | 54ec5949d61be37c9bd7c116eb3a84e61ecbfe5b (diff) | |
parent | 905dd3d103a2c024b87d8234bf449bdb0a0624a9 (diff) | |
download | device_common-741eabda9801a37364f6c59a5b3439b651d8ec43.tar.gz device_common-741eabda9801a37364f6c59a5b3439b651d8ec43.tar.bz2 device_common-741eabda9801a37364f6c59a5b3439b651d8ec43.zip |
Refactor the logic for vendor blobs APKs
am: 905dd3d103
Change-Id: Id8fb1a5d3d53ab33d410ee67acdadccddb50e919
-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 |