From 8fe11de5452db8ccf387f83be062e60082cebf7c Mon Sep 17 00:00:00 2001 From: Jackeagle Date: Tue, 4 Apr 2023 07:21:52 -0400 Subject: [PATCH] GS290: Allow preloader to flash to block symlink only Co-authored-by: SahilSonar Signed-off-by: Jackeagle --- releasetools.py | 2 +- sepolicy/vendor/init.te | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/releasetools.py b/releasetools.py index 0b5b41e..2504dbd 100644 --- a/releasetools.py +++ b/releasetools.py @@ -55,4 +55,4 @@ def OTA_InstallEnd(info, incremental): AddFirmware(info, "sspm.img", "/dev/block/by-name/sspm_1", "/dev/block/by-name/sspm_2", incremental) AddFirmware(info, "trustzone1.bin", "/dev/block/by-name/tee1", False, incremental) AddFirmware(info, "trustzone2.bin", "/dev/block/by-name/tee2", False, incremental) - AddFirmware(info, "preloader.img", "/dev/block/mmcblk0boot0", "/dev/block/mmcblk0boot1", incremental) + AddFirmware(info, "preloader.img", "/dev/block/platform/bootdevice/by-name/preloader_a", "/dev/block/platform/bootdevice/by-name/preloader_b", incremental) diff --git a/sepolicy/vendor/init.te b/sepolicy/vendor/init.te index 8bff3c1..1dc18fe 100644 --- a/sepolicy/vendor/init.te +++ b/sepolicy/vendor/init.te @@ -3,3 +3,7 @@ allow init hwservicemanager:binder call; allow init self:netlink_kobject_uevent_socket read; allow init sysfs_wake_lock:file r_file_perms; allow init vendor_data_file:file w_file_perms; +# Allow recovery to write to preloader +recovery_only(` + allow init sysfs_devices_block:file w_file_perms; +') -- GitLab