sm7250-common: Add support for smart charging and battery health
Signed-off-by: Sandeep-FED <sandymankara11@gmail.com>
This commit is contained in:
4
sepolicy/vendor/init.te
vendored
4
sepolicy/vendor/init.te
vendored
@@ -4,3 +4,7 @@ allow init platform_app:binder call;
|
||||
|
||||
allow init per_boot_file:file ioctl;
|
||||
allowxperm init per_boot_file:file ioctl { F2FS_IOC_SET_PIN_FILE };
|
||||
|
||||
# Allow init to wrtie to sysfs_battery_supply
|
||||
allow init sysfs_battery_supply:file { setattr };
|
||||
|
||||
|
||||
7
sepolicy/vendor/system_app.te
vendored
7
sepolicy/vendor/system_app.te
vendored
@@ -2,6 +2,7 @@ allow system_app sysfs_zram:dir search;
|
||||
allow system_app proc_pagetypeinfo:file read;
|
||||
allow system_app sysfs_dm:file rw_file_perms;
|
||||
allow system_app sysfs_vibrator:file rw_file_perms;
|
||||
|
||||
allow system_app sysfs_vibrator:dir r_dir_perms;
|
||||
allow system_app sysfs_leds:dir search;
|
||||
|
||||
@@ -9,3 +10,9 @@ allow system_app proc_pagetypeinfo:file r_file_perms;
|
||||
|
||||
allow system_app sysfs_zram:dir search;
|
||||
allow system_app sysfs_zram:file r_file_perms;
|
||||
|
||||
allow system_app sysfs:file { getattr };
|
||||
|
||||
allow system_app vendor_sysfs_battery_supply:dir search;
|
||||
allow system_app vendor_sysfs_battery_supply:file r_file_perms;
|
||||
|
||||
|
||||
3
sepolicy/vendor/system_server.te
vendored
3
sepolicy/vendor/system_server.te
vendored
@@ -1,2 +1,5 @@
|
||||
# Allow system_server to read Fast Charging status
|
||||
allow system_server vendor_sysfs_battery_supply:file { getattr open read };
|
||||
|
||||
#Smart charging
|
||||
allow system_server sysfs_battery_supply:file { getattr open read write };
|
||||
|
||||
Reference in New Issue
Block a user