如何提取不起作用的.apk文件的代码? [英] How to extract code of .apk file which is not working?

查看:123
本文介绍了如何提取不起作用的.apk文件的代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实际上,我试图提取名为cloudfilz.apk的.apk文件的代码,并希望在其源代码中进行操作,所以我按照以下步骤操作:-

新建一个文件夹并放入.apk文件(您要解码),然后将其扩展名为.zip的.apk文件重命名(例如:从filename.apk重命名为filename.apk.zip)并保存..now您将获得classes.dex文件等...在此阶段,您可以看到可绘制的图像,但看不到XML和Java文件...因此,继续...

第2步:

现在将这个zip apk文件解压缩到同一文件夹中(例如,在这种情况下为NEW FOLDER).现在从此链接 http://code.google.com/p/dex2jar/并将其解压缩到同一文件夹(在这种情况下为NEW FOLDER).....现在打开命令提示符,并到达该文件夹(在这种情况下为NEW FOLDER)..到达后,写入"dex2jar classes.dex".然后按回车.....现在您将在同一文件夹中获得classes.dex.dex2jar文件...

=>问题:-我成功地实现了步骤1,但是在步骤2中,当我执行dex2jar classes.dex时,我在命令提示符java.lang.UnsupportedClassVersionError上遇到了错误,我知道这是由于我安装的JDK之间不兼容版本和classes.dex JDK版本号被卡在这里,没有出路...

解决方案

来自市场或未签名的任何.apk文件

  1. 如果您从市场上下载了apk,因此从市场上签署了Install Astro File Manager的安装.打开Astro>工具>应用程序管理器/备份,然后选择要备份到SD卡上的应用程序. 将手机安装为USB驱动器,然后访问"backupsapps"文件夹以找到目标应用的apk(将其称为app.apk).将其复制到本地驱动器就像未签名的.apk一样.

  2. 从此链接下载Dex2Jar zip: SourceForge

  3. 解压缩下载的zip文件.

  4. 打开命令提示符&在到达dex2jar exe所在的目录时编写以下命令,并将apk复制到同一目录中.

    dex2jar targetapp.apk file(../dex2jar app.apk在终端上)

  5. http://jd.benow.ca/从此链接下载反编译器.

  6. >
  7. 使用jd-gui打开"targetapp.apk.dex2jar.jar" 文件>保存所有源以将jar中的类文件保存为Java文件.

Actually I was trying to extract code of a .apk file called cloudfilz.apk and wanted to manipulate in its source code so I followed the steps given below:-

make a new folder and put .apk file (which you want to decode) now rename this .apk file with extension .zip (eg: rename from filename.apk to filename.apk.zip) and save it..now you get classes.dex files etc...at this stage you are able to see drawable but not XML and java file...so continue...

Step 2:

now extract this zip apk file in the same folder(in this eg or case NEW FOLDER). now download dex2jar from this link http://code.google.com/p/dex2jar/ and extract it to the same folder (in this case NEW FOLDER).....now open command prompt and reach to that folder (in this case NEW FOLDER)....after reaching write "dex2jar classes.dex" and press enter.....now you get classes.dex.dex2jar file in the same folder......

=>Question:-I was successful to achieve step 1 but in step2 when I am executing dex2jar classes.dex I am getting an error on command prompt java.lang.UnsupportedClassVersionError ,I know this is due to incompatibility between my installed JDK version and classes.dex JDK version number so stuck here and don't have way out...

解决方案

Any .apk file from market or unsigned

  1. If you apk is downloaded from market and hence signed Install Astro File Manager from market. Open Astro > Tools > Application Manager/Backup and select the application to backup on to the SD card . Mount phone as USB drive and access 'backupsapps' folder to find the apk of target app (lets call it app.apk) . Copy it to your local drive same is the case of unsigned .apk.

  2. Download Dex2Jar zip from this link: SourceForge

  3. Unzip the downloaded zip file.

  4. Open command prompt & write the following command on reaching to directory where dex2jar exe is there and also copy the apk in same directory.

    dex2jar targetapp.apk file(./dex2jar app.apk on terminal)

  5. http://jd.benow.ca/ download decompiler from this link.

  6. Open ‘targetapp.apk.dex2jar.jar’ with jd-gui File > Save All Sources to sava the class files in jar to java files.

这篇关于如何提取不起作用的.apk文件的代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆