-
Notifications
You must be signed in to change notification settings - Fork 11
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
Consider using DexPatcher #5
Comments
@Lanchon Can you please explain tecnically how DexPatcher operate (the various steps done by the program)? |
hi, sorry for the delay, im travelling. better if you reed this message in full before following links. dexpatcher is a toolset to mod apks. the complete set is here: an important member of the toolset is the "dexpatcher tool" itself (yep, same name as the whole project). what it does is:
dexpatcher gradle plugins extend android studio to automate the process and add or patch resources and create several kinds of specialized libraries. but you dont need this functionality: the dexpatcher tool can also be run standalone (it is pure java). there are ready made scripts (for linux) to automate the process. see the second post in the link above titled "DEPRECATED: Workflow Automation Scripts HOW-TO". the scripts were deprecated once the gradle plugins were released, but they are a good example of how to use the tool in standalone mode. regarding what the dexpatcher tool actually does to patch dex code (which should be the first thing you look into), see the section "PATCHING JAVA CODE IN JAVA" in the link above. you will find 1) source of sample code to be patched, 2) source of a 'patch' dex that describes changes to be made, and 3) diagnostic output of the dexpatcher tool as it runs, and runlogs of the unpatched and patched code. it is documentation by example (yep, pretty bad) but that's all there is for now. you can post questions on xda or create issues on my project (or even ask here, worst option) if there's something you don't understand. the big picture is:
it is trival to run the process in android once scripting is solved. if dexpatcher is compiled to native code, the whole process could be run on recovery which is the ideal outcome but more complex. (btw, for this you might want to take a look at flashize.) (disclosure: im the author of dexpatcher and flashize.) |
I currently don't use android studio, I write Python code at hand; so I will need more time to get accustomed. I'm considering using DexPatcher but before doing anything I must discover how it works at a lower level. I cannot put this as priority but be certain I will look at it. In the meanwhile I'm already making Tingle more "tool agnostic", so it will be easier to switch tool but also support more then one tool at the same time. |
sure! to know exactly what dexpatcher does, read the paragraph "regarding what the dexpatcher tool actually does to patch dex code..." in my answer above. |
hi, i've published a DexPatcher-based signature spoofing patcher, you might want to take a look: thanks! |
hi,
how does this work? i suppose applying a text diff over backsmalied framework? then this is kind of brittle and will break often with minute framework changes, and could require different diffs for different roms.
consider using dexpatcher instead. i could look into it myself but im travelling and have no time now. disadvantage: less granularity to do changes. advantages: much much less brittle, changes in java without having the exact source code, seems like changes might be very simply implemented as method wrappers. also, dexpatcher can run on the device itself (pure java), and it could probably be cross compiled to native to support patching in recovery; the addon.d mechanism to repatch on system upgrade is even possible.
i can help with the coding of the dexpatcher patch.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: