5 ms·
If you haven't tried Jadx [1], give it a shot. It's by far the easiest way to reverse Android APKs. It doesn't do patching or reassembly, but I used it for reve
by mmastrac 4y ago
If you haven't tried Jadx [1], give it a shot. It's by far the easiest way to reverse Android APKs. It doesn't do patching or reassembly, but I used it for reversing the Delong'hi APK for longshot [2][3] and the quality of output was fantastic.
Note that scripts like this are extremely useful, but in the long term they're cobbling together a lot of tools and will become brittle or difficult to use across versions. I suggest that even if it works for you today, understanding exactly what's happening under the hood will help if the tool becomes unsupported long-term.
[1] https://github.com/skylot/jadx https://github.com/skylot/jadx
[2] https://github.com/mmastrac/longshot https://github.com/mmastrac/longshot
[3] https://grack.com/blog/2022/12/02/hacking-bluetooth-to-brew-coffee-on-github-actions-part-2/ https://grack.com/blog/2022/12/02/hacking-bluetooth-to-brew-...
- djmips 4y agoDid you do this just for fun ( which is awesome ) or do you have some longer term goal?
- motohagiography 4y agoThese are great. I used jadx to pull apart a conference attendee app I was supposed to install to see what it hoovered up. There is a level of reverse engineering that people can just get comfortable with doing without ahcieving the virtuosity of the stuff people publish papers and get talks about. Simple things like, what SDKs does this thing use (adware), what external APIs does it call (trackers), what interfaces does it use (mic, gps, etc), what data does it hoover up (contacts, sms messages, etc), what parties does it send them to, how much effort do the authors go to obfuscate or hide what they are doing (packers, code obfuscators), does it use a static encryption key or derive one from predictable components, does it have hidden features from triggers and arguments - are all achievable for someone with a bit of interest and an afternoon. The more niche the app, the less sophisticated the protections on it, I find.
- blacksmith_tb 4y agoI have used ClassyShark[1] to get some of that (from F-droid) with pretty good results. 1: https://fossdroid.com/a/classyshark3xodus.html https://fossdroid.com/a/classyshark3xodus.html
- j-bos 4y agoHow did you get the apk file to reverse without having already installed it?
- mmastrac 4y agoCheck apkpure.
- anfractuosity 4y agoJadx is really neat :), I've used it to work out how an android app turned on the wifi of a wildlife camera via bluetooth. I was also trying to use it to see how an app sends images to an NFC e-ink pricetag, but that looks rather more tricky at the moment.
- grishka 4y agoJadx is useful for decompilation, yes — it produces the best results of all the decompilers I tried because it works with dalvik bytecode directly (vs converting it into regular JVM classes). If I need to patch an apk though, I'd first use jadx to find the place I need to change, but then it's apktool for actual patching in bytecode because it disassembles and reassembles dex files losslessly. Java decompilers aren't intended to produce valid code that you can compile back. Sometimes they do, but it's more of a coincidence. By the way. Another underrated reverse engineering tool is xposed framework. It was never intended to be one, but the ability to inject arbitrary code into any app and install hooks without having to modify the apk is a godsend.
- mmastrac 4y agoTotally agree with this. I spend most of my time reading and only occasionally patching, so Jadx is perfect.