Merge "Track the symlink /root/adb_keys in the build system properly" into main
diff --git a/libprocessgroup/vts/vts_libprocessgroup.cpp b/libprocessgroup/vts/vts_libprocessgroup.cpp
index af0b0af..e51fa3d 100644
--- a/libprocessgroup/vts/vts_libprocessgroup.cpp
+++ b/libprocessgroup/vts/vts_libprocessgroup.cpp
@@ -15,18 +15,14 @@
  */
 
 #include <cerrno>
-#include <chrono>
 #include <cstdio>
 #include <filesystem>
-#include <future>
 #include <iostream>
 #include <optional>
 #include <random>
 #include <string>
 #include <vector>
 
-#include <unistd.h>
-
 #include <android-base/file.h>
 #include <android-base/strings.h>
 using android::base::ReadFileToString;
@@ -83,16 +79,6 @@
 
 }  // anonymous namespace
 
-
-class MemcgV2Test : public testing::Test {
-  protected:
-    void SetUp() override {
-        std::optional<bool> memcgV2Enabled = isMemcgV2Enabled();
-        ASSERT_NE(memcgV2Enabled, std::nullopt);
-        if (!*memcgV2Enabled) GTEST_SKIP() << "Memcg v2 not enabled";
-    }
-};
-
 class MemcgV2SubdirTest : public testing::Test {
   protected:
     std::optional<std::string> mRandDir;
@@ -150,26 +136,3 @@
     ASSERT_TRUE(WriteStringToFile("+memory", *mRandDir + "/cgroup.subtree_control"))
             << "Could not enable memcg under child cgroup subtree";
 }
-
-// Test for fix: mm: memcg: use larger batches for proactive reclaim
-// https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=287d5fedb377ddc232b216b882723305b27ae31a
-TEST_F(MemcgV2Test, ProactiveReclaimDoesntTakeForever) {
-    // Not all kernels have memory.reclaim
-    const std::filesystem::path reclaim(CGROUP_V2_ROOT_PATH + "/memory.reclaim");
-    if (!std::filesystem::exists(reclaim)) GTEST_SKIP() << "memory.reclaim not found";
-
-    // Use the total device memory as the amount to reclaim
-    const long numPages = sysconf(_SC_PHYS_PAGES);
-    const long pageSize = sysconf(_SC_PAGE_SIZE);
-    ASSERT_GT(numPages, 0);
-    ASSERT_GT(pageSize, 0);
-    const unsigned long long totalMem =
-            static_cast<unsigned long long>(numPages) * static_cast<unsigned long long>(pageSize);
-
-    auto fut = std::async(std::launch::async,
-                          [&]() { WriteStringToFile(std::to_string(totalMem), reclaim); });
-
-    // This is a test for completion within the timeout. The command is likely to "fail" since we
-    // are asking to reclaim all device memory.
-    ASSERT_NE(fut.wait_for(std::chrono::seconds(20)), std::future_status::timeout);
-}
diff --git a/trusty/utils/rpmb_dev/rpmb_dev.wv.system.rc b/trusty/utils/rpmb_dev/rpmb_dev.wv.system.rc
index 003b6fe..4e42d46 100644
--- a/trusty/utils/rpmb_dev/rpmb_dev.wv.system.rc
+++ b/trusty/utils/rpmb_dev/rpmb_dev.wv.system.rc
@@ -1,5 +1,5 @@
 service storageproxyd_wv_system /system_ext/bin/storageproxyd.system \
-        -d ${storageproxyd_wv_system.trusty_ipc_dev:-/dev/trusty-ipc-dev0} \
+        -d VSOCK:${trusty.widevine_vm.vm_cid}:1 \
         -r /dev/socket/rpmb_mock_wv_system \
         -p /data/secure_storage_wv_system \
         -t sock
@@ -23,20 +23,8 @@
     group system
     socket rpmb_mock_wv_system stream 660 system system
 
-# storageproxyd
-on boot && \
-    property:trusty.widevine_vm.nonsecure_vm_ready=1 && \
-    property:storageproxyd_wv_system.trusty_ipc_dev=*
-    wait /dev/socket/rpmb_mock_wv_system
-    enable storageproxyd_wv_system
-
-
 # RPMB Mock
-on early-boot && \
-    property:trusty.widevine_vm.enabled=1 && \
-    property:trusty.widevine_vm.vm_cid=* && \
-    property:ro.boot.vendor.apex.com.android.services.widevine=\
-com.android.services.widevine.cf_guest_trusty_nonsecure
+on early-boot
     # Create a persistent location for the RPMB data
     # (work around lack of RPMb block device on CF).
     # file contexts secure_storage_rpmb_system_file
@@ -57,6 +45,5 @@
     symlink /mnt/secure_storage_persist_wv_system/persist \
             /data/secure_storage_wv_system/persist
     chown root system /data/secure_storage_wv_system/persist
-    setprop storageproxyd_wv_system.trusty_ipc_dev VSOCK:${trusty.widevine_vm.vm_cid}:1
     exec_start rpmb_mock_init_wv_system
     start rpmb_mock_wv_system