Skip to content
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

Resources are changed after a rebuild #97

Closed
Zenlua opened this issue Apr 6, 2024 · 7 comments
Closed

Resources are changed after a rebuild #97

Zenlua opened this issue Apr 6, 2024 · 7 comments

Comments

@Zenlua
Copy link

Zenlua commented Apr 6, 2024

Version: 1.3.7

  • When compressing some lost text, will it have any effect on the application?
    Screenshot_20240406-101654

  • When recompressing the data, the changes are small and not very important.
    Screenshot_20240406-160014

@REAndroid
Copy link
Owner

We can't reproduce this issue without the apk. The attr case needs further investigation.
On second dimen case the problem comes from java's float number division/multiplication accuracy, normally it is less than +/- 0.00005, for some reason if you want to keep original value you need to use json format

@Zenlua
Copy link
Author

Zenlua commented Apr 6, 2024

https://gofile.io/d/3pZ7xr

Here is the apk, thanks

@Zenlua
Copy link
Author

Zenlua commented Apr 6, 2024

Same issue, this is the last I know of, the tool is improving day by day.

Screenshot_20240406-200634

File apk:
https://mega.nz/file/VNlwUYRA#1sJD4ZRy2bvWWd3OG8ZfjEH7jg5coBAypZAfiHwrhZE

@REAndroid
Copy link
Owner

I can't reproduce your issue, i did DECOMPILE -> COMPILE -> DECOMPILE , then the output is the same. How you did your comparison ?

@Zenlua
Copy link
Author

Zenlua commented Apr 7, 2024

Use apktool or another decoder to see, I use mt manager to compare resources.arsc

@REAndroid
Copy link
Owner

APKEditor is different from other tools our main goal is to produce editable files so that you can build it back correctly to working apk. Where as apktool intended to produce android standard source code, check #51 .
formats="reference|string|integer|bool|color|float|dimension|fraction" is equivalent to format=any thus you are free to code it like <attr name="__removed3" >.

Q: Why APKEditor is not stripping away format=any like other tools?

A:

During encoding we don't rely/trust xml tag name. Some obfuscators may use different name <abcd name="__removed3" >, but we need to correctly identify the type of entry is attribute, style or plural therefore our logic is:

  • If element contains format="xxx" -> encode it as attribute
  • If element contains parent="xxx" -> encode it as style
  • If element contains quantity="xxx" -> encode it as plural

@Zenlua
Copy link
Author

Zenlua commented Apr 7, 2024

Thank you for your explanation. Great tool. Wishing you a good life.

@Zenlua Zenlua closed this as completed Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants