Use $(AAPT) instead of aapt for verifying uses libraries
For SDK builds, $(AAPT) points to a prebuilt and aapt is not
necessarily in the path.
Test: make -j32 <some SDK build> tests
Bug: 70934104
Bug: 67345922
Change-Id: Icfd62a4e3ec284ed59a61714765e5a909a27947d
diff --git a/core/verify_uses_libraries.sh b/core/verify_uses_libraries.sh
index 8135be6..dde0447 100755
--- a/core/verify_uses_libraries.sh
+++ b/core/verify_uses_libraries.sh
@@ -15,11 +15,13 @@
# limitations under the License.
+# apt_binary is $(AAPT) in the build.
+
# Parse sdk, targetSdk, and uses librares in the APK, then cross reference against build specified ones.
set -e
local_apk=$1
-badging=$(aapt dump badging "${local_apk}")
+badging=$(${aapt_binary} dump badging "${local_apk}")
export sdk_version=$(echo "${badging}" | grep "sdkVersion" | sed -n "s/sdkVersion:'\(.*\)'/\1/p")
# Export target_sdk_version to the caller.
export target_sdk_version=$(echo "${badging}" | grep "targetSdkVersion" | sed -n "s/targetSdkVersion:'\(.*\)'/\1/p")