Study/개발 Tip

[Android] Android APK에서 소스코드 얻어오기

AC 2021. 6. 1. 00:12

 

작업을 시작하려면 다음 도구가 필요합니다.

Dex2jar- 여기에서 다운로드 : https://sourceforge.net/projects/dex2jar/

 

dex2jar

Download dex2jar for free. Tools to work with android .dex and java .class files. Mirrors: * https://bitbucket.org/pxb1988/dex2jar * https://github.com/pxb1988/dex2jar dex2jar contains following compment * dex-reader is designed to read the Dalvik Executab

sourceforge.net

Jd-gui- 여기에서 다운로드 : http://jd.benow.ca/

 

Java Decompiler

The “Java Decompiler project” aims to develop tools in order to decompile and analyze Java 5 “byte code” and the later versions. JD-GUI is a standalone graphical utility that displays Java source codes of “.class” files. You can browse the reco

java-decompiler.github.io

아래 단계를 따르십시오.

  1. apk의 이름  name.apk 에서 name.zip 으로 바꿉니다.
  2. 내용 추출
  3. class.dex를 복사 하여 dex2jar 디렉터리에 붙여 넣습니다 (앱에 따라 여러 개의 class.dex 파일이있을 수 있음).
  4. CMD를 열고 dex2jar의 경로로 이동합니다.
  5. .dex 파일이 두 개 이상인 경우 d2j-dex2jar.bat class.dex 또는 d2j-dex2jar.bat class.dex class2.dex 등의 명령을 실행 합니다.
  6. 그러면 새 .jar 파일이 생성됩니다. jd-gui를 실행하고 jar 파일을 엽니 다.
  7. 끝.
LIST