Browse files

Prevent stock OTA activities from running in CM

Change-Id: I3f586cd246fc351afb82c94f41329bf930f6f41a
  • Loading branch information...
1 parent 9ef85cb commit 194e515ddb2bf907b6392dc1ee06bdda76602d45 @rmcc rmcc committed Aug 27, 2013
Showing with 22 additions and 0 deletions.
  1. +4 −0 config/common.mk
  2. +9 −0 prebuilt/common/bin/otablock
  3. +9 −0 prebuilt/common/etc/init.local.rc
View
4 config/common.mk
@@ -108,6 +108,10 @@ PRODUCT_COPY_FILES += \
vendor/cm/prebuilt/common/bin/compcache:system/bin/compcache \
vendor/cm/prebuilt/common/bin/handle_compcache:system/bin/handle_compcache
+# block stock OTAs
+PRODUCT_COPY_FILES += \
+ vendor/cm/prebuilt/common/bin/otablock:system/bin/otablock
+
# Terminal Emulator
PRODUCT_COPY_FILES += \
vendor/cm/proprietary/Term.apk:system/app/Term.apk \
View
9 prebuilt/common/bin/otablock
@@ -0,0 +1,9 @@
+#!/system/bin/sh
+
+
+## If these activities are installed, get rid of them. We don't want updates
+## coming in from outside CM
+
+exec 2>/dev/null
+pm disable com.google.android.gsf/com.google.android.gsf.update.SystemUpdateActivity
+pm disable com.google.android.gsf/com.google.android.gsf.update.SystemUpdateService
View
9 prebuilt/common/etc/init.local.rc
@@ -48,3 +48,12 @@ service sysinit /system/bin/sysinit
user root
oneshot
disabled
+
+# Block stock OTA activities
+service otablock /system/bin/otablock
+ user root
+ oneshot
+ disabled
+
+on property:dev.bootcomplete=1
+ start otablock

0 comments on commit 194e515

Please sign in to comment.