Skip to content

Instantly share code, notes, and snippets.

@tracer8
Forked from fadookie/runAndroid.sh
Created August 18, 2018 04:34
Show Gist options
  • Save tracer8/5e01c9b79fcabb99f681d2d230ba8c93 to your computer and use it in GitHub Desktop.
Save tracer8/5e01c9b79fcabb99f681d2d230ba8c93 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