Cleanup wahoo sepolicy for easel. am: 26930702eb am: 2f826c40e2
am: f76af931dc

Change-Id: I34746a1961568e9058ba6782597a35d7dbc26318
diff --git a/BoardConfig.mk b/BoardConfig.mk
index 487b19d..36262f3 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -146,6 +146,7 @@
 # Display
 TARGET_HAS_WIDE_COLOR_DISPLAY := true
 TARGET_HAS_HDR_DISPLAY := false
+TARGET_USE_COLOR_MANAGEMENT := true
 TARGET_USES_COLOR_METADATA := true
 
 # Charger Mode
diff --git a/device.mk b/device.mk
index 2859629..db1a74b 100755
--- a/device.mk
+++ b/device.mk
@@ -88,7 +88,7 @@
     $(LOCAL_PATH)/init.qcom.ipastart.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.qcom.ipastart.sh \
     $(LOCAL_PATH)/init.qcom.wlan.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.qcom.wlan.sh \
     $(LOCAL_PATH)/init.insmod.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.insmod.sh \
-    $(LOCAL_PATH)/init.ramoops.sh:$(TARGET_COPY_OUT_SYSTEM)/bin/init.ramoops.sh \
+    $(LOCAL_PATH)/init.ramoops.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.ramoops.sh \
     frameworks/native/services/vr/virtual_touchpad/idc/vr-virtual-touchpad-0.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/vr-virtual-touchpad-0.idc \
     frameworks/native/services/vr/virtual_touchpad/idc/vr-virtual-touchpad-1.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/vr-virtual-touchpad-1.idc
 
@@ -562,6 +562,8 @@
 # Fingerprint HIDL implementation
 PRODUCT_PACKAGES += \
     android.hardware.biometrics.fingerprint@2.1-service.fpc
+PRODUCT_COPY_FILES += \
+    $(LOCAL_PATH)/init.fingerprint.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.fingerprint.sh \
 
 PRODUCT_COPY_FILES += \
     frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml
@@ -682,3 +684,7 @@
   PRODUCT_PROPERTY_OVERRIDES += \
       persist.vendor.usb.usbradio.config=diag
 endif
+
+# default atrace HAL
+PRODUCT_PACKAGES += \
+    android.hardware.atrace@1.0-service
diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp
index f676ad8..3040f5b 100755
--- a/dumpstate/DumpstateDevice.cpp
+++ b/dumpstate/DumpstateDevice.cpp
@@ -21,6 +21,8 @@
 #include <android-base/properties.h>
 #include <android-base/unique_fd.h>
 #include <cutils/properties.h>
+#include <hidl/HidlBinderSupport.h>
+
 #include <log/log.h>
 #include <string.h>
 
@@ -210,6 +212,11 @@
 
 // Methods from ::android::hardware::dumpstate::V1_0::IDumpstateDevice follow.
 Return<void> DumpstateDevice::dumpstateBoard(const hidl_handle& handle) {
+    // Exit when dump is completed since this is a lazy HAL.
+    addPostCommandTask([]() {
+        exit(0);
+    });
+
     if (handle == nullptr || handle->numFds < 1) {
         ALOGE("no FDs\n");
         return Void();
@@ -257,6 +264,8 @@
     DumpFileToFd(fd, "ipc-local-ports", "/d/msm_ipc_router/dump_local_ports");
     DumpTouch(fd);
     RunCommandToFd(fd, "USB Device Descriptors", {"/vendor/bin/sh", "-c", "cd /sys/bus/usb/devices/1-1 && cat product && cat bcdDevice; cat descriptors | od -t x1 -w16 -N96"});
+    DumpFileToFd(fd, "Pixel trace", "/d/tracing/instances/pixel-trace/trace");
+
     // Timeout after 3s
     RunCommandToFd(fd, "QSEE logs", {"/vendor/bin/sh", "-c", "/vendor/bin/timeout 3 cat /d/tzdbg/qsee_log"});
     RunCommandToFd(fd, "Power supply properties", {"/vendor/bin/sh", "-c", "for f in /sys/class/power_supply/*/uevent ; do echo \"\n------ $f\" ; cat $f ; done"});
diff --git a/dumpstate/android.hardware.dumpstate@1.0-service.wahoo.rc b/dumpstate/android.hardware.dumpstate@1.0-service.wahoo.rc
index 4c024a0..950da39 100644
--- a/dumpstate/android.hardware.dumpstate@1.0-service.wahoo.rc
+++ b/dumpstate/android.hardware.dumpstate@1.0-service.wahoo.rc
@@ -3,6 +3,8 @@
     user system
     group system
     interface android.hardware.dumpstate@1.0::IDumpstateDevice default
+    oneshot
+    disabled
 
 on boot
     chmod 0444 /sys/kernel/debug/tzdbg/qsee_log
diff --git a/fstab.hardware b/fstab.hardware
index d2fc516..472c491 100644
--- a/fstab.hardware
+++ b/fstab.hardware
@@ -6,4 +6,4 @@
 /dev/block/platform/soc/1da4000.ufshc/by-name/misc         /misc              emmc        defaults                                              defaults
 /dev/block/platform/soc/1da4000.ufshc/by-name/modem        /firmware          vfat        ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0   wait,slotselect
 /devices/soc/a800000.ssusb/a800000.dwc3*                   auto               vfat        defaults                                              voldmanaged=usb:auto
-/dev/block/zram0                                           none               swap        defaults                                              zramsize=536870912,max_comp_streams=8
+/dev/block/zram0                                           none               swap        defaults                                              zramsize=1073741824,max_comp_streams=8
diff --git a/health/LearnedCapacityBackupRestore.cpp b/health/LearnedCapacityBackupRestore.cpp
index 48fe461..cf8de8d 100644
--- a/health/LearnedCapacityBackupRestore.cpp
+++ b/health/LearnedCapacityBackupRestore.cpp
@@ -25,17 +25,28 @@
 static constexpr char kSysCFPersistFile[] = "/persist/battery/qcom_charge_full";
 static constexpr int kBuffSize = 256;
 
-LearnedCapacityBackupRestore::LearnedCapacityBackupRestore() {}
+LearnedCapacityBackupRestore::LearnedCapacityBackupRestore() : sw_cap_(0), hw_cap_(0) {}
 
 void LearnedCapacityBackupRestore::Restore() {
     ReadFromStorage();
     ReadFromSRAM();
-    UpdateAndSave();
+    if (sw_cap_ == 0) {
+        // First backup
+        sw_cap_ = hw_cap_;
+        SaveToStorage();
+    } else {
+        // Always restore backup value
+        SaveToSRAM();
+    }
 }
 
 void LearnedCapacityBackupRestore::Backup() {
     ReadFromSRAM();
-    UpdateAndSave();
+    if (sw_cap_ != hw_cap_) {
+        // Always backup the new FG computed learned capacity
+        sw_cap_ = hw_cap_;
+        SaveToStorage();
+    }
 }
 
 void LearnedCapacityBackupRestore::ReadFromStorage() {
@@ -90,24 +101,6 @@
         LOG(ERROR) << "Write data error: " << strerror(errno);
 }
 
-void LearnedCapacityBackupRestore::UpdateAndSave() {
-    bool backup = false;
-    bool restore = false;
-    if (hw_cap_) {
-        if ((hw_cap_ < sw_cap_) || (sw_cap_ == 0)) {
-            sw_cap_ = hw_cap_;
-            backup = true;
-        } else if (hw_cap_ > sw_cap_) {
-            hw_cap_ = sw_cap_;
-            restore = true;
-        }
-    }
-    if (restore)
-        SaveToSRAM();
-    if (backup)
-        SaveToStorage();
-}
-
 }  // namespace health
 }  // namespace wahoo
 }  // namespace google
diff --git a/health/LearnedCapacityBackupRestore.h b/health/LearnedCapacityBackupRestore.h
index 13d38e2..da9e564 100644
--- a/health/LearnedCapacityBackupRestore.h
+++ b/health/LearnedCapacityBackupRestore.h
@@ -41,7 +41,6 @@
     void SaveToStorage();
     void ReadFromSRAM();
     void SaveToSRAM();
-    void UpdateAndSave();
 };
 
 }  // namespace health
diff --git a/init.fingerprint.sh b/init.fingerprint.sh
new file mode 100755
index 0000000..413fd9e
--- /dev/null
+++ b/init.fingerprint.sh
@@ -0,0 +1,48 @@
+#!/vendor/bin/sh
+# /vendor/bin/init.fingerprint.sh [max_init_retry_times]
+
+# fps_hal service prop
+fps_svc_prop='init.svc.vendor.fps_hal'
+# fps_hal service name
+fps_svc_name='vendor.fps_hal'
+# fps_hal service init retry count
+init_retry_count_prop='vendor.fps.init_retry.count'
+# fps_hal service init succeed
+init_succeed_prop='vendor.fps.init.succeed'
+# Define maximum init retry times as default 10
+max_times=10
+
+# Deal with the input parameter
+if [ "$#" -ge 1 ]; then
+  # Check is it positive number or not
+  # If so, then set maximum times as $1
+  # If not, $max_times keeps in default value
+  if [ "$1" -eq "$1" ] && [ "$1" -gt 0 ]; then
+    max_times=$1
+    echo $max_times
+  fi
+fi
+
+# fps_hal service init retry count
+init_retry_count=0
+
+while [ "$init_retry_count" -le "$max_times" ]
+do
+  # debouncing time for init processing
+  sleep 5
+  # Get fps_hal service state and count init retry times
+  fps_svc_state=$(getprop $fps_svc_prop)
+  if [ "$fps_svc_state" == "stopped" ]; then
+    if [ "$init_retry_count" -lt "$max_times" ]; then
+      init_retry_count=$((init_retry_count+1))
+      setprop $init_retry_count_prop $init_retry_count
+      setprop $init_succeed_prop false
+      start $fps_svc_name
+    else
+      break;
+    fi
+  elif [ "$fps_svc_state" == "running" ]; then
+    setprop $init_succeed_prop true
+    break
+  fi
+done
diff --git a/init.hardware.rc b/init.hardware.rc
index 31f5bb5..951b8db 100644
--- a/init.hardware.rc
+++ b/init.hardware.rc
@@ -188,6 +188,9 @@
     chmod 0770 /persist/rfs/apq/gnss
     chmod 0770 /persist/hlos_rfs
 
+    # b/78019660 Remove unlabeled persist_rfs_file
+    rm /persist/rfs/msm/mpss/server_check.txt
+
     # for android.hardware.health@2.0-service.marlin cycle count backup
     mkdir /persist/battery 0700 system system
 
@@ -227,20 +230,6 @@
     # Wait qseecomd started
     wait_for_prop sys.listeners.registered true
 
-on property:sys.user.0.ce_available=true
-    mkdir /data/misc_ce/0/ramoops
-    start vendor.ramoops_sh
-
-on property:sys.ramoops.decrypted=true
-    mount pstore pstore /sys/fs/pstore
-    chown system log /sys/fs/pstore
-    chown system log /sys/fs/pstore/console-ramoops
-    chmod 0440 /sys/fs/pstore/console-ramoops
-    chown system log /sys/fs/pstore/console-ramoops-0
-    chmod 0440 /sys/fs/pstore/console-ramoops-0
-    chown system log /sys/fs/pstore/pmsg-ramoops-0
-    chmod 0440 /sys/fs/pstore/pmsg-ramoops-0
-
 on property:sys.listeners.registered=true
     # load IPA FWs
     start vendor.ipastart_sh
@@ -255,6 +244,10 @@
     # b/38496103 Setup debug folders for display
     mkdir /data/vendor/display 0770 system graphics
 
+    # b/65834073 Create rfs folder for tftp_server
+    mkdir /data/vendor/tombstones 0770 system system
+    mkdir /data/vendor/tombstones/rfs 0770 root system
+
     # keep that at the end of on post-fs-data
     # Set indication (checked by vold) that we have finished this action
     setprop vold.post_fs_data_done 1
@@ -335,7 +328,7 @@
     mkdir /data/misc/dash 0770 media audio
 
     # Create directory for radio
-    mkdir /data/vendor/radio 0771 system radio
+    mkdir /data/vendor/radio 0773 system radio
 
     # Create directory used by display clients
     mkdir /data/misc/display 0770 system graphics
@@ -480,19 +473,15 @@
     # default country code
     setprop ro.boot.wificountrycode 00
 
-    # Encrypted ramoops
-    umount /sys/fs/pstore
-    chmod 770 /dev/access-ramoops
-    chown system system /dev/access-ramoops
-    chmod 770 /dev/access-metadata
-    chown system system /dev/access-metadata
-
     # Make the ftm4 command node writeable from dumpstate
     chown system system /sys/devices/virtual/input/ftm4_touch/cmd
 
     # ftm4 VR mode
     chown system system /sys/devices/virtual/input/ftm4_touch/vrmode
 
+    # WLAN debug access
+    chown system system /d/icnss/stats
+
 service vendor.init-elabel-sh /system/bin/init.elabel.sh
     class late_start
     user system
@@ -563,6 +552,8 @@
     chown system system /sys/devices/soc/soc:qcom,cpubw/devfreq/soc:qcom,cpubw/bw_hwmon/hyst_trigger_count
     chown system system /sys/devices/soc/soc:qcom,cpubw/devfreq/soc:qcom,cpubw/bw_hwmon/hist_memory
     chown system system /sys/devices/soc/soc:qcom,cpubw/devfreq/soc:qcom,cpubw/bw_hwmon/hyst_length
+    # Enable PowerHAL hint processing
+    setprop vendor.powerhal.init 1
 
 on property:sys.boot_completed=1
     # Enable power setting and set sys.post_boot.parsed to 1
@@ -618,6 +609,7 @@
 # we don't want to run swapon_all at that time.
 on sys-boot-completed-set && property:persist.sys.zram_enabled=1
     swapon_all /vendor/etc/fstab.${ro.hardware}
+    write /proc/sys/vm/swappiness 100
 
 on property:init.svc.vendor.per_mgr=running
     start vendor.per_proxy
@@ -841,13 +833,6 @@
     disabled
     oneshot
 
-service vendor.ramoops_sh /system/bin/init.ramoops.sh
-    class main
-    user root
-    group root system
-    disabled
-    oneshot
-
 # b/70518189 vDSO experiments
 on property:sys.vdso=*
    write /sys/module/vdso/parameters/enable_32 1
@@ -873,3 +858,41 @@
     setprop persist.vendor.charge.stop.level 35
     setprop persist.vendor.charge.start.level 30
 
+on property:sys.boot_completed=1
+    # Create pixel-trace.
+    # At this moment, only mm_event is available. If others want to put more,
+    # it should get hard review from pixel-perf-team.
+
+    mkdir /sys/kernel/debug/tracing/instances/pixel-trace 600
+    write /sys/kernel/debug/tracing/instances/pixel-trace/buffer_size_kb 64
+    write /sys/kernel/debug/tracing/instances/pixel-trace/events/mm_event/enable 1
+
+# turns off tracing right before bugreporting to keep more traces
+on property:init.svc.dumpstatez=running
+    write /d/tracing/instances/pixel-trace/tracing_on 0
+
+on property:init.svc.dumpstatez=stopped
+    write /d/tracing/instances/pixel-trace/tracing_on 1
+
+on property:init.svc.bugreport=running
+    write /d/tracing/instances/pixel-trace/tracing_on 0
+
+on property:init.svc.bugreport=stopped
+    write /d/tracing/instances/pixel-trace/tracing_on 1
+
+# init-fingerprint-sh is for stopping fps_hal after init retry fail serval times
+# It keeps running until max init retry or fps_hal running successfully
+# vendor.fps_hal restarts until max init retry times
+#
+# /vendor/bin/init.fingerprint.sh [max_init_retry_times]
+service init-fingerprint-sh /vendor/bin/init.fingerprint.sh 10
+    group root
+    user root
+    disabled
+    oneshot
+
+on property:sys.boot_completed=1
+    start init-fingerprint-sh
+
+on property:vendor.fps.init.succeed=true && property:init.svc.vendor.fps_hal=stopped
+    start init-fingerprint-sh
diff --git a/init.hardware.usb.rc b/init.hardware.usb.rc
index 09ae4d5..a73170f 100644
--- a/init.hardware.usb.rc
+++ b/init.hardware.usb.rc
@@ -43,7 +43,7 @@
     write /config/usb_gadget/g1/os_desc/qw_sign "MSFT100"
     mkdir /dev/usb-ffs 0775 shell shell
     mkdir /dev/usb-ffs/adb 0770 shell shell
-    mount functionfs adb /dev/usb-ffs/adb rmode=0770,fmode=0660,uid=2000,gid=2000
+    mount functionfs adb /dev/usb-ffs/adb rmode=0770,fmode=0660,uid=2000,gid=2000,no_disconnect=1
     mkdir /dev/usb-ffs/mtp 0770 mtp mtp
     mkdir /dev/usb-ffs/ptp 0770 mtp mtp
     mount functionfs mtp /dev/usb-ffs/mtp rmode=0770,fmode=0660,uid=1024,gid=1024,no_disconnect=1
diff --git a/init.ramoops.sh b/init.ramoops.sh
index 4c57a1a..37b69e5 100644
--- a/init.ramoops.sh
+++ b/init.ramoops.sh
@@ -1,4 +1,4 @@
-#!/system/bin/sh
+#!/vendor/bin/sh
 
 # Decrypt the keys and write them to the kernel
 ramoops -D
@@ -7,11 +7,11 @@
     # Pivot (and decrypt)
     echo 1 > /sys/devices/virtual/ramoops/pstore/use_alt
 else
-    setprop sys.ramoops.decryption.error $?
+    setprop vendor.ramoops.decryption.error $?
 fi
 
 # Trigger remount of pstore regardless of decryption state
-setprop sys.ramoops.decrypted true
+setprop vendor.ramoops.decrypted true
 
 # Generate keys (if none exist), and load the keys to carveout
 if [[ $(getprop ro.hardware) == "walleye" ]]; then
diff --git a/manifest.xml b/manifest.xml
index 2409a72..6cf24ae 100644
--- a/manifest.xml
+++ b/manifest.xml
@@ -65,7 +65,7 @@
     <hal format="hidl">
         <name>android.hardware.configstore</name>
         <transport>hwbinder</transport>
-        <version>1.1</version>
+        <version>1.2</version>
         <interface>
             <name>ISurfaceFlingerConfigs</name>
             <instance>default</instance>
@@ -351,7 +351,7 @@
     <hal format="hidl">
         <name>android.hardware.wifi</name>
         <transport>hwbinder</transport>
-        <version>1.2</version>
+        <version>1.3</version>
         <interface>
             <name>IWifi</name>
             <instance>default</instance>
@@ -360,7 +360,7 @@
     <hal format="hidl">
         <name>android.hardware.wifi.hostapd</name>
         <transport>hwbinder</transport>
-        <version>1.0</version>
+        <version>1.1</version>
         <interface>
             <name>IHostapd</name>
             <instance>default</instance>
diff --git a/overlay/packages/apps/Bluetooth/res/values/config.xml b/overlay/packages/apps/Bluetooth/res/values/config.xml
index 6db14c0..e403105 100644
--- a/overlay/packages/apps/Bluetooth/res/values/config.xml
+++ b/overlay/packages/apps/Bluetooth/res/values/config.xml
@@ -29,4 +29,5 @@
 -->
 <resources>
     <bool name="profile_supported_sap">true</bool>
+    <bool name="profile_supported_hearing_aid">true</bool>
 </resources>
diff --git a/power-libperfmgr/Power.cpp b/power-libperfmgr/Power.cpp
index 8a009c3..0b36c9e 100644
--- a/power-libperfmgr/Power.cpp
+++ b/power-libperfmgr/Power.cpp
@@ -52,40 +52,51 @@
 using ::android::hardware::Void;
 
 Power::Power() :
-        mHintManager(HintManager::GetFromJSON("/vendor/etc/powerhint.json")),
-        mInteractionHandler(mHintManager),
+        mHintManager(nullptr),
+        mInteractionHandler(nullptr),
         mVRModeOn(false),
         mSustainedPerfModeOn(false),
-        mEncoderModeOn(false) {
-    mInteractionHandler.Init();
+        mEncoderModeOn(false),
+        mReady(false) {
+            mInitThread =
+            std::thread([this](){
+                            android::base::WaitForProperty(kPowerHalInitProp, "1");
+                            mHintManager = HintManager::GetFromJSON("/vendor/etc/powerhint.json");
+                            mInteractionHandler = std::make_unique<InteractionHandler>(mHintManager);
+                            mInteractionHandler->Init();
 
-    std::string state = android::base::GetProperty(kPowerHalStateProp, "");
-    if (state == "VIDEO_ENCODE") {
-        ALOGI("Initialize with VIDEO_ENCODE on");
-        mHintManager->DoHint("VIDEO_ENCODE");
-        mEncoderModeOn = true;
-    } else if (state ==  "SUSTAINED_PERFORMANCE") {
-        ALOGI("Initialize with SUSTAINED_PERFORMANCE on");
-        mHintManager->DoHint("SUSTAINED_PERFORMANCE");
-        mSustainedPerfModeOn = true;
-    } else if (state == "VR_MODE") {
-        ALOGI("Initialize with VR_MODE on");
-        mHintManager->DoHint("VR_MODE");
-        mVRModeOn = true;
-    } else if (state == "VR_SUSTAINED_PERFORMANCE") {
-        ALOGI("Initialize with SUSTAINED_PERFORMANCE and VR_MODE on");
-        mHintManager->DoHint("VR_SUSTAINED_PERFORMANCE");
-        mSustainedPerfModeOn = true;
-        mVRModeOn = true;
-    } else {
-        ALOGI("Initialize PowerHAL");
-    }
+                            std::string state = android::base::GetProperty(kPowerHalStateProp, "");
+                            if (state == "VIDEO_ENCODE") {
+                                ALOGI("Initialize with VIDEO_ENCODE on");
+                                mHintManager->DoHint("VIDEO_ENCODE");
+                                mEncoderModeOn = true;
+                            } else if (state ==  "SUSTAINED_PERFORMANCE") {
+                                ALOGI("Initialize with SUSTAINED_PERFORMANCE on");
+                                mHintManager->DoHint("SUSTAINED_PERFORMANCE");
+                                mSustainedPerfModeOn = true;
+                            } else if (state == "VR_MODE") {
+                                ALOGI("Initialize with VR_MODE on");
+                                mHintManager->DoHint("VR_MODE");
+                                mVRModeOn = true;
+                            } else if (state == "VR_SUSTAINED_PERFORMANCE") {
+                                ALOGI("Initialize with SUSTAINED_PERFORMANCE and VR_MODE on");
+                                mHintManager->DoHint("VR_SUSTAINED_PERFORMANCE");
+                                mSustainedPerfModeOn = true;
+                                mVRModeOn = true;
+                            } else {
+                                ALOGI("Initialize PowerHAL");
+                            }
 
-    state = android::base::GetProperty(kPowerHalAudioProp, "");
-    if (state == "LOW_LATENCY") {
-        ALOGI("Initialize with AUDIO_LOW_LATENCY on");
-        mHintManager->DoHint("AUDIO_LOW_LATENCY");
-    }
+                            state = android::base::GetProperty(kPowerHalAudioProp, "");
+                            if (state == "LOW_LATENCY") {
+                                ALOGI("Initialize with AUDIO_LOW_LATENCY on");
+                                mHintManager->DoHint("AUDIO_LOW_LATENCY");
+                            }
+
+                            // Now start to take powerhint
+                            mReady.store(true);
+                        });
+            mInitThread.detach();
 }
 
 // Methods from ::android::hardware::power::V1_0::IPower follow.
@@ -94,7 +105,7 @@
 }
 
 Return<void> Power::powerHint(PowerHint_1_0 hint, int32_t data) {
-    if (!isSupportedGovernor()) {
+    if (!isSupportedGovernor() || !mReady) {
         return Void();
     }
 
@@ -103,7 +114,7 @@
             if (mVRModeOn || mSustainedPerfModeOn) {
                 ALOGV("%s: ignoring due to other active perf hints", __func__);
             } else {
-                mInteractionHandler.Acquire(data);
+                mInteractionHandler->Acquire(data);
             }
             break;
         case PowerHint_1_0::VIDEO_ENCODE:
@@ -417,7 +428,7 @@
 
 // Methods from ::android::hardware::power::V1_2::IPower follow.
 Return<void> Power::powerHintAsync_1_2(PowerHint_1_2 hint, int32_t data) {
-    if (!isSupportedGovernor()) {
+    if (!isSupportedGovernor() || !mReady) {
         return Void();
     }
 
@@ -518,7 +529,7 @@
 }
 
 Return<void> Power::debug(const hidl_handle& handle, const hidl_vec<hidl_string>&) {
-    if (handle != nullptr && handle->numFds >= 1) {
+    if (handle != nullptr && handle->numFds >= 1 && mReady) {
         int fd = handle->data[0];
 
         std::string buf(android::base::StringPrintf("HintManager Running: %s\n"
diff --git a/power-libperfmgr/Power.h b/power-libperfmgr/Power.h
index a39323f..61529b2 100644
--- a/power-libperfmgr/Power.h
+++ b/power-libperfmgr/Power.h
@@ -18,6 +18,7 @@
 #define ANDROID_HARDWARE_POWER_V1_2_POWER_H
 
 #include <atomic>
+#include <thread>
 
 #include <android/hardware/power/1.2/IPower.h>
 #include <hidl/MQDescriptor.h>
@@ -43,6 +44,7 @@
 
 constexpr char kPowerHalStateProp[] = "vendor.powerhal.state";
 constexpr char kPowerHalAudioProp[] = "vendor.powerhal.audio";
+constexpr char kPowerHalInitProp[] = "vendor.powerhal.init";
 
 struct Power : public IPower {
     // Methods from ::android::hardware::power::V1_0::IPower follow.
@@ -68,10 +70,12 @@
     static bool isSupportedGovernor();
 
     std::shared_ptr<HintManager> mHintManager;
-    InteractionHandler mInteractionHandler;
+    std::unique_ptr<InteractionHandler> mInteractionHandler;
     std::atomic<bool> mVRModeOn;
     std::atomic<bool> mSustainedPerfModeOn;
     std::atomic<bool> mEncoderModeOn;
+    std::atomic<bool> mReady;
+    std::thread mInitThread;
 };
 
 }  // namespace implementation
diff --git a/powerhint.xml b/powerhint.xml
deleted file mode 100755
index 01d6e42..0000000
--- a/powerhint.xml
+++ /dev/null
@@ -1,102 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-
-<!--
-/* Copyright (c) 2016, The Linux Foundation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- *       copyright notice, this list of conditions and the following
- *       disclaimer in the documentation and/or other materials provided
- *       with the distribution.
- *     * Neither the name of The Linux Foundation nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
--->
-
-<Powerhint>
-    <Hint type="0x0A00"> <!--video encode 30 fps-->
-        <Resource opcode="0x40804000" value="0x7A6"/>   <!-- B CPU - Cluster max freq ~1.958 Ghz -->
-    </Hint>
-    <Hint type="0x0F00"> <!--sustained performance-->
-        <Resource opcode="0x40800000" value="0x0"/>     <!-- B CPU - Cluster min freq uncapped -->
-        <Resource opcode="0x40800100" value="0x0"/>     <!-- L CPU - Cluster min freq uncapped -->
-        <Resource opcode="0x40804000" value="0x4E0"/>   <!-- B CPU - Cluster max freq ~1.2 GHz -->
-        <Resource opcode="0x40804100" value="0x4E0"/>   <!-- L CPU - Cluster max freq ~1.2 Ghz -->
-        <Resource opcode="0x42810000" value="0x156"/>   <!-- GPU - max freq 342 Mhz -->
-        <Resource opcode="0x42814000" value="0x0"/>     <!-- GPUBW freq uncapped -->
-    </Hint>
-    <Hint type="0x1000"> <!--vr mode-->
-        <Resource opcode="0x40800000" value="0x626"/>   <!-- B CPU - Cluster min freq ~1.4 Ghz -->
-        <Resource opcode="0x40800100" value="0x613"/>   <!-- L CPU - Cluster min freq ~1.4 Ghz -->
-        <Resource opcode="0x40804000" value="0x626"/>   <!-- B CPU - Cluster max freq ~1.4 Ghz -->
-        <Resource opcode="0x40804100" value="0x613"/>   <!-- L CPU - Cluster max freq ~1.4 Ghz -->
-        <Resource opcode="0x4280C000" value="0x203"/>   <!-- GPU - min freq 515 Mhz -->
-        <Resource opcode="0x42810000" value="0x203"/>   <!-- GPU - max freq 515 Mhz -->
-        <Resource opcode="0x42814000" value="0x2E57"/>  <!-- GPUBW freq 1555 Mhz-->
-    </Hint>
-    <Hint type="0x1001"> <!--vr mode sustained performance-->
-        <Resource opcode="0x40800000" value="0x540"/>   <!-- B CPU - Cluster min freq ~1.5 Ghz -->
-        <Resource opcode="0x40800100" value="0x5c6"/>   <!-- L CPU - Cluster min freq ~1.3 Ghz -->
-        <Resource opcode="0x40804000" value="0x540"/>   <!-- B CPU - Cluster max freq ~1.5 Ghz -->
-        <Resource opcode="0x40804100" value="0x5c6"/>   <!-- L CPU - Cluster max freq ~1.3 Ghz -->
-        <Resource opcode="0x4280C000" value="0x19E"/>   <!-- GPU - min freq 414 Mhz -->
-        <Resource opcode="0x42810000" value="0x19E"/>   <!-- GPU - max freq 414 Mhz -->
-        <Resource opcode="0x42814000" value="0x1E4F"/>  <!-- GPUBW freq 1017 Mhz -->
-    </Hint>
-    <Hint type="0x1A00"> <!--interaction-->
-        <Resource opcode="0x40800000" value="0x44C"/>     <!-- B CPU - Cluster min freq ~1.1 Ghz -->
-        <Resource opcode="0x40800100" value="0x44C"/>     <!-- L CPU - Cluster min freq ~1.1 Ghz -->
-        <Resource opcode="0x42C18000" value="0x32"/>      <!-- Top App schedtune boost to 50 -->
-        <Resource opcode="0x4180C000" value="0x0"/>       <!-- CPUBW disable hysteresis -->
-        <Resource opcode="0x41800000" value="0x33"/>      <!-- CPUBW min freq 681 MHz -->
-    </Hint>
-    <Hint type="0x1B00"> <!--boost-->
-        <Resource opcode="0x40800000" value="0xFFF"/>     <!-- B CPU - Cluster min freq ~ max -->
-        <Resource opcode="0x40800100" value="0xFFF"/>     <!-- L CPU - Cluster min freq ~ max -->
-        <Resource opcode="0x4180C000" value="0x0"/>       <!-- CPUBW disable hysteresis -->
-        <Resource opcode="0x40400000" value="0x1"/>       <!-- POWER_COLLAPSE -->
-        <Resource opcode="0x41800000" value="0x8C"/>      <!-- CPUBW min freq 1804 MHz -->
-    </Hint>
-    <Hint type="0x0B0A"> <!--CAMERA LAUNCH-->
-        <Resource opcode="0x40800000" value="0xFFF"/>     <!-- B CPU - Cluster min freq ~ max -->
-        <Resource opcode="0x40800100" value="0xFFF"/>     <!-- L CPU - Cluster min freq ~ max -->
-        <Resource opcode="0x40400000" value="0x1"/>       <!-- POWER_COLLAPSE -->
-    </Hint>
-    <Hint type="0x0C0A"> <!--CAMERA STREAMING-->
-        <Resource opcode="0x40800000" value="0xFFF"/>     <!-- B CPU - Cluster min freq ~ max -->
-        <Resource opcode="0x40800100" value="0xFFF"/>     <!-- L CPU - Cluster min freq ~ max -->
-        <Resource opcode="0x40400000" value="0x1"/>       <!-- POWER_COLLAPSE -->
-    </Hint>
-    <Hint type="0x0D0A"> <!--CAMERA SHOT-->
-        <Resource opcode="0x40800000" value="0xFFF"/>     <!-- B CPU - Cluster min freq ~ max -->
-        <Resource opcode="0x40800100" value="0xFFF"/>     <!-- L CPU - Cluster min freq ~ max -->
-        <Resource opcode="0x40400000" value="0x1"/>       <!-- POWER_COLLAPSE -->
-        <Resource opcode="0x4180C000" value="0x0"/>       <!-- CPUBW disable hysteresis -->
-        <Resource opcode="0x41800000" value="0x8C"/>      <!-- CPUBW min freq 1804 MHz -->
-    </Hint>
-    <Hint type="0x0E0A"> <!--AUDIO STREAMING-->
-        <Resource opcode="0x40400000" value="0x1"/>       <!-- POWER_COLLAPSE -->
-        <Resource opcode="0x40800000" value="0x579"/>     <!-- B CPU - Cluster min freq ~1.4 Ghz -->
-    </Hint>
-    <Hint type="0x0F0A"> <!--AUDIO_LOW_LATENCY-->
-        <Resource opcode="0x40400000" value="0x1"/>       <!-- POWER_COLLAPSE -->
-    </Hint>
-
-</Powerhint>
diff --git a/sepolicy/private/device.te b/sepolicy/private/device.te
deleted file mode 100644
index ae7cadd..0000000
--- a/sepolicy/private/device.te
+++ /dev/null
@@ -1 +0,0 @@
-type ramoops_device, dev_type;
diff --git a/sepolicy/private/file_contexts b/sepolicy/private/file_contexts
index 88cdca0..6ed955e 100644
--- a/sepolicy/private/file_contexts
+++ b/sepolicy/private/file_contexts
@@ -1,8 +1,3 @@
 /system/bin/folio_daemon          u:object_r:folio_daemon_exec:s0
 /data/misc/elabel(/.*)?           u:object_r:elabel_data_file:s0
 /system/bin/init\.elabel\.sh      u:object_r:init_elabel_exec:s0
-/system/bin/ramoops               u:object_r:ramoops_exec:s0
-/system/bin/init\.ramoops\.sh     u:object_r:ramoops_exec:s0
-/dev/access-metadata              u:object_r:ramoops_device:s0
-/dev/access-ramoops               u:object_r:ramoops_device:s0
-/data/misc_ce/[0-9]+/ramoops(/.*)? u:object_r:ramoops_data_file:s0
diff --git a/sepolicy/private/genfs_contexts b/sepolicy/private/genfs_contexts
deleted file mode 100644
index 9c5764a..0000000
--- a/sepolicy/private/genfs_contexts
+++ /dev/null
@@ -1,4 +0,0 @@
-genfscon sysfs /devices/virtual/ramoops/pstore/aes_key                  u:object_r:sysfs_pstore:s0
-genfscon sysfs /devices/virtual/ramoops/pstore/aes_key_iv               u:object_r:sysfs_pstore:s0
-genfscon sysfs /devices/virtual/ramoops/pstore/aes_key_tag              u:object_r:sysfs_pstore:s0
-genfscon sysfs /devices/virtual/ramoops/pstore/use_alt                  u:object_r:sysfs_pstore:s0
diff --git a/sepolicy/private/property.te b/sepolicy/private/property.te
deleted file mode 100644
index cc8bd9c..0000000
--- a/sepolicy/private/property.te
+++ /dev/null
@@ -1 +0,0 @@
-type ramoops_prop, property_type;
diff --git a/sepolicy/private/property_contexts b/sepolicy/private/property_contexts
deleted file mode 100644
index 8453a6c..0000000
--- a/sepolicy/private/property_contexts
+++ /dev/null
@@ -1 +0,0 @@
-sys.ramoops.                  u:object_r:ramoops_prop:s0
diff --git a/sepolicy/private/ramoops.te b/sepolicy/private/ramoops.te
deleted file mode 100644
index ade857b..0000000
--- a/sepolicy/private/ramoops.te
+++ /dev/null
@@ -1,20 +0,0 @@
-type ramoops, domain, coredomain;
-type ramoops_exec, exec_type, file_type, system_file_type;
-
-init_daemon_domain(ramoops);
-
-# kmod=crypto-gcm(aes)
-dontaudit ramoops kernel:system module_request;
-
-allow ramoops ramoops_exec:file rx_file_perms;
-allow ramoops shell_exec:file rx_file_perms;
-allow ramoops toolbox_exec:file rx_file_perms;
-
-# Set the sys.ramoops.decrypted property
-typeattribute ramoops system_writes_vendor_properties_violators;
-set_prop(ramoops, ramoops_prop);
-
-allow ramoops sysfs_pstore:file rw_file_perms;
-allow ramoops ramoops_device:chr_file rw_file_perms;
-allow ramoops ramoops_data_file:file create_file_perms;
-allow ramoops ramoops_data_file:dir rw_dir_perms;
diff --git a/sepolicy/public/file.te b/sepolicy/public/file.te
index 1224e34..091d295 100644
--- a/sepolicy/public/file.te
+++ b/sepolicy/public/file.te
@@ -1,2 +1 @@
 type elabel_data_file, file_type, data_file_type, core_data_file_type;
-type sysfs_pstore, sysfs_type, fs_type;
diff --git a/sepolicy/public/ramoops.te b/sepolicy/public/ramoops.te
deleted file mode 100644
index 4ad9ac1..0000000
--- a/sepolicy/public/ramoops.te
+++ /dev/null
@@ -1 +0,0 @@
-type ramoops_data_file, file_type, data_file_type, core_data_file_type;
diff --git a/sepolicy/vendor/bug_map b/sepolicy/vendor/bug_map
index c8e08d7..19f82e3 100644
--- a/sepolicy/vendor/bug_map
+++ b/sepolicy/vendor/bug_map
@@ -10,7 +10,6 @@
 hal_camera_default debugfs dir 77865891
 hal_camera_default radio_prop file 77865891
 hal_imsrtp default_prop file 77725358
-hal_power_default cgroup file 77919134
 init_power init_power capability 77915310
 installd media_rw_data_file file 77926261
 netutils_wrapper oemfs dir 77871509
@@ -28,5 +27,4 @@
 surfaceflinger vendor_default_prop file 79617173
 system_app vendor_default_prop file 79617173
 system_server vendor_default_prop file 79617173
-thermal-engine thermal-engine capability 78019417
 untrusted_app vendor_default_prop file 79617173
diff --git a/sepolicy/vendor/cameraserver.te b/sepolicy/vendor/cameraserver.te
index 594f22a..b9adc4c 100644
--- a/sepolicy/vendor/cameraserver.te
+++ b/sepolicy/vendor/cameraserver.te
@@ -8,5 +8,4 @@
 
 allow cameraserver system_server:unix_stream_socket { read write };
 
-# TODO (b/37688918) Verify that this is actually needed and not a violation of treble
 binder_call(cameraserver, mediacodec)
diff --git a/sepolicy/vendor/device.te b/sepolicy/vendor/device.te
index c63bdb3..b683453 100644
--- a/sepolicy/vendor/device.te
+++ b/sepolicy/vendor/device.te
@@ -26,3 +26,4 @@
 type thermal_device, dev_type;
 type wlan_device, dev_type;
 type xbl_block_device, dev_type;
+type ramoops_device, dev_type;
diff --git a/sepolicy/vendor/file.te b/sepolicy/vendor/file.te
index c9a1d09..85471b1 100644
--- a/sepolicy/vendor/file.te
+++ b/sepolicy/vendor/file.te
@@ -38,6 +38,7 @@
 
 # /proc
 type proc_wifi_dbg, fs_type, proc_type;
+type proc_swappiness, fs_type, proc_type;
 
 type qmuxd_socket, file_type;
 type netmgrd_socket, file_type;
@@ -79,6 +80,9 @@
 type audio_vendor_data_file, file_type, data_file_type;
 type mediadrm_vendor_data_file, file_type, data_file_type;
 
+# Tombstone vendor data
+type tombstone_vendor_data_file, file_type, data_file_type;
+
 #diag sysfs files
 type sysfs_diag, fs_type, sysfs_type;
 
@@ -91,3 +95,6 @@
 type proc_irq, fs_type, proc_type;
 type sysfs_irq, sysfs_type, fs_type;
 type irqbalance_socket, file_type;
+
+type sysfs_pstore, sysfs_type, fs_type;
+type ramoops_vendor_data_file, file_type, data_file_type;
diff --git a/sepolicy/vendor/file_contexts b/sepolicy/vendor/file_contexts
index 914a0cc..ceb22fb 100644
--- a/sepolicy/vendor/file_contexts
+++ b/sepolicy/vendor/file_contexts
@@ -36,6 +36,8 @@
 /dev/mnh_sm                                     u:object_r:easel_device:s0
 /dev/easelcomm-client                           u:object_r:easel_device:s0
 /dev/pn81a                                      u:object_r:pn81a_device:s0
+/dev/access-metadata                            u:object_r:ramoops_device:s0
+/dev/access-ramoops                             u:object_r:ramoops_device:s0
 
 # dev socket nodes
 /dev/socket/chre                                u:object_r:chre_socket:s0
@@ -176,6 +178,9 @@
 /vendor/etc/init\.insmod\.cfg                                        u:object_r:init-insmod-sh_exec:s0
 /vendor/bin/init\.power\.sh     u:object_r:init_power_exec:s0
 /vendor/bin/init\.radio\.sh     u:object_r:init_radio_exec:s0
+/vendor/bin/ramoops             u:object_r:ramoops_exec:s0
+/vendor/bin/init\.ramoops\.sh   u:object_r:ramoops_exec:s0
+/vendor/bin/init\.fingerprint\.sh                                    u:object_r:init-fingerprint_exec:s0
 
 /vendor/bin/hw/android\.hardware\.bluetooth@1\.0-service-qti          u:object_r:hal_bluetooth_default_exec:s0
 /vendor/bin/hw/android\.hardware\.drm@1\.1-service\.widevine          u:object_r:hal_drm_widevine_exec:s0
@@ -252,6 +257,8 @@
 /data/vendor/sensors(/.*)?             u:object_r:sensors_vendor_data_file:s0
 /data/vendor/audio(/.*)?               u:object_r:audio_vendor_data_file:s0
 /data/vendor/mediadrm(/.*)?            u:object_r:mediadrm_vendor_data_file:s0
+/data/vendor/tombstones(/.*)?          u:object_r:tombstone_vendor_data_file:s0
+/data/vendor_ce/[0-9]+/ramoops(/.*)?   u:object_r:ramoops_vendor_data_file:s0
 
 # /
 /tombstones             u:object_r:rootfs:s0
diff --git a/sepolicy/vendor/genfs_contexts b/sepolicy/vendor/genfs_contexts
index ff95251..0a82997 100644
--- a/sepolicy/vendor/genfs_contexts
+++ b/sepolicy/vendor/genfs_contexts
@@ -3,6 +3,7 @@
 genfscon proc /debugdriver/driverdump                 u:object_r:proc_wifi_dbg:s0
 genfscon proc /ath_pktlog/cld                         u:object_r:proc_wifi_dbg:s0
 genfscon proc /irq                                    u:object_r:proc_irq:s0
+genfscon proc /sys/vm/swappiness                      u:object_r:proc_swappiness:s0
 
 genfscon sysfs /devices/soc/soc:qcom,cpubw            u:object_r:sysfs_msm_subsys:s0
 genfscon sysfs /devices/soc/soc:qcom,mincpubw         u:object_r:sysfs_msm_subsys:s0
@@ -98,3 +99,8 @@
 genfscon debugfs /fg/sram                             u:object_r:debugfs_fg_sram:s0
 genfscon debugfs /dma_buf/bufinfo                     u:object_r:debugfs_dma_bufinfo:s0
 genfscon debugfs /tzdbg	                              u:object_r:debugfs_tzdbg:s0
+
+genfscon sysfs /devices/virtual/ramoops/pstore/aes_key                  u:object_r:sysfs_pstore:s0
+genfscon sysfs /devices/virtual/ramoops/pstore/aes_key_iv               u:object_r:sysfs_pstore:s0
+genfscon sysfs /devices/virtual/ramoops/pstore/aes_key_tag              u:object_r:sysfs_pstore:s0
+genfscon sysfs /devices/virtual/ramoops/pstore/use_alt                  u:object_r:sysfs_pstore:s0
diff --git a/sepolicy/vendor/hal_dumpstate_impl.te b/sepolicy/vendor/hal_dumpstate_impl.te
index 39a8995..5ebd735 100644
--- a/sepolicy/vendor/hal_dumpstate_impl.te
+++ b/sepolicy/vendor/hal_dumpstate_impl.te
@@ -8,6 +8,10 @@
 allow hal_dumpstate_impl vendor_shell_exec:file rx_file_perms;
 allow hal_dumpstate_impl vendor_toolbox_exec:file rx_file_perms;
 
+# Allow to read pixel-trace trace file
+allow hal_dumpstate_impl debugfs_tracing_instances:dir search;
+allow hal_dumpstate_impl debugfs_tracing_instances:file r_file_perms;
+
 userdebug_or_eng(`
   # smlog_dump
   domain_auto_trans(hal_dumpstate_impl, smlog_dump_exec, smlog_dump)
diff --git a/sepolicy/vendor/hal_graphics_composer_default.te b/sepolicy/vendor/hal_graphics_composer_default.te
index 42aa393..c5e3668 100644
--- a/sepolicy/vendor/hal_graphics_composer_default.te
+++ b/sepolicy/vendor/hal_graphics_composer_default.te
@@ -16,7 +16,6 @@
 
 r_dir_file(hal_graphics_composer_default, sysfs_leds)
 
-# TODO(b/37666508): Remove the following line upon resolution of the bug
 allow hal_graphics_composer_default video_device:chr_file rw_file_perms;
 
 # HWC_UeventThread
diff --git a/sepolicy/vendor/init-fingerprint.te b/sepolicy/vendor/init-fingerprint.te
new file mode 100644
index 0000000..7053f0d
--- /dev/null
+++ b/sepolicy/vendor/init-fingerprint.te
@@ -0,0 +1,10 @@
+type init-fingerprint, domain;
+type init-fingerprint_exec, exec_type, vendor_file_type, file_type;
+
+init_daemon_domain(init-fingerprint)
+
+allow init-fingerprint vendor_shell_exec:file rx_file_perms;
+allow init-fingerprint vendor_toolbox_exec:file rx_file_perms;
+
+set_prop(init-fingerprint, vendor_fingerprint_prop)
+set_prop(init-fingerprint, ctl_start_prop)
diff --git a/sepolicy/vendor/location.te b/sepolicy/vendor/location.te
index 67471df..02f8d4a 100644
--- a/sepolicy/vendor/location.te
+++ b/sepolicy/vendor/location.te
@@ -35,7 +35,7 @@
 
 dontaudit location kernel:system module_request;
 
-allow location proc_net:file r_file_perms;
+allow location proc_net_type:file r_file_perms;
 
 # execute /vendor/bin/lowi-server
 allow location location_exec:file rx_file_perms;
@@ -46,4 +46,4 @@
 
 userdebug_or_eng(`
   allow location diag_device:chr_file rw_file_perms;
-')
\ No newline at end of file
+')
diff --git a/sepolicy/vendor/netmgrd.te b/sepolicy/vendor/netmgrd.te
index ebe12bb..da334ad 100644
--- a/sepolicy/vendor/netmgrd.te
+++ b/sepolicy/vendor/netmgrd.te
@@ -46,7 +46,7 @@
 #Ignore if device loading for private IOCTL failed
 dontaudit netmgrd kernel:system { module_request };
 
-allow netmgrd proc_net:file rw_file_perms;
+allow netmgrd proc_net_type:file rw_file_perms;
 allow netmgrd netmgr_data_file:dir rw_dir_perms;
 allow netmgrd netmgr_data_file:file create_file_perms;
 
diff --git a/sepolicy/vendor/property.te b/sepolicy/vendor/property.te
index 7651a23..9a978b1 100644
--- a/sepolicy/vendor/property.te
+++ b/sepolicy/vendor/property.te
@@ -24,3 +24,7 @@
 type vendor_usb_config_prop, property_type;
 type vendor_charge_prop, property_type;
 type persist_nfc_prop, property_type;
+type vendor_ramoops_prop, property_type;
+
+# fingerprint
+type vendor_fingerprint_prop, property_type;
diff --git a/sepolicy/vendor/property_contexts b/sepolicy/vendor/property_contexts
index 773a4c3..9d4597d 100644
--- a/sepolicy/vendor/property_contexts
+++ b/sepolicy/vendor/property_contexts
@@ -25,6 +25,7 @@
 sys.logger.bluetooth       u:object_r:bluetooth_log_prop:s0
 vendor.powerhal.state      u:object_r:power_prop:s0
 vendor.powerhal.audio      u:object_r:power_prop:s0
+vendor.powerhal.init       u:object_r:power_prop:s0
 sys.wlan.driver.version    u:object_r:vendor_wifi_version:s0
 sys.wlan.firmware.version  u:object_r:vendor_wifi_version:s0
 persist.vendor.usb.config  u:object_r:vendor_usb_config_prop:s0
@@ -208,3 +209,10 @@
 
 # persist_nfc_prop
 persist.nfc. u:object_r:persist_nfc_prop:s0
+
+# ramoops
+vendor.ramoops.                    u:object_r:vendor_ramoops_prop:s0
+
+# fingerprint
+vendor.fps.init.succeed               u:object_r:vendor_fingerprint_prop:s0
+vendor.fps.init_retry.count           u:object_r:vendor_fingerprint_prop:s0
diff --git a/sepolicy/vendor/ramoops.te b/sepolicy/vendor/ramoops.te
new file mode 100644
index 0000000..ec3c5e2
--- /dev/null
+++ b/sepolicy/vendor/ramoops.te
@@ -0,0 +1,19 @@
+type ramoops, domain;
+type ramoops_exec, exec_type, vendor_file_type, file_type;
+
+init_daemon_domain(ramoops);
+
+# kmod=crypto-gcm(aes)
+dontaudit ramoops kernel:system module_request;
+
+allow ramoops ramoops_exec:file rx_file_perms;
+allow ramoops vendor_shell_exec:file rx_file_perms;
+allow ramoops vendor_toolbox_exec:file rx_file_perms;
+
+# Set the sys.ramoops.decrypted property
+set_prop(ramoops, vendor_ramoops_prop);
+
+allow ramoops sysfs_pstore:file rw_file_perms;
+allow ramoops ramoops_device:chr_file rw_file_perms;
+allow ramoops ramoops_vendor_data_file:file create_file_perms;
+allow ramoops ramoops_vendor_data_file:dir rw_dir_perms;
diff --git a/sepolicy/vendor/rfs_access.te b/sepolicy/vendor/rfs_access.te
index 9b6d9ca..7973b49 100644
--- a/sepolicy/vendor/rfs_access.te
+++ b/sepolicy/vendor/rfs_access.te
@@ -16,3 +16,7 @@
 allow rfs_access persist_rfs_file:file create_file_perms;
 
 allow rfs_access self:socket create_socket_perms_no_ioctl;
+
+# For ramdump entries in /data/vendor/tombstones
+allow rfs_access tombstone_vendor_data_file:dir create_dir_perms;
+allow rfs_access tombstone_vendor_data_file:file create_file_perms;
diff --git a/sepolicy/vendor/seapp_contexts b/sepolicy/vendor/seapp_contexts
index a4f429b..2530739 100644
--- a/sepolicy/vendor/seapp_contexts
+++ b/sepolicy/vendor/seapp_contexts
@@ -29,4 +29,4 @@
 user=_app seinfo=easel name=com.google.android.imaging.easel.service domain=easelservice_app type=app_data_file levelFrom=user
 
 #Domain for connectivity monitor
-user=radio seinfo=platform name=com.google.android.connectivitymonitor domain=con_monitor_app type=app_data_file levelFrom=all
+user=_app isPrivApp=true seinfo=platform name=com.google.android.connectivitymonitor domain=con_monitor_app type=app_data_file levelFrom=all
diff --git a/sepolicy/vendor/system_server.te b/sepolicy/vendor/system_server.te
index 31c7ff7..d7b8461 100644
--- a/sepolicy/vendor/system_server.te
+++ b/sepolicy/vendor/system_server.te
@@ -23,5 +23,3 @@
 set_prop(system_server, public_vendor_system_prop)
 
 dontaudit system_server self:capability sys_module;
-
-allow system_server thermal_service:service_manager find;
diff --git a/sepolicy/vendor/thermalserviced.te b/sepolicy/vendor/thermalserviced.te
deleted file mode 100644
index aa6a085..0000000
--- a/sepolicy/vendor/thermalserviced.te
+++ /dev/null
@@ -1 +0,0 @@
-binder_call(thermalserviced, system_server)
diff --git a/sepolicy/vendor/vendor_init.te b/sepolicy/vendor/vendor_init.te
index ef333db..5cd77c9 100644
--- a/sepolicy/vendor/vendor_init.te
+++ b/sepolicy/vendor/vendor_init.te
@@ -4,7 +4,6 @@
   dhcp_data_file
   elabel_data_file
   media_rw_data_file
-  ramoops_data_file
   system_data_file
   tombstone_data_file
   wifi_data_file
@@ -12,6 +11,7 @@
 
 allow vendor_init debugfs_clk:file w_file_perms;
 allow vendor_init proc_uid_cpupower:file write;
+allow vendor_init proc_swappiness:file w_file_perms;
 dontaudit vendor_init kernel:system module_request;
 
 # Allow vendor_init to write to /proc/sysrq-trigger on userdebug and eng builds
@@ -30,3 +30,6 @@
 
 dontaudit vendor_init unlabeled:dir getattr;
 dontaudit vendor_init unlabeled:file getattr;
+
+allow vendor_init debugfs_tracing_instances:dir create_dir_perms;
+allow vendor_init debugfs_tracing_instances:file w_file_perms;
diff --git a/sepolicy/vendor/wcnss_service.te b/sepolicy/vendor/wcnss_service.te
index a6f143c..a612332 100644
--- a/sepolicy/vendor/wcnss_service.te
+++ b/sepolicy/vendor/wcnss_service.te
@@ -12,7 +12,7 @@
 allow wcnss_service vendor_shell_exec:file rx_file_perms;
 allow wcnss_service vendor_toolbox_exec:file rx_file_perms;
 
-allow wcnss_service proc_net:file w_file_perms;
+allow wcnss_service proc_net_type:file { getattr w_file_perms };
 
 allow wcnss_service self:socket create_socket_perms;
 allowxperm wcnss_service self:socket ioctl msm_sock_ipc_ioctls;
@@ -23,8 +23,6 @@
 allow wcnss_service cnss_vendor_data_file:dir create_dir_perms;
 allow wcnss_service cnss_vendor_data_file:file create_file_perms;
 
-allow wcnss_service proc_net:file getattr;
-
 r_dir_file(wcnss_service, sysfs_msm_subsys)
 # pkt logging for cnss_diag
 userdebug_or_eng(`
diff --git a/vibrator/OWNERS b/vibrator/OWNERS
new file mode 100644
index 0000000..2c0d70d
--- /dev/null
+++ b/vibrator/OWNERS
@@ -0,0 +1,2 @@
+dtwlin@google.com
+michaelwr@google.com