Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Commit 8fd55d6

Browse files
committed
temp
1 parent 8c8b9bd commit 8fd55d6

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

apps/bare-expo/scripts/create-emulator.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ API_LEVEL=$1
44
emulator_name="bare-expo"
55
ANDROID_SDK_ROOT=${ANDROID_SDK_ROOT:-$ANDROID_HOME}
66

7-
if $ANDROID_SDK_ROOT/tools/android list avd | grep -q $emulator_name; then
7+
if $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/avdmanager list avd | grep -q $emulator_name; then
88
echo " ☛ Found an existing an emulator named ${emulator_name}"
99
exit 0;
1010
fi
@@ -24,10 +24,10 @@ then
2424
fi
2525

2626
echo " ☛ Downloading the Android image to create an emulator..."
27-
echo no | $ANDROID_SDK_ROOT/tools/bin/sdkmanager $PACKAGE
27+
echo no | $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager $PACKAGE
2828

2929
echo " ☛ Creating the emulator..."
30-
echo no | $ANDROID_SDK_ROOT/tools/bin/avdmanager \
30+
echo no | $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/avdmanager \
3131
--verbose \
3232
create avd \
3333
--force \

apps/bare-expo/scripts/start-emulator.sh

+23-23
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,29 @@ echo " ☛ Bootstrapping Expo in ${CURRENT_ENV} mode"
1111

1212
"$DIR/setup-android-project.sh"
1313

14-
if ! $ANDROID_SDK_ROOT/tools/android list avd | grep -q bare-expo; then
15-
echo " ⚠️ No emulator for bare Expo found, creating one..."
16-
$DIR/create-emulator.sh 22
17-
fi
18-
19-
if $ANDROID_SDK_ROOT/platform-tools/adb devices -l | grep -q emulator; then
20-
echo " ✅ Emulator is already running"
21-
else
22-
echo " ⚠️ Starting emulator..."
23-
echo "no" | $ANDROID_SDK_ROOT/emulator/emulator "-avd" "bare-expo" "-skin" "480x800" "-no-audio" "-no-boot-anim" "-port" "5554" "-no-snapshot" "-partition-size" "1024" &
24-
25-
$DIR/wait-for-emulator.sh
26-
sleep 30
27-
28-
$ANDROID_SDK_ROOT/platform-tools/adb wait-for-device
29-
$ANDROID_SDK_ROOT/platform-tools/adb shell settings put global window_animation_scale 0
30-
$ANDROID_SDK_ROOT/platform-tools/adb shell settings put global transition_animation_scale 0
31-
$ANDROID_SDK_ROOT/platform-tools/adb shell settings put global animator_duration_scale 0
32-
$ANDROID_SDK_ROOT/platform-tools/adb shell am broadcast -a android.intent.action.BOOT_COMPLETED &
33-
34-
sleep 5
35-
echo " ✅ Emulator is running"
36-
fi
14+
# if ! $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/avdmanager list avd | grep -q bare-expo; then
15+
# echo " ⚠️ No emulator for bare Expo found, creating one..."
16+
# $DIR/create-emulator.sh 22
17+
# fi
18+
19+
# if $ANDROID_SDK_ROOT/platform-tools/adb devices -l | grep -q emulator; then
20+
# echo " ✅ Emulator is already running"
21+
# else
22+
# echo " ⚠️ Starting emulator..."
23+
# echo "no" | $ANDROID_SDK_ROOT/emulator/emulator "-avd" "bare-expo" "-skin" "480x800" "-no-audio" "-no-boot-anim" "-port" "5554" "-no-snapshot" "-partition-size" "1024" &
24+
25+
# $DIR/wait-for-emulator.sh
26+
# sleep 30
27+
28+
# $ANDROID_SDK_ROOT/platform-tools/adb wait-for-device
29+
# $ANDROID_SDK_ROOT/platform-tools/adb shell settings put global window_animation_scale 0
30+
# $ANDROID_SDK_ROOT/platform-tools/adb shell settings put global transition_animation_scale 0
31+
# $ANDROID_SDK_ROOT/platform-tools/adb shell settings put global animator_duration_scale 0
32+
# $ANDROID_SDK_ROOT/platform-tools/adb shell am broadcast -a android.intent.action.BOOT_COMPLETED &
33+
34+
# sleep 5
35+
# echo " ✅ Emulator is running"
36+
# fi
3737

3838
$DIR/start-metro.sh $port
3939

0 commit comments

Comments
 (0)