
Posted on • Edited on • Originally published atrobertohuertas.com
Rust powered CLI apk decompiler
Lately I've been needing toreverse engineer
someapks and I've been manually using some third-party tools to do so. But, how could we speed up the process? A little bit ofRust can be very helpful! 😉
Rust is awesome for building CLI
If you weren't aware of it,Rust is also a superb choice for buildingCLI tools. It even has adedicated page for this! 😉
Take a look at thisawesome tools:
Entering apk-decompiler
Let's be honest, we don't like doingrepetetive boring tasks and going throughdex2jar,apktool andJava Decompiler again and again would inevitably lead to everyone of us totry to automate this process.
And that's precisely why I built my ownCLI utility which is unexcitingly calledapk-decompiler 🎉.
How to get an apk
You have several ways to do this.
Theeasiest one is to browse toApkPure and just download it to your computer.
The moreconvoluted one would require you to have arooted
phone and pull theapk
from there. If you're curious about this process you can just readapk-decompiler readme, it's succintly detailedthere.
How to use it
At the moment,apk-decompiler only supportsMacOS
andLinux
.
You can get the software from thereleases page of the project and download it right away.
Once you have downloaded it, you can add it to yourpath and use it like this:
apk-decompiler <name-of-your-apk>
What you'll get
You'll get a new folder calledoutput
with the following folders in it:
- decompiled: This is the output of runningdex2jar.
- extracted: This folder contains the output of
unzipping
theapk
. - xml: This is basically the output of runningapktool.
- package-name-error.zip: Optional file that you will get in case there are some errors during the decompilation process.
Known issues
If you have folders with empty spaces this may be a problem forjd-cli which is one of the dependencies of this project. So... just try to avoid them! 😜
Link to the tool
Just in case you somehow missed the link toapk-decompiler, you can find ithere.
Feel free to improve it, fork it or raise issues in theGithub repository.
Enjoy!
--
Originally published atrobertohuertas.com on February 3, 2019.
Top comments(0)
For further actions, you may consider blocking this person and/orreporting abuse