Sandbox apexd test genrules

gen_corrupt_rebootless_apex already worked with sandboxing.

gen_key_mismatch_capex had a diff in an "original_apex" file, which
I beleive is an unused output of the apex listed in the sources.
This original_apex was in $(genDir), so when we zipped up gendir we
included it. Instead, create a temporary directory to unzip/rezip the
input apex to, so that the rezipping doesn't also pick up the
original_apex.

Other genrules in this directory solve the problem by rm'ing
original_apex.

Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py gen_corrupt_rebootless_apex gen_key_mismatch_capex
Change-Id: I3f5976da5bc2b4f257b3abad0442a4220af608ec
diff --git a/apexd/apexd_testdata/Android.bp b/apexd/apexd_testdata/Android.bp
index 6b4cabb..ab41f72 100644
--- a/apexd/apexd_testdata/Android.bp
+++ b/apexd/apexd_testdata/Android.bp
@@ -106,9 +106,9 @@
   out: ["com.android.apex.compressed_different_key.capex"],
   srcs: [":apex.apexd_test_no_inst_key"],
   tools: ["soong_zip", "zipalign", "conv_apex_manifest", "apex_compression_tool", "avbtool"],
-  cmd: "unzip -q $(in) -d $(genDir) && " +
-       "$(location conv_apex_manifest) setprop name com.android.apex.compressed $(genDir)/apex_manifest.pb && " +
-       "$(location soong_zip) -d -C $(genDir) -D $(genDir) " +
+  cmd: "mkdir $(genDir)/tempdir && unzip -q $(in) -d $(genDir)/tempdir && " +
+       "$(location conv_apex_manifest) setprop name com.android.apex.compressed $(genDir)/tempdir/apex_manifest.pb && " +
+       "$(location soong_zip) -d -C $(genDir)/tempdir -D $(genDir)/tempdir " +
        "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " +
        "-o $(genDir)/unaligned.apex && " +
        "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " +