As an Android developer, decompiling apk is a skill we need to master, so how to decompile Apk in Ubuntu environment?
sh d2j-dex2jar.sh /home/im/Desktop/dex2jar/-debug-apk/classes.dexSome problems may be encountered during the execution of the above command:
Question 1: Prompt:
d2j-dex2jar.sh: 36: d2j-dex2jar.sh: ./d2j_invoke.sh: Permission denied
Reason: The d2j_invoke.sh file does not have execute permission
Solution: Add executable permissions:sudo chmod +x d2j_invoke.shQuestion 2: The produced jar may be empty
Reason: the execution of d2j-dex2jar.sh will depend on other scripts (copy it separately and execute it will cause problems)
Solution: When executing it, other files of dex2jar should be in the same directory.
Correct operation result:
im@58user:~/Downloads/dex2jar-2.0$ sudo chmod +x d2j_invoke.sh
im@58user:~/Downloads/dex2jar-2.0$ sh d2j-dex2jar.sh /home/im/Desktop/dex2jar/bangjob-apk/classes.dex
dex2jar /home/im/Desktop/dex2jar/bangjob-apk/classes.dex ->./classes-dex2jar.jar
Then the classes-dex2jar.jar file will be generated in this directory.
Possible problems:
There may be no response when the jd-gui program is executed, because the operating system may lack some environment. Execute the command: sudo apt-get install gtk2-engines-murrine:i386 libgtk2.0-0:i386 libcanberra-gtk-module:i386 libgtk2.0-0:i386 libxxf86vm1:i386 libsm6:i386 lib32stdc++6 lib32ncurses5 lib32bz2 -1.0 libgtk2.0-0:i386 libxxf86vm1:i386 libsm-dev:i386 libcanberra-gtk3-module:i386 Then run the jd-gui program, the screen will be displayed~! ~!

dex2jar.png
Recommended Posts