diff --git a/init_regions.sh b/init_regions.sh index 6a608ad..7fc31f5 100755 --- a/init_regions.sh +++ b/init_regions.sh @@ -25,3 +25,4 @@ case "${REGION}" in esac setprop ro.product.locale "${LANGUAGE}-${COUNTRY}" +setprop ro.boot.wificountrycode "${COUNTRY}" diff --git a/sepolicy/locale.te b/sepolicy/locale.te index 4502482..e0beb35 100644 --- a/sepolicy/locale.te +++ b/sepolicy/locale.te @@ -6,6 +6,7 @@ type locale_exec, exec_type, file_type; init_daemon_domain(locale) set_prop(locale, product_locale_prop) +set_prop(locale, wifi_region_prop) # use cat to read /sys/firmware/vpd/ro/region allow locale shell_exec:file rx_file_perms; diff --git a/sepolicy/property.te b/sepolicy/property.te index eb62aa1..1bb3fe0 100644 --- a/sepolicy/property.te +++ b/sepolicy/property.te @@ -1,2 +1,3 @@ type product_locale_prop, property_type; type debug_bq25892_prop, property_type; +type wifi_region_prop, property_type; diff --git a/sepolicy/property_contexts b/sepolicy/property_contexts index 5554d42..33f39c3 100644 --- a/sepolicy/property_contexts +++ b/sepolicy/property_contexts @@ -1,2 +1,3 @@ +boot.wificountrycode u:object_r:wifi_region_prop:s0 product.locale u:object_r:product_locale_prop:s0 debug.bq25892 u:object_r:debug_bq25892_prop:s0