Build, sync and use debuggerd and su in ART's Android root testing dir.
Binaries /system/bin/debuggerd and /system/xbin/su are used by script
tools/run-jdwp-tests.sh as part of the process dumping command when
testing on device.
Note that this dumping command won't work on ART Buildbot devices
running Android N regardless, as the debuggerd protocol changed in an
incompatible way in Android O.
Test: tools/run-jdwp-tests.sh --mode=device
Change-Id: I402918ca0879583a1beb2dc71dc1d81516607ed2
diff --git a/tools/buildbot-build.sh b/tools/buildbot-build.sh
index e447ab4..31bddd5 100755
--- a/tools/buildbot-build.sh
+++ b/tools/buildbot-build.sh
@@ -80,6 +80,7 @@
fi
make_command="make $j_arg $extra_args $showcommands build-art-target-tests $common_targets"
make_command+=" libjavacrypto-target libnetd_client-target linker toybox toolbox sh"
+ make_command+=" debuggerd su"
make_command+=" ${out_dir}/host/linux-x86/bin/adb libstdc++ "
make_command+=" ${out_dir}/target/product/${TARGET_PRODUCT}/system/etc/public.libraries.txt"
mode_suffix="-target"
diff --git a/tools/run-jdwp-tests.sh b/tools/run-jdwp-tests.sh
index 21ddcbc..56d412b 100755
--- a/tools/run-jdwp-tests.sh
+++ b/tools/run-jdwp-tests.sh
@@ -216,7 +216,11 @@
if [[ "$mode" == "host" ]]; then
dump_command="/bin/kill -3"
else
- dump_command="/system/xbin/su root /data/local/tmp/system/bin/debuggerd"
+ # Note that this dumping command won't work when `$android_root`
+ # is different from `/system` (e.g. on ART Buildbot devices) when
+ # the device is running Android N, as the debuggerd protocol
+ # changed in an incompatible way in Android O (see b/32466479).
+ dump_command="$android_root/xbin/su root $android_root/bin/debuggerd"
fi
if [[ $has_gdb = "yes" ]]; then
if [[ $mode == "target" ]]; then