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

Please explain "-m" further #3608

Closed
privacyguy123 opened this issue May 27, 2024 · 5 comments
Closed

Please explain "-m" further #3608

privacyguy123 opened this issue May 27, 2024 · 5 comments

Comments

@privacyguy123
Copy link

To me, it sounds quite important to "match"the original file when decompiling/recompiling and when I pass this option I am not seeing any error recompiling either as the documents seem to suggest.

Can you explain further what this is actually doing? I assume this option does not exist in Google official baksmali/smali fatjars?

@iBotPeaches
Copy link
Owner

Its avoiding anything Apktool does to massage a file - used for analysis mostly when you have no intent for reassembly.

I adjusted the wording - bcd55d0

@privacyguy123
Copy link
Author

privacyguy123 commented May 29, 2024

Its avoiding anything Apktool does to massage a file - used for analysis mostly when you have no intent for reassembly.

I adjusted the wording - bcd55d0

I'm still not 100% sure what it's doing. It does sound like it should be necessary to "match original" when dealing with decompiling/recompiling any file no?

@iBotPeaches
Copy link
Owner

I'm still not 100% sure what it's doing. It does sound like it should be necessary to "match original" when dealing with decompiling/recompiling any file no?

Not really no - an application is increasingly stripped of more and more things. A strict 1-1 disassembly of that will match the original, but fall short of many things that make it easy to re-assemble or even analyze. Such as:

  • Named keys
  • Dummy resources
  • Inline of string resources (since a by-product of apktool makes them public)

Chances are the average user who has no idea about Apktool internals or AOSP internals will have any idea what any of that means. If they do - they can look at the source and identify the exact difference of the flag.

@privacyguy123
Copy link
Author

I am decompiling and recompiling a modded framework.jar - I am not sure if it's better to use "-m" or not as they both recompile and boot fine. I guess this is my question, which should I go with?

@iBotPeaches
Copy link
Owner

If you aren't touching resources and only sources - -m is not relevant.

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