Skip to content

Instantly share code, notes, and snippets.

@andybak
Forked from fadookie/runAndroid.sh
Created May 27, 2018 11:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andybak/88b8bdfda1357ec11f7c2e16af76423d to your computer and use it in GitHub Desktop.
Save andybak/88b8bdfda1357ec11f7c2e16af76423d to your computer and use it in GitHub Desktop.
Script to install, run, and open logcat for a Unity Android App
#!/bin/sh
# Script to install, run, and open logcat for a Unity Android App.
# I needed this as one of my libraries has a critical post-build script so I can't use "Build and Run" anymore - this is the "and Run" part.
# Be sure to update these variables to match your app's publishing/build settings:
APK_PATH='builds/android/basecode.apk'
BUNDLE_ID='com.eliotlash.basecode'
alias unilogcat='adb logcat|egrep "Unity"'
adb install -r "${APK_PATH}" && adb logcat -c && adb shell am start -n "${BUNDLE_ID}/com.unity3d.player.UnityPlayerNativeActivity" && echo 'DONE, LOG:' && unilogcat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment