diff options
author | Bill Yi <byi@google.com> | 2014-09-09 17:59:54 -0700 |
---|---|---|
committer | Bill Yi <byi@google.com> | 2014-09-09 18:16:50 -0700 |
commit | b143878e855aff96d089c26e99f02879062bdc1b (patch) | |
tree | cd613318a1d97f5bdf3e8c5a9daf9dec36afb3a9 /generate-packages.sh | |
parent | 158db857476959fd095b9d6ca1c322b739050c79 (diff) | |
download | device_common-b143878e855aff96d089c26e99f02879062bdc1b.tar.gz device_common-b143878e855aff96d089c26e99f02879062bdc1b.tar.bz2 device_common-b143878e855aff96d089c26e99f02879062bdc1b.zip |
Generate a makefile for apk listandroid-wear-5.0.0_r1android-cts-5.0_r9android-cts-5.0_r8android-cts-5.0_r7android-cts-5.0_r6android-cts-5.0_r5android-cts-5.0_r4android-cts-5.0_r3android-5.0.2_r3android-5.0.2_r1android-5.0.1_r1android-5.0.0_r7android-5.0.0_r6android-5.0.0_r5.1android-5.0.0_r5android-5.0.0_r4android-5.0.0_r3android-5.0.0_r2android-5.0.0_r1lollipop-wear-releaselollipop-releaselollipop-devlollipop-cts-release
BUG: 17445025
We don't rely on PRODUCT_COPY_FILES for prebuilt apk.
Change-Id: Idf3fc90dd71dd5a3d2a84d7faf0a7e780f251b03
Diffstat (limited to 'generate-packages.sh')
-rwxr-xr-x | generate-packages.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/generate-packages.sh b/generate-packages.sh index 070dfd0..4857dea 100755 --- a/generate-packages.sh +++ b/generate-packages.sh @@ -43,6 +43,14 @@ 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 @@ -58,6 +66,25 @@ 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} + 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 |