Unity android build symbols.zip file too big
Asked Answered
C

4

12

I have started publishing my app to the Android play store and need to upload a symbols.zip file to de-obfuscate my crash reports. When I build my app in Unity 2020.1.0f1 ( had the same problem in the previous version) the app bundle(aab) is about 35MB, but my symbols.zip is almost 400MB.

I am using the Android NDK and SDK included with Unity. In my build settings, I have tried using R8 under minify and without.

Google will not accept such a large symbols file. I need to figure out how to get the symbols file to a reasonable size.

I have tried searching for solutions, but am coming up empty. I have tried moving to a newer version of Unity.

Chlamys answered 23/8, 2020 at 7:57 Comment(3)
I had exactly the same problem and asked a question on [forum.unity.com/threads/android-symbols-zip-is-too-big.965879/… forum). Suggestion is to rezip the generated archive with maximum compression method. It helped me to reduce the size to ~120MBMalenamalet
Enigo, Please post your comment as answer.Nicholasnichole
@ Enigo Thank you so much. This worked like a charm. Cannot believe I did not think of trying this before. To clarify for everyone else who may come across this post. I extracted the two directories inside the symbols.zip file . Then I made a new zip archive using 7zip and added those folders into it. Be careful to maintain the folder structure of the original symbols.zip in the new archive. This method almost halved the size of my symbols.zip. Thanks again!Chlamys
M
12

Following up on my comment - it is actually very easy to solve this problem. Just unzip generated symbols.zip and archive it again without any changes.

screenshot

As you can see, the size of the repacked archive is ~5 times smaller.

Malenamalet answered 14/9, 2020 at 19:51 Comment(4)
Reduces the file size, but then when I try to upload: "The native debug symbols contain an invalid directory my_app.symbols. Only Android ABIs are supported."Yourself
Did you change the folders structure?Malenamalet
Nope. Create it in Unity. Unzip it in Windows. Rezip it in Windows. Upload.Yourself
Figured out why it wasn't working for me! https://mcmap.net/q/926503/-unity-android-build-symbols-zip-file-too-bigYourself
E
3
  1. Unzip the symbols file;
  2. Delete all files with .dbg.so extension in subdirectories.
  3. Zip the files again with some level of compression.

The resulting zip file should be way smaller. Our symbols files usually have around 1.9GB and it gets to around 240MB after these steps.

Eclampsia answered 17/9, 2021 at 19:36 Comment(0)
Y
2

In addition to @Enigo's answer, if you are using Windows to zip, do not zip the originally extracted folder. Zip the contents of it, then rename.

Yourself answered 8/10, 2020 at 17:23 Comment(0)
E
1

Following up to this question.

Current Unity versions now offer better support for Public/Debug symbols file . Just select "Public" on "Create symbols.zip" option in the Build Settings.

Build Settings public symbols.zip

Eclampsia answered 14/6, 2024 at 20:15 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.