summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRicardo Cerqueira <cyanogenmod@cerqueira.org>2013-08-27 22:15:26 +0100
committerRicardo Cerqueira <cyanogenmod@cerqueira.org>2013-08-28 16:12:30 +0100
commita0919a9671ab1e48c60da1ce23ddcfd7cc583722 (patch)
treeb116368c0dc09c3be322fd5f147bf846425d9fa1
parent754bef5027332736d8fdbe451201c3d9396b7c56 (diff)
downloadvendor_replicant-a0919a9671ab1e48c60da1ce23ddcfd7cc583722.zip
vendor_replicant-a0919a9671ab1e48c60da1ce23ddcfd7cc583722.tar.gz
vendor_replicant-a0919a9671ab1e48c60da1ce23ddcfd7cc583722.tar.bz2
Prevent stock OTA activities from running in CM
Change-Id: I3f586cd246fc351afb82c94f41329bf930f6f41a
-rw-r--r--config/common.mk4
-rw-r--r--prebuilt/common/bin/otablock9
-rw-r--r--prebuilt/common/etc/init.local.rc9
3 files changed, 22 insertions, 0 deletions
diff --git a/config/common.mk b/config/common.mk
index 06b0912..a385b4f 100644
--- a/config/common.mk
+++ b/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 \
diff --git a/prebuilt/common/bin/otablock b/prebuilt/common/bin/otablock
new file mode 100644
index 0000000..b1a93f2
--- /dev/null
+++ b/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
diff --git a/prebuilt/common/etc/init.local.rc b/prebuilt/common/etc/init.local.rc
index d62c1c2..5e34187 100644
--- a/prebuilt/common/etc/init.local.rc
+++ b/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