Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Missing debug symbols for .so files in Android Studio

Discussion in 'Android' started by TheTaj, Sep 23, 2020.

  1. TheTaj

    TheTaj

    Joined:
    Jun 26, 2014
    Posts:
    24
    I've been scouring forums, blogs, etc for any answers to this, but so far I've found no solutions/workarounds.

    I have a few apps that are working fine, they use several firebase features including firebase-messaging. No bugs to speak of, users are able to play the game just fine.
    I'd really like to be able to open up my .apk in AndroidStudio and record a firebase robo-test, however I can't seem to get past this issue.

    Missing debug symbols
    To debug the APK, native libraries (*.so files) must have debug symbols.
    The following libraries are missing debug symbols:
    * libFirebaseCppAnalytics.so
    * libFirebaseCppApp-6_15_2.so
    * libFirebaseCppAuth.so
    * libFirebaseCppCrashlytics.so
    * libFirebaseCppDatabase.so
    * libFirebaseCppFunctions.so
    * libFirebaseCppInstanceId.so
    * libFirebaseCppMessaging.so
    * libFirebaseCppRemoteConfig.so
    * libil2cpp.so
    * libmain.so
    * libnative-googlesignin.so
    * libunity.so


    Whenever I attempt to do just about anything in AndroidStudio (such as try to launch the apk for a robo test recording) I get hit with a "Default Activity not found" error, which I am fairly certain is related to the missing debug symbols since I have defined the default activity in my manifest:
     <activity android:name="com.google.firebase.MessagingUnityPlayerActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
    <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
    <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
    <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    </activity>


    In my attempts to rectify this issue, I've tried:
    • Changing the activity from "com.google.firebase.MessagingUnityPlayerActivity" to
      "com.unity3d.player.UnityPlayerActivity"
    • Pointing unity to the latest gradle (6.6.1 instead of Unity's prebuilt 5.1.1 included in Unity 2019.4.4 which is the version I'm using
    • Pointing Android Studio to the latest gradle, pointing it to Unity's version, etc
    • I've disabled proguard
    • Unchecked 'strip engine code'
    • Development build on/off when building
    • Downgraded Android Studio from latest (4.0.1) to an earlier version (3.5.1)
    • Praying (although this may not be configured correctly as I am an atheist)
    • Changing AndroidStudio launch options from 'Default Activity' to 'None', also 'Specified Activity' gives me no options in the dropdown (likely because the missing debug symbols are keeping the project form being parsed correctly)
    If anyone has run into this issue before, or knows of any solutions/workarounds I haven't tried-- I'd very much appreciate anything that might help point me in the right direction.
    I have seen some solutions about manually attaching an external library file for each .so file, but I can't seem to find any information on where these debug symbols are contained. (My cpp folder in AndroidStudio has the problematic .so files and nothing else)

    Thanks in advance!
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,875
    Let's start with libil2cpp.

    Those symbols can be acquired if you have Create Symbols checked in Build Settings window, a zip file will be created next to apk. There will be two files - libunity.dbg.so (symbol with source code information), libunity.sym.so (symbols only with function names). Basically rename libil2cpp.sym.so -> libil2cpp.so

    Regarding libunity.so:
    - If you have Strip Engine Code selected and il2cpp selected, the symbols will be in the created zip file, again rename .sym.so to .so
    - If you have Strip Engine Code deselected, libunity symbols will be in Unity installation, for ex., <UnityInstall>Editor\Data\PlaybackEngines\AndroidPlayer\Variations\il2cpp\Release\Symbols\arm64-v8a , again rename sym.so -> .so

    libmain.so symbols always come from Unity installation, no matter what Strip Engine Code is set to. The location is the same as with libunity, \Editor\Data\PlaybackEngines\AndroidPlayer\Variations\il2cpp\Release\Symbols\arm64-v8a, again rename sym.so -> .so

    Hope that helps
     
  3. TheTaj

    TheTaj

    Joined:
    Jun 26, 2014
    Posts:
    24
    Hi Tomas, thanks for your reply!

    I had also submitted this issue to the Android support team and I was able to figure out my issue, so I figure I'll post it here for anyone who runs into this.

    I updated my AndroidStudio version to 4.1 RC3.
    I manually set the library for the .so files for the libil2cpp.so -- these were located under <UnityProject>\Temp\StagingArea\symbols\$YOUR_ABI\
    I chose the 'Invalidate Caches and Restart' option in AndroidStudio (not sure if this was necessary, tbh)

    ---- At this point, Android Studio was parsing in my project correctly and the errors weren't keeping me from performing various Android Studio tasks! Great success! ----

    Now, the reason I was doing all this was because I wanted to record a robo test (Tools > Firebase > Test Lab > Record Robo Test)
    (One thing I was missing was a line in my AndroidManifest saying android:debuggable="true")

    Unfortunately, as it stands currently, it doesn't look like firebase actually support Unity projects because when I ran my Robo Test, literally none of my input was actually recorded.
    Firebase doesn't explicitly say this, but hints at this in the 'Known Issues' of their doc: https://firebase.google.com/docs/test-lab/android/robo-ux-test

    Tl;Dr -- Here are the steps to get firebase robo testing not working *correctly* for Unity projects in Android Studio.