Skip to content

Instantly share code, notes, and snippets.

@clungzta
Created May 15, 2017 23:29
Show Gist options
  • Select an option

  • Save clungzta/f9028242cf044c2e45f6abf3908a98a8 to your computer and use it in GitHub Desktop.

Select an option

Save clungzta/f9028242cf044c2e45f6abf3908a98a8 to your computer and use it in GitHub Desktop.

Revisions

  1. clungzta renamed this gist May 15, 2017. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. clungzta created this gist May 15, 2017.
    29 changes: 29 additions & 0 deletions build_debug_android_kivy.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    VERBOSITY = 1

    # Change Package name to suit that
    PACKAGE_NAME=org.test.kivytestapp

    echo $PACKAGE_NAME
    echo "Building the android app in debug mode."
    buildozer -v android debug

    echo "Loading the app onto to the debug mode device."
    adb install -r bin/TestApp-1.0-debug.apk

    echo "Automatically (re)starting the app on the device"
    adb shell monkey -p $PACKAGE_NAME -c android.intent.category.LAUNCHER 1

    PID=$(adb shell ps | grep $PACKAGE_NAME | cut -c10-15)
    echo $PACKAGE_NAME
    echo $PID

    # Print android log output to command
    if (( VERBOSITY == 1 )); then
    # Filter the output to this program only
    echo "Logging app specific filtered output"
    adb -d logcat | grep $PID
    elif (( VERBOSITY > 1 )); then
    # Print all android system output
    echo "Logging all system output"
    adb -d logcat
    fi