Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for Rust powered CLI apk decompiler
Roberto Huertas
Roberto Huertas

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:

  1. quicli,
  2. clap,
  3. structopt,
  4. console...

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>
Enter fullscreen modeExit fullscreen mode

What you'll get

You'll get a new folder calledoutput with the following folders in it:

  1. decompiled: This is the output of runningdex2jar.
  2. extracted: This folder contains the output ofunzipping theapk.
  3. xml: This is basically the output of runningapktool.
  4. 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)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Just a humble software developer wandering through cyberspace. Organizer of @bcnrust. Currently working at @Datadog.
  • Location
    Barcelona
  • Work
    Software Engineer at Datadog
  • Joined

More fromRoberto Huertas

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp