# AndroidSDK Setup (Linux) ## Install Android CLI - First download and install the latest version of `android cli` ```console $ curl -fsSL https://dl.google.com/android/cli/latest/linux_x86_64/install.sh | bash ``` ## Install Android Debug Bridge (adb) - This tool allows you to communicate with your android device. - When a bridge is established you can install you application onto the device ```console $ sudo apt update $ sudo apt install adb ``` - Run with ```console $ adb start-server ``` ## Emulation - First you have to create an emulator ```console $ android emulator create ``` - Run with: ```console $ ~/Android/Sdk/emulator/emulator @medium_phone -no-snapshot -gpu swiftshader_indirect ``` ## Gradle - This is the used android application build system - In your project create the `gradlew` build script - The first time you run the script gradle will setup everything you need - To build and install your application on the connected device run: ```console $ ./gradlew installDebug ``` --- ## References - AndroidCLI - https://developer.android.com/tools/agents - Android Debug Bridge (adb) - https://en.wikipedia.org/wiki/Android_Debug_Bridge - gradlew script - http://gist.netimaro.si/tilc/gradlew