Forums - Snapshot says application need read/write access, but it already has!

5 posts / 0 new
Last post
Snapshot says application need read/write access, but it already has!
olle
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?

  • Up0
  • Down0
olle
Join Date: 14 Sep 18
Posts: 3
Posted: Fri, 2018-09-14 08:31

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.

  • Up0
  • Down0
eshaw Moderator
Join Date: 12 May 16
Location: San Diego
Posts: 141
Posted: Wed, 2018-09-26 16:04

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

 

  • Up0
  • Down0
olle
Join Date: 14 Sep 18
Posts: 3
Posted: Wed, 2018-10-17 07:11

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)

  • Up0
  • Down0
onnep
Join Date: 8 Nov 18
Posts: 4
Posted: Tue, 2018-12-11 05:19

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

 

ActivityThread: Application com.company.application.buildtype is waiting for the debugger on port 8100...
        : Successfully load libgui-plugin.so, this=0x7f51bba0c0
OemGestureButton: Update mNavigationBarPosition to 1 displayRotation=1
OemGestureButton: updateGestureButtonRegion: not enabled
ActivityManager: Config changes=20000480 {1.0 0 ?mcc?mnc [en_FI] ldltr sw411dp w813dp h380dp 420dpi nrml long hdr widecg land finger -keyb/v/h -nav/h winConfig={ mBounds=Rect(0, 0 - 0, 0) mAppBounds=Rect(79, 0 - 2214, 1080) mWindowingMode=fullscreen mActivityType=undefined} s.7mThemeChanged = 0}
ANDR-IOP: io prefetch is disabled
ActivityManager: Failed to schedule configuration change
ActivityManager: android.os.DeadObjectException

 

I would really appreciate any ideas!

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.