Nice programing

DEXtoJar 사용 방법

nicepro 2020. 12. 2. 21:59
반응형

DEXtoJar 사용 방법


이 링크 http://code.google.com/p/dex2jar/downloads/list 에서 파일 dex를 jar로 디 컴파일하는 솔루션을 찾았 지만 사용 방법을 이해하지 못합니다.


그렇게하려면 아래 단계를 따르십시오 _

  1. APK 파일의 이름을 변경 (예 : APK 파일의 이름을 .zip Ex- test.apk-> test.zip )하고 결과 zip 파일의 압축을 풉니 다.
  2. .dex 파일dex2jar 폴더 복사하십시오 .
  3. setclasspath.bat를 실행하십시오 . 이 데이터는 다음 단계에서 사용되기 때문에 실행해야합니다.
  4. Windows 명령 프롬프트로 이동하여 폴더 경로를 dex2jar 폴더 의 경로로 변경하고 다음과 같이 명령을 실행하십시오. d2j-dex2jar.bat classes.dex
  5. 즐겨!! jar 파일은 이름이 classes_dex2jar.jar 인 동일한 폴더에 준비됩니다 .

이것이 당신과 모든 사람들이 이것을 읽는 데 도움이되기를 바랍니다 ... :)


1 단계 dex2jar. *. *. zip 파일의 내용 추출 
2 단계 .dex 파일을 추출 된 디렉터리에 복사합니다.
3 단계 : Windows에서는 dex2jar.bat <.dex filename>을, Linux에서는 ./dex2jar.sh <.dex filename>을 실행합니다.

  1. dex2jar https://code.google.com/p/dex2jar/downloads/list 다운로드
  2. APK에서 dex2jar 실행 d2j-dex2jar.sh someApk.apk
  3. JD GUI http://jd.benow.ca/ 에서 jar 파일 열기

이 가이드를 따르세요 : https://code.google.com/p/dex2jar/wiki/UserGuide

--2016 년 10 월 11 일 업데이트-

Google의 github 에서이 ClassyShark를 APK에서 코드를보기가 매우 쉽습니다.

https://github.com/google/android-classyshark

// https://github.com/pxb1988/dex2jar/releases 릴리스를 다운로드했는지 확인 하십시오 (/ dex2jar / downloads / list에서이 링크를 찾는 ppl의 경우


간단한 방법

  1. test.apk => test.zip 이름을 바꿉니다.
  2. test.zip을 추출한 다음 해당 폴더를 엽니 다.
  3. dex2jax 다운로드 및 추출
  4. 테스트 폴더에서 classes.dex 파일 복사
  5. dex2jar 추출 된 폴더로 과거
  6. Windows를 사용하는 경우 Alt & D 키를 누른 다음 cmd입력하고 Enter 키를 누릅니다 (cmd로 열기).
  7. d2j-dex2jar.bat classes.dex 명령을 실행하십시오.
  8. JD-GUI 다운로드
  9. classes-dex2jar.jar 파일을 JD-GUI로 이동
  10. 다 ..

누군가가 여전히 APK를 디 컴파일하는 쉬운 방법 (리소스 디 컴파일 포함)을 찾고 있다면 내가 만든 도구를 살펴보세요 : https://github.com/dirkvranckaert/AndroidDecompiler

프로젝트를 로컬에서 체크 아웃하고 문서화 된대로 스크립트를 실행하면 모든 리소스와 소스가 디 컴파일됩니다.


.apk 파일을 디 컴파일하고 온라인으로 다운로드 할 수 있습니다.

http://www.javadecompilers.com/


  1. 여기에서 최신 dex2jar 다운로드-> dex2jar
  2. 이 명령을 Linux에서 실행-> sh d2j-dex2jar.sh classes.dex
  3. 여기에서 자바 디 컴파일러 다운로드-> JD-GUI
  4. classes-dex2jar.jar 파일을 JD-GUI로 끌어다 놓습니다.

Windows 용 버전을 찾고 있다면 소스 포지 ( https://sourceforge.net/projects/dex2jar/) 에서 가져옵니다.

필요한 d2j-dex2jar.bat 파일이 있습니다.


  1. Dex2jar를 다운로드하고 압축을 풉니 다.
  2. .sh를 컴파일 할 수없는 경우 다운로드 경로 ./d2j-dex2jar.sh /path-to-your/someApk.apk로 이동하여 권한을 업데이트하십시오 : chmod a + x d2j-dex2jar.sh.
  3. .jar 파일이 생성됩니다.
  4. 이제 JD-GUI와 함께 jar를 사용하여 디 컴파일하십시오.

  1. 이전 링크

  2. dex2jar 구문

    • https://github.com/pxb1988/dex2jar , 당신은 당신의 예상 사용량 / 구문을 볼 수 있습니다 :
    • sh d2j-dex2jar.sh -f ~/path/to/apk_to_decompile.apk
    • 에서 변환 할 수 있습니다 apkjar.
  3. 원하는 dexjar

    • dex파일 이있는 경우 (예 : FDex2실행중인 Android apk / app의 덤프 사용 ) 다음을 수행 할 수 있습니다.
    • sh d2j-dex2jar.sh -f ~/path/to/dex_to_decompile.dex
    • 변환 된 가지고 있습니다 jar에서를 dex.
    • 예:
    • /xxx/dex-tools-2.1-SNAPSHOT/d2j-dex2jar.sh -f com.huili.readingclub8825612.dex dex2jar com.huili.readingclub8825612.dex -> ./com.huili.readingclub8825612-dex2jar.jar
  4. 원하는 jarjava src

    • if you continue want convert from jar to java sourcecode, then you, have multiple choice:
      • using Jadx directly convert dex to java sourcecode
      • first convert dex to jar, second convertjartojava sourcecode`

Note

how to got d2j-dex2jar.sh?

download from dex2jar github release, got dex-tools-2.1-SNAPSHOT.zip, unzip then got

  • you expected Linux's d2j-dex2jar.sh
    • and Windows's d2j-dex2jar.bat
    • and related other tools
    • d2j-jar2dex.sh
    • d2j-dex2smali.sh
    • d2j-baksmali.sh
    • d2j-apk-sign.sh
    • etc.

what's the full process of convert dex to java sourcecode ?

you can refer my (crifan)'s full answer in another post: android - decompiling DEX into Java sourcecode - Stack Overflow

or refer my full tutorial (but written in Chinese): 安卓应用的安全和破解


After you extract the classes.dex file, just drag and drop it to d2j-dex2jar


The below url is doing same as above answers. Instead of downloading some jar files and doing much activities, you can try to decompile by:

http://apk-deguard.com/

참고URL : https://stackoverflow.com/questions/5257830/how-to-use-dextojar

반응형