Fix performance-inefficient-vector-operation am: e1ed6cb533

Original change: https://android-review.googlesource.com/c/platform/system/apex/+/2152598

Change-Id: I824c331b2b1557ae874624b99bccc7936a944d9a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_not_pre_installed_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_not_pre_installed_apex.asciipb
index f87c6b9..b2035c8 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_not_pre_installed_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_not_pre_installed_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_arm64/com.android.apex.cts.shim_not_pre_installed.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v1_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v1_apex.asciipb
index 03cf8a0..e108ba3 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v1_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v1_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_arm64/com.android.apex.cts.shim.v1.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_additional_file_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_additional_file_apex.asciipb
index c93ee73..9211e61 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_additional_file_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_additional_file_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_arm64/com.android.apex.cts.shim.v2_additional_file.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_additional_folder_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_additional_folder_apex.asciipb
index d5922e1..a5d0827 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_additional_folder_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_additional_folder_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_arm64/com.android.apex.cts.shim.v2_additional_folder.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_apex.asciipb
index 18e12ee..9f834b3 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_arm64/com.android.apex.cts.shim.v2.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_apk_in_apex_sdk_target_p_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_apk_in_apex_sdk_target_p_apex.asciipb
index 00f9f6c..d684672 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_apk_in_apex_sdk_target_p_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_apk_in_apex_sdk_target_p_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_arm64/com.android.apex.cts.shim.v2_apk_in_apex_sdk_target_p.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_apk_in_apex_upgrades_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_apk_in_apex_upgrades_apex.asciipb
new file mode 100644
index 0000000..918ce0c
--- /dev/null
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_apk_in_apex_upgrades_apex.asciipb
@@ -0,0 +1,15 @@
+drops {
+  android_build_drop {
+    build_id: "8572644"
+    target: "CtsShim"
+    source_file: "aosp_arm64/com.android.apex.cts.shim.v2_apk_in_apex_upgrades.apex"
+  }
+  dest_file: "shim/prebuilts//arm/com.android.apex.cts.shim.v2_apk_in_apex_upgrades.apex"
+  version: ""
+  version_group: ""
+  git_project: "platform/system/apex"
+  git_branch: "tm-dev"
+  transform: TRANSFORM_NONE
+  transform_options {
+  }
+}
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_different_certificate_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_different_certificate_apex.asciipb
index 861ffa3..275064d 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_different_certificate_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_different_certificate_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_arm64/com.android.apex.cts.shim.v2_different_certificate.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_different_package_name_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_different_package_name_apex.asciipb
index 79de375..3b24219 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_different_package_name_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_different_package_name_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_arm64/com.android.apex.cts.shim.v2_different_package_name.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_no_hashtree_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_no_hashtree_apex.asciipb
index 91f5ef2..866da01 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_no_hashtree_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_no_hashtree_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_arm64/com.android.apex.cts.shim.v2_no_hashtree.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_rebootless_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_rebootless_apex.asciipb
index e8f2283..2f99030 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_rebootless_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_rebootless_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_arm64/com.android.apex.cts.shim.v2_rebootless.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_sdk_target_p_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_sdk_target_p_apex.asciipb
index e56d855..abaf998 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_sdk_target_p_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_sdk_target_p_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_arm64/com.android.apex.cts.shim.v2_sdk_target_p.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_sign_payload_with_different_key_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_sign_payload_with_different_key_apex.asciipb
index ec3b1d6..5bf4e32 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_sign_payload_with_different_key_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_sign_payload_with_different_key_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_arm64/com.android.apex.cts.shim.v2_sign_payload_with_different_key.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_signed_bob_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_signed_bob_apex.asciipb
index a8b55ab..ff3a295 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_signed_bob_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_signed_bob_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_arm64/com.android.apex.cts.shim.v2_signed_bob.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_signed_bob_rot_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_signed_bob_rot_apex.asciipb
index 23567d8..af3c9b3 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_signed_bob_rot_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_signed_bob_rot_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_arm64/com.android.apex.cts.shim.v2_signed_bob_rot.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_signed_bob_rot_rollback_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_signed_bob_rot_rollback_apex.asciipb
index 84c7328..45e3352 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_signed_bob_rot_rollback_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_signed_bob_rot_rollback_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_arm64/com.android.apex.cts.shim.v2_signed_bob_rot_rollback.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_unsigned_payload_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_unsigned_payload_apex.asciipb
index ed4ca4b..078ac5a 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_unsigned_payload_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_unsigned_payload_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_arm64/com.android.apex.cts.shim.v2_unsigned_payload.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_with_post_install_hook_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_with_post_install_hook_apex.asciipb
index 5fb0fb2..0798f5f 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_with_post_install_hook_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_with_post_install_hook_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_arm64/com.android.apex.cts.shim.v2_with_post_install_hook.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_with_pre_install_hook_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_with_pre_install_hook_apex.asciipb
index 38f20a0..44a33be 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_with_pre_install_hook_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_with_pre_install_hook_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_arm64/com.android.apex.cts.shim.v2_with_pre_install_hook.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_without_apk_in_apex_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_without_apk_in_apex_apex.asciipb
index ac823c9..19099b5 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_without_apk_in_apex_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_without_apk_in_apex_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_arm64/com.android.apex.cts.shim.v2_without_apk_in_apex.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_wrong_sha_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_wrong_sha_apex.asciipb
index 0281ed4..6db5911 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_wrong_sha_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v2_wrong_sha_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_arm64/com.android.apex.cts.shim.v2_wrong_sha.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v3_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v3_apex.asciipb
index 50c821d..d0c5a40 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v3_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v3_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_arm64/com.android.apex.cts.shim.v3.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v3_rebootless_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v3_rebootless_apex.asciipb
index f900c46..179ba8d 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v3_rebootless_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v3_rebootless_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_arm64/com.android.apex.cts.shim.v3_rebootless.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v3_signed_bob_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v3_signed_bob_apex.asciipb
index d908d0e..15d980c 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v3_signed_bob_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v3_signed_bob_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_arm64/com.android.apex.cts.shim.v3_signed_bob.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v3_signed_bob_rot_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v3_signed_bob_rot_apex.asciipb
index cb1a634..01313db 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v3_signed_bob_rot_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__arm_com_android_apex_cts_shim_v3_signed_bob_rot_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_arm64/com.android.apex.cts.shim.v3_signed_bob_rot.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_not_pre_installed_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_not_pre_installed_apex.asciipb
index 0d09fcb..1673a81 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_not_pre_installed_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_not_pre_installed_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_x86_64/com.android.apex.cts.shim_not_pre_installed.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v1_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v1_apex.asciipb
index 742bca4..83580fe 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v1_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v1_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_x86_64/com.android.apex.cts.shim.v1.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_additional_file_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_additional_file_apex.asciipb
index 783107c..5c23eea 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_additional_file_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_additional_file_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_x86_64/com.android.apex.cts.shim.v2_additional_file.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_additional_folder_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_additional_folder_apex.asciipb
index 5ab45ea..36df5ad 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_additional_folder_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_additional_folder_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_x86_64/com.android.apex.cts.shim.v2_additional_folder.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_apex.asciipb
index aee50ef..c2d9242 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_x86_64/com.android.apex.cts.shim.v2.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_apk_in_apex_sdk_target_p_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_apk_in_apex_sdk_target_p_apex.asciipb
index 9eb21ee..92dba07 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_apk_in_apex_sdk_target_p_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_apk_in_apex_sdk_target_p_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_x86_64/com.android.apex.cts.shim.v2_apk_in_apex_sdk_target_p.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_apk_in_apex_upgrades_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_apk_in_apex_upgrades_apex.asciipb
new file mode 100644
index 0000000..a3228fb
--- /dev/null
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_apk_in_apex_upgrades_apex.asciipb
@@ -0,0 +1,15 @@
+drops {
+  android_build_drop {
+    build_id: "8572644"
+    target: "CtsShim"
+    source_file: "aosp_x86_64/com.android.apex.cts.shim.v2_apk_in_apex_upgrades.apex"
+  }
+  dest_file: "shim/prebuilts//x86/com.android.apex.cts.shim.v2_apk_in_apex_upgrades.apex"
+  version: ""
+  version_group: ""
+  git_project: "platform/system/apex"
+  git_branch: "tm-dev"
+  transform: TRANSFORM_NONE
+  transform_options {
+  }
+}
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_different_certificate_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_different_certificate_apex.asciipb
index 670489d..1534301 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_different_certificate_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_different_certificate_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_x86_64/com.android.apex.cts.shim.v2_different_certificate.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_different_package_name_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_different_package_name_apex.asciipb
index c5d28ff..b8e1de5 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_different_package_name_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_different_package_name_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_x86_64/com.android.apex.cts.shim.v2_different_package_name.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_no_hashtree_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_no_hashtree_apex.asciipb
index 17ae6c5..d9c58de 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_no_hashtree_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_no_hashtree_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_x86_64/com.android.apex.cts.shim.v2_no_hashtree.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_rebootless_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_rebootless_apex.asciipb
index c817a79..0c4bbda 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_rebootless_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_rebootless_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_x86_64/com.android.apex.cts.shim.v2_rebootless.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_sdk_target_p_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_sdk_target_p_apex.asciipb
index b121049..826a238 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_sdk_target_p_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_sdk_target_p_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_x86_64/com.android.apex.cts.shim.v2_sdk_target_p.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_sign_payload_with_different_key_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_sign_payload_with_different_key_apex.asciipb
index 39e49e1..3199a49 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_sign_payload_with_different_key_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_sign_payload_with_different_key_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_x86_64/com.android.apex.cts.shim.v2_sign_payload_with_different_key.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_signed_bob_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_signed_bob_apex.asciipb
index 2056dc1..eb0acfa 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_signed_bob_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_signed_bob_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_x86_64/com.android.apex.cts.shim.v2_signed_bob.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_signed_bob_rot_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_signed_bob_rot_apex.asciipb
index 229b0f3..19268fc 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_signed_bob_rot_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_signed_bob_rot_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_x86_64/com.android.apex.cts.shim.v2_signed_bob_rot.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_signed_bob_rot_rollback_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_signed_bob_rot_rollback_apex.asciipb
index fc464db..c86aef6 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_signed_bob_rot_rollback_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_signed_bob_rot_rollback_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_x86_64/com.android.apex.cts.shim.v2_signed_bob_rot_rollback.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_unsigned_payload_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_unsigned_payload_apex.asciipb
index cffcd60..1f0f41d 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_unsigned_payload_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_unsigned_payload_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_x86_64/com.android.apex.cts.shim.v2_unsigned_payload.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_with_post_install_hook_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_with_post_install_hook_apex.asciipb
index c2168d8..def0f0d 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_with_post_install_hook_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_with_post_install_hook_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_x86_64/com.android.apex.cts.shim.v2_with_post_install_hook.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_with_pre_install_hook_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_with_pre_install_hook_apex.asciipb
index 1f2469a..2a1c96f 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_with_pre_install_hook_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_with_pre_install_hook_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_x86_64/com.android.apex.cts.shim.v2_with_pre_install_hook.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_without_apk_in_apex_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_without_apk_in_apex_apex.asciipb
index 986a459..ad5a295 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_without_apk_in_apex_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_without_apk_in_apex_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_x86_64/com.android.apex.cts.shim.v2_without_apk_in_apex.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_wrong_sha_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_wrong_sha_apex.asciipb
index d53ab6c..21c2689 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_wrong_sha_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v2_wrong_sha_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_x86_64/com.android.apex.cts.shim.v2_wrong_sha.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v3_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v3_apex.asciipb
index ca8bade..84113df 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v3_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v3_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_x86_64/com.android.apex.cts.shim.v3.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v3_rebootless_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v3_rebootless_apex.asciipb
index e2c369f..cc3a401 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v3_rebootless_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v3_rebootless_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_x86_64/com.android.apex.cts.shim.v3_rebootless.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v3_signed_bob_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v3_signed_bob_apex.asciipb
index ea06694..ab5a34e 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v3_signed_bob_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v3_signed_bob_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_x86_64/com.android.apex.cts.shim.v3_signed_bob.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v3_signed_bob_rot_apex.asciipb b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v3_signed_bob_rot_apex.asciipb
index 3d41a84..6d51168 100644
--- a/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v3_signed_bob_rot_apex.asciipb
+++ b/.prebuilt_info/prebuilt_info_shim_prebuilts__x86_com_android_apex_cts_shim_v3_signed_bob_rot_apex.asciipb
@@ -1,6 +1,6 @@
 drops {
   android_build_drop {
-    build_id: "7552332"
+    build_id: "8572644"
     target: "CtsShim"
     source_file: "aosp_x86_64/com.android.apex.cts.shim.v3_signed_bob_rot.apex"
   }
@@ -8,7 +8,7 @@
   version: ""
   version_group: ""
   git_project: "platform/system/apex"
-  git_branch: "sc-dev"
+  git_branch: "tm-dev"
   transform: TRANSFORM_NONE
   transform_options {
   }
diff --git a/shim/build/Android.bp b/shim/build/Android.bp
index 6dc64a3..99121d2 100644
--- a/shim/build/Android.bp
+++ b/shim/build/Android.bp
@@ -448,7 +448,7 @@
     targets: ["com.android.apex.cts.shim.v2_signed_bob_rot"],
     dest: "com.android.apex.cts.shim.v2_signed_bob_rot.apex",
   },
-  cmd: "$(location :apksigner) sign --v1-signing-enabled false --v2-signing-enabled false --key $(location :com.android.apex.rotation.key.bob.pk8) --cert $(location :com.android.apex.rotation.key.bob.x509.pem) --lineage $(location :com.android.apex.rotation.key.bob.rot) --out $(out) $(location :com.android.apex.cts.shim.v2)",
+  cmd: "$(location :apksigner) sign --v1-signing-enabled false --v2-signing-enabled false --key $(location :com.android.apex.rotation.key.bob.pk8) --cert $(location :com.android.apex.rotation.key.bob.x509.pem) --lineage $(location :com.android.apex.rotation.key.bob.rot) --rotation-min-sdk-version 28 --out $(out) $(location :com.android.apex.cts.shim.v2)",
 }
 
 // v2 cts shim package signed by bob + lineage + rollback capability
@@ -466,7 +466,7 @@
     targets: ["com.android.apex.cts.shim.v2_signed_bob_rot_rollback"],
     dest: "com.android.apex.cts.shim.v2_signed_bob_rot_rollback.apex",
   },
-  cmd: "$(location :apksigner) sign --v1-signing-enabled false --v2-signing-enabled false --key $(location :com.android.apex.rotation.key.bob.pk8) --cert $(location :com.android.apex.rotation.key.bob.x509.pem) --lineage $(location :com.android.apex.rotation.key.bob.rot.rollback) --out $(out) $(location :com.android.apex.cts.shim.v2)",
+  cmd: "$(location :apksigner) sign --v1-signing-enabled false --v2-signing-enabled false --key $(location :com.android.apex.rotation.key.bob.pk8) --cert $(location :com.android.apex.rotation.key.bob.x509.pem) --lineage $(location :com.android.apex.rotation.key.bob.rot.rollback) --rotation-min-sdk-version 28 --out $(out) $(location :com.android.apex.cts.shim.v2)",
 }
 
 // v3 cts shim package signed by bob
@@ -501,7 +501,7 @@
     targets: ["com.android.apex.cts.shim.v3_signed_bob_rot"],
     dest: "com.android.apex.cts.shim.v3_signed_bob_rot.apex",
   },
-  cmd: "$(location :apksigner) sign --v1-signing-enabled false --v2-signing-enabled false --key $(location :com.android.apex.rotation.key.bob.pk8) --cert $(location :com.android.apex.rotation.key.bob.x509.pem) --lineage $(location :com.android.apex.rotation.key.bob.rot) --out $(out) $(location :com.android.apex.cts.shim.v3)",
+  cmd: "$(location :apksigner) sign --v1-signing-enabled false --v2-signing-enabled false --key $(location :com.android.apex.rotation.key.bob.pk8) --cert $(location :com.android.apex.rotation.key.bob.x509.pem) --lineage $(location :com.android.apex.rotation.key.bob.rot) --rotation-min-sdk-version 28 --out $(out) $(location :com.android.apex.cts.shim.v3)",
 }
 
 // This one is only used in ApexdHostTest and not meant to be installed
diff --git a/shim/prebuilts/arm/com.android.apex.cts.shim.v1.apex b/shim/prebuilts/arm/com.android.apex.cts.shim.v1.apex
index 791d0dd..c2dc28f 100644
--- a/shim/prebuilts/arm/com.android.apex.cts.shim.v1.apex
+++ b/shim/prebuilts/arm/com.android.apex.cts.shim.v1.apex
Binary files differ
diff --git a/shim/prebuilts/arm/com.android.apex.cts.shim.v2.apex b/shim/prebuilts/arm/com.android.apex.cts.shim.v2.apex
index 0a26d23..880ab4a 100644
--- a/shim/prebuilts/arm/com.android.apex.cts.shim.v2.apex
+++ b/shim/prebuilts/arm/com.android.apex.cts.shim.v2.apex
Binary files differ
diff --git a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_additional_file.apex b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_additional_file.apex
index 5ed2c7e..8c84cd5 100644
--- a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_additional_file.apex
+++ b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_additional_file.apex
Binary files differ
diff --git a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_additional_folder.apex b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_additional_folder.apex
index 133f7f7..b519bbe 100644
--- a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_additional_folder.apex
+++ b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_additional_folder.apex
Binary files differ
diff --git a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_apk_in_apex_sdk_target_p.apex b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_apk_in_apex_sdk_target_p.apex
index 6ce5397..38e2339 100644
--- a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_apk_in_apex_sdk_target_p.apex
+++ b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_apk_in_apex_sdk_target_p.apex
Binary files differ
diff --git a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_apk_in_apex_upgrades.apex b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_apk_in_apex_upgrades.apex
new file mode 100644
index 0000000..3d7bf51
--- /dev/null
+++ b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_apk_in_apex_upgrades.apex
Binary files differ
diff --git a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_different_certificate.apex b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_different_certificate.apex
index 4228ffe..f4bc7e8 100644
--- a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_different_certificate.apex
+++ b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_different_certificate.apex
Binary files differ
diff --git a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_different_package_name.apex b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_different_package_name.apex
index de090f1..59e9fe1 100644
--- a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_different_package_name.apex
+++ b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_different_package_name.apex
Binary files differ
diff --git a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_no_hashtree.apex b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_no_hashtree.apex
index 162044c..353949b 100644
--- a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_no_hashtree.apex
+++ b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_no_hashtree.apex
Binary files differ
diff --git a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_rebootless.apex b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_rebootless.apex
index 9d68887..c39b790 100644
--- a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_rebootless.apex
+++ b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_rebootless.apex
Binary files differ
diff --git a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_sdk_target_p.apex b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_sdk_target_p.apex
index 44f7613..da25328 100644
--- a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_sdk_target_p.apex
+++ b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_sdk_target_p.apex
Binary files differ
diff --git a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_sign_payload_with_different_key.apex b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_sign_payload_with_different_key.apex
index 389871d..3eaf372 100644
--- a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_sign_payload_with_different_key.apex
+++ b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_sign_payload_with_different_key.apex
Binary files differ
diff --git a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_signed_bob.apex b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_signed_bob.apex
index f8fa44f..6f38273 100644
--- a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_signed_bob.apex
+++ b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_signed_bob.apex
Binary files differ
diff --git a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_signed_bob_rot.apex b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_signed_bob_rot.apex
index 9658818..1969746 100644
--- a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_signed_bob_rot.apex
+++ b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_signed_bob_rot.apex
Binary files differ
diff --git a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_signed_bob_rot_rollback.apex b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_signed_bob_rot_rollback.apex
index 3440043..be642bf 100644
--- a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_signed_bob_rot_rollback.apex
+++ b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_signed_bob_rot_rollback.apex
Binary files differ
diff --git a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_unsigned_payload.apex b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_unsigned_payload.apex
index d6f7d8f..7bebb77 100644
--- a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_unsigned_payload.apex
+++ b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_unsigned_payload.apex
Binary files differ
diff --git a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_with_post_install_hook.apex b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_with_post_install_hook.apex
index cc214f8..8006022 100644
--- a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_with_post_install_hook.apex
+++ b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_with_post_install_hook.apex
Binary files differ
diff --git a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_with_pre_install_hook.apex b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_with_pre_install_hook.apex
index dab82a0..3465dbb 100644
--- a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_with_pre_install_hook.apex
+++ b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_with_pre_install_hook.apex
Binary files differ
diff --git a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_without_apk_in_apex.apex b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_without_apk_in_apex.apex
index 9706f2f..67743a9 100644
--- a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_without_apk_in_apex.apex
+++ b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_without_apk_in_apex.apex
Binary files differ
diff --git a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_wrong_sha.apex b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_wrong_sha.apex
index f305cff..aa1c10c 100644
--- a/shim/prebuilts/arm/com.android.apex.cts.shim.v2_wrong_sha.apex
+++ b/shim/prebuilts/arm/com.android.apex.cts.shim.v2_wrong_sha.apex
Binary files differ
diff --git a/shim/prebuilts/arm/com.android.apex.cts.shim.v3.apex b/shim/prebuilts/arm/com.android.apex.cts.shim.v3.apex
index 3122c96..b345bca 100644
--- a/shim/prebuilts/arm/com.android.apex.cts.shim.v3.apex
+++ b/shim/prebuilts/arm/com.android.apex.cts.shim.v3.apex
Binary files differ
diff --git a/shim/prebuilts/arm/com.android.apex.cts.shim.v3_rebootless.apex b/shim/prebuilts/arm/com.android.apex.cts.shim.v3_rebootless.apex
index 0f5134d..c3bab7c 100644
--- a/shim/prebuilts/arm/com.android.apex.cts.shim.v3_rebootless.apex
+++ b/shim/prebuilts/arm/com.android.apex.cts.shim.v3_rebootless.apex
Binary files differ
diff --git a/shim/prebuilts/arm/com.android.apex.cts.shim.v3_signed_bob.apex b/shim/prebuilts/arm/com.android.apex.cts.shim.v3_signed_bob.apex
index a83bf51..4733bad 100644
--- a/shim/prebuilts/arm/com.android.apex.cts.shim.v3_signed_bob.apex
+++ b/shim/prebuilts/arm/com.android.apex.cts.shim.v3_signed_bob.apex
Binary files differ
diff --git a/shim/prebuilts/arm/com.android.apex.cts.shim.v3_signed_bob_rot.apex b/shim/prebuilts/arm/com.android.apex.cts.shim.v3_signed_bob_rot.apex
index 703b641..6972daa 100644
--- a/shim/prebuilts/arm/com.android.apex.cts.shim.v3_signed_bob_rot.apex
+++ b/shim/prebuilts/arm/com.android.apex.cts.shim.v3_signed_bob_rot.apex
Binary files differ
diff --git a/shim/prebuilts/arm/com.android.apex.cts.shim_not_pre_installed.apex b/shim/prebuilts/arm/com.android.apex.cts.shim_not_pre_installed.apex
index 806ccc7..4cda1c6 100644
--- a/shim/prebuilts/arm/com.android.apex.cts.shim_not_pre_installed.apex
+++ b/shim/prebuilts/arm/com.android.apex.cts.shim_not_pre_installed.apex
Binary files differ
diff --git a/shim/prebuilts/x86/com.android.apex.cts.shim.v1.apex b/shim/prebuilts/x86/com.android.apex.cts.shim.v1.apex
index a94ae75..030c53b 100644
--- a/shim/prebuilts/x86/com.android.apex.cts.shim.v1.apex
+++ b/shim/prebuilts/x86/com.android.apex.cts.shim.v1.apex
Binary files differ
diff --git a/shim/prebuilts/x86/com.android.apex.cts.shim.v2.apex b/shim/prebuilts/x86/com.android.apex.cts.shim.v2.apex
index a9c2758..b090a96 100644
--- a/shim/prebuilts/x86/com.android.apex.cts.shim.v2.apex
+++ b/shim/prebuilts/x86/com.android.apex.cts.shim.v2.apex
Binary files differ
diff --git a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_additional_file.apex b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_additional_file.apex
index 5ed2c7e..c498b32 100644
--- a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_additional_file.apex
+++ b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_additional_file.apex
Binary files differ
diff --git a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_additional_folder.apex b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_additional_folder.apex
index 133f7f7..e83ec07 100644
--- a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_additional_folder.apex
+++ b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_additional_folder.apex
Binary files differ
diff --git a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_apk_in_apex_sdk_target_p.apex b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_apk_in_apex_sdk_target_p.apex
index 6ce5397..4545b1c 100644
--- a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_apk_in_apex_sdk_target_p.apex
+++ b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_apk_in_apex_sdk_target_p.apex
Binary files differ
diff --git a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_apk_in_apex_upgrades.apex b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_apk_in_apex_upgrades.apex
new file mode 100644
index 0000000..298fd85
--- /dev/null
+++ b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_apk_in_apex_upgrades.apex
Binary files differ
diff --git a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_different_certificate.apex b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_different_certificate.apex
index 4228ffe..d911fe0 100644
--- a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_different_certificate.apex
+++ b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_different_certificate.apex
Binary files differ
diff --git a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_different_package_name.apex b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_different_package_name.apex
index de090f1..053df91 100644
--- a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_different_package_name.apex
+++ b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_different_package_name.apex
Binary files differ
diff --git a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_no_hashtree.apex b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_no_hashtree.apex
index 19ec142..65a5473 100644
--- a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_no_hashtree.apex
+++ b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_no_hashtree.apex
Binary files differ
diff --git a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_rebootless.apex b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_rebootless.apex
index 9d68887..9f94684 100644
--- a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_rebootless.apex
+++ b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_rebootless.apex
Binary files differ
diff --git a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_sdk_target_p.apex b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_sdk_target_p.apex
index 9929c3d..8fd510c 100644
--- a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_sdk_target_p.apex
+++ b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_sdk_target_p.apex
Binary files differ
diff --git a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_sign_payload_with_different_key.apex b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_sign_payload_with_different_key.apex
index 389871d..baae3e3 100644
--- a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_sign_payload_with_different_key.apex
+++ b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_sign_payload_with_different_key.apex
Binary files differ
diff --git a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_signed_bob.apex b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_signed_bob.apex
index 3f2fc50..1e80788 100644
--- a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_signed_bob.apex
+++ b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_signed_bob.apex
Binary files differ
diff --git a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_signed_bob_rot.apex b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_signed_bob_rot.apex
index cf628ab..c064928 100644
--- a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_signed_bob_rot.apex
+++ b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_signed_bob_rot.apex
Binary files differ
diff --git a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_signed_bob_rot_rollback.apex b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_signed_bob_rot_rollback.apex
index ba5af3b..685f347 100644
--- a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_signed_bob_rot_rollback.apex
+++ b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_signed_bob_rot_rollback.apex
Binary files differ
diff --git a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_unsigned_payload.apex b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_unsigned_payload.apex
index 38c073f..f2329ae 100644
--- a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_unsigned_payload.apex
+++ b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_unsigned_payload.apex
Binary files differ
diff --git a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_with_post_install_hook.apex b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_with_post_install_hook.apex
index cc214f8..bb2d96e 100644
--- a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_with_post_install_hook.apex
+++ b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_with_post_install_hook.apex
Binary files differ
diff --git a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_with_pre_install_hook.apex b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_with_pre_install_hook.apex
index dab82a0..fd00bd5 100644
--- a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_with_pre_install_hook.apex
+++ b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_with_pre_install_hook.apex
Binary files differ
diff --git a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_without_apk_in_apex.apex b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_without_apk_in_apex.apex
index 9706f2f..e7da653 100644
--- a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_without_apk_in_apex.apex
+++ b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_without_apk_in_apex.apex
Binary files differ
diff --git a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_wrong_sha.apex b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_wrong_sha.apex
index f305cff..32bf141 100644
--- a/shim/prebuilts/x86/com.android.apex.cts.shim.v2_wrong_sha.apex
+++ b/shim/prebuilts/x86/com.android.apex.cts.shim.v2_wrong_sha.apex
Binary files differ
diff --git a/shim/prebuilts/x86/com.android.apex.cts.shim.v3.apex b/shim/prebuilts/x86/com.android.apex.cts.shim.v3.apex
index 7f3e9ec..1bd8b1b 100644
--- a/shim/prebuilts/x86/com.android.apex.cts.shim.v3.apex
+++ b/shim/prebuilts/x86/com.android.apex.cts.shim.v3.apex
Binary files differ
diff --git a/shim/prebuilts/x86/com.android.apex.cts.shim.v3_rebootless.apex b/shim/prebuilts/x86/com.android.apex.cts.shim.v3_rebootless.apex
index 0f5134d..2f7a2e5 100644
--- a/shim/prebuilts/x86/com.android.apex.cts.shim.v3_rebootless.apex
+++ b/shim/prebuilts/x86/com.android.apex.cts.shim.v3_rebootless.apex
Binary files differ
diff --git a/shim/prebuilts/x86/com.android.apex.cts.shim.v3_signed_bob.apex b/shim/prebuilts/x86/com.android.apex.cts.shim.v3_signed_bob.apex
index 1aeb0b0..38fe019 100644
--- a/shim/prebuilts/x86/com.android.apex.cts.shim.v3_signed_bob.apex
+++ b/shim/prebuilts/x86/com.android.apex.cts.shim.v3_signed_bob.apex
Binary files differ
diff --git a/shim/prebuilts/x86/com.android.apex.cts.shim.v3_signed_bob_rot.apex b/shim/prebuilts/x86/com.android.apex.cts.shim.v3_signed_bob_rot.apex
index 20f1c85..68505d5 100644
--- a/shim/prebuilts/x86/com.android.apex.cts.shim.v3_signed_bob_rot.apex
+++ b/shim/prebuilts/x86/com.android.apex.cts.shim.v3_signed_bob_rot.apex
Binary files differ
diff --git a/shim/prebuilts/x86/com.android.apex.cts.shim_not_pre_installed.apex b/shim/prebuilts/x86/com.android.apex.cts.shim_not_pre_installed.apex
index 806ccc7..7fd07b5 100644
--- a/shim/prebuilts/x86/com.android.apex.cts.shim_not_pre_installed.apex
+++ b/shim/prebuilts/x86/com.android.apex.cts.shim_not_pre_installed.apex
Binary files differ
diff --git a/tests/Android.bp b/tests/Android.bp
index 438a799..956af99 100644
--- a/tests/Android.bp
+++ b/tests/Android.bp
@@ -87,6 +87,7 @@
 apex {
     name: "apex.test",
     manifest: "testdata/apex_manifest.json",
+    androidManifest: "testdata/AndroidManifest.xml",
     prebuilts: ["sample_prebuilt_file"],
     key: "apex.test.key",
     certificate: ":apex.test.certificate",
@@ -262,11 +263,36 @@
         "-Wall",
         "-Werror",
     ],
-    header_libs: ["jni_headers"],
+    header_libs: [
+        "jni_headers"
+    ],
     stl: "c++_shared",
     sdk_version: "current",
 }
 
+java_test_host {
+    name: "apex_apkinapexmaxsdk_tests",
+    srcs: ["src/**/MaxSdkTests.java"],
+    libs: [
+        "tradefed",
+        "truth-prebuilt"
+    ],
+    static_libs: [
+        "cts-install-lib-host",
+        "frameworks-base-hostutils",
+        "testng"
+    ],
+    test_config: "max-sdk-tests.xml",
+    test_suites: ["general-tests"],
+    data: [
+        ":apex_maxsdk_tests_app",
+        ":apex_maxsdk_regular_app_tests",
+    ],
+    java_resources: [
+        ":com.android.apex.maxsdk.test",
+    ],
+}
+
 android_test_helper_app {
     name: "apex_apkinapex_tests_app",
     manifest: "app/ApkInApexTests_AndroidManifest.xml",
@@ -277,3 +303,16 @@
     static_libs: ["androidx.test.rules", "cts-install-lib", "cts-rollback-lib", "testng"],
     test_suites: ["general-tests"],
 }
+
+android_test_helper_app {
+    name: "apex_maxsdk_tests_app",
+    manifest: "app/MaxSdkTests_AndroidManifest.xml",
+    srcs: ["app/src/**/MaxSdkTests.java"],
+    static_libs: ["androidx.test.rules", "cts-install-lib", "cts-rollback-lib", "testng"],
+    test_suites: ["general-tests"],
+}
+
+android_test_helper_app {
+    name: "apex_maxsdk_regular_app_tests",
+    manifest: "testdata/maxsdk/app/AndroidManifest_normalApp.xml",
+}
diff --git a/tests/app/MaxSdkTests_AndroidManifest.xml b/tests/app/MaxSdkTests_AndroidManifest.xml
new file mode 100644
index 0000000..1aec150
--- /dev/null
+++ b/tests/app/MaxSdkTests_AndroidManifest.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright (C) 2022 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.
+  -->
+
+<manifest
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        package="com.android.tests.apex.maxsdk.app">
+
+    <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
+
+    <application>
+        <uses-library android:name="android.test.runner" />
+    </application>
+
+
+    <instrumentation
+            android:name="androidx.test.runner.AndroidJUnitRunner"
+            android:targetPackage="com.android.tests.apex.maxsdk.app"
+            android:label="ApexMaxSdk Test" />
+</manifest>
diff --git a/tests/app/src/com/android/tests/apex/app/MaxSdkTests.java b/tests/app/src/com/android/tests/apex/app/MaxSdkTests.java
new file mode 100644
index 0000000..e149022
--- /dev/null
+++ b/tests/app/src/com/android/tests/apex/app/MaxSdkTests.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2022 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.
+ */
+
+package com.android.tests.apex.app;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import static org.junit.Assert.assertThrows;
+
+import android.content.Context;
+import android.content.pm.PackageInfo;
+import android.content.pm.PackageManager;
+
+import androidx.test.InstrumentationRegistry;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+@RunWith(JUnit4.class)
+public class MaxSdkTests {
+    // these apps are installed via apk-in-apex
+    private static final String APP_NO_MAX_SDK = "com.android.apex.maxsdk.app.available.test";
+    private static final String APP_MAX_SDK_10K =
+            "com.android.apex.maxsdk.app.available.target10k.test";
+    private static final String APP_MAX_SDK_31 = "com.android.apex.maxsdk.app.unavailable.test";
+    // REGULAR_APP is installed as a normal app
+    private static final String REGULAR_APP_WITH_MAX_SDK =
+            "com.android.apex.maxsdk.regular.app.test";
+    private final Context mContext = InstrumentationRegistry.getContext();
+    private final PackageManager mPm = mContext.getPackageManager();
+
+    @Test
+    public void testApkInApexIsAvailable() throws Exception {
+        PackageInfo pi = mPm.getPackageInfo(APP_NO_MAX_SDK, 0);
+        assertThat(pi).isNotNull();
+    }
+
+    @Test
+    public void testAppWithMaxSdk10KIsAvailable() throws Exception {
+        PackageInfo pi = mPm.getPackageInfo(APP_MAX_SDK_10K, 0);
+        assertThat(pi).isNotNull();
+    }
+
+    @Test
+    public void testAppWithMaxSdk31() throws Exception {
+        // this app should not be available because it has uses-sdk maxSdkVersion="31"
+        assertThrows(PackageManager.NameNotFoundException.class,
+                () -> mPm.getPackageInfo(APP_MAX_SDK_31, 0));
+    }
+
+    @Test
+    public void testRegularAppIsAvailable() throws Exception {
+        // because this is a regular app, max-sdk should not be checked
+        PackageInfo pi = mPm.getPackageInfo(REGULAR_APP_WITH_MAX_SDK, 0);
+        assertThat(pi).isNotNull();
+    }
+}
diff --git a/tests/max-sdk-tests.xml b/tests/max-sdk-tests.xml
new file mode 100644
index 0000000..afc1ef8
--- /dev/null
+++ b/tests/max-sdk-tests.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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.
+-->
+<configuration description="Runs the max-sdk support test cases">
+    <option name="test-suite-tag" value="max-sdk-tests" />
+    <option name="test-suite-tag" value="apct" />
+    <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/>
+    <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+        <option name="cleanup-apks" value="true" />
+        <option name="test-file-name" value="apex_maxsdk_tests_app.apk" />
+        <option name="test-file-name" value="apex_maxsdk_regular_app_tests.apk" />
+    </target_preparer>
+    <test class="com.android.tradefed.testtype.HostTest" >
+        <option name="class"
+                value="com.android.tests.apex.host.MaxSdkTests" />
+    </test>
+</configuration>
diff --git a/tests/src/com/android/tests/apex/host/MaxSdkTests.java b/tests/src/com/android/tests/apex/host/MaxSdkTests.java
new file mode 100644
index 0000000..d6eadb1
--- /dev/null
+++ b/tests/src/com/android/tests/apex/host/MaxSdkTests.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2022 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.
+ */
+
+package com.android.tests.apex.host;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import static org.junit.Assume.assumeTrue;
+
+import android.cts.install.lib.host.InstallUtilsHost;
+
+import com.android.internal.util.test.SystemPreparer;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+import com.android.tradefed.testtype.junit4.BaseHostJUnit4Test;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.RuleChain;
+import org.junit.rules.TemporaryFolder;
+import org.junit.runner.RunWith;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class MaxSdkTests extends BaseHostJUnit4Test {
+
+    private static final String APEX = "com.android.apex.maxsdk.test.apex";
+
+    private final InstallUtilsHost mHostUtils = new InstallUtilsHost(this);
+    private final TemporaryFolder mTemporaryFolder = new TemporaryFolder();
+    private final SystemPreparer mPreparer = new SystemPreparer(mTemporaryFolder,
+            this::getDevice);
+
+    @Rule
+    public final RuleChain ruleChain = RuleChain.outerRule(mTemporaryFolder).around(mPreparer);
+
+    @Before
+    public void setUp() throws Exception {
+        assumeTrue("Updating APEX is not supported", mHostUtils.isApexUpdateSupported());
+        mPreparer.pushResourceFile(APEX, "/product/apex/" + APEX);
+        mPreparer.reboot();
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        getDevice().disableAdbRoot();
+    }
+
+    @Test
+    public void verifyMaxSdk() throws Exception {
+        assertThat(
+            runDeviceTests(
+                "androidx.test.runner.AndroidJUnitRunner",
+                "com.android.tests.apex.maxsdk.app",
+                (String) null /* class */,
+                (String) null /* method */
+            )
+        ).isTrue();
+    }
+}
diff --git a/tests/testdata/AndroidManifest.xml b/tests/testdata/AndroidManifest.xml
index 04bc559..e7c5c02 100644
--- a/tests/testdata/AndroidManifest.xml
+++ b/tests/testdata/AndroidManifest.xml
@@ -1,7 +1,26 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-  package="com.android.apex.test">
-  <!-- APEX does not have classes.dex -->
-  <application android:hasCode="false" />
-</manifest>
+          package="com.android.apex.test">
+    <!-- APEX does not have classes.dex -->
+    <application android:hasCode="false">
+        <apex-system-service
+            android:name="com.android.apex.test.ApexSystemService"
+            android:path="/apex/com.android.apex.test/javalib/fake.jar"
+            android:minSdkVersion="30"/>
 
+        <!-- Always inactive system service, since maxSdkVersion is low -->
+        <apex-system-service
+            android:name="com.android.apex.test.OldApexSystemService"
+            android:path="/apex/com.android.apex.test/javalib/fake.jar"
+            android:minSdkVersion="1"
+            android:maxSdkVersion="1"
+        />
+
+        <!-- Always inactive system service, since minSdkVersion is high -->
+        <apex-system-service
+            android:name="com.android.apex.test.NewApexSystemService"
+            android:path="/apex/com.android.apex.test/javalib/fake.jar"
+            android:minSdkVersion="999999"
+        />
+    </application>
+</manifest>
diff --git a/tests/testdata/maxsdk/app/AndroidManifest_normalApp.xml b/tests/testdata/maxsdk/app/AndroidManifest_normalApp.xml
new file mode 100644
index 0000000..6b3ca97
--- /dev/null
+++ b/tests/testdata/maxsdk/app/AndroidManifest_normalApp.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2022 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.
+ -->
+<!-- Manifest for a regular app, not part of the apex -->
+<manifest
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        package="com.android.apex.maxsdk.regular.app.test">
+        <!-- because this app will be installed as a regular app (not as an apk-in-apex),
+             maxSdkVersion shouldn't prevent the app from being installed -->
+        <uses-sdk android:maxSdkVersion="31"/>
+</manifest>
diff --git a/tests/testdata/maxsdk/com.android.apex.maxsdk.test/Android.bp b/tests/testdata/maxsdk/com.android.apex.maxsdk.test/Android.bp
new file mode 100644
index 0000000..a54da03
--- /dev/null
+++ b/tests/testdata/maxsdk/com.android.apex.maxsdk.test/Android.bp
@@ -0,0 +1,70 @@
+// Copyright (C) 2022 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.
+
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+apex_key {
+    name: "com.android.apex.maxsdk.test.key",
+    public_key: "com.android.apex.maxsdk.test.avbpubkey",
+    private_key: "com.android.apex.maxsdk.test.pem",
+}
+
+android_app_certificate {
+    name: "com.android.apex.maxsdk.test.certificate",
+    certificate: "com.android.apex.maxsdk.test",
+}
+
+apex_test {
+    name: "com.android.apex.maxsdk.test",
+    manifest: "manifest.json",
+    file_contexts: ":apex.test-file_contexts",  // Default, please edit, see go/android-apex-howto
+    key: "com.android.apex.maxsdk.test.key",
+    certificate: ":com.android.apex.maxsdk.test.certificate",
+    updatable: false,
+    installable: false,
+    apps: [
+        "com.android.apex.maxsdk.app.available.test",
+        "com.android.apex.maxsdk.app.unavailable.test",
+        "com.android.apex.maxsdk.app.available.target10k.test",
+    ],
+}
+
+android_app {
+    name: "com.android.apex.maxsdk.app.available.test",
+    manifest: "AndroidManifest.xml",
+    sdk_version: "31",
+    apex_available: [
+        "com.android.apex.maxsdk.test",
+    ]
+}
+
+android_app {
+    name: "com.android.apex.maxsdk.app.unavailable.test",
+    manifest: "AndroidManifest_withMaxSdk.xml",
+    sdk_version: "31",
+    apex_available: [
+        "com.android.apex.maxsdk.test",
+    ]
+}
+
+android_app {
+    name: "com.android.apex.maxsdk.app.available.target10k.test",
+    manifest: "AndroidManifest_withMaxSdk10k.xml",
+    sdk_version: "31",
+    apex_available: [
+        "com.android.apex.maxsdk.test",
+    ]
+}
diff --git a/tests/testdata/maxsdk/com.android.apex.maxsdk.test/AndroidManifest.xml b/tests/testdata/maxsdk/com.android.apex.maxsdk.test/AndroidManifest.xml
new file mode 100644
index 0000000..c7dade9
--- /dev/null
+++ b/tests/testdata/maxsdk/com.android.apex.maxsdk.test/AndroidManifest.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2022 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.
+ -->
+
+<manifest
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        package="com.android.apex.maxsdk.app.available.test">
+</manifest>
diff --git a/tests/testdata/maxsdk/com.android.apex.maxsdk.test/AndroidManifest_withMaxSdk.xml b/tests/testdata/maxsdk/com.android.apex.maxsdk.test/AndroidManifest_withMaxSdk.xml
new file mode 100644
index 0000000..4439eaf
--- /dev/null
+++ b/tests/testdata/maxsdk/com.android.apex.maxsdk.test/AndroidManifest_withMaxSdk.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2022 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.
+ -->
+
+<manifest
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        package="com.android.apex.maxsdk.app.unavailable.test">
+        <uses-sdk android:maxSdkVersion="31"/>
+</manifest>
diff --git a/tests/testdata/maxsdk/com.android.apex.maxsdk.test/AndroidManifest_withMaxSdk10k.xml b/tests/testdata/maxsdk/com.android.apex.maxsdk.test/AndroidManifest_withMaxSdk10k.xml
new file mode 100644
index 0000000..d22bf66
--- /dev/null
+++ b/tests/testdata/maxsdk/com.android.apex.maxsdk.test/AndroidManifest_withMaxSdk10k.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2022 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.
+ -->
+
+<manifest
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        package="com.android.apex.maxsdk.app.available.target10k.test">
+        <uses-sdk android:maxSdkVersion="10000"/>
+</manifest>
diff --git a/tests/testdata/maxsdk/com.android.apex.maxsdk.test/com.android.apex.maxsdk.test.avbpubkey b/tests/testdata/maxsdk/com.android.apex.maxsdk.test/com.android.apex.maxsdk.test.avbpubkey
new file mode 100644
index 0000000..f4af547
--- /dev/null
+++ b/tests/testdata/maxsdk/com.android.apex.maxsdk.test/com.android.apex.maxsdk.test.avbpubkey
Binary files differ
diff --git a/tests/testdata/maxsdk/com.android.apex.maxsdk.test/com.android.apex.maxsdk.test.pem b/tests/testdata/maxsdk/com.android.apex.maxsdk.test/com.android.apex.maxsdk.test.pem
new file mode 100644
index 0000000..dde5fd2
--- /dev/null
+++ b/tests/testdata/maxsdk/com.android.apex.maxsdk.test/com.android.apex.maxsdk.test.pem
@@ -0,0 +1,51 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIJJwIBAAKCAgEAvFhH2F48NE3Cdh98JB/31VsCPF68d+2jHYAG6eqM0lDOOM9p
+nDJZ6EReAQZ7Es8HSnYUCSIfNGmZUvwWMjYLyrXpaBf4kmwiErkHXAh3dn4243Bo
+OtTBiLvvh2KFZjdRhJrnUQRfsFaIaFlr10eLYZv4lMSEPS+wpxJRsAWbHSpqzVis
+mFYPAB/HztmuRsHeWadQp0mwEZD3KYLI3g/q9DKEg+CqordzhOSh4kADgACZpRjf
+mIvqCgTo5c53sl1GoiIWly/LP+Z3QJtJFtNs2cKxAR9XadSXqgCaKReQnsD/dYf5
+PJWT0v21uma+N2bFu0kQEPPZOeJCPyOsbWLwZzQQToL3SRkUjteYfY36RUNHjM5L
+Pqa/wau0UvpCZPHVmg4fh26QPcVCnZpAhwjNnnsXArDjRUuXNPpPNnRaGGic/t5k
+oeHw2LVSw/UKLqzLx2+FtBiu2wiOzuByrlTqiu4fj7hd9B1cPR85VkFyq+kISGHT
+xEp6SDKRuoxGt43QHztocfsiVyZlvN6goOZkHl/Qpgxl8FZDESwA0VvH/5I+yVO7
+JYSKHJLDn01oX2O64G6uymjA/5nwDmjn+Hs5vemduNzjl+Qie0y3ezC+S2TEwRMs
+KIviz4KrcHKntwGk57y99FdBZumgYwBJCVjSt2D+S7Ba9OmhoTUcjKId9x8CAwEA
+AQKCAgBKn3enxH56Aq0ffA4Fihz5jZtvK+HkamUMVSNoHqQ42Ac8/wDLADAbFKti
+IJ02sIwk9m+txrUyYPx8oqBwuHUnlbeqpIS6DtnZLTI7Rqd+bTd2GZ1SYeVkNYIL
+0/8ippxHu9AWi3MWPNLC9VsC6rfQrqlo2AvE6lZFe76dzTrN7XZvccjAeqhq1iym
+Sh0Ar+NXBjGwdkOqUhN7gPPw98GRi0pxrdwtqB2+848oQ1CfsJ0vipFcsWLDIXrd
+QlaudsJ7jqIAuNEAumFZWa01vAMOrFLRLQfHSJHmq2JpEYsdOz575KndVS5ClH8i
+IX8QGEoTkDkrXlIc2waAWbQBiwfQTW/O5PRLd2xp3tFwR5W2or3xxaa6QzzLEd9c
+8cpaRwMwXpRxpXmNvKBoqDYdrKRgLS/vM7bfCFCk4i4poUpeyHHkfziWRs9ahaiT
+dMlrfm73ocqWCmhcHnb/tJAGzdJCkk8TEGd1aMC/CSz/mqr7ik57pxCt0L09lHRR
+IReNDkR189KoIdtnh6kphDZmAuswlkh0C1i4611j5pKH9KYghRHBJ/lnI1fXqnyw
+GcbI1iCSL9Ca+Xvb58HLxnXRqVuKslshXnoZt7SFLvgHvlMRIZwuGti9lb+OTl1c
+UT7So14sVj5z5w7ilV5OmmBNYwGuG25mEAhwSONenwDNLehYUQKCAQEA7yakhv0G
+GOSoRXSgsjfRTxXI1X/WyMIYIKOXjJtkvBTIZGWNyhmfr4jPs3bqi403e0Gc+G/h
+TioEyyOrZ5pcxQ56lqx/S6ybFxH1QEa1OJcBkB4gtw+JLgoGLEr+eO18c+9RJPTY
+Z9nuNJcGsRvJkaSshqgrabbQz27dcL52DWqOop7wc3aUHlK2t9igutyMtfx4cTN3
+wszgXPQiMmTgcKBsUwg3T9CUoEH+EtUnklUO9hs3ePjlpC4JXfjpvNJm8HWOA6vw
+Vy6DExoC870SiLapl3qwKXOEItUmH3r9OxK6gUAH+WhkSWpUzCXSfJ9hhLLdwVEt
+z+gYC1nJqN32XQKCAQEAyZ1K5WiKdj2SgB/jeT+AvxZ9hel6ByHSfbtOKLSBzbTB
+8zAkui5MoK2B3Mho3B1lCCdNbmiY8OiholA9ixo9AFLcNj0FMXiocNntWrPQxGAX
+yzsX5ZdycIDRqPo+NKuEs41H1CjeWB9ieketwqyEjKW+YxBqvk49OM1t50C8pJCC
+ODOwN6PINPcwsIheQHVVqpt3N0If4hgpjYqyhZaTBcEVqlQELyydmDGqyZn0oSI4
+tgy20pxBH7iPQ5aAn7XgWaixT1+Z93zN704tG97RxEglBPZXXyFtWXOiTRIRZqd5
+osmFYkG8kKAFUuOMAnuINabtJo80+fFNq4Lzur+TqwKCAQBOi/2bzHz1LhzKeyzQ
+fB7F/9yvqsZLt9we1DxRVTR3xcevmd9BErts9t1pD1SnsyEW3Y0F2BFDD+/1HGkO
+pRd1LXU8Cbnhi/aAVEid7NtWk9pSkGKkXXjr4yT15UfBRhcLKP4YykZNjbl8EmKD
+RyIkMNbtf0yK8x2QE9StVBEIBQiGBvfopHivoPEcXw0jco7QsvSIEaRzGcFTJmgY
+7yL8OuR5PQiVsWcvX51oaBQQLtm0IWpN1Enwa6Jt9/QlLWHb9nBHanCM4dzxKCjy
+DxaISp5W/1fetW8f1awoyMdlYJhbHUHBO/U8W60wQ/fnMJ3h7LGC7fvC/nLvP3VJ
+fmWNAoIBAAb0o0HY4nYD18sNzpY/R5zQFNKK5Ifcdduam66x04yaQNq3/Xxi3ofo
+lINecqetZ+/pEzXM7AHbtL/ZztW+uP4K3cgNQOGdDQqfqh2n+Hrd6dQ8HK3yFKOm
+/hS7VWwRwslDBYhfRJR7uLUJRghiVUxY54GZbmVUY65TAAirZhazWZrAxcKVpvGU
+2ZwtiDrnEWaKaImCgYEWXlCgyVnsgPQA3lN7BI3wFxvKEt9TrWnluVkmhSQs+d4z
+StYFGjjoWG4fcMaRQMmWB7DK3KmKfWgtKQHL0eXZTGF6qM3J4snM21hvZWenZu8C
+ZkyexxTK2D8pnCLpa+V3mrthEDGQLHMCggEAY3BzWH5dQloMYgExtvfifbNXFKzG
+RdQnmAvLT6Nlv7lKUKTD4O0Hrv0o9a/O+y2qTO7HMsnNNpR/Lq9F93Akt16ILC+9
+zqkM7BjVqAzCc48V/yMGtWPZwcR2he1n8HgbdZkU/93UJNQxtTAgEuEnazh4ZBQg
+jWyy6jyOMMXNsEdHUUmcyN7IdFHAAvzamxmIUImshavxXnGjAXZiLz2Ewg2xVKrl
+ZF4HHPfq/cn/4Ic6sQ8tmppuov5p56DpO6Dl5DFvbtciY+GbaO+Aq2tqT6mg0bjY
+H52Jf53T8TaJQg33+yb9Qu0i2X/2QPODm88O1PO8R2UDXIec6PIYymV0tA==
+-----END RSA PRIVATE KEY-----
diff --git a/tests/testdata/maxsdk/com.android.apex.maxsdk.test/com.android.apex.maxsdk.test.pk8 b/tests/testdata/maxsdk/com.android.apex.maxsdk.test/com.android.apex.maxsdk.test.pk8
new file mode 100644
index 0000000..12d7966
--- /dev/null
+++ b/tests/testdata/maxsdk/com.android.apex.maxsdk.test/com.android.apex.maxsdk.test.pk8
Binary files differ
diff --git a/tests/testdata/maxsdk/com.android.apex.maxsdk.test/com.android.apex.maxsdk.test.x509.pem b/tests/testdata/maxsdk/com.android.apex.maxsdk.test/com.android.apex.maxsdk.test.x509.pem
new file mode 100644
index 0000000..b5dae43
--- /dev/null
+++ b/tests/testdata/maxsdk/com.android.apex.maxsdk.test/com.android.apex.maxsdk.test.x509.pem
@@ -0,0 +1,34 @@
+-----BEGIN CERTIFICATE-----
+MIIF3TCCA8UCFGPwQqpTEKgDNzlnGNkzYp1wSgKQMA0GCSqGSIb3DQEBCwUAMIGp
+MQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91
+bnRhaW4gVmlldzEQMA4GA1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEi
+MCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTElMCMGA1UEAwwcY29t
+LmFuZHJvaWQuYXBleC5tYXhzZGsudGVzdDAgFw0yMjAyMjQxOTA1MzNaGA80NzYw
+MDEyMTE5MDUzM1owgakxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlh
+MRYwFAYDVQQHDA1Nb3VudGFpbiBWaWV3MRAwDgYDVQQKDAdBbmRyb2lkMRAwDgYD
+VQQLDAdBbmRyb2lkMSIwIAYJKoZIhvcNAQkBFhNhbmRyb2lkQGFuZHJvaWQuY29t
+MSUwIwYDVQQDDBxjb20uYW5kcm9pZC5hcGV4Lm1heHNkay50ZXN0MIICIjANBgkq
+hkiG9w0BAQEFAAOCAg8AMIICCgKCAgEApI7HwWXk3RelSA+I49f8vZSnpw6q9LYn
+NePbT884eBxK7xIkDDXsnxSMvzdh8uT3gt3j87QMzZsv8jpyAa5m5Y0bwCDRTFCw
+IFei4eHRLUZeuybR7l7TI6153OArIiUeDO0gZtxzRXN4t2fjU/qo7bTWjrgfOob9
+KW/TCQQFSAocqZK0x1l+FSs3+o6duMe/LwhT7r+LVLxNxXb7TUbb9TP/NrkN8gt9
+BKLrDUHawpA/S22ELspW/IqGAV689dw01CFSJDquqLnJRMHJ3B9367oBQZdHimue
+gQPOoWyMUxTNAeL3WCZ8Uado8/cuyR7oMaSnfdHaWeUMxsxqh40vu2yfSC3kdjYK
+TkQWOI/byK03jTbTERNjSseSmXZqKnwdIvy9F58XzfeqBPZQwzlGc/Eg/oHvvYGF
+VotRyWBO0nAN9/Bt0kgtg/37y93zemsZ6B6QI5dT4RdInC8b9jQkfw0bmN2VE2P0
+7zLXIBck6K59ZfaMi/4+duzrluxxb7X8FaFMmX3QTpbSnPDeuZij0B0KsLI4ul5u
+ItSMDsNQZiv4729OdiX/AGLD1qQLr0se4AL0jXouMgAKscX3MWxhYMM/QcoHR3Vl
+vLZzO+GaGqirElqPxSu/Cd6xrqN027xk9UHe2t5Hp3HXhEhMNY6AlvzRhHZeRqiv
+Ip4NdGNF7BECAwEAATANBgkqhkiG9w0BAQsFAAOCAgEAljWrfEAnT/xLDBlIldFD
+mo/oY9CIXolc1SWZwf/yGUnaXm27hMUO4YYSSRVR3okV2HmDDM4RGzMNeZM6gCWR
++Eeq8nRU2lv7OXxXYJDKE3q++4/KvvfDohZvJ5I8m9SH6jgmP63D9noaBMnp51XL
+92Zr/sQQngNfSjMTTdIqg+XviEsB+knyhDCK3qrVv9dWMIh2U2jQ6s0nAdv4KLJm
+AkfR0LmjdcZLHwCXpPW3Fr+13xK1wFqH9qrGw3NR2XpxHc6tZu6ZOWdrwQr9Zw+5
++Dt6MC65VFLXC6qCvG+7NdspFVOBT3uxWIl3ow91TPgVeJgiYGQY/+nI8PtIHlCD
+3CF6eyB7necmc2ee2SQNPFGT0fGajprqYRzzHz3mz/9BsrRp7kMGEakG0dPZsWd7
+sLX5ihklLLdkTg3Fp0g0S0DsE44u6TXiJv4363xsGGTu4b438LZX+kQJ2fWpPFBX
+43CUWCk1zTCpwWwSHZxns1cnlwFnNxl7hnZ9WH7dhrRZXpkylsEyeATNTxBBfdlD
+ngCEbXdNyxs06iFrn+BC44vsJKyZCmnBC03AJMyfaxNutqnFwBwToA9F7d61UzqA
+LeKlnRdt3JI5WdREqHCsbpyv7tgykKlf3vYqjqHKca3gcsCOJFCzAxaz5voA3J+p
+LWUarJ6nfdZVIFm4M6DNUKU=
+-----END CERTIFICATE-----
diff --git a/tests/testdata/maxsdk/com.android.apex.maxsdk.test/manifest.json b/tests/testdata/maxsdk/com.android.apex.maxsdk.test/manifest.json
new file mode 100644
index 0000000..25e51f0
--- /dev/null
+++ b/tests/testdata/maxsdk/com.android.apex.maxsdk.test/manifest.json
@@ -0,0 +1,4 @@
+{
+  "name": "com.android.apex.maxsdk.test",
+  "version": 1
+}