Skip to content

Commit

Permalink
Prevent stock OTA activities from running in CM
Browse files Browse the repository at this point in the history
Change-Id: I3f586cd246fc351afb82c94f41329bf930f6f41a
  • Loading branch information
rmcc committed Aug 28, 2013
1 parent 9ef85cb commit 194e515
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/common.mk
Expand Up @@ -108,6 +108,10 @@ PRODUCT_COPY_FILES += \
vendor/cm/prebuilt/common/bin/compcache:system/bin/compcache \ vendor/cm/prebuilt/common/bin/compcache:system/bin/compcache \
vendor/cm/prebuilt/common/bin/handle_compcache:system/bin/handle_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 # Terminal Emulator
PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \
vendor/cm/proprietary/Term.apk:system/app/Term.apk \ vendor/cm/proprietary/Term.apk:system/app/Term.apk \
Expand Down
9 changes: 9 additions & 0 deletions 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
9 changes: 9 additions & 0 deletions prebuilt/common/etc/init.local.rc
Expand Up @@ -48,3 +48,12 @@ service sysinit /system/bin/sysinit
user root user root
oneshot oneshot
disabled 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.