xref: /aosp_15_r20/system/sepolicy/private/charger.te (revision e4a36f4174b17bbab9dc043f4a65dc8d87377290)
1*e4a36f41SAndroid Build Coastguard Workertypeattribute charger coredomain;
2*e4a36f41SAndroid Build Coastguard Worker
3*e4a36f41SAndroid Build Coastguard Worker# The system charger is a client of HIDL health HAL.
4*e4a36f41SAndroid Build Coastguard Workerhal_client_domain(charger, hal_health)
5*e4a36f41SAndroid Build Coastguard Worker
6*e4a36f41SAndroid Build Coastguard Worker# charger needs to tell init to continue the boot
7*e4a36f41SAndroid Build Coastguard Worker# process when running in charger mode.
8*e4a36f41SAndroid Build Coastguard Worker# The system charger needs to be allowed to set these properties on legacy devices.
9*e4a36f41SAndroid Build Coastguard Workerset_prop(charger, system_prop)
10*e4a36f41SAndroid Build Coastguard Workerset_prop(charger, exported_system_prop)
11*e4a36f41SAndroid Build Coastguard Workerset_prop(charger, exported3_system_prop)
12*e4a36f41SAndroid Build Coastguard Worker
13*e4a36f41SAndroid Build Coastguard Worker# The system charger can read ro.charger.*
14*e4a36f41SAndroid Build Coastguard Workerget_prop(charger, charger_prop)
15*e4a36f41SAndroid Build Coastguard Worker
16*e4a36f41SAndroid Build Coastguard Workercompatible_property_only(`
17*e4a36f41SAndroid Build Coastguard Worker    neverallow {
18*e4a36f41SAndroid Build Coastguard Worker        domain
19*e4a36f41SAndroid Build Coastguard Worker        -init
20*e4a36f41SAndroid Build Coastguard Worker        -dumpstate
21*e4a36f41SAndroid Build Coastguard Worker        -charger
22*e4a36f41SAndroid Build Coastguard Worker    } charger_prop:file no_rw_file_perms;
23*e4a36f41SAndroid Build Coastguard Worker')
24