1

I got this error message

apktool is not recognised as an internal or external command, operable program or batch file

while doing the process provided in Is there a way to get the source code from an APK file?

How can I make it work?

Community
  • 1
  • 1
Irfan Alam
  • 439
  • 3
  • 9
  • 24

3 Answers3

5

This may be a PATH problem,do this:

PATH=%PATH%;ApkToolPath

ApkToolPath is the directory where apktool is.

BTW, u need to download 2 files: apktool-install-windows-r05-ibot.tar.bz2 and apktool1.5.2.tar.bz2. extract both and put aapt.exe apktoo.bat apktool.jar together.

Update: Download link for all the mentioned tools here

Good luck!

King of Masses
  • 17,833
  • 4
  • 58
  • 76
whogiawho
  • 466
  • 9
  • 20
  • I am new to this, can you explain where/how to do PATH=%PATH%;ApkToolPath – Irfan Alam Mar 30 '14 at 06:04
  • My path for apktool is c:\users\user\desktop\new folder [File name is "apktool1.5.2.tar"] – Irfan Alam Mar 30 '14 at 06:17
  • say dir c:\apktool containing "aapt.exe" and "apktool.bat", then do PATH=%PATH%;c:\apktool. besides, make sure u extract apktool.jar from apktool1.5.2.tar and put it to c:\apktool – whogiawho Mar 30 '14 at 06:24
  • I had only unzipped apktool1.5.2.tar.bz2 and apktool-install-windows-r05-ibot.tar.bz2 to that folder. I had not extracted apktool.jar from apktool1.5.2.tar and apktool-install-windows-r05-ibot folder from apktool-install-windows-r05-ibot.tar. Now I extracted those files again and put apktool.jar and aapt.exe and apktool.bat files in that same folder. Now it worked. THANK YOU. – Irfan Alam Mar 30 '14 at 06:55
  • Please simplify[edit] your answer. I will vote it up, So that any other have same problem will get benefit from it. – Irfan Alam Mar 30 '14 at 07:01
  • thanks man for the link to download. i was unable to find bat file for apktool – Deepak Vajpayee Jun 11 '19 at 05:53
2

Place aapt.exe, apktool.bat(extracted from apktool-install-windows-r05-ibot) and apktool.jar in same folder. That should solve your problem

0

In my case when using windows.

Problem : The name of apktool had '.bat' or '.jar' extension and it would seem like its a jar file or its a .bat file

  • so my bat file was : 'apktool.bat.txt' and jar file was : 'apktool.jar.jar'

Solution : Windows hides the file extension, So i navigated to 'File Explorer Options' the set 'Hide file extensions for Known file types'.

Then make sure that files have correct file extension (i.e apktool.bat not apktool.bat.txt)

Apktool naming file extensions in windows

enter image description here

shirley
  • 10,698
  • 8
  • 25
  • 48