-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Implement automatic resource resolution #3574
base: master
Are you sure you want to change the base?
Implement automatic resource resolution #3574
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does look a lot smaller than the last attempt. The override of the method on baksmali seems much more elegant than last time.
One thing I'm curious about
public void loadResourceIds(ResTable resTable, File outDir) throws SAXException, IOException, AndrolibException { | ||
this.loadFrameworkResources(resTable); | ||
Map<String, File> resourceFiles = new HashMap<>(); | ||
resourceFiles.put(outDir.getName(), new File(outDir, "res/values/public.xml")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain this part? I'm not following why we'd generate our own res/values/public.xml
. Wouldn't that conflict with the natural generation of it? Is that solely done to keep the API happy with baksmali that needs it?
It seems (albeit maybe memory heavy) - we can keep the resources in memory during disassembly and just reference them during this override of loadResourceIds
with some dummy null file that actually queries that hashmap
throw new AndrolibException("Could not parse framework resources", ex); | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor nit - can we kill newline?
Any ideas how to bypass this obfuscation ? Thanks |
No description provided.