File tree Expand file tree Collapse file tree 1 file changed +21
-3
lines changed
Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Original file line number Diff line number Diff line change 5252 run : |
5353 echo "Starting emulator..."
5454 export PATH=$PATH:$ANDROID_HOME/emulator
55- emulator -avd test -no-audio -no-window -no-boot-anim -no-metrics &
56- # Wait for emulator to fully boot
57- sleep 120
55+ nohup emulator -avd test -no-audio -no-window -no-boot-anim -no-metrics > /dev/null 2>&1 &
56+
57+ # Wait for ADB to detect the device
58+ echo "Waiting for emulator device..."
59+ adb wait-for-device
60+
61+ # Poll for full boot
62+ boot_completed=""
63+ echo "Waiting for emulator to boot..."
64+ until [[ "$boot_completed" == "1" ]]; do
65+ sleep 5
66+ boot_completed=$(adb shell getprop sys.boot_completed 2>/dev/null | tr -d '\r')
67+ done
68+
69+ # Optional: unlock the screen (some test frameworks expect an unlocked device)
70+ adb shell input keyevent 82
71+
72+ echo "Emulator is fully booted."
73+
74+ - name : Verify emulator is running
75+ run : adb devices
5876
5977 - name : Export CLOUDINARY_URL
6078 run : |
You can’t perform that action at this time.
0 commit comments