Fix the run-test script to correctly guess target arch name.

Bug: 216467764
Test: art/test/testrunner/testrunner.py --target -t 650-checker-inline-access-thunks
Change-Id: I31a691626c1d000168a6ad48fc727c31bc916730
diff --git a/test/run-test b/test/run-test
index 2f8dbf3..96552e6 100755
--- a/test/run-test
+++ b/test/run-test
@@ -570,8 +570,8 @@
 function guess_target_arch_name() {
     # Check whether this is a device with native bridge. Currently this is hardcoded
     # to x86 + arm.
-    local guess_path=${ANDROID_PRODUCT_OUT}/system/apex/com.android.art.testing/javalib
-    local x86_arm=`ls ${guess_path} | sort | grep -E '^(arm|x86)$'`
+    local guess_path=$chroot/system/framework/art_boot_images
+    local x86_arm=`adb shell ls ${guess_path} | sort | grep -E '^(arm|x86)$'`
     # Collapse line-breaks into spaces
     x86_arm=$(echo $x86_arm)
     if [ "x$x86_arm" = "xarm x86" ] ; then
@@ -583,8 +583,8 @@
             target_arch_name=x86
         fi
     else
-        local grep32bit=`ls ${guess_path} | grep -E '^(arm|x86)$'`
-        local grep64bit=`ls ${guess_path} | grep -E '^(arm64|x86_64)$'`
+        local grep32bit=`adb shell ls ${guess_path} | grep -E '^(arm|x86)$'`
+        local grep64bit=`adb shell ls ${guess_path} | grep -E '^(arm64|x86_64)$'`
         if [ "x${suffix64}" = "x64" ]; then
             target_arch_name=${grep64bit}
         else