From 771c2254b9238e74ee8e8492cc71dd260bc69015 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 13 Oct 2020 14:57:42 -0700 Subject: Remove xr directory It's not used. Test: m checkbuild Change-Id: I3c755a3aad3f7ffea8e2da67cdb6dfd4142c7738 --- xr/init/init.xr.rc | 106 --------------------- .../frameworks/base/core/res/res/values/config.xml | 7 -- xr/packages/BluetoothQtiSymlink/Android.mk | 20 ---- .../overlays/SetupWizardOverlayXr/Android.mk | 31 ------ .../SetupWizardOverlayXr/AndroidManifest.xml | 26 ----- .../SetupWizardOverlayXr/res/raw/wizard_script.xml | 62 ------------ .../raw/wizard_script_connect_and_update_flow.xml | 61 ------------ xr/products/experimental_google_xr.mk | 52 ---------- xr/scripts/boot-to-vr.sh | 79 --------------- xr/sepolicy/README | 1 - xr/sepolicy/platform_app.te | 1 - xr/sepolicy/property.te | 10 -- xr/sepolicy/property_contexts | 4 - xr/sepolicy/untrusted_app_27.te | 2 - xr/sepolicy/vr_hwc.te | 1 - 15 files changed, 463 deletions(-) delete mode 100644 xr/init/init.xr.rc delete mode 100644 xr/overlay/frameworks/base/core/res/res/values/config.xml delete mode 100644 xr/packages/BluetoothQtiSymlink/Android.mk delete mode 100644 xr/packages/overlays/SetupWizardOverlayXr/Android.mk delete mode 100644 xr/packages/overlays/SetupWizardOverlayXr/AndroidManifest.xml delete mode 100644 xr/packages/overlays/SetupWizardOverlayXr/res/raw/wizard_script.xml delete mode 100644 xr/packages/overlays/SetupWizardOverlayXr/res/raw/wizard_script_connect_and_update_flow.xml delete mode 100644 xr/products/experimental_google_xr.mk delete mode 100755 xr/scripts/boot-to-vr.sh delete mode 100644 xr/sepolicy/README delete mode 100644 xr/sepolicy/platform_app.te delete mode 100644 xr/sepolicy/property.te delete mode 100644 xr/sepolicy/property_contexts delete mode 100644 xr/sepolicy/untrusted_app_27.te delete mode 100644 xr/sepolicy/vr_hwc.te diff --git a/xr/init/init.xr.rc b/xr/init/init.xr.rc deleted file mode 100644 index dcb1067..0000000 --- a/xr/init/init.xr.rc +++ /dev/null @@ -1,106 +0,0 @@ -# -# Copyright (C) 2019 The Android Open-Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -on init - # Temporarily stop booting into VR directly due to battery drain. - # TODO(b/131327495): Re-enable this once VrHeadsetPowerPolicyService or its - # equivalent lands in Android master. - setprop ro.boot.vr 0 - setprop ro.surface_flinger.use_vr_flinger 1 - setprop persist.sys.vr.pluggy_enabled 1 - - # Setup cpusets used by the VR services. - mkdir /dev/cpuset/kernel 0750 root system - write /dev/cpuset/kernel/cpus 0 - write /dev/cpuset/kernel/mems 0 - chown system system /dev/cpuset/kernel/tasks - chown system system /dev/cpuset/kernel/cpus - chmod 0660 /dev/cpuset/kernel/tasks - chmod 0660 /dev/cpuset/kernel/cpus - - mkdir /dev/cpuset/system 0750 root system - write /dev/cpuset/system/cpus 0 - write /dev/cpuset/system/mems 0 - chown system system /dev/cpuset/system/tasks - chmod 0660 /dev/cpuset/system/tasks - - mkdir /dev/cpuset/system/performance 0750 root system - write /dev/cpuset/system/performance/cpus 0 - write /dev/cpuset/system/performance/mems 0 - chown system system /dev/cpuset/system/performance/tasks - chmod 0660 /dev/cpuset/system/performance/tasks - - mkdir /dev/cpuset/system/background 0750 root system - write /dev/cpuset/system/background/cpus 0 - write /dev/cpuset/system/background/mems 0 - chown system system /dev/cpuset/system/background/tasks - chmod 0660 /dev/cpuset/system/background/tasks - - mkdir /dev/cpuset/application 0750 root system - write /dev/cpuset/application/cpus 0 - write /dev/cpuset/application/mems 0 - chown system system /dev/cpuset/application/tasks - chmod 0660 /dev/cpuset/application/tasks - - mkdir /dev/cpuset/application/performance 0750 root system - write /dev/cpuset/application/performance/cpus 0 - write /dev/cpuset/application/performance/mems 0 - chown system system /dev/cpuset/application/performance/tasks - chmod 0660 /dev/cpuset/application/performance/tasks - - mkdir /dev/cpuset/application/background 0750 root system - write /dev/cpuset/application/background/cpus 0 - write /dev/cpuset/application/background/mems 0 - chown system system /dev/cpuset/application/background/tasks - chmod 0660 /dev/cpuset/application/background/tasks - - # Create UDS structure for base VR services. - mkdir /dev/socket/pdx 0775 system system - mkdir /dev/socket/pdx/system 0775 system system - mkdir /dev/socket/pdx/system/buffer_hub 0775 system system - mkdir /dev/socket/pdx/system/performance 0775 system system - mkdir /dev/socket/pdx/system/vr 0775 system system - mkdir /dev/socket/pdx/system/vr/display 0775 system system - mkdir /dev/socket/pdx/system/vr/pose 0775 system system - mkdir /dev/socket/pdx/system/vr/sensors 0775 system system - -# -# TODO(b/137410559): Remove this, it's specific to Snapdragon 845. -# -on boot - # Update DVR cpusets to boot-time values. - write /dev/cpuset/kernel/cpus 0-7 - write /dev/cpuset/system/cpus 0-7 - write /dev/cpuset/system/performance/cpus 0-7 - write /dev/cpuset/system/background/cpus 0-7 - write /dev/cpuset/system/cpus 0-7 - write /dev/cpuset/application/cpus 0-7 - write /dev/cpuset/application/performance/cpus 0-7 - write /dev/cpuset/application/background/cpus 0-7 - write /dev/cpuset/application/cpus 0-7 - -# -# TODO(b/137410559): Remove this, it's specific to Snapdragon 845. -# -on property:sys.boot_completed=1 - # Update DVR cpusets to runtime values. - # Kernel cpuset will be apply on PowerHAL - write /dev/cpuset/system/performance/cpus 6-7 - write /dev/cpuset/system/background/cpus 0-1 - write /dev/cpuset/system/cpus 0-1,6-7 - write /dev/cpuset/application/performance/cpus 4-5 - write /dev/cpuset/application/background/cpus 0-1 - write /dev/cpuset/application/cpus 0-1,4-5 diff --git a/xr/overlay/frameworks/base/core/res/res/values/config.xml b/xr/overlay/frameworks/base/core/res/res/values/config.xml deleted file mode 100644 index cd86be0..0000000 --- a/xr/overlay/frameworks/base/core/res/res/values/config.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - true - - diff --git a/xr/packages/BluetoothQtiSymlink/Android.mk b/xr/packages/BluetoothQtiSymlink/Android.mk deleted file mode 100644 index b25835a..0000000 --- a/xr/packages/BluetoothQtiSymlink/Android.mk +++ /dev/null @@ -1,20 +0,0 @@ -# -# This is a workaround for Bluetooth not working on OnePlus7 Pro. See b/139486342 -# - -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_MODULE := BluetoothQtiSymlink - -lib_dir := $(PRODUCT_OUT)/system/lib -bluetooth_qti := libbluetooth_qti.so -bluetooth := libbluetooth.so -bluetooth_qti_path := $(lib_dir)/$(bluetooth_qti) -bluetooth_path := $(lib_dir)/$(bluetooth) - -$(bluetooth_qti_path): $(bluetooth_path) - cd $(lib_dir) && ln -sf $(bluetooth) $(bluetooth_qti) - -droid: $(bluetooth_qti_path) diff --git a/xr/packages/overlays/SetupWizardOverlayXr/Android.mk b/xr/packages/overlays/SetupWizardOverlayXr/Android.mk deleted file mode 100644 index 4c84e18..0000000 --- a/xr/packages/overlays/SetupWizardOverlayXr/Android.mk +++ /dev/null @@ -1,31 +0,0 @@ -# -# Copyright 2019, The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_CERTIFICATE := platform -LOCAL_OVERRIDES_PACKAGES := SetupWizardOverlay - -LOCAL_PRODUCT_MODULE := true - -LOCAL_SRC_FILES := $(call all-subdir-java-files) - -LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res - -LOCAL_PACKAGE_NAME := SetupWizardOverlayXr -LOCAL_SDK_VERSION := current - -include $(BUILD_RRO_PACKAGE) diff --git a/xr/packages/overlays/SetupWizardOverlayXr/AndroidManifest.xml b/xr/packages/overlays/SetupWizardOverlayXr/AndroidManifest.xml deleted file mode 100644 index fa7b0ba..0000000 --- a/xr/packages/overlays/SetupWizardOverlayXr/AndroidManifest.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - diff --git a/xr/packages/overlays/SetupWizardOverlayXr/res/raw/wizard_script.xml b/xr/packages/overlays/SetupWizardOverlayXr/res/raw/wizard_script.xml deleted file mode 100644 index 5ec8fa0..0000000 --- a/xr/packages/overlays/SetupWizardOverlayXr/res/raw/wizard_script.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/xr/packages/overlays/SetupWizardOverlayXr/res/raw/wizard_script_connect_and_update_flow.xml b/xr/packages/overlays/SetupWizardOverlayXr/res/raw/wizard_script_connect_and_update_flow.xml deleted file mode 100644 index 5990ba7..0000000 --- a/xr/packages/overlays/SetupWizardOverlayXr/res/raw/wizard_script_connect_and_update_flow.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/xr/products/experimental_google_xr.mk b/xr/products/experimental_google_xr.mk deleted file mode 100644 index 999b719..0000000 --- a/xr/products/experimental_google_xr.mk +++ /dev/null @@ -1,52 +0,0 @@ -PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \ - ro.dvr.lens_metrics=/etc/hmd_config - -# SELinux permissions -BOARD_PLAT_PRIVATE_SEPOLICY_DIR := device/google/vrservices/xr/sepolicy - -# Remove non-critical and non-XR packages from PRODUCT_PACKAGES. -# -# Overrides (i.e. removes) packages that are bundled into the system/product -# image for smartphone use cases. We are removing those packages for two -# reasons: -# 1) Pixel devices' system/product image are almost out of disk spaces. It has -# been hard for us to bundle the AIO flavored VrCore into the their system -# image. Removing some of the packages free up enough disk spaces for XR use -# cases. -# 2) Removing those packages won't impact the functionality of the device. More -# specifically, those package meet the following requirements: -# i) they are not critical packages for XR use cases; and ii) can still be -# install from Play Store if ever needed. -# For certain packages, removing those packages are actually beneficial. For -# example, the WallpapersBReel201* packages introduced unnecessary GPU load -# for the system. Disabling those packages frees some GPU resources to XR use -# cases and improves the accuracy of our GPU performance profiling. - -# External camera libraries. -# There is no need to add extra SELinux policy for external cameras -# because our devices do not run Trebel passthrough mode. -PRODUCT_PACKAGES += android.hardware.camera.provider@2.4-impl -PRODUCT_PACKAGES += android.hardware.camera.provider@2.4-external-service -# Use webcam camera device@3.5 -PRODUCT_PROPERTY_OVERRIDES += ro.vendor.camera.external.hal3TrebleMinorVersion=5 - -PRODUCT_PACKAGES += NonXrProductPackagesRemover - -PRODUCT_PACKAGE_OVERLAYS := device/google/vrservices/xr/overlay - -PRODUCT_COPY_FILES += \ - device/google/vrservices/xr/init/init.xr.rc:$(TARGET_COPY_OUT_SYSTEM)/etc/init/init.xr.rc \ - device/google/vrservices/xr/scripts/boot-to-vr.sh:$(TARGET_COPY_OUT_SYSTEM)/bin/boot-to-vr.sh \ - frameworks/native/data/etc/android.hardware.vr.high_performance.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/android.hardware.vr.high_performance.xml \ - vendor/unbundled_google/packages/PrebuiltGoogleVr/configs/daydream_viewer_config:$(TARGET_COPY_OUT_SYSTEM)/etc/hmd_config \ - -# XR/VR prebuilt packages -PRODUCT_PACKAGES += \ - SetupWizardOverlay \ - SetupWizardOverlayXr \ - VrHome \ - VrInputMethodIme \ - VrHeadsetPowerPolicy \ - pps-tool.sh \ - BluetoothQtiSymlink \ - diff --git a/xr/scripts/boot-to-vr.sh b/xr/scripts/boot-to-vr.sh deleted file mode 100755 index 484f380..0000000 --- a/xr/scripts/boot-to-vr.sh +++ /dev/null @@ -1,79 +0,0 @@ -# -# This script finds the init.rc file for a certain Pixel XR device and updates -# the value of ro.boot.vr being set during the init process. -# -SYSTEM_INIT_XR_RC_FILE="/system/etc/init/init.xr.rc" -PROP_RO_HARDWARE="$(getprop ro.hardware)" -PROP_RO_BOOT_HARDWARE_PLATFORM="$(getprop ro.boot.hardware.platform)" -PROP_RO_PRODUCT_NAME="$(getprop ro.product.name)" - -function print_usage { - echo "Update $(get_init_rc_file)" - echo "Usage:" - echo " boot-to-vr.sh (true|false))" - echo " Enable or disable whether the system should boot into VR." - exit 1 -} - -function get_hardware_name() { - case $PROP_RO_HARDWARE in - walleye) echo walleye ;; - taimen) echo taimen ;; - blueline) echo $PROP_RO_BOOT_HARDWARE_PLATFORM ;; - crosshatch) echo $PROP_RO_BOOT_HARDWARE_PLATFORM ;; - esac -} - -function get_init_rc_file() { - if [ -f $SYSTEM_INIT_XR_RC_FILE ]; then - echo $SYSTEM_INIT_XR_RC_FILE - else - echo "/vendor/etc/init/hw/init.$(get_hardware_name).rc" - fi -} - -function print_init_rc() { - cat $(get_init_rc_file) | grep -A10 -B10 ro.boot.vr -} - -function fail_to_write_file() { - echo "Cannot modify $(get_init_rc_file). The following commands may help: - adb disable-verity - adb reboot - adb remount" - exit 1 -} - -function enable_boot_to_vr() { - sed -i "s/setprop ro.boot.vr 0/setprop ro.boot.vr 1/" $(get_init_rc_file) - rc=$? - - if [[ $rc != 0 ]]; then - fail_to_write_file - else - print_init_rc - fi -} - -function disable_boot_to_vr() { - sed -i "s/setprop ro.boot.vr 1/setprop ro.boot.vr 0/" $(get_init_rc_file) - rc=$? - - if [[ $rc != 0 ]]; then - fail_to_write_file - else - print_init_rc - fi -} - -WHOAMI=$(whoami) -if ! [ "$WHOAMI" == "root" ]; then - echo "*** Root access required. Run 'adb root' first." - exit 1 -fi - -case "$1" in - true) enable_boot_to_vr ;; - false) disable_boot_to_vr ;; - *) print_usage ;; -esac diff --git a/xr/sepolicy/README b/xr/sepolicy/README deleted file mode 100644 index 30daeea..0000000 --- a/xr/sepolicy/README +++ /dev/null @@ -1 +0,0 @@ -These are SELinux policies that can be shared across XR devices. diff --git a/xr/sepolicy/platform_app.te b/xr/sepolicy/platform_app.te deleted file mode 100644 index 09214ae..0000000 --- a/xr/sepolicy/platform_app.te +++ /dev/null @@ -1 +0,0 @@ -allow platform_app system_prop:property_service set; diff --git a/xr/sepolicy/property.te b/xr/sepolicy/property.te deleted file mode 100644 index adad644..0000000 --- a/xr/sepolicy/property.te +++ /dev/null @@ -1,10 +0,0 @@ -# For VrHeadsetPowerPolicyService. -type vr_performance_prop, property_type, extended_core_property_type; -type vr_pps_state_prop, property_type, extended_core_property_type; -type vr_pps_enabled_prop, property_type; - -set_prop(platform_app, vr_performance_prop) -set_prop(platform_app, vr_pps_state_prop) -get_prop(platform_app, vr_pps_enabled_prop) -set_prop(surfaceflinger, vr_performance_prop) - diff --git a/xr/sepolicy/property_contexts b/xr/sepolicy/property_contexts deleted file mode 100644 index 6e1a18c..0000000 --- a/xr/sepolicy/property_contexts +++ /dev/null @@ -1,4 +0,0 @@ -# For VrHeadsetPowerPolicyService. -persist.sys.pps_enabled u:object_r:vr_pps_enabled_prop:s0 -sys.pps.state u:object_r:vr_pps_state_prop:s0 -sys.dvr.performance u:object_r:vr_performance_prop:s0 diff --git a/xr/sepolicy/untrusted_app_27.te b/xr/sepolicy/untrusted_app_27.te deleted file mode 100644 index e9bc2b3..0000000 --- a/xr/sepolicy/untrusted_app_27.te +++ /dev/null @@ -1,2 +0,0 @@ -allow untrusted_app_27 vr_hwc_service:service_manager find; -allow untrusted_app_27 virtual_touchpad_service:service_manager find; diff --git a/xr/sepolicy/vr_hwc.te b/xr/sepolicy/vr_hwc.te deleted file mode 100644 index 295205e..0000000 --- a/xr/sepolicy/vr_hwc.te +++ /dev/null @@ -1 +0,0 @@ -allow vr_hwc untrusted_app_27:binder call; -- cgit v1.2.3