Open dturner opened 8 years ago
Hi Don, are you sure the perf binary was copied to the device? It looks like adb push failed.
On Tue, Apr 12, 2016 at 2:24 PM, Don Turner notifications@github.com wrote:
Following the instructions here: https://google.github.io/fplutil/android_ndk_perf.html. I run the following command:
cd liquidfun/Box2D/Testbed android_ndk_perf --apk bin/testbed-debug.apk record -o output/perf.data
This produces the following error:
WARNING: Nexus 9 is not in the list of supported devices. It is likely that the performance counters don't work so you may need to try a different device.
run-as: exec failed for /data/local/tmp/perf: Permission denied 243 chmod: /data/data/com.google.fpl.liquidfun.testbed/perf.data: No such file or directory 1 0 Unable to make /data/data/com.google.fpl.liquidfun.testbed/perf.data readable.
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/google/fplutil/issues/5
Running android_ndk_perf
with --verbose
I can see that it's the following command which fails:
/usr/local/bin/adb "shell" "run-as com.google.fpl.liquidfun.testbed /data/local/tmp/perf"
With the error: run-as: exec failed for /data/local/tmp/perf: Permission denied
This is because whilst /data/local/tmp/perf is world executable, /data/local/tmp is not world readable (/data is readable only by system).
I did find that you can do adb shell cp /data/local/tmp/perf /data/data/com.google.fpl.liquidfun.testbed/perf
in order to copy the perf binary into the package folder. It can then be executed using run-as
from there.
I have an internal patch for this, haven't tested all command but in general it looks like perf may have issues with Android N anyway.
Following the instructions here: https://google.github.io/fplutil/android_ndk_perf.html. I run the following command:
cd liquidfun/Box2D/Testbed android_ndk_perf --apk bin/testbed-debug.apk record -o output/perf.data
This produces the following error:
WARNING: Nexus 9 is not in the list of supported devices. It is likely that the performance counters don't work so you may need to try a different device.
run-as: exec failed for /data/local/tmp/perf: Permission denied 243 chmod: /data/data/com.google.fpl.liquidfun.testbed/perf.data: No such file or directory 1 0 Unable to make /data/data/com.google.fpl.liquidfun.testbed/perf.data readable.