diff --git a/scripts/test_common.sh b/scripts/test_common.sh index 39f6f2eb0..d6ef66439 100644 --- a/scripts/test_common.sh +++ b/scripts/test_common.sh @@ -13,7 +13,7 @@ print_error() { run_content_cmd() { while true; do - local out=$(echo "content call --uri content://com.topjohnwu.magisk.provider --method $1" | adb shell /system/xbin/su | tee /dev/fd/2) + local out=$(adb shell /system/xbin/su 0 content call --uri content://com.topjohnwu.magisk.provider --method $1 | tee /dev/fd/2) if ! grep -q 'Bundle\[' <<< "$out"; then # The call failed, wait a while and retry later sleep 30 @@ -38,5 +38,5 @@ test_setup() { test_app() { # Run app tests run_content_cmd test - echo 'su -c id' | adb shell /system/xbin/su 2000 | tee /dev/fd/2 | grep -q 'uid=0' + adb shell /system/xbin/su 2000 su -c id | tee /dev/fd/2 | grep -q 'uid=0' }