mirror of
https://github.com/chararomandroid/android_device_samsung_a20
synced 2026-08-22 04:05:31 -04:00
universal7885: parts: hidl: Move to /system
* Sepolicy issues, need to be in /system to write data to files. While we're on it, move fm radio hal too
This commit is contained in:
parent
88d149ae33
commit
af754b5f92
22 changed files with 50 additions and 54 deletions
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
cc_binary {
|
||||
name: "vendor.eureka.hardware.fmradio@1.2-service",
|
||||
proprietary: true,
|
||||
srcs: [
|
||||
"FMRadio.cpp",
|
||||
"service.cpp",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
service vendor.fm-hal /vendor/bin/vendor.eureka.hardware.fmradio@1.2-service
|
||||
service fm-hal /system/bin/vendor.eureka.hardware.fmradio@1.2-service
|
||||
interface vendor.eureka.hardware.fmradio@1.0::IFMRadio default
|
||||
interface vendor.eureka.hardware.fmradio@1.1::IFMRadio default
|
||||
interface vendor.eureka.hardware.fmradio@1.2::IFMRadio default
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<manifest version="1.0" type="device">
|
||||
<hal format="hidl">
|
||||
<manifest version="1.0" type="framework">
|
||||
<hal>
|
||||
<name>vendor.eureka.hardware.fmradio</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>1.2</version>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
cc_binary {
|
||||
name: "vendor.eureka.hardware.parts@1.0-service",
|
||||
proprietary: true,
|
||||
srcs: [
|
||||
"Battery.cpp",
|
||||
"FlashLight.cpp",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
service vendor.parts-hal /vendor/bin/vendor.eureka.hardware.parts@1.0-service
|
||||
service parts-hal /system/bin/vendor.eureka.hardware.parts@1.0-service
|
||||
interface vendor.eureka.hardware.parts@1.0::IBatteryStats default
|
||||
interface vendor.eureka.hardware.parts@1.0::IDisplayConfigs default
|
||||
interface vendor.eureka.hardware.parts@1.0::IFlashBrightness default
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<manifest version="1.0" type="device">
|
||||
<hal format="hidl">
|
||||
<manifest version="1.0" type="framework">
|
||||
<hal>
|
||||
<name>vendor.eureka.hardware.parts</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>1.0</version>
|
||||
|
|
|
|||
2
universal7885-common/sepolicy/private/device.te
Normal file
2
universal7885-common/sepolicy/private/device.te
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
# FM Radio
|
||||
type fm_radio_device, dev_type;
|
||||
1
universal7885-common/sepolicy/private/file.te
Normal file
1
universal7885-common/sepolicy/private/file.te
Normal file
|
|
@ -0,0 +1 @@
|
|||
type sysfs_fmradio_tune, sysfs_type, rw_fs_type, fs_type;
|
||||
|
|
@ -2,7 +2,15 @@
|
|||
|
||||
### DATA
|
||||
/data/zram(/.*)? u:object_r:zram_data_file:s0
|
||||
/data/swap(/.*)? u:object_r:parts_data_file:s0
|
||||
|
||||
# Eureka Bootlogger
|
||||
/system/bin/eklogger u:object_r:eklogger_exec:s0
|
||||
/data/debug(/.*)? u:object_r:eklogger_data_file:s0
|
||||
|
||||
# SamsungParts
|
||||
/(vendor|system/vendor)/bin/vendor\.eureka\.hardware\.parts@[0-9]\.[0-9]-service u:object_r:hal_parts_default_exec:s0
|
||||
# FMRadio
|
||||
/(vendor|system/vendor)/bin/vendor\.eureka\.hardware\.fmradio@[0-9]\.[0-9]-service u:object_r:hal_fmradio_default_exec:s0
|
||||
|
||||
/dev/radio0 u:object_r:fm_radio_device:s0
|
||||
2
universal7885-common/sepolicy/private/genfscon_contexts
Normal file
2
universal7885-common/sepolicy/private/genfscon_contexts
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
## FMRadio
|
||||
genfscon sysfs /devices/virtual/s610_radio/s610_radio/ u:object_r:sysfs_fmradio_tune:s0
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
type hal_fmradio_default, domain;
|
||||
type hal_fmradio_default_exec, exec_type, file_type, vendor_file_type;
|
||||
type hal_fmradio_default_exec, exec_type, file_type, system_file_type;
|
||||
add_hwservice(hal_fmradio_default, hal_fmradio_hwservice);
|
||||
init_daemon_domain(hal_fmradio_default);
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
type hal_parts_default, domain;
|
||||
type hal_parts_default_exec, exec_type, file_type, vendor_file_type;
|
||||
type hal_parts_default, domain, coredomain;
|
||||
type hal_parts_default_exec, exec_type, file_type, system_file_type;
|
||||
add_hwservice(hal_parts_default, hal_parts_hwservice);
|
||||
init_daemon_domain(hal_parts_default);
|
||||
|
||||
|
|
@ -26,10 +26,10 @@ allow hal_parts_default sysfs_sec_touchscreen:dir search;
|
|||
allow hal_parts_default sysfs_touchscreen_writable:file rw_file_perms;
|
||||
|
||||
# Swap
|
||||
type parts_data_file, file_type, data_file_type;
|
||||
type parts_data_file, file_type, data_file_type, core_data_file_type;
|
||||
allow hal_parts_default parts_data_file:dir rw_dir_perms;
|
||||
allow hal_parts_default parts_data_file:file rw_file_perms;
|
||||
allow hal_parts_default parts_data_file:file create_file_perms;
|
||||
allow hal_parts_default vendor_shell_exec:file rx_file_perms;
|
||||
allow hal_parts_default vendor_toolbox_exec:file rx_file_perms;
|
||||
allow hal_parts_default shell_exec:file rx_file_perms;
|
||||
allow hal_parts_default toolbox_exec:file rx_file_perms;
|
||||
allow hal_parts_default self:capability sys_admin;
|
||||
2
universal7885-common/sepolicy/private/hwservice.te
Normal file
2
universal7885-common/sepolicy/private/hwservice.te
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
type hal_parts_hwservice, hwservice_manager_type;
|
||||
type hal_fmradio_hwservice, hwservice_manager_type;
|
||||
8
universal7885-common/sepolicy/private/hwservice_contexts
Normal file
8
universal7885-common/sepolicy/private/hwservice_contexts
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# SamsungParts
|
||||
vendor.eureka.hardware.parts::IBatteryStats u:object_r:hal_parts_hwservice:s0
|
||||
vendor.eureka.hardware.parts::IFlashBrightness u:object_r:hal_parts_hwservice:s0
|
||||
vendor.eureka.hardware.parts::IDisplayConfigs u:object_r:hal_parts_hwservice:s0
|
||||
vendor.eureka.hardware.parts::ISwapOnData u:object_r:hal_parts_hwservice:s0
|
||||
|
||||
# FMRadio
|
||||
vendor.eureka.hardware.fmradio::IFMRadio u:object_r:hal_fmradio_hwservice:s0
|
||||
14
universal7885-common/sepolicy/private/system_app.te
Normal file
14
universal7885-common/sepolicy/private/system_app.te
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# SamsungParts
|
||||
allow system_app hal_parts_hwservice:hwservice_manager find;
|
||||
|
||||
allow system_app hal_parts_default:binder call;
|
||||
|
||||
r_dir_file(system_app, parts_data_file)
|
||||
|
||||
# FMRadio
|
||||
allow system_app hal_fmradio_hwservice:hwservice_manager find;
|
||||
|
||||
allow system_app hal_fmradio_default:binder call;
|
||||
|
||||
allow system_app fm_radio_device:chr_file { read write open ioctl };
|
||||
|
||||
|
|
@ -5,9 +5,6 @@ type tz_user_device, dev_type;
|
|||
# /dev/m2m1shot_scaler0
|
||||
type m2m1shot_device, dev_type;
|
||||
|
||||
# FM Radio
|
||||
type fm_radio_device, dev_type;
|
||||
|
||||
# gps
|
||||
type gps_device, dev_type;
|
||||
|
||||
|
|
|
|||
4
universal7885-common/sepolicy/vendor/file.te
vendored
4
universal7885-common/sepolicy/vendor/file.te
vendored
|
|
@ -41,7 +41,7 @@ type sysfs_sec_touchscreen, sysfs_type, r_fs_type, fs_type;
|
|||
type sysfs_sim, sysfs_type, r_fs_type, fs_type;
|
||||
type sysfs_sensors, sysfs_type, r_fs_type, fs_type;
|
||||
type sysfs_wifi, sysfs_type, r_fs_type, fs_type;
|
||||
|
||||
type sysfs_gpu, sysfs_type, r_fs_type, fs_type;
|
||||
type sysfs_backlight_writable, sysfs_type, rw_fs_type, fs_type;
|
||||
type sysfs_battery_writable, sysfs_type, rw_fs_type, fs_type;
|
||||
type sysfs_bt_writable, sysfs_type, rw_fs_type, fs_type;
|
||||
|
|
@ -100,9 +100,7 @@ type sysfs_input_writable, sysfs_type, rw_fs_type, fs_type;
|
|||
type sysfs_batteryinfo_charger_writable, sysfs_type, rw_fs_type, fs_type;
|
||||
type sysfs_camera_writable, sysfs_type, rw_fs_type, fs_type;
|
||||
type sysfs_decon, sysfs_type, r_fs_type, fs_type;
|
||||
type sysfs_gpu, sysfs_type, r_fs_type, fs_type;
|
||||
type sysfs_socinfo, sysfs_type, r_fs_type, fs_type;
|
||||
type sysfs_fmradio_tune, sysfs_type, rw_fs_type, fs_type;
|
||||
type sysfs_v4l, sysfs_type, r_fs_type, fs_type;
|
||||
type sysfs_v4l_mfc, sysfs_type, r_fs_type, fs_type;
|
||||
type sysfs_v4l_smfc, sysfs_type, r_fs_type, fs_type;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
/data/vendor/log(/.*)? u:object_r:log_vendor_data_file:s0
|
||||
/data/vendor/log/cbd(/.*)? u:object_r:log_cbd_vendor_data_file:s0
|
||||
/data/vendor/secradio(/.*)? u:object_r:radio_vendor_data_file:s0
|
||||
/data/swap(/.*)? u:object_r:parts_data_file:s0
|
||||
|
||||
### DEV
|
||||
/dev/block/platform/.+/by-name/boot u:object_r:boot_block_device:s0
|
||||
|
|
@ -216,11 +215,5 @@
|
|||
/(vendor|system/vendor)/bin/hw/vendor\.samsung\.hardware\.gnss@[0-9]\.[0-9]-service u:object_r:hal_gnss_default_exec:s0
|
||||
/(vendor|system/vendor)/firmware(/.*)? u:object_r:vendor_firmware_file:s0
|
||||
|
||||
# SamsungParts
|
||||
/(vendor|system/vendor)/bin/vendor\.eureka\.hardware\.parts@[0-9]\.[0-9]-service u:object_r:hal_parts_default_exec:s0
|
||||
# FMRadio
|
||||
/(vendor|system/vendor)/bin/vendor\.eureka\.hardware\.fmradio@[0-9]\.[0-9]-service u:object_r:hal_fmradio_default_exec:s0
|
||||
|
||||
/dev/radio0 u:object_r:fm_radio_device:s0
|
||||
/factory(/.*)? u:object_r:sec_efs_file:s0
|
||||
|
||||
|
|
|
|||
|
|
@ -77,8 +77,6 @@ genfscon proc /reset_reason u:object_r:proc_reset_reason:s
|
|||
genfscon proc /sys/vm/swappiness u:object_r:proc_swapiness:s0
|
||||
|
||||
# SYSFS
|
||||
## FMRadio
|
||||
genfscon sysfs /devices/virtual/s610_radio/s610_radio/ u:object_r:sysfs_fmradio_tune:s0
|
||||
|
||||
# class
|
||||
genfscon sysfs /class/video4linux u:object_r:sysfs_v4l:s0
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
type rild_hwservice, hwservice_manager_type;
|
||||
type hal_parts_hwservice, hwservice_manager_type;
|
||||
type hal_fmradio_hwservice, hwservice_manager_type;
|
||||
type hal_vendor_configstore_hwservice, hwservice_manager_type;
|
||||
type hal_vendor_surfaceflinger_hwservice, hwservice_manager_type;
|
||||
|
|
|
|||
|
|
@ -4,14 +4,5 @@ vendor.samsung.hardware.radio.bridge::ISehBridge u:object_r:rild_hwse
|
|||
vendor.samsung.hardware.radio.channel::ISehChannel u:object_r:rild_hwservice:s0
|
||||
vendor.lineage.power::ILineagePower u:object_r:hal_power_hwservice:s0
|
||||
|
||||
# SamsungParts
|
||||
vendor.eureka.hardware.parts::IBatteryStats u:object_r:hal_parts_hwservice:s0
|
||||
vendor.eureka.hardware.parts::IFlashBrightness u:object_r:hal_parts_hwservice:s0
|
||||
vendor.eureka.hardware.parts::IDisplayConfigs u:object_r:hal_parts_hwservice:s0
|
||||
vendor.eureka.hardware.parts::ISwapOnData u:object_r:hal_parts_hwservice:s0
|
||||
|
||||
# FMRadio
|
||||
vendor.eureka.hardware.fmradio::IFMRadio u:object_r:hal_fmradio_hwservice:s0
|
||||
|
||||
vendor.samsung_slsi.hardware.ExynosHWCServiceTW::IExynosHWCServiceTW u:object_r:hal_vendor_surfaceflinger_hwservice:s0
|
||||
vendor.samsung_slsi.hardware.configstore::IExynosHWCConfigs u:object_r:hal_vendor_configstore_hwservice:s0
|
||||
|
|
|
|||
|
|
@ -11,18 +11,4 @@ allow system_app sysfs_battery_info:file { read open getattr };
|
|||
|
||||
r_dir_file(system_app, sysfs_battery_info)
|
||||
|
||||
# SamsungParts
|
||||
allow system_app hal_parts_hwservice:hwservice_manager find;
|
||||
|
||||
allow system_app hal_parts_default:binder call;
|
||||
|
||||
r_dir_file(system_app, parts_data_file)
|
||||
|
||||
# FMRadio
|
||||
allow system_app hal_fmradio_hwservice:hwservice_manager find;
|
||||
|
||||
allow system_app hal_fmradio_default:binder call;
|
||||
|
||||
allow system_app fm_radio_device:chr_file { read write open ioctl };
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue