sm8250-common: overlay: Define OEM fast charge sysfs node

* required for oem fast charger detection
* this forces android to display 'charging rapidly' whenever our proprietary 33w charger is connected, based on the value of this node (0/1)
This commit is contained in:
adithya2306
2025-11-27 09:50:34 +00:00
committed by TechPanelGM
parent 3489a00e51
commit 47684a50c8
3 changed files with 13 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
SPDX-FileCopyrightText: The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<resources>
<!-- Path to fast charging status file to detect whether an oem fast charger is active -->
<string name="config_oemFastChargerStatusPath" translatable="false">/sys/class/power_supply/bms/fastcharge_mode</string>
</resources>

1
sepolicy/vendor/system_app.te vendored Normal file
View File

@@ -0,0 +1 @@
r_dir_file(system_app, vendor_sysfs_battery_supply)

3
sepolicy/vendor/system_server.te vendored Normal file
View File

@@ -0,0 +1,3 @@
# Allow system_server to read Fast Charging status
allow system_server vendor_sysfs_battery_supply:file { getattr open read };
allow system_server vendor_sysfs_battery_supply:file rw_file_perms;