diff options
Diffstat (limited to 'addonsu/updater-script-remove')
-rw-r--r-- | addonsu/updater-script-remove | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/addonsu/updater-script-remove b/addonsu/updater-script-remove new file mode 100644 index 0000000..dab1df9 --- /dev/null +++ b/addonsu/updater-script-remove @@ -0,0 +1,19 @@ +ui_print("Removing su addon..."); +ifelse(is_mounted("/system"), unmount("/system")); +package_extract_file("mount-system.sh", "/tmp/mount-system.sh"); +set_metadata("/tmp/mount-system.sh", "uid", 0, "gid", 0, "mode", 0755); +run_program("/tmp/mount-system.sh") == 0 || abort("Could not mount /system"); + +if getprop("ro.build.system_root_image") != "true" then + delete("/system/addon.d/51-addonsu.sh"); + delete("/system/bin/su"); + delete("/system/xbin/su"); +else + delete("/system/system/addon.d/51-addonsu.sh"); + delete("/system/system/bin/su"); + delete("/system/system/xbin/su"); +endif; + +unmount("/system"); +ui_print("Done"); +set_progress(1.000000); |