Skip to content

Instantly share code, notes, and snippets.

@aldemirenes
Last active September 19, 2024 14:34
Show Gist options
  • Save aldemirenes/9bbea36abba33d74196ca5e488c4365e to your computer and use it in GitHub Desktop.
Save aldemirenes/9bbea36abba33d74196ca5e488c4365e to your computer and use it in GitHub Desktop.
Shell scripts for Android development without needing to use Android Studio
#!/bin/sh
package_name=$1
./gradlew assembleDebug
adb -d install -r app/build/outputs/apk/app-debug.apk
adb shell monkey -p "$package_name" -c android.intent.category.LAUNCHER 1
./logcat.sh "$package_name"
#!/bin/sh
package_name=$1
app_pid=$(adb shell ps | grep "$package_name" | awk '{ print $2 }')
adb logcat | grep "$app_pid"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment