Repository: flutter
Issue: Cannot deobfuscate proguard android stack trace 
Labels: platform-android,tool,a: build,P2,team-android,triaged-android

I use proguard to obfuscate my android app. However, the `mapping.txt` does not appear to include any of the symbols from the stack trace, or even any of the functions defined in my app's lib directory.

build.gradle

```
buildTypes {
    release {
        signingConfig signingConfigs.release
        shrinkResources true
        minifyEnabled true
        useProguard true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
```

proguard-rules.pro

```
#Flutter Wrapper
-keep class io.flutter.app.** { *; }
-keep class io.flutter.plugin.**  { *; }
-keep class io.flutter.util.**  { *; }
-keep class io.flutter.view.**  { *; }
-keep class io.flutter.**  { *; }
-keep class io.flutter.plugins.**  { *; }
-keep class com.shockwave.**
-keepclassmembers class com.shockwave.** { *; }
-dontwarn android.**
```

gradle.properties

```
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
extra-gen-snapshot-options=--obfuscate
```

## Steps to Reproduce

1. build app with `flutter build appbundle`
2. Use generated `mapping.txt` to deobfuscate code

```bash
$ ~/Library/Android/sdk/tools/proguard/bin/retrace.sh -verbose build/app/outputs/mapping/release/mapping.txt ~/Desktop/obfuscated_trace.txt
```

I expect to see the stack trace deobfuscated, but I don't. Instead I see the original stack trace:

```
#0      kX._Sse (yXi:451)
#1      kX.jed (yXi:596)
#2      Mfa.bve (RYi:330)
#3      _Ofa._dve (RYi:472)
#4      taa._Due (TXi:1623)
#5      DW._LVd (lXi:598)
#6      iW.Oje.<anonymous closure> (jXi:76)
#7      iW.Oje.<anonymous closure> (jXi:75)
#8      _TV.Nje (dXi:267)
#9      _Uac.<anonymous closure> (XMi:282)
#10     _jdb (HJi:1190)
#11     _Gc.krb (HJi:1093)
#12     _Gc.Jrb (HJi:997)
#13     _Uac (XMi:281)
#14     _dispatchPlatformMessage (XMi:156)
```

<details>
<summary>Details</summary>

```
Analyzing bin...
No issues found! (ran in 0.6s)
```

```
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.20.1, on Mac OS X 10.15.6 19G2021, locale en-US)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.6)
[✓] Android Studio (version 4.0)
[✓] Connected device (2 available)

• No issues found!
```
</details>

Within my mapping.txt file, I see references to android-specific functions

```
androidx.core.graphics.TypefaceCompatApi21Impl -> b.d.f.d:
    java.lang.reflect.Method sAddFontWeightStyle -> d
    boolean sHasInitBeenCalled -> f
    java.lang.reflect.Constructor sFontFamilyCtor -> c
    java.lang.reflect.Method sCreateFromFamiliesWithDefault -> e
    java.lang.Class sFontFamily -> b
    boolean addFontWeightStyle(java.lang.Object,java.lang.String,int,boolean) -> a
    android.graphics.Typeface createFromFamiliesWithDefault(java.lang.Object) -> a
    android.graphics.Typeface createFromFontFamilyFilesResourceEntry(android.content.Context,androidx.core.content.res.FontResourcesParserCompat$FontFamilyFilesResourceEntry,android.content.res.Resources,int) -> a
    android.graphics.Typeface createFromFontInfo(android.content.Context,android.os.CancellationSignal,androidx.core.provider.FontsContractCompat$FontInfo[],int) -> a
    java.io.File getFile(android.os.ParcelFileDescriptor) -> a
    void init() -> a
    java.lang.Object newFamily() -> b
```

and references to functions in my plugins

```
io.scer.pdf.renderer.NativePDFRendererPlugin -> g.e.a.a.a:
    io.scer.pdf.renderer.resources.DocumentRepository documents -> c
    io.scer.pdf.renderer.resources.PageRepository pages -> d
    io.flutter.plugin.common.PluginRegistry$Registrar registrar -> e
    io.scer.pdf.renderer.NativePDFRendererPlugin$Companion Companion -> f
    io.scer.pdf.renderer.resources.DocumentRepository access$getDocuments$p(io.scer.pdf.renderer.NativePDFRendererPlugin) -> a
    kotlin.Pair access$openAssetDocument(io.scer.pdf.renderer.NativePDFRendererPlugin,java.lang.String) -> a
    kotlin.Pair access$openDataDocument(io.scer.pdf.renderer.NativePDFRendererPlugin,byte[]) -> a
    kotlin.Pair access$openFileDocument(io.scer.pdf.renderer.NativePDFRendererPlugin,java.io.File) -> a
    void closeDocumentHandler(io.flutter.plugin.common.MethodCall,io.flutter.plugin.common.MethodChannel$Result) -> a
    kotlin.Pair openAssetDocument(java.lang.String) -> a
    kotlin.Pair openDataDocument(byte[]) -> a
    kotlin.Pair openFileDocument(java.io.File) -> a
    void registerWith(io.flutter.plugin.common.PluginRegistry$Registrar) -> a
    io.scer.pdf.renderer.resources.PageRepository access$getPages$p(io.scer.pdf.renderer.NativePDFRendererPlugin) -> b
    void closePageHandler(io.flutter.plugin.common.MethodCall,io.flutter.plugin.common.MethodChannel$Result) -> b
    void openDocumentAssetHandler(io.flutter.plugin.common.MethodCall,io.flutter.plugin.common.MethodChannel$Result) -> c
    void openDocumentDataHandler(io.flutter.plugin.common.MethodCall,io.flutter.plugin.common.MethodChannel$Result) -> d
    void openDocumentFileHandler(io.flutter.plugin.common.MethodCall,io.flutter.plugin.common.MethodChannel$Result) -> e
    void openPageHandler(io.flutter.plugin.common.MethodCall,io.flutter.plugin.common.MethodChannel$Result) -> f
    void renderHandler(io.flutter.plugin.common.MethodCall,io.flutter.plugin.common.MethodChannel$Result) -> g
```

but I don't find my app's identifier or any functions declared anywhere lib. But I know they have to be _somewhere_. Any help would be appreciated.