From 6b9549fd73c10b54a754dbbf3bef5a1db0d30bc2 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Wed, 26 Sep 2012 15:00:59 -0700 Subject: [PATCH] Make runhat command work again. Change-Id: Ia3d2aefd32579b61da72e65c78dc6053dbaaad28 --- envsetup.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/envsetup.sh b/envsetup.sh index e5c60cfde..3694755c4 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -937,7 +937,7 @@ function runhat() shift 2 fi local adbOptions=${adbTarget} - echo adbOptions = ${adbOptions} + #echo adbOptions = ${adbOptions} # runhat options local targetPid=$1 @@ -954,8 +954,11 @@ function runhat() fi # issue "am" command to cause the hprof dump - local devFile=/sdcard/hprof-$targetPid + local sdcard=$(adb shell echo -n '$EXTERNAL_STORAGE') + local devFile=$sdcard/hprof-$targetPid + #local devFile=/data/local/hprof-$targetPid echo "Poking $targetPid and waiting for data..." + echo "Storing data at $devFile" adb ${adbOptions} shell am dumpheap $targetPid $devFile echo "Press enter when logcat shows \"hprof: heap dump completed\"" echo -n "> "