Obfuscapk icon indicating copy to clipboard operation
Obfuscapk copied to clipboard

Play store and Stacktrace ?

Open Krammig opened this issue 5 years ago • 2 comments

This looks like a terrific project.

My questions relate to the Play Store submission and also obtaining a Stacktrace from users.

a) will the resulting APK be accepted by Google / Play ?

b) is it still possible after applying this to the APK to obtain the usual Stacktrace back if an app crashes ?

For both the above, particularly though b) is there any documentation explaining how to do so.

Thanks

Krammig avatar Jul 06 '20 05:07 Krammig

Hi, currently we haven't tested the Play Store submission after using Obfuscapk. a) should be possible if you sign the app with your certificate while for b) I guess it depends on the used obfuscators (e.g., if you use only RandomManifest there shouldn't be any problems, however if you use some renaming obfuscators you could have some "strange" names in the stacktrace). See also this FAQ.

ClaudiuGeorgiu avatar Jul 06 '20 10:07 ClaudiuGeorgiu

To obtain usual stacktrace and for debugging purposes I returned readable strings for new names. I provide examples below.

For FieldRename I changed this https://github.com/ClaudiuGeorgiu/Obfuscapk/blob/c9e493b6b6656f58a46108101432064b93874056/src/obfuscapk/obfuscators/field_rename/field_rename.py#L23-L25

into this

def rename_field(self, field_name: str) -> str: 
     return "{0}_renamed".format(field)

For ClassRename I changed this https://github.com/ClaudiuGeorgiu/Obfuscapk/blob/c9e493b6b6656f58a46108101432064b93874056/src/obfuscapk/obfuscators/class_rename/class_rename.py#L36-L38

def encrypt_identifier(self, identifier: str) -> str: 
     return '{0}_renamed'.format(identifier)

With these changes it's easy to debug since obfuscator only appends _renamed to the original class or field names

Elyorbe avatar Aug 10 '20 06:08 Elyorbe