Extracting Android .apk and reading contents of XML file in res/layout

后端 未结 5 1681
一整个雨季
一整个雨季 2020-12-08 07:02

I am trying to reverse engineer an existing android app and understand how a particular UI is constructed. I\'ve found that I can rename the apk to zip and view some of the

相关标签:
5条回答
  • 2020-12-08 07:37

    Create a new folder and put the .apk file which you want to decode into that.

    Download the latest version of from here.

    Open cmd then navigate to the root directory of APKtool and type the following command:

    apktool d myApp.apk 
    

    (where myApp.apk is the filename that you want to decode)

    now you get a file folder in that folder and can easily read the apk's xml files.

    Here is the link for more detail install instructions

    0 讨论(0)
  • 2020-12-08 07:38

    I think you can use android-apktool. The XML files look very well.

    0 讨论(0)
  • 2020-12-08 07:44

    if you just want to know the UI construction ,you can use Hierarchy Viewer

    0 讨论(0)
  • 2020-12-08 07:50

    First covert your .apk to .zip. Inside that you will get a compiled-bundled version of java class files called .dex. apply the below trick to convert that dex to class files

    There's a way to do this. A slight atypical way is to download this opensource tool dextojar http://code.google.com/p/dex2jar/

    This will convert your dex files to Jar file. Unjar these files to get java class files.

    Then reverse engineer the java class files to get the java code. Don't use it to break some commercial projects.

    Thanks

    0 讨论(0)
  • 2020-12-08 07:54

    For those Who are shortcut lovers: and using ubunto,

    go to cmd : ctl+alt+t

    type:

    sudo apt install apktool
    

    press enter then go to your apk(to decompile) folder. by using

    cd ~/folder_name
    

    then type:

    apktool d yourAppName.apk
    

    and boom , you are done.

    0 讨论(0)
提交回复
热议问题