user1589345
user1589345

Reputation: 307

Using apktool to decompile apk file

I tried extracting apk file using apktool. I followed steps mentioned below. Is there a way to get the source code from an APK file?

but i am not able to get it completely.I am not sure about where to put the apktool and how to decompile apk file. i got following error while running apktool command C:\Windows\System32>apktool.bat Unable to access jarfile C:\Windows\System32\apktool.jar

Please help me to sort this out.

Thanks in advance

Upvotes: 14

Views: 75676

Answers (5)

Infosec Expert
Infosec Expert

Reputation: 11

Those who are still facing same issue, follow below steps:

  1. Download the apktool.bat from Github
  2. Download latest apktool.jar from BitBucket
  3. Rename apktool_version.jar to apktool.jar
  4. Put .bat and .jar in same folder.
  5. Run apktool.bat d "folder/example.apk"

Example Command-Line output from apktool.bat

Upvotes: 1

lttsdev
lttsdev

Reputation: 11

I have followed https://ibotpeaches.github.io/Apktool/install/ link for windows and renamed jar file as "apktool.jar" with extra jar extension (ie.apktool.jar.jar) so I was getting "Error: Unable to access jarfile C:\APKtool\apktool.jar".

After renaming properly (removing extra .jar extension) , I am able to use "apktool.jar" properly.

I know it is silly mistake, but some time it happens :)

Upvotes: 1

Bryan
Bryan

Reputation: 61

I also had this problem, then i noticed this in apktool.After done that,apktool gone well.

  1. Rename downloaded jar to apktool.jar

Upvotes: 6

Connor Tumbleson
Connor Tumbleson

Reputation: 3330

I would create a folder called "apktool" somewhere where it won't be deleted ( a safe spot ).

Download the wrapper file & the apktool file itself via the Google code page (linked below). This is 2 files. One is a wrapper, OS specific, along with aapt ( which is needed for rebuild), and the other is simply apktool.jar which is the main application.

Once that is done, go into Environment Variables (PATH) for Windows, and add that current directory to it. So you can access apktool / aapt anywhere via command prompt.

http://code.google.com/p/android-apktool/

Upvotes: 1

Sahil Singh
Sahil Singh

Reputation: 3787

I faced the same problem. I my case i discovered that the jar file is present in a separate package and i had to download apktool1.5.2.tar.bz2 in addition to apktool-install-windows-r05-ibot.tar.bz2 . Then i extracted the jar file and placed it in the same directory as apktool. Hope it helps.

Upvotes: 23

Related Questions