Skip to content

Instantly share code, notes, and snippets.

@niltonvasques
Last active July 30, 2016 13:13
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 niltonvasques/221ca6e119f61bba5dfc1ac1947a91ee to your computer and use it in GitHub Desktop.
Save niltonvasques/221ca6e119f61bba5dfc1ac1947a91ee to your computer and use it in GitHub Desktop.
Basic android Makefile
APP_NAME=MyAppName
PACKAGE=com.example.package
CC=./gradlew
ADB=adb
.PHONY: build uninstall install log
all: build uninstall install log
build:
$(CC) assembleDebug
install:
find . -name *debug.apk | xargs adb install -d
uninstall:
$(ADB) uninstall $(PACKAGE)
log:
$(eval PID=`adb shell dumpsys meminfo $(PACKAGE) | grep "pid [0-9]*" -oh | grep "[0-9]*" -oh`)
$(ADB) logcat | grep "($(PID))"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment