-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
common: add policy for powershare HAL
Co-Authored-By: Anay Wadhera <[email protected]> Co-Authored-By: Jake Weinstein <[email protected]> Co-Authored-By: Omkar Chandorkar <[email protected]> Signed-off-by: xenxynon <[email protected]>
- Loading branch information
Showing
9 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
binder_use(platform_app) | ||
|
||
# Allow PowerShare HAL service to be found | ||
hal_client_domain(platform_app, hal_p404_powershare) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# HALs | ||
attribute hal_p404_powershare; | ||
expandattribute hal_p404_powershare true; | ||
attribute hal_p404_powershare_client; | ||
expandattribute hal_p404_powershare_client true; | ||
attribute hal_p404_powershare_server; | ||
expandattribute hal_p404_powershare_server false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
# Fastcharge | ||
type sysfs_fastcharge, sysfs_type, fs_type; | ||
type sysfs_fastcharge, sysfs_type, fs_type; | ||
|
||
# PowerShare | ||
type sysfs_powershare, sysfs_type, fs_type; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
# Usb | ||
/(vendor|system/vendor)/bin/hw/android\.hardware\.usb@1\.0-service\.basic u:object_r:hal_usb_default_exec:s0 | ||
|
||
# Powershare | ||
/(vendor|system/vendor)/bin/hw/vendor\.p404\.powershare-service u:object_r:hal_p404_powershare_default_exec:s0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# HWBinder IPC from client to server | ||
binder_call(hal_p404_powershare_client, hal_p404_powershare_server) | ||
hal_attribute_service(hal_p404_powershare, hal_p404_powershare_service) | ||
binder_call(hal_p404_powershare_server, servicemanager) | ||
# Allow binder communication with platform_app | ||
binder_call(hal_p404_powershare, platform_app) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
type hal_p404_powershare_default, domain; | ||
binder_use(hal_p404_powershare_default); | ||
hal_server_domain(hal_p404_powershare_default, hal_p404_powershare) | ||
type hal_p404_powershare_default_exec, exec_type, vendor_file_type, file_type; | ||
init_daemon_domain(hal_p404_powershare_default) | ||
# Allow PowerShare HAL to write to PowerShare sysfs node | ||
allow hal_p404_powershare_default sysfs_powershare:file rw_file_perms; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
type hal_p404_powershare_service, service_manager_type, vendor_service; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
vendor.p404.powershare.IPowerShare/default u:object_r:hal_p404_powershare_service:s0 |