Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

Unable to run android_ndk_perf on Nexus 9 #5

Open
dturner opened this issue Apr 12, 2016 · 4 comments
Open

Unable to run android_ndk_perf on Nexus 9 #5

dturner opened this issue Apr 12, 2016 · 4 comments

Comments

@dturner
Copy link

dturner commented Apr 12, 2016

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.

@stewartmiles
Copy link
Contributor

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
#5

@dturner
Copy link
Author

dturner commented Apr 13, 2016

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).

@dturner
Copy link
Author

dturner commented Apr 13, 2016

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.

@stewartmiles
Copy link
Contributor

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.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants