Skip to content

Commit

Permalink
CtsOsTestCases failed due to Missing SoC Properties.
Browse files Browse the repository at this point in the history
Following CTS test android.os.cts.BuildTest#testBuildConstants
is failing due to missing SoC properties. A12 onwards, Below
SoC properties need to define to pass CTS and cts-on-gsi Test-:
ro.soc.manufacturer
ro.soc.model

Tracked-On: OAM-111307
Signed-off-by: Ankit Agarwal <[email protected]>
Signed-off-by: Panda,SushreeX <[email protected]>
  • Loading branch information
ankithbti52509 authored and sysopenci committed Jul 26, 2023
1 parent e910888 commit 26ff9f6
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions soc/file_contexts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(/system)?/vendor/bin/set_soc_prop.sh u:object_r:set_soc_prop_exec:s0
1 change: 1 addition & 0 deletions soc/property.te
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vendor_internal_prop(vendor_cpu_model_name_prop)
1 change: 1 addition & 0 deletions soc/property_contexts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vendor.cpu.model_name u:object_r:vendor_cpu_model_name_prop:s0
18 changes: 18 additions & 0 deletions soc/set_soc_prop.te
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Rules for soc
type set_soc_prop, domain;
type set_soc_prop_exec, exec_type, file_type, vendor_file_type;
init_daemon_domain(set_soc_prop)

allow set_soc_prop proc_cpuinfo:file r_file_perms;
allow set_soc_prop vendor_toolbox_exec:file execute_no_trans;

set_prop(set_soc_prop, vendor_cpu_model_name_prop)

not_full_treble(`
allow set_soc_prop system_file:file rx_file_perms;
allow set_soc_prop shell_exec:file rx_file_perms;
')
full_treble_only(`
allow set_soc_prop vendor_shell_exec:file rx_file_perms;
allow set_soc_prop vendor_toolbox_exec:file rx_file_perms;
')
1 change: 1 addition & 0 deletions soc/shell.te
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
allow shell set_soc_prop_exec:file getattr;
1 change: 1 addition & 0 deletions soc/vendor_init.te
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
set_prop(vendor_init, vendor_cpu_model_name_prop)

0 comments on commit 26ff9f6

Please sign in to comment.