Android symbols
Generate symbols to help you debug a built Android application.
Read time 6 minutesLast updated 10 days ago
To help you debug your application, Unity can generate a package that contains symbol files with debug metadata for native Unity libraries. Symbol files contain an executable file section called symbol table () that translates active memory addresses into information you can use, like a method name. The translation process is called symbolication. You can upload a symbols package to the Google Play Console to see a human-readable stack trace on the Android Vitals dashboard.
.symtabFor more information about executable file (ELF) section, refer to Wikipedia.
Unity generates symbol files for the following libraries:
-
: Unity’s engine code:
libunity- If Strip Engine Code property is disabled, the symbol file is precompiled.
- If Strip Engine Code property is enabled, Unity compiles the symbol file during build process.
-
: Contains C# scripts:
libil2cpp- If you don't export your project, Unity compiles the symbol file during build process.
- If you export your project, Gradle compiles the symbol file.
Gradle generates symbol files for any additional shared libraries by stripping the and executable file sections from the shared libraries. If a shared library doesn't contain these sections, Gradle will not generate a symbol file for it.
.symtab.debug*Depending upon your application build format, Unity generates symbol files in two ways :
- As a zip file that can be generated for both or
apk.aab - Directly embeds symbol files in the . Unity doesn't embed symbol files into an
aab.apk
Use UserBuildSettings.DebugSymbols.format API to set the format of the symbol package.
Types of symbol files
Unity uses debugSymbolLevel property of Gradle to generate symbol files. There are two types of symbol files:
- Public: A small file that contains a symbol table section. For more information, refer to Public symbols.
- Debugging: Contains everything that a public symbol file contains along with full debugging information that you can use for more in-depth debugging. For more information, refer to Debugging symbols.
Use UserBuildSettings.DebugSymbols.level to generate the required type of symbol file.
UserBuildSettings.DebugSymbols.format = DebugSymbolFormat.IncludeInBundle | DebugSymbolFormat.Zip | DebugSymbolFormat.LegacyExtensions;
Public symbols
A public symbols file contains information that resolves function addresses to human-readable strings. These files don't contain debugging information. This makes public symbol files smaller than debugging symbols files.
Debugging symbols
A debugging symbols file contains full debugging information and a symbol table section. Use it to:
- Resolve stack traces and to debug applications that you have source code available for.
- Attach a native debugger to the application and debug the code.
Custom symbols
You can instruct Unity to include additional symbol files. This is useful if you use shared libraries and want your local debugger, and Google Play, to resolve the shared library stack traces if the application crashes.
To make Unity include a custom symbols file:
- In the Project window, select a plug-in that has a file extension.
.so - In the Inspector, find the Platform settings section.
- Set CPU to the CPU architecture that the symbols file is compatible with.
- Set Shared Library Type to Symbol.
Whenever Unity generates a symbols package, it adds the additional symbol files to the symbols package.
If you want to make Unity include a custom symbols file from a C# script, the UnityEditor.Android namespace includes the following APIs to set the CPU and Shared Library Type respectively:

Custom plug-in in the Inspector.
Generating a symbols package
There are two ways to enable symbols package generation for your application:
- Through the Build Profiles window.
- Using the UserBuildSettings.DebugSymbols.level and UserBuildSettings.DebugSymbols.format APIs.
To enable symbols package generation through the Build Profiles window:
-
Open the Build Profiles window (menu: File > Build Profiles).
-
From the list of platforms in the Platforms panel, select Android or create a build profile for the Android platform.
-
Set Debug Symbols to one of the following:
-
Set Symbols output options to .zip.
After you enable symbols package generation, building your project generates a file that contains a symbol file for the library. If you set your scripting backend to , the also contains a symbol file for the library. Unity places this symbols package within the output directory. The name of the symbols package file is in this format: . For example, where is the name of your application build file, is the version, and is the bundle version code. The version and bundle version code are set in the Android Player settings.
.ziplibunityIL2CPP
?
.ziplibil2cpp<appbuildfilename>-<version>-v<bundle version code>-IL2CPP.symbols.zipMyApp-0.1-v100-IL2CPP.symbols.zipMyApp0.1100If you enable Export Project in the Android build settings, Unity doesn't build the project. Instead, it exports the project for Android Studio, generates a symbol file for , and places it within in the output directory. When you build your exported project from Android Studio, Gradle generates the symbol file and places it within the directory alongside the symbol file.
libunityunityLibrary/symbols/<architecture>/libil2cppunityLibrary/symbols/<architecture>/libunityUsing symbols in the Google Play console
Embedded symbols
If you're producing an Android App bundle (aab), you can embed symbols directly into an and upload it to Google Play.
aabUserBuildSettings.DebugSymbols.level = DebugSymbolLevel.SymbolTable;UserBuildSettings.DebugSymbols.format = DebugSymbolFormat.IncludeInBundle;
Zipped symbols
To produce a zipped symbols package, use the following code:
UserBuildSettings.DebugSymbols.level = DebugSymbolLevel.SymbolTable;UserBuildSettings.DebugSymbols.format = DebugSymbolFormat.Zip | DebugSymbolFormat.LegacyExtensions;
After you upload your application to Google Play, you can upload a public symbols zip package. For information on how to do this, refer to Google's documentation: Deobfuscate or symbolicate crash stack traces.