diff options
-rw-r--r-- | apps/Development/AndroidManifest.xml | 5 | ||||
-rwxr-xr-x | scripts/gdbclient | 28 | ||||
-rwxr-xr-x | tools/idegen/idegen.sh | 13 |
3 files changed, 30 insertions, 16 deletions
diff --git a/apps/Development/AndroidManifest.xml b/apps/Development/AndroidManifest.xml index 3ac819077..69dc1e2ab 100644 --- a/apps/Development/AndroidManifest.xml +++ b/apps/Development/AndroidManifest.xml @@ -16,7 +16,8 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.development" - android:versionCode="1" android:versionName="1.0"> + android:versionCode="1" android:versionName="1.0" + android:sharedUserId="android.uid.system"> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> @@ -55,7 +56,7 @@ android:icon="@mipmap/ic_launcher_devtools"> <intent-filter> <action android:name="android.intent.action.MAIN" /> - <category android:name="android.intent.category.LAUNCHER" /> + <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity> <activity android:name="PackageBrowser" android:label="Package Browser"> diff --git a/scripts/gdbclient b/scripts/gdbclient index b74a8f01e..8ff9ae9c6 100755 --- a/scripts/gdbclient +++ b/scripts/gdbclient @@ -14,7 +14,7 @@ source $ANDROID_BUILD_TOP/build/envsetup.sh function adb_get_product_device() { local candidate=`adb shell getprop ro.product.device | tr -d '\r\n'` - if [ -z $candidate ]; then + if [ -z "$candidate" ]; then candidate=`adb shell getprop ro.hardware | tr -d '\r\n'` fi echo $candidate @@ -47,15 +47,6 @@ function gdbclient() { fi local DEVICE=$(adb_get_product_device) - if [ -z "$DEVICE" ]; then - echo "Error: Unable to get device name. Please check if device is connected and ANDROID_SERIAL is set." - return -2 - fi - - if [ -n "$2" ]; then - PORT=$2 - fi - local ROOT=$(gettop) if [ -z "$ROOT" ]; then # This is for the situation with downloaded symbols (from the build server) @@ -63,7 +54,24 @@ function gdbclient() { ROOT=`realpath .` fi + + if [[ -z "$DEVICE" || ! -d "$ROOT/out/target/product/$DEVICE" ]]; then + if [ -z "$CM_BUILD" ]; then + echo "Error: Unable to get device name. Please check if device is connected and ANDROID_SERIAL is set." + return -2 + fi + DEVICE=$CM_BUILD + fi + + if [ -n "$2" ]; then + PORT=$2 + fi + local OUT_ROOT="$ROOT/out/target/product/$DEVICE" + if [[ ! -d "$OUT_ROOT" && -n "$OUT" ]]; then + # The case where OUT_DIR_COMMON_BASE is used + OUT_ROOT="$OUT" + fi local SYMBOLS_DIR="$OUT_ROOT/symbols" local IS_TAPAS_USER="$(get_build_var TARGET_BUILD_APPS)" local TAPAS_SYMBOLS_DIR= diff --git a/tools/idegen/idegen.sh b/tools/idegen/idegen.sh index d7e6986d8..2dbff37b1 100755 --- a/tools/idegen/idegen.sh +++ b/tools/idegen/idegen.sh @@ -5,9 +5,14 @@ if [ ! -d development ]; then exit 1 fi -idegenjar=`find out -name idegen.jar -follow | grep -v intermediates` -if [ "" = "$idegenjar" ]; then - echo "Couldn't find idegen.jar. Please run make first." -else +if [ -z "$ANDROID_HOST_OUT" ]; then + echo "Couldn't find host out directory. Make sure ANDROID_HOST_OUT is in your environment." + exit 127 +fi + +idegenjar=`find $ANDROID_HOST_OUT -name idegen.jar -follow | grep -v intermediates` +if [ -z "$idegenjar" ]; then + echo "Couldn't find idegen.jar. Please run 'make idegen' first." +else java -cp $idegenjar Main fi |