-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error decompiling resources in obfuscated APKs[core] #1581
Comments
@redmi111 Can you provide the used APK file? That would it make easier to reproduce this issue and searching for the commit that introduced this problem. |
http://filesharing24.com/d/OxB Here is the APK. Stable v1.2.0 no issues and stable 1.3.0.1 got that problem. |
@redmi111 Sorry but something seems to be wrong with the upload. It is no longer available. Instead you can simply rename the file from apk to zip and attach it here in the issue. |
Tried uploading here but getting we don't support that file type error, can you try this wetransfer link |
Thanks, got the file. And found the mentioned code e.g. in |
Ok, back to the latest code base. If I debug the method
If I understand the code correctly it prefers the field name in favor of the resource name. Just changing this to the opposite may break other APKs as it may happen that the resource names are obfuscated but not the R field names. The only possible solution would be some sort of rating function which scans a name and tries to estimate if this is an obfuscated or non-obfuscated name. Then we could rate the resource and the field name and use the which one more likely a non-obfuscated name. @skylot Or do you see an easier way how to deal with this situation? |
Looks like this is the best solution, another one is just adding new option into preferences. So I think we can just add option with 3 choices like: |
@skylot don't forget R class might deleted from apk. |
Ok. I implemented rating method and options, although rating method can be adjusted better, but I don't have enough samples 🙁 |
Names of resources is decoded fine on v1.2.0 but from 1.3.0 it was obfuscated. For reference attaching the pics from both.
Above is 1.2.0
and below is
![image](https://user-images.githubusercontent.com/35992798/180022249-fa321ede-3a77-4a3b-8c75-c36378a696f6.png)
1.3.0 stable version. EDIT: 1.4.+ also has exact same problem
The text was updated successfully, but these errors were encountered: