5b33c6c1d5
Run 'make addonsu' to make a flashable zip to install the addon and 'make addonsu-remove' for a flashable zip that removes it. Change-Id: I5b2fe67f98f2474b923c074dc6025b47c6db2ae0
21 lines
746 B
Text
21 lines
746 B
Text
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/etc/init/superuser.rc");
|
|
delete("/system/xbin/su");
|
|
else
|
|
delete("/system/system/addon.d/51-addonsu.sh");
|
|
delete("/system/system/bin/su");
|
|
delete("/system/system/etc/init/superuser.rc");
|
|
delete("/system/system/xbin/su");
|
|
endif;
|
|
|
|
unmount("/system");
|
|
ui_print("Done");
|
|
set_progress(1.000000);
|