From e671eb6c69f7364eb5de84fddd6e22e677dffd03 Mon Sep 17 00:00:00 2001 From: Yumi Yukimura Date: Wed, 9 Apr 2025 23:19:33 +0800 Subject: [PATCH] sm6150-common: Run `hvdcp_opti` in recovery mode * Enables charging in recovery mode (will be useful when the main OS is not downstream Android...) Change-Id: Ife2b7b82439ccedf2456080d8106966cdad7669f Signed-off-by: therealmharc --- proprietary-files.txt | 2 +- rootdir/etc/init.recovery.qcom.rc | 6 ++++++ sepolicy/vendor/vendor_hvdcp.te | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 sepolicy/vendor/vendor_hvdcp.te diff --git a/proprietary-files.txt b/proprietary-files.txt index 215f8e5..01830ce 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -52,7 +52,7 @@ vendor/lib64/vendor.qti.hardware.bluetooth_sar@1.0.so vendor/lib64/vendor.qti.hardware.bluetooth_sar@1.1.so # Charger -vendor/bin/hvdcp_opti +vendor/bin/hvdcp_opti;RECOVERY_AVAILABLE # Certificate Authority vendor/app/CACertService/CACertService.apk diff --git a/rootdir/etc/init.recovery.qcom.rc b/rootdir/etc/init.recovery.qcom.rc index 6ab9b32..8c0eb2c 100644 --- a/rootdir/etc/init.recovery.qcom.rc +++ b/rootdir/etc/init.recovery.qcom.rc @@ -1,3 +1,9 @@ +service hvdcp_opti /system/bin/hvdcp_opti + user root + group system wakelock + task_profiles ServiceCapacityLow + seclabel u:r:vendor_hvdcp:s0 + on fs wait /dev/block/platform/soc/${ro.boot.bootdevice} symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice diff --git a/sepolicy/vendor/vendor_hvdcp.te b/sepolicy/vendor/vendor_hvdcp.te new file mode 100644 index 0000000..f54b331 --- /dev/null +++ b/sepolicy/vendor/vendor_hvdcp.te @@ -0,0 +1,3 @@ +recovery_only(` + domain_trans(init, rootfs, vendor_hvdcp) +')