Snapshot says application need read/write access, but it already has!
Join Date: 14 Sep 18
Posts: 3
Posted: Fri, 2018-09-14 08:28
I've just downloaded Snapdragon Profiler to debug a very weird issue in our Android opengl game, only happening on OnePlus6 running Adreno 630, but not on OnePlus5 (Adreno 540) (nor on any other hardware I've tried, from other vendors)
But, I can't get it to take a snapshot... It complaines the application needs read/write access to external storage, but afaik it does have it!
I added this in my AndroidManifest.xml:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
And I checked in runtime if I have it like this:
/* Checks if external storage is available for read and write */
public boolean isExternalStorageWritable() {
String state = Environment.getExternalStorageState();
if (Environment.MEDIA_MOUNTED.equals(state)) {
return true;
}
return false;
}
/* Checks if external storage is available to at least read */
public boolean isExternalStorageReadable() {
String state = Environment.getExternalStorageState();
if (Environment.MEDIA_MOUNTED.equals(state) ||
Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {
return true;
}
return false;
}
In runtime I get "isExternalStorageWritable: true isExternalStorageReadable: true"
But still, the profiler still says the application need read/write access, and the "Take Snapshot" button does not seem to do anything...
Well, first it says "Retrieving snapshot" then I see a brief flash in the snapshot window (nothing recognizable from my app) and then nothing happens...
I'm running on MacOS 10.14 Mojave, with android build tools 27.0.3, adb version is 1.0.39
Both adb and simpleperf have the right paths in settings.
Anyone know anything I could try to get it to work?
Also, nothing else seems to work in the profiler either... I can connect to my device, I can see my process and select the one I'm interested in, but nothing I do seems to bring me any data from the device.
Sorry to hear it's not working for you. Are the problems with Profiler limited to the OnePlus6, or are you seeing similar issues on other devices? When you say you are not able to get any data from Profiler, which capture modes have you tried (Snapshot, Trace, Realtime, etc.)?
Eric
Thank you for answering, wish I saw it sooner, but unfortunately I didn't get notified about your reply before yesterday.
I tried all the capture modes, but couldn't get anything to work but getting basic information about the hardware connected.
Two of my collegues have since managed to get it working though, but they both had problems, but after lots of connecting and reconnecting, rebooting and whatnot, it now seems to somewhat work. (They can't say what made it "suddenly" work).
We're all using OSX, so it seems the profiling is very unstable on OSX.
Asked one of them now, he still havn't got Snapshot and Trace to work, but Realtime did work. The other guy I know we did get either a Trace or a Snapshot from the OP6.
We've done everything by the book, added internet and read/write permissions, starts the profiler first and then the app.
I think we only tried with OnePlus6 since that was the one we had the graphics problem with.
(We have since managed to fix the issue we had, without the use of the profiler)
I have also issues with OnePlus6. We have a Unity Project which has some issues with instancing and it would be helpful to see it with Snapshot Capture. Unfortunately that does not work. Trace Capture does work, but it does not allow seeing the drawcalls, etc.
I have set the android-debuggable="true" in the manifest, which was initially missing from our build (it is a release build). That was what the profiler correctly alerted me about. But now the Capture Snapshot still says that "No eligible processes found". When I use the 'Launch Application' I can get the app to start, and shortly display "Waiting for debugger" on the device.
from logcat (not sure if this is related):
I would really appreciate any ideas!