Apk decompile error: d2j-dex2jar command not found

匿名 (未验证) 提交于 2019-12-03 02:49:01

问题:

I try to get source code from an .apk

I followed the steps from right here Is there a way to get the source code from an APK file? but on Step 2.4 when I wrote on my cmd dex2jar path> d2j-dex2jar classes.dex I get

"'d2j-dex2jar' is not recognized as an internal or external command, operable program or batch files."

any solutions ?

回答1:

Use dex2jar classes.dex instead of d2j-dex2jar classes.dex And please check which version of dex2jar is with you. if it is dex2jar-2.x jar file then , please try to download dex2jar-0.0.9.15 jar file.



回答2:

for dex2jar 2.0 version please follow below steps to generate jar

  1. download dex2jar (https://sourceforge.net/projects/dex2jar/files/)
  2. extract folder
  3. goto folder in command prompt
  4. chmod u+x d2j_invoke.sh
  5. chmod u+x d2j-dex2jar.sh
  6. put desired apk to decompile in dex2jar folder
  7. sh d2j-dex2jar.sh -f -o output_jar.jar my_app.apk
  8. This will generate output_jar.jar in same folder


回答3:

Add permission with: chmod +x d2j-dex2jar.sh Then run it with: ./d2j-dex2jar.sh app.apk



回答4:

place all the apk file, coverted zip, apktool, apktool install, dex2jar, jd-gui folders under a single folder... open command prompt(admin).. then goto the directory of your newly created folder.. then type... d2j-dex2jar classes.dex , press enter... thats it ur problem is solved...cheezzz

no need to add any xtra permissions...it workwed for me..it'll work for you too...



回答5:

Just goto the folder where you put your classes.dex file then just run the command in command prompt http://i.stack.imgur.com/8X3aP.png

-Make sure you have downloaded the dex2jar latest version which is dex2jar-2.0. download it with this link

https://sourceforge.net/projects/dex2jar/

-It will then make your classes.dex file to executable jar 'classes-dex2jar.jar'



回答6:

If you have downloaded the d2j-dex2jar-2.x then it would not contain the d2j-dex2jar.sh file

so, try to download the dex2jar-0.0.9.15 from the link dex2jar-0.0.9.15

Finally extract this zip file and you will find the d2j-dex2jar.sh file.

Hopefully this will help you!



回答7:

you must use dex2jar-0.0.9.15 to decompile apk older version dos'nt work correctly because missing some files via extension bat



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!