Last active
February 22, 2024 20:21
-
-
Save mate-h/c84319e4d92de43cda504cf1bcde90b3 to your computer and use it in GitHub Desktop.
Downloads the Android Command Line tools for MacOS and installs the platform-tools (including ADB) package with the sdkmanager CLI. Useful for installing basic Android tooling and the Android Emulator without the need to install Android Studio or the entire SDK.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install mise from https://mise.jdx.dev/getting-started.html | |
mise install java@17 | |
mise global java@17 | |
# install brew from https://brew.sh/ | |
# sdkmanager, avdmanager | |
brew install --cask android-commandlinetools | |
echo "fish_add_path /opt/homebrew/share/android-commandlinetools/cmdline-tools/latest/bin" > ~/.config/fish/config.fish | |
exec $SHELL | |
touch ~/.android/repositories.cfg | |
sdkmanager emulator | |
sdkmanager platform-tools # adb, fastboot | |
echo "fish_add_path /opt/homebrew/share/android-commandlinetools/emulator" > ~/.config/fish/config.fish | |
echo "fish_add_path /opt/homebrew/share/android-commandlinetools/platform-tools" > ~/.config/fish/config.fish | |
exec $SHELL | |
sdkmanager "platforms;android-34" | |
sdkmanager "system-images;android-34;google_apis_playstore;arm64-v8a" | |
sdkmanager --licenses | |
avdmanager create avd --name "Pixel" --package "system-images;android-34;google_apis_playstore;arm64-v8a" -d 30 | |
# Start android emulator | |
emulator -avd Pixel |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For Zsh or Bash -