Android - Integrating Gapps

Tags: 

I've integrated Google Apps so that I don't have to flash multiple zips. Although these apps contain Google's proprietary code and can't be distributed by CyanogenMod, since these ROMs are only for me there's no problem!

After extracting the Gapps package, there is one file to edit in order to include them in the build: vendor/cm/config/common.mk. E.g.:

  PRODUCT_COPY_FILES += \
      pathToGapps/addon.d/50-cm.sh:system/addon.d/50-cm.sh \
      pathToGapps/app/GenieWidget.apk:system/app/GenieWidget.apk \
      pathToGapps/app/Gmail2.apk:system/app/Gmail2.apk \
      pathToGapps/app/GmsCore.apk:system/app/GmsCore.apk

Installing the Gapps package also deletes some files, and replaces others, so these have to be removed from the respective make files (those in build/target/product/ with the attached patches.