Fix AVD test on API 23

This commit is contained in:
topjohnwu 2024-07-20 15:08:06 -07:00
parent 92b2e06e57
commit a177d3b022

View File

@ -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'
}