Clean up deprecated properties. Set sepolicy for vendor process

Bug: 79941736
Test: Manually
Change-Id: Ia7ec0d90be1dbce402b8b6b52762c7384c0d5e1e
diff --git a/target/board/generic/device.mk b/target/board/generic/device.mk
index 8c66fc9..82c6657 100644
--- a/target/board/generic/device.mk
+++ b/target/board/generic/device.mk
@@ -17,10 +17,6 @@
 # This is a build configuration for the product aspects that
 # are specific to the emulator.
 
-PRODUCT_PROPERTY_OVERRIDES := \
-    ro.ril.hsxpa=1 \
-    ro.ril.gprsclass=10
-
 PRODUCT_COPY_FILES := \
     device/generic/goldfish/camera/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles.xml \
     frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml \
diff --git a/target/board/generic/sepolicy/goldfish_setup.te b/target/board/generic/sepolicy/goldfish_setup.te
index a99653c..3041436 100644
--- a/target/board/generic/sepolicy/goldfish_setup.te
+++ b/target/board/generic/sepolicy/goldfish_setup.te
@@ -25,10 +25,11 @@
 allow goldfish_setup execns_exec:file rx_file_perms;
 allow goldfish_setup proc_net:file rw_file_perms;
 allow goldfish_setup proc:file r_file_perms;
-set_prop(goldfish_setup, ctl_default_prop);
 allow goldfish_setup nsfs:file r_file_perms;
 allow goldfish_setup system_data_file:dir getattr;
 allow goldfish_setup kernel:system module_request;
+set_prop(goldfish_setup, qemu_prop);
+get_prop(goldfish_setup, net_share_prop);
 # Allow goldfish_setup to run /system/bin/ip and /system/bin/iw
 allow goldfish_setup system_file:file execute_no_trans;
 # Allow goldfish_setup to run init.wifi.sh
diff --git a/target/board/generic/sepolicy/property.te b/target/board/generic/sepolicy/property.te
index 8c7c892..3593a39 100644
--- a/target/board/generic/sepolicy/property.te
+++ b/target/board/generic/sepolicy/property.te
@@ -2,3 +2,4 @@
 type qemu_cmdline, property_type;
 type radio_noril_prop, property_type;
 type net_eth0_prop, property_type;
+type net_share_prop, property_type;
diff --git a/target/board/generic/sepolicy/property_contexts b/target/board/generic/sepolicy/property_contexts
index c5a2bc1..f7a241c 100644
--- a/target/board/generic/sepolicy/property_contexts
+++ b/target/board/generic/sepolicy/property_contexts
@@ -1,6 +1,8 @@
 qemu.                   u:object_r:qemu_prop:s0
 qemu.cmdline            u:object_r:qemu_cmdline:s0
+vendor.qemu		u:object_r:qemu_prop:s0
 ro.emu.                 u:object_r:qemu_prop:s0
 ro.emulator.            u:object_r:qemu_prop:s0
 ro.radio.noril          u:object_r:radio_noril_prop:s0
 net.eth0.               u:object_r:net_eth0_prop:s0
+net.shared_net_ip       u:object_r:net_share_prop:s0
diff --git a/target/board/generic_arm64/device.mk b/target/board/generic_arm64/device.mk
index 050b90d..c0fbdcd 100644
--- a/target/board/generic_arm64/device.mk
+++ b/target/board/generic_arm64/device.mk
@@ -17,10 +17,6 @@
 # This is a build configuration for the product aspects that
 # are specific to the emulator.
 
-PRODUCT_PROPERTY_OVERRIDES := \
-    ro.ril.hsxpa=1 \
-    ro.ril.gprsclass=10
-
 PRODUCT_COPY_FILES := \
     device/generic/goldfish/camera/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles.xml \
     frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml \
diff --git a/target/board/generic_x86/device.mk b/target/board/generic_x86/device.mk
index aaac689..ecf8697 100644
--- a/target/board/generic_x86/device.mk
+++ b/target/board/generic_x86/device.mk
@@ -17,10 +17,6 @@
 # This is a build configuration for the product aspects that
 # are specific to the emulator.
 
-PRODUCT_PROPERTY_OVERRIDES := \
-    ro.ril.hsxpa=1 \
-    ro.ril.gprsclass=10
-
 PRODUCT_COPY_FILES := \
     device/generic/goldfish/camera/media_profiles.xml:system/etc/media_profiles.xml \
     frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:system/etc/media_codecs_google_audio.xml \
diff --git a/target/board/generic_x86_64/device.mk b/target/board/generic_x86_64/device.mk
index aaac689..ecf8697 100755
--- a/target/board/generic_x86_64/device.mk
+++ b/target/board/generic_x86_64/device.mk
@@ -17,10 +17,6 @@
 # This is a build configuration for the product aspects that
 # are specific to the emulator.
 
-PRODUCT_PROPERTY_OVERRIDES := \
-    ro.ril.hsxpa=1 \
-    ro.ril.gprsclass=10
-
 PRODUCT_COPY_FILES := \
     device/generic/goldfish/camera/media_profiles.xml:system/etc/media_profiles.xml \
     frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:system/etc/media_codecs_google_audio.xml \
diff --git a/target/product/emulator.mk b/target/product/emulator.mk
index 8d5dc09..78d8e92 100644
--- a/target/product/emulator.mk
+++ b/target/product/emulator.mk
@@ -177,3 +177,16 @@
 #once it is fixed in aosp, remove this block of comment.
 #PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
 #config.disable_location=true
+
+# Enable Perfetto traced
+PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
+    persist.traced.enable=1
+
+# enable Google-specific location features,
+# like NetworkLocationProvider and LocationCollector
+PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
+    ro.com.google.locationfeatures=1
+
+# disable setupwizard
+PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
+    ro.setupwizard.mode=DISABLED