Snap for 11931036 from 1fc96a57bb
to 24Q3-release
Change-Id: If10bdebd7bd5df2096493c18be28d458d2911d3d
This commit is contained in:
commit
a0cc76f28a
7 changed files with 51 additions and 6 deletions
1
aoc/sepolicy/service.te
Normal file
1
aoc/sepolicy/service.te
Normal file
|
@ -0,0 +1 @@
|
||||||
|
type aocx, service_manager_type;
|
|
@ -1 +0,0 @@
|
||||||
type aocx, vndservice_manager_type;
|
|
|
@ -31,3 +31,6 @@ set_prop(gnssd, vendor_gps_prop)
|
||||||
|
|
||||||
# Read RIL property
|
# Read RIL property
|
||||||
get_prop(gnssd, vendor_rild_prop)
|
get_prop(gnssd, vendor_rild_prop)
|
||||||
|
|
||||||
|
# Read modme state
|
||||||
|
allow gnssd sysfs_modem_state:file r_file_perms;
|
||||||
|
|
|
@ -22,4 +22,8 @@ allow hal_gnss_pixel hal_contexthub_service:service_manager find;
|
||||||
|
|
||||||
# Allow connect to gnss service
|
# Allow connect to gnss service
|
||||||
allow hal_gnss_pixel vendor_gps_file:dir create_dir_perms;
|
allow hal_gnss_pixel vendor_gps_file:dir create_dir_perms;
|
||||||
allow hal_gnss_pixel vendor_gps_file:fifo_file create_file_perms;
|
allow hal_gnss_pixel vendor_gps_file:fifo_file create_file_perms;
|
||||||
|
|
||||||
|
# Allow access ssrdump information
|
||||||
|
allow hal_gnss_pixel sscoredump_vendor_data_crashinfo_file:file r_file_perms;
|
||||||
|
allow hal_gnss_pixel sscoredump_vendor_data_crashinfo_file:dir r_dir_perms;
|
||||||
|
|
|
@ -34,6 +34,18 @@ int main(int argc, char *argv[])
|
||||||
char *line = NULL;
|
char *line = NULL;
|
||||||
size_t len = 0;
|
size_t len = 0;
|
||||||
FILE *ical_fd;
|
FILE *ical_fd;
|
||||||
|
const char *ical_override_cmd_prop[2] = {
|
||||||
|
[0] = "vendor.touch.gti0.ical.override.cmd",
|
||||||
|
[1] = "vendor.touch.gti1.ical.override.cmd",
|
||||||
|
};
|
||||||
|
const char *ical_override_result_prop[2] = {
|
||||||
|
[0] = "vendor.touch.gti0.ical.override.result",
|
||||||
|
[1] = "vendor.touch.gti1.ical.override.result",
|
||||||
|
};
|
||||||
|
const char *ical_write_history_prop[2] = {
|
||||||
|
[0] = "vendor.touch.gti0.ical.write.history",
|
||||||
|
[1] = "vendor.touch.gti1.ical.write.history",
|
||||||
|
};
|
||||||
const char *ical_state_prop[2] = {
|
const char *ical_state_prop[2] = {
|
||||||
[0] = "vendor.touch.gti0.ical.state",
|
[0] = "vendor.touch.gti0.ical.state",
|
||||||
[1] = "vendor.touch.gti1.ical.state",
|
[1] = "vendor.touch.gti1.ical.state",
|
||||||
|
@ -46,9 +58,16 @@ int main(int argc, char *argv[])
|
||||||
[0] = "/sys/devices/virtual/goog_touch_interface/gti.0/interactive_calibrate",
|
[0] = "/sys/devices/virtual/goog_touch_interface/gti.0/interactive_calibrate",
|
||||||
[1] = "/sys/devices/virtual/goog_touch_interface/gti.1/interactive_calibrate",
|
[1] = "/sys/devices/virtual/goog_touch_interface/gti.1/interactive_calibrate",
|
||||||
};
|
};
|
||||||
|
const char *ical_override_cmd_prop_path = ical_override_cmd_prop[0];
|
||||||
|
const char *ical_override_result_prop_path = ical_override_result_prop[0];
|
||||||
|
const char *ical_write_history_prop_path = ical_write_history_prop[0];
|
||||||
const char *ical_state_prop_path = ical_state_prop[0];
|
const char *ical_state_prop_path = ical_state_prop[0];
|
||||||
const char *ical_result_prop_path = ical_result_prop[0];
|
const char *ical_result_prop_path = ical_result_prop[0];
|
||||||
const char *ical_sysfs_path = ical_sysfs[0];
|
const char *ical_sysfs_path = ical_sysfs[0];
|
||||||
|
const char ical_override_all_cmd_prop_val[PROPERTY_VALUE_MAX] = "xxx";
|
||||||
|
char ical_override_cmd_prop_val[PROPERTY_VALUE_MAX] = "\0";
|
||||||
|
char ical_override_result_prop_val[PROPERTY_VALUE_MAX] = "\0";
|
||||||
|
char ical_write_history_prop_val[PROPERTY_VALUE_MAX] = "\0";
|
||||||
|
|
||||||
if (argc < 3) {
|
if (argc < 3) {
|
||||||
ALOGW("No target dev or command for interactive_calibrate sysfs.\n");
|
ALOGW("No target dev or command for interactive_calibrate sysfs.\n");
|
||||||
|
@ -60,11 +79,18 @@ int main(int argc, char *argv[])
|
||||||
if (strncmp(argv[1], "1", strlen(argv[1])) == 0 ||
|
if (strncmp(argv[1], "1", strlen(argv[1])) == 0 ||
|
||||||
strncmp(argv[1], "gti1", strlen(argv[1])) == 0 ||
|
strncmp(argv[1], "gti1", strlen(argv[1])) == 0 ||
|
||||||
strncmp(argv[1], "gti.1", strlen(argv[1])) == 0) {
|
strncmp(argv[1], "gti.1", strlen(argv[1])) == 0) {
|
||||||
|
ical_override_cmd_prop_path = ical_override_cmd_prop[1];
|
||||||
|
ical_override_result_prop_path = ical_override_result_prop[1];
|
||||||
|
ical_write_history_prop_path = ical_write_history_prop[1];
|
||||||
ical_state_prop_path = ical_state_prop[1];
|
ical_state_prop_path = ical_state_prop[1];
|
||||||
ical_result_prop_path = ical_result_prop[1];
|
ical_result_prop_path = ical_result_prop[1];
|
||||||
ical_sysfs_path = ical_sysfs[1];
|
ical_sysfs_path = ical_sysfs[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
property_get(ical_override_cmd_prop_path, ical_override_cmd_prop_val, NULL);
|
||||||
|
property_get(ical_override_result_prop_path, ical_override_result_prop_val, "0 - -2147483648");
|
||||||
|
property_get(ical_write_history_prop_path, ical_write_history_prop_val, NULL);
|
||||||
|
|
||||||
property_set(ical_result_prop_path, "na");
|
property_set(ical_result_prop_path, "na");
|
||||||
property_set(ical_state_prop_path, "running");
|
property_set(ical_state_prop_path, "running");
|
||||||
if (access(ical_sysfs_path, F_OK | R_OK | W_OK)) {
|
if (access(ical_sysfs_path, F_OK | R_OK | W_OK)) {
|
||||||
|
@ -84,11 +110,25 @@ int main(int argc, char *argv[])
|
||||||
getline(&line, &len, ical_fd);
|
getline(&line, &len, ical_fd);
|
||||||
if (line != NULL) {
|
if (line != NULL) {
|
||||||
property_set(ical_state_prop_path, "read");
|
property_set(ical_state_prop_path, "read");
|
||||||
property_set(ical_result_prop_path, line);
|
if (strncmp(ical_override_cmd_prop_val,
|
||||||
ALOGI("read: %s => %s", ical_sysfs_path, line);
|
ical_write_history_prop_val,
|
||||||
|
strlen(ical_write_history_prop_path)) == 0 ||
|
||||||
|
strncasecmp(ical_override_cmd_prop_val,
|
||||||
|
ical_override_all_cmd_prop_val,
|
||||||
|
strlen(ical_override_all_cmd_prop_val)) == 0) {
|
||||||
|
property_set(ical_result_prop_path, ical_override_result_prop_val);
|
||||||
|
ALOGW("read(original): %s => %s",
|
||||||
|
ical_sysfs_path, line);
|
||||||
|
ALOGW("read(override): %s => %s",
|
||||||
|
ical_sysfs_path, ical_override_result_prop_val);
|
||||||
|
} else {
|
||||||
|
property_set(ical_result_prop_path, line);
|
||||||
|
ALOGI("read: %s => %s", ical_sysfs_path, line);
|
||||||
|
}
|
||||||
free(line);
|
free(line);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
property_set(ical_write_history_prop_path, argv[2]);
|
||||||
property_set(ical_state_prop_path, argv[2]);
|
property_set(ical_state_prop_path, argv[2]);
|
||||||
fwrite(argv[2], 1, strlen(argv[2]), ical_fd);
|
fwrite(argv[2], 1, strlen(argv[2]), ical_fd);
|
||||||
ALOGI("write: %s => %s\n", argv[2], ical_sysfs_path);
|
ALOGI("write: %s => %s\n", argv[2], ical_sysfs_path);
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
/vendor/bin/hw/android\.hardware\.input\.processor-reflector u:object_r:hal_input_processor_default_exec:s0
|
|
||||||
/vendor/bin/twoshay_touchflow u:object_r:twoshay_exec:s0
|
|
Loading…
Add table
Add a link
Reference in a new issue