14

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

2
  • Did you split up the contents of the apktool folder? Also, where exactly is the apktool folder located? I'd advise you to not work in System32 and instead copy the apktool folder to your Desktop, open a command prompt window in that location then launch the .bat
    – A--C
    Dec 29, 2012 at 19:31
  • Why did you unpacked it to C:\Windows\System32? Create a normal foldre on the disk D and unpack it there.
    – vortexwolf
    Dec 29, 2012 at 19:33

6 Answers 6

23

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.

4
  • OMG - this confused me for ages!
    – Diskdrive
    Apr 8, 2013 at 7:18
  • gee, this is really confusing by not following conventions.
    – zinking
    Oct 20, 2013 at 14:34
  • for mac user - java -jar /Users/user/Downloads/apktool1.5.2/apktool.jar d /Users/user/Downloads/sample.apk
    – Sourabh
    Feb 20, 2014 at 8:16
  • I agree, it's quite confusing. I assumed the windows file would have everything needed for the windows install!
    – Ryre
    May 7, 2014 at 21:29
6

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

  1. Rename downloaded jar to apktool.jar
0
1

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/

1

ApkTool + Dex2Jar + any java decompiler? Comon! This is old style :0)

Try NEW open-source APK and DEX decompiler called Jadx: https://sourceforge.net/projects/jadx/files/

It has also online version here: http://www.javadecompilers.com/apk/

1

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 :)

1

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

  1. Download "https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/windows/apktool.bat"
  2. download latest apktool from https://bitbucket.org/iBotPeaches/apktool/downloads/
  3. Rename apktool_version.jar to apktool.jar
  4. Put .bat and .jar in same folder.
  5. Run apktool.bar d "path of apkfile/example.apk"

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.