axmol/template/android/ndkgdb.sh

31 lines
910 B
Bash
Raw Normal View History

APPNAME="__projectname__"
APP_ANDROID_NAME="__packagename__"
2013-06-16 19:25:20 +08:00
ANDROID_SDK_ROOT="__androidsdk__"
NDK_ROOT="__ndkroot__"
COCOS2DX_ROOT="__cocos2dxroot__"
2013-06-16 19:25:20 +08:00
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
APP_ROOT="$DIR/.."
APP_ANDROID_ROOT="$COCOS2DX_ROOT/$APPNAME/proj.android"
echo "NDK_ROOT = $NDK_ROOT"
2013-06-16 19:25:20 +08:00
echo "ANDROID_SDK_ROOT = $ANDROID_SDK_ROOT"
echo "COCOS2DX_ROOT = $COCOS2DX_ROOT"
echo "APP_ROOT = $APP_ROOT"
echo "APP_ANDROID_ROOT = $APP_ANDROID_ROOT"
echo "APP_ANDROID_NAME = $APP_ANDROID_NAME"
echo
echo "Killing and restarting ${APP_ANDROID_NAME}"
echo
2013-06-16 19:25:20 +08:00
#set -x
"${ANDROID_SDK_ROOT}"/platform-tools/adb shell am force-stop "${APP_ANDROID_NAME}"
NDK_MODULE_PATH="${COCOS2DX_ROOT}":"${COCOS2DX_ROOT}"/cocos2dx/platform/third_party/android/prebuilt \
2013-06-16 19:25:20 +08:00
"${NDK_ROOT}"/ndk-gdb \
--adb="${ANDROID_SDK_ROOT}"/platform-tools/adb \
--verbose \
--start \
--force