Android Oxygene Obfuscation

(Matt Robertson) #1

I have an Android app written in Oxygene and published on the Google Play Store. My app crash report Stack Traces in the Google Play Console seem to indicate that the code has been obfuscated.

The stack traces look like this, for example:

    at MyFileName.SomeObject.MethodName (Unknown Source: 56)
    at MyFileName.AnotherObject.NewMethodName (Unknown Source: 27)

Instead of this:

     at MyFileName.SomeObject.MethodName (MyFileName: 9231)
     at MyFileName.AnotherObject.NewMethodName (MyFileName: 3672)

In a typical Android project run via Android Studio and the standard toolchain, this is caused by ProGuard and can be fixed with the correct ProGuard settings or by uploading the mapping.txt file to the Play Console to deobfuscate (all described here).

Is EBuild obfuscating code in the build process? If so, is there a mapping.txt produced similarly to ProGuard?

(marc hoffman) #2

that’s not obfuscation, just lack of debug symbols?

(Matt Robertson) #3

This only seems to be an issue with the standard toolchain when obfuscation is enabled, so I was guessing that it may be the same cause in the EBuild toolchain. Is there any way in EBuild to see the actual error cause and line numbers in release builds?

(marc hoffman) #4

obfuscation changes your actual method names. debug symbols associate your method names/binary code locations with source locations. there’s an option to generate or not generate debug symbols (it’s on for Debug, off for Release, by default).

1 Like
(Matt Robertson) #5

I just ran across an issue with this. The Android manifest has a comment noting that the android:debuggable="true" attribute is overwritten by the compiler when the debug info option is set. The problem is that I’m wanting my Release builds to generate debug symbols but not be debuggable.

Would it be possible to have android:debuggable="true" overridden if the build is set to Debug (not Release) rather than if the debug symbols are set to On?

(marc hoffman) #6

hmm, i’m not sure if that’s a feasible combo? what would this give you?

(Matt Robertson) #7

When an app in production crashes, I get the crash report with stack trace in the Google Play Developer Console. When debug symbols are turned off, the stack trace does not show the Exception’s message or the line numbers. Having this information available makes bug fixes significantly faster. For security reasons, the Google Play Store does not allow production apps to be marked debuggable (and I would not want production apps to be debuggable).

So I want my production apps to be NOT debuggable but to still show debug symbols in the crash reports. I don’t know how it works “behind the scenes” but it doesn’t seem like these should be mutually exclusive since Android apps built in Android Studio show the debug symbols in their crash reports.

(marc hoffman) #8

gotcha. i’ll look into how to best expose this…

1 Like