【问题标题】:apptool decompile with AND APKTOOLapptool 使用 AND APKTOOL 反编译
【发布时间】:2016-12-19 05:09:16
【问题描述】:

我想反编译我最近的apk来测试它。

我运行代码

C:\Users\admin\apktool d OwnApp.apk

但出现错误:

输入文件 (OwnApp.apk) 未找到或不可读。

为什么我会得到这个?

【问题讨论】:

    标签: android


    【解决方案1】:

    .apk文件解码过程,分步法:

    第 1 步:

     1). Make a new folder and copy over the .apk file that you want to decode.
     2). Now rename the extension of this .apk file to .zip (e.g. rename from filename.apk to filename.zip) and save it.
     3). Now you can access the classes.dex files, etc. At this stage you are able to see drawables but not xml and java files, so continue.
    

    第 2 步:

     1). Now extract this .zip file in the same folder (or NEW FOLDER).
     2). Download dex2jar and extract it to the same folder (or NEW FOLDER).
     3). Move the classes.dex file into the dex2jar folder.
     4). Now open command prompt and change directory to that folder (or NEW FOLDER). 5). Then write d2j-dex2jar classes.dex (for mac terminal or ubuntu write ./d2j-dex2jar.sh classes.dex) and press enter.
     6). You now have the classes.dex.dex2jar file in the same folder.
     7). Download java decompiler, double click on jd-gui, click on open file, and open classes.dex.dex2jar file from that folder: now you get class files.
     8). Save all of these class files (In jd-gui, click File -> Save All Sources) by src name. At this stage you get the java source but the .xml files are still unreadable, so continue.
    

    第 3 步:

     1). Now open another new folder
    
     2). Put in the .apk file which you want to decode
     3). Download the latest version of apktool AND apktool install window (both can be downloaded from the same link) and place them in the same folder
     4). Open a command window apktool d myApp.apk (where myApp.apk denotes the filename that you want to decode)
     5). now you get a file folder in that folder and can easily read the apk's xml files.
    

    这个解决方案是从这个 StactOverflow 站点 Check Here 中提取的

    你可以从这里libraries下载所有需要的库

    【讨论】:

    • 几年后才能找到正确的答案。谢谢
    【解决方案2】:

    使用 apktool for MAC 重新编译 apk:-

    反编译 APK(Android 包)的过程:

    • 打开终端并cd到apk目录
    • 输入苏
    • apktool d <..>

    重新编译 APK(Android 包)的过程:

    • 打开终端并cd到apk目录
    • 输入苏
    • apktool b <..>
    • 在 pathToMyAPK/dist/NewAPP.apk 中生成新的 apk

    ->现在我们需要对 apk 进行签名才能移植到设备。

    要签署 apk:

    jarsigner -verbose -keystore <path of my-keystore.keystore> <path of apk>  alias_name
    

    【讨论】:

      【解决方案3】:

      对于反编译,通过 CMD 运行 Apktools,例如 C:\\example: apktool d x.apk

      【讨论】:

      • 只是什么?你能重新编辑你的答案,让它更清楚吗?
      • 请完整回答
      • apktools>apktool d s.apk
      猜你喜欢
      • 2014-07-19
      • 1970-01-01
      • 2019-08-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-07-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多