From f919bb0e99d39874be9b2157673a6df7ccc3add7 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Sat, 20 Jul 2024 04:52:25 -0700 Subject: [PATCH] Minor changes --- .github/workflows/build.yml | 4 ++-- scripts/avd_test.sh | 2 +- scripts/cuttlefish.sh | 2 +- scripts/test_common.sh | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index deacf476e..973e508e2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -162,7 +162,7 @@ jobs: run: scripts/avd_test.sh ${{ matrix.version }} cf_test: - name: Test on AOSP main Cuttlefish + name: Test Cuttlefish on main runs-on: ubuntu-24.04 env: CF_HOME: /home/runner/aosp_cf_x86_64_phone @@ -186,7 +186,7 @@ jobs: with: ref: ${{ github.ref }} repo-token: ${{ secrets.GITHUB_TOKEN }} - check-name: 'Build Magisk artifacts' + check-name: "Build Magisk artifacts" - name: Download build artifacts uses: actions/download-artifact@v4 diff --git a/scripts/avd_test.sh b/scripts/avd_test.sh index ff98c449a..8a2a5e26c 100755 --- a/scripts/avd_test.sh +++ b/scripts/avd_test.sh @@ -82,7 +82,7 @@ test_emu() { # Install LSPosed if [ $api -ge $lsposed_min_api -a $api -le $atd_max_api ]; then adb push out/lsposed.zip /data/local/tmp/lsposed.zip - adb shell echo 'PATH=$PATH:/debug_ramdisk magisk --install-module /data/local/tmp/lsposed.zip' \| /system/xbin/su + echo 'PATH=$PATH:/debug_ramdisk magisk --install-module /data/local/tmp/lsposed.zip' | adb shell /system/xbin/su fi adb reboot diff --git a/scripts/cuttlefish.sh b/scripts/cuttlefish.sh index fd530ca0b..c55a1fa2c 100755 --- a/scripts/cuttlefish.sh +++ b/scripts/cuttlefish.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -cvd_args='-daemon -enable_sandbox=false -report_anonymous_usage_stats=n' +cvd_args='-daemon -enable_sandbox=false -memory_mb=8192 -report_anonymous_usage_stats=n' magisk_args='-init_boot_image=magisk_patched.img' cleanup() { diff --git a/scripts/test_common.sh b/scripts/test_common.sh index b90e6bdf8..39f6f2eb0 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=$(adb shell echo "'content call --uri content://com.topjohnwu.magisk.provider --method $1'" \| /system/xbin/su | tee /dev/fd/2) + local out=$(echo "content call --uri content://com.topjohnwu.magisk.provider --method $1" | adb shell /system/xbin/su | 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 - adb shell echo 'su -c id' \| /system/xbin/su 2000 | tee /dev/fd/2 | grep -q 'uid=0' + echo 'su -c id' | adb shell /system/xbin/su 2000 | tee /dev/fd/2 | grep -q 'uid=0' }