Skip to content

Commit

Permalink
Fix emulator avd searchpath
Browse files Browse the repository at this point in the history
Copied from setup_avd.sh script
  • Loading branch information
peace-maker committed Oct 11, 2024
1 parent 1b757fb commit 248cb1f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions travis/setup_avd_fast.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@ ANDROIDV=android-34

# Create our emulator Android Virtual Device (AVD)
# --snapshot flag is deprecated, see bitrise-steplib/steps-create-android-emulator#18
export PATH=$PATH:"$ANDROID_HOME"/cmdline-tools/latest/bin:"$ANDROID_HOME"/platform-tools
export PATH=$PATH:"$ANDROID_HOME"/cmdline-tools/latest/bin:"$ANDROID_HOME"/platform-tools:"$ANDROID_HOME"/emulator
yes | sdkmanager --sdk_root="$ANDROID_HOME" --install "system-images;$ANDROIDV;default;$ANDROID_ABI" "emulator" "platform-tools" "platforms;$ANDROIDV"
yes | sdkmanager --sdk_root="$ANDROID_HOME" --licenses
echo no | avdmanager --verbose create avd --name android-$ANDROID_ABI --force --abi "default/$ANDROID_ABI" --package "system-images;$ANDROIDV;default;$ANDROID_ABI"
avdmanager list avd
"$ANDROID_HOME"/emulator/emulator -list-avds

"$ANDROID_HOME"/emulator/emulator -avd android-$ANDROID_ABI -no-window -no-boot-anim -read-only -no-audio -no-window -no-snapshot -gpu off -accel off &
# The emulator is crazy and does not even respect its own paths
sed -i "s@=android-sdk@=$PWD/android-sdk@" ~/.config/.android/avd/android-$ANDROID_ABI.avd/config.ini

emulator -list-avds

emulator -avd android-$ANDROID_ABI -no-window -no-boot-anim -read-only -no-audio -no-window -no-snapshot -gpu off -accel off &
adb wait-for-device
adb shell id
adb shell getprop

0 comments on commit 248cb1f

Please sign in to comment.