Merge "java_sdk_library: Remove requirement for api_packages to be specified"
diff --git a/apex/builder.go b/apex/builder.go
index fe465f5..fc1e514 100644
--- a/apex/builder.go
+++ b/apex/builder.go
@@ -378,7 +378,7 @@
 			optFlags = append(optFlags, "--assets_dir "+filepath.Dir(noticeFile.String()))
 		}
 
-		if ctx.ModuleDir() != "system/apex/apexd/apexd_testdata" && a.testOnlyShouldSkipHashtreeGeneration() {
+		if ctx.ModuleDir() != "system/apex/apexd/apexd_testdata" && ctx.ModuleDir() != "system/apex/shim/build" && a.testOnlyShouldSkipHashtreeGeneration() {
 			ctx.PropertyErrorf("test_only_no_hashtree", "not available")
 			return
 		}
diff --git a/build_kzip.bash b/build_kzip.bash
index ccd6bad..02b346d 100755
--- a/build_kzip.bash
+++ b/build_kzip.bash
@@ -19,12 +19,13 @@
 # Build extraction files for C++ and Java. Build `merge_zips` which we use later.
 build/soong/soong_ui.bash --build-mode --all-modules --dir=$PWD -k merge_zips xref_cxx xref_java
 #Build extraction file for Go files in build/soong directory.
+declare -r abspath_out=$(realpath "${out}")
 (cd build/soong;
  ../../prebuilts/build-tools/linux-x86/bin/go_extractor \
     --goroot="${PWD}/../../prebuilts/go/linux-x86" \
     --rules=vnames.go.json \
     --canonicalize_package_corpus \
-    --output "${out}/soong/all.go.kzip" \
+    --output "${abspath_out}/soong/all.go.kzip" \
     ./... )
 
 declare -r kzip_count=$(find "$out" -name '*.kzip' | wc -l)