[Galaxy Tab 2 7" Android Development] Tsjoklat:
I have uploaded some new versions of gapps packages with additional changes to the backup scripts. When directories that are not included in the original file structure of the ROM are restored during a dirty flash of a ROM update, they are given full read/write permissions (777). The restored direcories should be only writable with root access (755). Here are the changes from the last versions:

KitKat changelog:

diff -ru gapps-kk-20140620-2-signed/system/addon.d/70-gapps.sh gapps-kk-20140620-3-signed/system/addon.d/70-gapps.sh
--- gapps-kk-20140620-2-signed/system/addon.d/70-gapps.sh	2014-07-10 12:27:50.000000000 +0200
+++ gapps-kk-20140620-3-signed/system/addon.d/70-gapps.sh	2015-01-11 00:42:06.000000000 +0100
@@ -117,6 +117,7 @@
;;
post-restore)
chmod 755 /system/etc/preferred-apps
+ chmod 755 /system/usr/srec
chmod 755 /system/usr/srec/en-US
;;
esac

Lollipop changelog:

diff -ru gapps-lp-20150107-1-minimal-signed/optional/face/addon.d/71-gapps-faceunlock.sh gapps-lp-20150110-1-minimal-signed/optional/face/addon.d/71-gapps-faceunlock.sh
--- gapps-lp-20150107-1-minimal-signed/optional/face/addon.d/71-gapps-faceunlock.sh	2015-01-07 23:13:52.000000000 +0100
+++ gapps-lp-20150110-1-minimal-signed/optional/face/addon.d/71-gapps-faceunlock.sh	2015-01-11 00:17:48.000000000 +0100
@@ -49,6 +49,9 @@
# Stub
;;
post-restore)
+ chmod 755 /system/app/FaceLock
+ chmod 755 /system/app/FaceLock/lib
+ chmod 755 /system/app/FaceLock/lib/arm
chmod -R 755 /system/vendor/pittpatt
chmod 644 /system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.8/*.bin
chmod 644 /system/vendor/pittpatt/models/detection/yaw_roll_face_detectors.7.1/*.bin
diff -ru gapps-lp-20150107-1-minimal-signed/system/addon.d/70-gapps.sh gapps-lp-20150110-1-minimal-signed/system/addon.d/70-gapps.sh
--- gapps-lp-20150107-1-minimal-signed/system/addon.d/70-gapps.sh	2015-01-07 23:13:18.000000000 +0100
+++ gapps-lp-20150110-1-minimal-signed/system/addon.d/70-gapps.sh	2015-01-11 00:17:12.000000000 +0100
@@ -99,7 +99,21 @@
rm -rf /system/app/PartnerBookmarksProvider
rm -rf /system/app/Provision
rm -rf /system/app/QuickSearchBox
+ chmod 755 /system/app/GoogleCalendarSyncAdapter
+ chmod 755 /system/app/GoogleContactsSyncAdapter
chmod 755 /system/etc/preferred-apps
+ chmod 755 /system/priv-app/GoogleBackupTransport
+ chmod 755 /system/priv-app/GoogleFeedback
+ chmod 755 /system/priv-app/GoogleLoginService
+ chmod 755 /system/priv-app/GoogleOneTimeInitializer
+ chmod 755 /system/priv-app/GooglePartnerSetup
+ chmod 755 /system/priv-app/GoogleServicesFramework
+ chmod 755 /system/priv-app/Phonesky
+ chmod 755 /system/priv-app/PrebuiltGmsCore
+ chmod 755 /system/priv-app/PrebuiltGmsCore/lib
+ chmod 755 /system/priv-app/PrebuiltGmsCore/lib/arm
+ chmod 755 /system/priv-app/SetupWizard
+ chmod 755 /system/usr/srec
chmod 755 /system/usr/srec/en-US
;;
esac

diff -ru gapps-lp-20150107-1-signed/optional/face/addon.d/71-gapps-faceunlock.sh gapps-lp-20150110-1-signed/optional/face/addon.d/71-gapps-faceunlock.sh
--- gapps-lp-20150107-1-signed/optional/face/addon.d/71-gapps-faceunlock.sh	2015-01-07 23:08:12.000000000 +0100
+++ gapps-lp-20150110-1-signed/optional/face/addon.d/71-gapps-faceunlock.sh	2015-01-11 00:16:16.000000000 +0100
@@ -49,6 +49,9 @@
# Stub
;;
post-restore)
+ chmod 755 /system/app/FaceLock
+ chmod 755 /system/app/FaceLock/lib
+ chmod 755 /system/app/FaceLock/lib/arm
chmod -R 755 /system/vendor/pittpatt
chmod 644 /system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.8/*.bin
chmod 644 /system/vendor/pittpatt/models/detection/yaw_roll_face_detectors.7.1/*.bin
diff -ru gapps-lp-20150107-1-signed/system/addon.d/70-gapps.sh gapps-lp-20150110-1-signed/system/addon.d/70-gapps.sh
--- gapps-lp-20150107-1-signed/system/addon.d/70-gapps.sh	2015-01-07 23:08:16.000000000 +0100
+++ gapps-lp-20150110-1-signed/system/addon.d/70-gapps.sh	2015-01-11 00:16:20.000000000 +0100
@@ -111,7 +111,32 @@
rm -rf /system/app/PartnerBookmarksProvider
rm -rf /system/app/Provision
rm -rf /system/app/QuickSearchBox
+ chmod 755 /system/app/CloudPrint2
+ chmod 755 /system/app/GenieWidget2
+ chmod 755 /system/app/GoogleCalendarSyncAdapter
+ chmod 755 /system/app/GoogleContactsSyncAdapter
+ chmod 755 /system/app/GoogleTTS
+ chmod 755 /system/app/GoogleTTS/lib
+ chmod 755 /system/app/GoogleTTS/lib/arm
+ chmod 755 /system/app/Hangouts
+ chmod 755 /system/app/PrebuiltGmail
chmod 755 /system/etc/preferred-apps
+ chmod 755 /system/priv-app/GoogleBackupTransport
+ chmod 755 /system/priv-app/GoogleFeedback
+ chmod 755 /system/priv-app/GoogleLoginService
+ chmod 755 /system/priv-app/GoogleOneTimeInitializer
+ chmod 755 /system/priv-app/GooglePartnerSetup
+ chmod 755 /system/priv-app/GoogleServicesFramework
+ chmod 755 /system/priv-app/Phonesky
+ chmod 755 /system/priv-app/PrebuiltGmsCore
+ chmod 755 /system/priv-app/PrebuiltGmsCore/lib
+ chmod 755 /system/priv-app/PrebuiltGmsCore/lib/arm
+ chmod 755 /system/priv-app/SetupWizard
+ chmod 755 /system/priv-app/Talkback
+ chmod 755 /system/priv-app/Velvet
+ chmod 755 /system/priv-app/Velvet/lib
+ chmod 755 /system/priv-app/Velvet/lib/arm
+ chmod 755 /system/usr/srec
chmod 755 /system/usr/srec/en-US
;;
esac

diff -ru gapps-lp-google-calendar-20150105-1-signed/system/addon.d/72-gapps-calendar.sh gapps-lp-google-calendar-20150110-1-signed/system/addon.d/72-gapps-calendar.sh
--- gapps-lp-google-calendar-20150105-1-signed/system/addon.d/72-gapps-calendar.sh	2015-01-06 03:32:10.000000000 +0100
+++ gapps-lp-google-calendar-20150110-1-signed/system/addon.d/72-gapps-calendar.sh	2015-01-10 23:32:00.000000000 +0100
@@ -35,5 +35,6 @@
;;
post-restore)
rm -rf /system/app/Calendar
+ chmod 755 /system/app/CalendarGooglePrebuilt
;;
esac

diff -ru gapps-lp-google-exchange-20150107-1-signed/system/addon.d/73-gapps-exchange.sh gapps-lp-google-exchange-20150110-1-signed/system/addon.d/73-gapps-exchange.sh
--- gapps-lp-google-exchange-20150107-1-signed/system/addon.d/73-gapps-exchange.sh	2015-01-07 23:31:42.000000000 +0100
+++ gapps-lp-google-exchange-20150110-1-signed/system/addon.d/73-gapps-exchange.sh	2015-01-10 23:32:04.000000000 +0100
@@ -34,5 +34,6 @@
;;
post-restore)
rm -rf /system/app/Exchange2
+ chmod 755 /system/app/PrebuiltExchange3Google
;;
esac

diff -ru gapps-lp-google-keyboard-20150107-1-signed/system/addon.d/74-gapps-keyboard.sh gapps-lp-google-keyboard-20150110-1-signed/system/addon.d/74-gapps-keyboard.sh
--- gapps-lp-google-keyboard-20150107-1-signed/system/addon.d/74-gapps-keyboard.sh	2015-01-08 01:12:12.000000000 +0100
+++ gapps-lp-google-keyboard-20150110-1-signed/system/addon.d/74-gapps-keyboard.sh	2015-01-10 23:32:16.000000000 +0100
@@ -35,5 +35,6 @@
;;
post-restore)
rm -rf /system/app/LatinIME
+ chmod 755 /system/app/LatinIMEGoogle
;;
esac

Latest standard gapps package for 4.4.4: gapps-kk-20140620-3-signed.zip

Latest minimal gapps package for 4.4.4: gapps-kk-20140620-3-minimal-signed.zip

Latest minimal gapps package for 5.0.x: gapps-lp-20150110-1-minimal-signed.zip

Latest standard gapps package for 5.0.x: gapps-lp-20150110-1-signed.zip

Google Calendar addon package for 5.0.x: gapps-lp-google-calendar-20150110-1-signed.zip

Google Exchange addon package for 5.0.x: gapps-lp-google-exchange-20150110-1-signed.zip

Google Keyboard addon package for 5.0.x: gapps-lp-google-keyboard-20150110-1-signed.zip