mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-11 04:30:17 +03:00
30 lines
842 B
Bash
Executable File
30 lines
842 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
SDKDIR=$PWD/.android-sdk
|
|
export ANDROID_SDK_ROOT=${SDKDIR}
|
|
export ANDROID_HOME=${SDKDIR}
|
|
export ANDROID_AVD_HOME=${SDKDIR}/avd
|
|
|
|
mkdir ${SDKDIR}
|
|
mkdir ${SDKDIR}/cmdline-tools
|
|
|
|
echo Downloading Android SDK...
|
|
cd ${SDKDIR}/cmdline-tools
|
|
COMMAND_LINE_TOOLS_ZIP=${SDKDIR}/commandlinetools.zip
|
|
curl https://dl.google.com/android/repository/commandlinetools-mac-7583922_latest.zip -o ${COMMAND_LINE_TOOLS_ZIP}
|
|
unzip ${COMMAND_LINE_TOOLS_ZIP}
|
|
rm ${COMMAND_LINE_TOOLS_ZIP}
|
|
mv cmdline-tools latest
|
|
ln -s ${SDKDIR}/cmdline-tools/latest ${SDKDIR}/tools
|
|
|
|
echo Installing emulator...
|
|
yes | ${ANDROID_HOME}/tools/bin/sdkmanager --install platform-tools emulator
|
|
|
|
echo Installing platform SDK...
|
|
yes | ${ANDROID_HOME}/tools/bin/sdkmanager --install "platforms;android-32"
|
|
|
|
echo Starting ADB...
|
|
${ANDROID_HOME}/platform-tools/adb devices
|