Search Unity

Proguard mapping file - where can I find it?

Discussion in 'Android' started by gili_unity, Mar 31, 2019.

  1. gili_unity

    gili_unity

    Joined:
    Jan 2, 2019
    Posts:
    9
    We use ProGuard when compiling our app on Android, and we need the mapping.txt file that should be created so we can upload it to Google Play (docs).
    Is this mapping.txt file being generated by Unity? Where can I find it?
     
  2. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    835
    The location of the file depends on your Unity version. In latest Unity versions the mapping file will be placed at the same location as your apk file when you build it from the editor. The file will be named "<apk-name>_mapping.txt". In older versions the mapping file can be found in "<project-location>\Temp\gradleOut\build\outputs\mapping\" after you build the apk. Just make sure to copy the mapping file from the latter location as it will be removed after you close the editor.
     
    hristokehayov likes this.
  3. flashmandv

    flashmandv

    Joined:
    Mar 26, 2015
    Posts:
    156
    @JuliusM I can't find any mapping file in Unity 2019.1.4
    Was it deprecated, or placed in other location? Do I need to build developer build to get it?
     
  4. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    835
    It works for both release and development builds if proguard is enabled.
     
  5. IndieFist

    IndieFist

    Joined:
    Jul 18, 2013
    Posts:
    520
    The mapping.txt its required to be upload in google play console? if not could cause crashes in unity cloud?
     
  6. eivasilev54

    eivasilev54

    Joined:
    Dec 15, 2017
    Posts:
    2
    Does deobfuscation work for code, written in c#? how to do it?
     
  7. wagenheimer

    wagenheimer

    Joined:
    Jun 1, 2018
    Posts:
    323
    How it works? On the New Google Play Console now it shows this :

    upload_2020-8-11_19-21-34.png

    Where I can get the DEBUG SYMBOLS and the DEOBFUSCATION FILE after creating an Unity Android Build?
     
  8. ShinSeok

    ShinSeok

    Joined:
    Jan 17, 2015
    Posts:
    5
    I am also looking for a solution to the same problem.
     
  9. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    835
    The debug symbols are placed in the same location as your built app bundle if the symbols are enabled in the build settings.
    upload_2020-8-12_11-39-57.png
    "deobfuscation file " is named mapping file and it is also placed in the same location as your built app bundle if minification is enabled in the player settings -> publishing settings. Note that if minification is not enabled, then your java code is not obfuscated and the warning in the play console can be ignored.
    upload_2020-8-12_11-43-5.png
     
    Last edited: Aug 12, 2020
  10. PuddingEntertainment

    PuddingEntertainment

    Joined:
    Mar 19, 2016
    Posts:
    8
    Hey @JuliusM

    I have the option "Create symbols.zip" enabled but the generated zip size is too big > 400MB whereas Google Console accepts only up to 300MB.
    StackTrace Log Type is set to ScriptOnly. Looking inside the archive I can see that there are 2 symbols - one for each selected architecture (ARMv7 and ARM64).

    What to do in this case? Such archive is not accepted by Google Play Console.
     
  11. HectorOfPriamos

    HectorOfPriamos

    Joined:
    Jul 9, 2017
    Posts:
    15
    I had the same issue. I chose only ARM64 and symbols.zip file was barely 296 mb. It worked in that way however I'm not sure if some devices won't be supported when ARM7 is unchecked.
     
  12. HectorOfPriamos

    HectorOfPriamos

    Joined:
    Jul 9, 2017
    Posts:
    15
    My solution didn't work as expected :) When you choose one of either ARM64 or ARM7 you sacrifice support for many devices. So no point in doing it. I'm looking forward for some kind of solution to reduce size of symbols.zip file
     
    PuddingEntertainment likes this.
  13. PuddingEntertainment

    PuddingEntertainment

    Joined:
    Mar 19, 2016
    Posts:
    8
    thanks for confirming @HectorOfPriamos ! I thought about doing the same, but then decided to wait for a bit.
    hopefully, we will hear something from @JuliusM
     
  14. Haze-Games

    Haze-Games

    Joined:
    Mar 1, 2015
    Posts:
    189
  15. Haze-Games

    Haze-Games

    Joined:
    Mar 1, 2015
    Posts:
    189
    @JuliusM It would be better to have current low compression of these symbol files for development builds only (to keep it fast), but whenever you are building a non-dev build, using a much higher compression is mandatory (or a setting to choose how much they should be compressed), because any developer today has to unzip / rezip symbols in order to upload to Google Play.

    I can't see any released game being able to create symbols for both ARM64 and ARMv7 with symbols < 400 Mo with current setting, forcing us this additional step that's a waste of time (I'm doing this from Cloud Build, it does break the nice workflow of Cloud Build). Is that planned for the near future?

    On that topic, how can I retrieve the mapping .txt file from Cloud Build?

    Thank you!
     
  16. HectorOfPriamos

    HectorOfPriamos

    Joined:
    Jul 9, 2017
    Posts:
    15
    @Haze-Games this is an unbelievably simply solution but it works really! Thanks mate!! How come I couldn't find that simple solution I don't know because I have searched the web for such a long time! Since then I have been exporting my project to Android Studio and build there to have smaller symbols.zip file :mad: But now I no longer need it, thanks again mate :)

    @PuddingEntertainment I definitely recommend you trying that solution, it works like magic :)
     
    Haze-Games likes this.
  17. Nokobot

    Nokobot

    Joined:
    Jun 15, 2017
    Posts:
    13
    Same Question.... If you got a solution, it would be appreciated....
     
  18. fioregames

    fioregames

    Joined:
    Jan 28, 2021
    Posts:
    2
    donde encuentro el archivo de texto estoy usando la unidad 2020.2 con la opción R8 habilitada ???
     
  19. rennengames

    rennengames

    Joined:
    Feb 16, 2021
    Posts:
    1
    my ads stoped working after i minify->proguard for mapping file. any solution to this @PuddingEntertainment
     
  20. Kayumus

    Kayumus

    Joined:
    Jul 21, 2020
    Posts:
    15
    Hello, I did all according to your guide but it does not work.
    I cannot upload mapping file to Google Play Console, therefore it shows this warning:
    upload_2021-5-19_8-29-0.png
     
    Last edited: May 19, 2021
  21. Kayumus

    Kayumus

    Joined:
    Jul 21, 2020
    Posts:
    15
    this is my mapping file .txt file upload_2021-5-19_9-5-50.png
     
  22. Routaz

    Routaz

    Joined:
    Mar 22, 2020
    Posts:
    6
    Hey all!
    I'm having a problem when building app and using minify.
    I have a app that has google game services sign-in for leaderboard and achievements. If I build using minify R8, it works but asks for a mapping file, which I can't find from any of the places mentioned before.

    If I build using minify release, it works with Google console, BUT google sign-in won't work as Proguard-config file removes some files crucial to it.

    So few questions:
    1) How should I build my app, with R8 or Release?
    2) If with release, how to I modify Proguard-config file? (where it is? how to implement that into unity and so on?)

    EDIT: I'm building .aab bundle for Google play.

    I'm using Unity 2020.2.2f1
    Thanks in advance :)
     
  23. kojiMarunouchi

    kojiMarunouchi

    Joined:
    Sep 25, 2019
    Posts:
    8
    Haze-Games You saved me addressing the issue. Thanks a lot!!
     
  24. oliverwigren

    oliverwigren

    Joined:
    Jun 10, 2020
    Posts:
    5
    Simply un-zip it and zip again, it will then be much smaller