diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 0c845089f0..1e2cf38517 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -1121,13 +1121,42 @@ jobs: - name: Setup Android SDK uses: android-actions/setup-android@v3 with: - packages: '' - + packages: 'platform-tools' + + # https://github.com/lzhiyong/android-sdk-tools/releases + - name: Install ADB + run: | + curl --compressed --location --output tools.zip https://github.com/lzhiyong/android-sdk-tools/releases/download/34.0.3/android-sdk-tools-static-aarch64.zip + unzip -d tools -n -q tools.zip + rm -f tools.zip + cp tools/platform-tools/adb $ANDROID_SDK_ROOT/platform-tools/adb + rm -fr tools + shell: bash + + # https://ci.android.com/builds/branches/aosp-emu-master-dev/grid + - name: Install Emulator + run: | + curl --compressed --location --output emulator.zip $(curl --location --silent https://ci.android.com/builds/submitted/11162281/emulator-linux_aarch64/latest/sdk-repo-linux_aarch64-emulator-11162281.zip | grep -o 'https://storage[^"]*' | sed 's/\\u0026/\&/g') + unzip -d $ANDROID_SDK_ROOT -n -q emulator.zip + rm -f emulator.zip + cp $ANDROID_SDK_ROOT/platform-tools/package.xml $ANDROID_SDK_ROOT/emulator/package.xml + sed -i \ + -e 's|path="[a-zA-Z-]*"|path="emulator"|g' \ + -e 's|Android .*<\/display-name>|Android Emulator<\/display-name>|g' \ + $ANDROID_SDK_ROOT/emulator/package.xml + echo 'Vulkan = off\nGLDirectMem = on' >> ~/.android/advancedFeatures.ini + shell: bash + + - name: Install SDK Tools + run: | + sdkmanager 'platforms;android-34' 'system-images;android-34;google_apis;arm64-v8a' 'tools' + bash -c 'yes || true' | sdkmanager --licenses + shell: bash - - run: sdkmanager --list - - run: sdkmanager --channel=3 --list - - run: sdkmanager tools - - run: ls -l $HOME/.android/ + # - run: sdkmanager --list + # - run: sdkmanager --channel=3 --list + # - run: sdkmanager tools + # - run: ls -l $HOME/.android/ # - name: Enable KVM group perms