Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unity android build symbols.zip file too big

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.

like image 772
Manie Besselaar Avatar asked Aug 23 '20 07:08

Manie Besselaar


3 Answers

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.

like image 155
Enigo Avatar answered Nov 08 '22 02:11

Enigo


  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.

like image 38
Leonardo Bilck Avatar answered Nov 08 '22 02:11

Leonardo Bilck


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.

like image 2
Evorlor Avatar answered Nov 08 '22 03:11

Evorlor