From 5d90ca57b85f798d035166b42e1f8d3b4ff6ccf3 Mon Sep 17 00:00:00 2001 From: Yemel Jardi Date: Mon, 9 Jun 2014 11:15:22 -0300 Subject: [PATCH] Add debug flag to android build script --- README.md | 3 ++- android/build.sh | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d9896b3c1..66fa78531 100644 --- a/README.md +++ b/README.md @@ -139,8 +139,9 @@ export CROSSWALK="" To build the APK run the script: ``` -sh android/build.sh +sh android/build.sh [-d] ``` +- The -d flag will package the apk in debug mode, allowing [remote debugging chrome](https://developer.chrome.com/devtools/docs/remote-debugging) - The APK file is in **android/Copay_VERSION_arm.apk** To install the APK in your device run: diff --git a/android/build.sh b/android/build.sh index 15d12d8fc..111389d45 100644 --- a/android/build.sh +++ b/android/build.sh @@ -20,6 +20,11 @@ checkOK() { BUILDDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" APPDIR="$BUILDDIR/package" VERSION=`cut -d '"' -f2 $BUILDDIR/../version.js` +DEBUG="" +if [[ $1 = "-d" ]] +then + DEBUG="--enable-remote-debugging" +fi # Move to the build directory cd $BUILDDIR @@ -49,7 +54,7 @@ checkOK # Building the APK echo "${OpenColor}${Green}* Building APK file...${CloseColor}" cd $CROSSWALK -python make_apk.py --manifest=$APPDIR/manifest.json --target-dir=$BUILDDIR --arch=arm +python make_apk.py --manifest=$APPDIR/manifest.json --target-dir=$BUILDDIR --arch=arm $DEBUG checkOK cd $BUILDDIR