addonsu: Fix installation on TWRP A/B
* These checks need to be added back otherwise it fails to extract files due to 'Too many symbolic links encountered' errors. * Log: Installing su addon... Installing su addon...about to run program [/tmp/mount-system.sh] with 1 args Extracted file "/system/xbin/su" Extracted file "/system/addon.d/51-addonsu.sh" failed to create dir for /system/etc/init/superuser.rc script aborted: set_metadata: Error on lstat of "/system/etc/init/superuser.rc": Too many symbolic links encountered set_metadata: Error on lstat of "/system/etc/init/superuser.rc": Too many symbolic links encounterederror: 25 cause: 111 Updater process ended with ERROR: 7 Change-Id: Ibf5082756063f7e703cbc47cf9642677983874ac
This commit is contained in:
committed by
Rashed Abdel-Tawab
parent
611638e195
commit
fd798c5177
@@ -6,10 +6,17 @@ set_metadata("/tmp/mount-system.sh", "uid", 0, "gid", 0, "mode", 0755);
|
||||
set_metadata("/tmp/unmount-system.sh", "uid", 0, "gid", 0, "mode", 0755);
|
||||
run_program("/tmp/mount-system.sh") == 0 || abort("Could not mount /system");
|
||||
|
||||
delete("/system/addon.d/51-addonsu.sh");
|
||||
delete("/system/bin/su");
|
||||
delete("/system/etc/init/superuser.rc");
|
||||
delete("/system/xbin/su");
|
||||
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;
|
||||
|
||||
run_program("/tmp/unmount-system.sh") == 0 || ui_print("Could not unmount /system");
|
||||
ui_print("Done");
|
||||
|
Reference in New Issue
Block a user