-
-
Save vchepeli/9515d92a09b0f829c8ffae8a19dfdfe6 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 hidden or 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
| # http://johnborg.es/2019/04/android-setup-macos.html | |
| # install rtx from https://github.com/jdx/rtx | |
| rtx install java@17 | |
| rtx 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