diff --git a/libs/androidfw/tests/AssetManager2_test.cpp b/libs/androidfw/tests/AssetManager2_test.cpp
index 5a5bafdf..df3fa02 100644
--- a/libs/androidfw/tests/AssetManager2_test.cpp
+++ b/libs/androidfw/tests/AssetManager2_test.cpp
@@ -207,11 +207,11 @@
   AssetManager2 assetmanager;
   assetmanager.SetApkAssets({overlayable_assets_, overlay_assets_, lib_one_assets_});
 
-  auto apk_assets = assetmanager.GetApkAssets();
-  ASSERT_EQ(3, apk_assets.size());
-  ASSERT_EQ(overlayable_assets_, apk_assets[0].promote());
-  ASSERT_EQ(overlay_assets_, apk_assets[1].promote());
-  ASSERT_EQ(lib_one_assets_, apk_assets[2].promote());
+  ASSERT_EQ(3, assetmanager.GetApkAssetsCount());
+  auto op = assetmanager.StartOperation();
+  ASSERT_EQ(overlayable_assets_, assetmanager.GetApkAssets(0));
+  ASSERT_EQ(overlay_assets_, assetmanager.GetApkAssets(1));
+  ASSERT_EQ(lib_one_assets_, assetmanager.GetApkAssets(2));
 
   auto get_first_package_id = [&assetmanager](auto apkAssets) -> uint8_t {
     return assetmanager.GetAssignedPackageId(apkAssets->GetLoadedArsc()->GetPackages()[0].get());
@@ -834,4 +834,26 @@
             std::string::npos);
 }
 
+TEST_F(AssetManager2Test, GetApkAssets) {
+  AssetManager2 assetmanager;
+  assetmanager.SetApkAssets({overlayable_assets_, overlay_assets_, lib_one_assets_});
+
+  ASSERT_EQ(3, assetmanager.GetApkAssetsCount());
+  EXPECT_EQ(1, overlayable_assets_->getStrongCount());
+  EXPECT_EQ(1, overlay_assets_->getStrongCount());
+  EXPECT_EQ(1, lib_one_assets_->getStrongCount());
+
+  {
+    auto op = assetmanager.StartOperation();
+    ASSERT_EQ(overlayable_assets_, assetmanager.GetApkAssets(0));
+    ASSERT_EQ(overlay_assets_, assetmanager.GetApkAssets(1));
+    EXPECT_EQ(2, overlayable_assets_->getStrongCount());
+    EXPECT_EQ(2, overlay_assets_->getStrongCount());
+    EXPECT_EQ(1, lib_one_assets_->getStrongCount());
+  }
+  EXPECT_EQ(1, overlayable_assets_->getStrongCount());
+  EXPECT_EQ(1, overlay_assets_->getStrongCount());
+  EXPECT_EQ(1, lib_one_assets_->getStrongCount());
+}
+
 }  // namespace android
diff --git a/libs/androidfw/tests/Idmap_test.cpp b/libs/androidfw/tests/Idmap_test.cpp
index 568e041..60aa7d8 100644
--- a/libs/androidfw/tests/Idmap_test.cpp
+++ b/libs/androidfw/tests/Idmap_test.cpp
@@ -66,9 +66,9 @@
 
 std::string GetStringFromApkAssets(const AssetManager2& asset_manager,
                                    const AssetManager2::SelectedValue& value) {
-  auto assets = asset_manager.GetApkAssets();
+  auto op = asset_manager.StartOperation();
   const ResStringPool* string_pool =
-      assets[value.cookie].promote()->GetLoadedArsc()->GetStringPool();
+      asset_manager.GetApkAssets(value.cookie)->GetLoadedArsc()->GetStringPool();
   return GetStringFromPool(string_pool, value.data);
 }
 
