Add an adb_tradeinmode type for restricted adbd.
This adds sepolicy for a super restricted adbd mode. Currently, this
mode has just enough permissions to handle adb connection.
It also adds a new property, persist.adb.tradeinmode, which can be used
to enter this restricted version of adbd.
Test: manual test
Bug: 307713521
Change-Id: I99963f27ebab615332cb971701d1c06ea01332a1
diff --git a/private/property.te b/private/property.te
index 40beca5..c746cb3 100644
--- a/private/property.te
+++ b/private/property.te
@@ -1,5 +1,6 @@
# Properties used only in /system
system_internal_prop(adbd_prop)
+system_internal_prop(adbd_tradeinmode_prop)
system_internal_prop(apexd_payload_metadata_prop)
system_internal_prop(ctl_snapuserd_prop)
system_internal_prop(crashrecovery_prop)
@@ -509,6 +510,7 @@
-init
-vendor_init
-adbd
+ -adbd_tradeinmode
-system_server
} {
adbd_config_prop
@@ -519,6 +521,7 @@
domain
-init
-adbd
+ -adbd_tradeinmode
} {
adbd_prop
}:property_service set;