apktool

有没有办法从APK文件中获取源代码?

最后都变了- 提交于 2019-12-10 18:25:33
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 我的笔记本电脑上的硬盘驱动器刚刚崩溃,并且丢失了过去两个月来我一直在使用的应用程序的所有源代码。 我所拥有的就是APK文件,该文件存储在我发送给朋友时的电子邮件中。 有什么办法可以从这个APK文件中提取我的源代码? #1楼 这两篇文章描述了如何结合使用 apktool 和 dex2jar 来获取 APK 文件,并创建一个可以构建和运行它的Eclipse项目。 http://blog.inyourbits.com/2012/11/extending-existing-android-applications.html http://blog.inyourbits.com/2012/12/extending-existing-android-applications.html 基本上,您: 使用 apktool 将资源文件移出apk 使用 dex2jar 获得一个jar文件,其中包含Eclipse所需格式的类。 创建一个Eclipse项目,将其指向资源文件和新的jar文件 使用zip实用程序打开jar文件并删除现有资源 使用 JDGui 打开jar文件以查看源代码 从 JDGui 所需的任何源代码,将其粘贴到Eclipse中的类中并对其进行修改 从jar文件中删除该类(因此您没有多次定义相同的类) 运行。 #2楼

Android studio import problems. (Apktool)

浪子不回头ぞ 提交于 2019-12-08 18:02:26
I have been trying to import a file to android studio that I decompiled using apktool. But when I try to import the file to Android studio it does not show anything on the "Project" browser. While in the import process, in the first step, I chose "Create project from existing sources". Is there anyway to fix this problem? Also, is there anyway to use in android studio a file from notepad++? Thanks. As Daniel Souza replied, apktool is just a tools to help you to extract the class and manifest. If you look into the detail and the flow of the Android build process ( https://source.android.com

Android studio import problems. (Apktool)

房东的猫 提交于 2019-12-08 07:17:15
问题 I have been trying to import a file to android studio that I decompiled using apktool. But when I try to import the file to Android studio it does not show anything on the "Project" browser. While in the import process, in the first step, I chose "Create project from existing sources". Is there anyway to fix this problem? Also, is there anyway to use in android studio a file from notepad++? Thanks. 回答1: As Daniel Souza replied, apktool is just a tools to help you to extract the class and

APK反编译

落花浮王杯 提交于 2019-12-06 12:28:54
参考网站, https://www.cnblogs.com/geeksongs/p/10864200.html 1、直接解压apk得到classes.dex,有的apk可能有几个dex 2、将classes.dex放到dex2jar-2.0文件夹内。 3、cmd输入命令:d2j-dex2jar.bat classes.dex 4、使用jd-gui https://github.com/java-decompiler/jd-gui/releases/ 打开classes-dex2jar.jar就可以看到源代码 如果再第三步出现错误,报错 error.zip,可以把dex2jar的源码下载下来编译一下。 https://github.com/pxb1988/dex2jar gradlew.bat assemble 在dex2jar-2.x\dex-tools\build\distributions下生成压缩包(dex-tools-2.1-SNAPSHOT.tar,dex-tools-2.1-SNAPSHOT.zip),解压一个压缩包,重新反编译apk。 此外,还可以使用apktool工具来反编译, https://ibotpeaches.github.io/Apktool/install/ 命令 apktool.bat d XXX.apk 来源: https://www.cnblogs

android apk 防止反编译技术第四篇-对抗JD-GUI(转)

依然范特西╮ 提交于 2019-12-04 22:20:58
一、 对抗 JD-GUI 原理 通常在对 apk 进行反编译的时候用到的最多的两个工具就是 apk-tool 和 dex2jar 。利用这两个工具将 apk 首先反编译成 classes.dex 然后再将 classes.dex 反编译成 jar 文件或者将 apk 直接反编译成 jar 文件;得到 jar 文件以后就可以利用 JD-GUI 将得到的 jar 文件打开就可以直接查看 apk 的 java 源码了。我们花了那么大心思写的程序就这么容易被别人拿到源码是不是很不甘心,现在我就告诉你对抗 JD-GUI 查看源码的方法。我们在用 JD-GUI 查看源码时有时有些函数的根本看不到直接提示 error 错误,我们就利用这点来保护我们的 apk 。原来 JD-GUI 在将经过混淆处理的 jar 里面的 class 字节码文件转成 java 文件时,遇到函数中根本走不到的分支的特殊实现时就会提示函数 error 。这时我们只要查看这些提示 error 的文件或者函数对应的源码是有什么语句引起的,将这些语句加到我们的源码中就可以防止利用 JD-GUI 去查看我们的 apk 源码了。 二、 原理实现 (1) 假如我们的 apk onCreate 的函数实现如下: ? 1 2 3 4 5 @Override protected void onCreate(Bundle

如何使用apktool反编译apk

∥☆過路亽.° 提交于 2019-12-03 23:38:30
需要以下文件,网上可以搜索下载,其中两个需要解压 使用apktool反编译apk得到资源文件、AndroidManifest.xml、语言资源文件等 可以运行 java -jar apktool——2.3.4.jar d -f apk文件绝对路径 -o 输出的目录 -o 输出的目录就在apktool工具所在目录,跟apktool同级 使用dex2jar反编译apk得到jar包 前提需要 将apk修改后缀名为zip或rar,然后进行解压得到classes.dex classes.dex是java文件编译后再通过dx工具打包而成的 将获取到的classes.dex放入解压后的dex2jar目录 在terminal输入"d2j-dex2jar classes.dex" 命令执行完成后,会生成 classes-dex2jar.jar 文件 使用jd-gui,将class文件反编译成java源代码 来源: https://www.cnblogs.com/endian11/p/11811542.html

android apk 自我保护技术-让JD-GUI显示error

独自空忆成欢 提交于 2019-12-03 20:29:39
又到周末一个人侘在家里无事可干,这就是程序员的悲哀啊。好了我们利用周末的时间继续介绍 android apk 防止反编译技术的另一种方法。前三篇我们讲了加壳技术( http://my.oschina.net/u/2323218/blog/393372 )、运行时修改字节码( http://my.oschina.net/u/2323218/blog/396203 )和伪加密( http://my.oschina.net/u/2323218/blog/399326 ),如果有不明白的可以查看我的博客的前三篇中关于这三种技术的介绍。接下来我们将介绍另一种防止 apk 反编译的技术 - 对抗 JD-GUI 。 一、 对抗 JD-GUI 原理 通常在对 apk 进行反编译的时候用到的最多的两个工具就是 apk-tool 和 dex2jar 。利用这两个工具将 apk 首先反编译成 classes.dex 然后再将 classes.dex 反编译成 jar 文件或者将 apk 直接反编译成 jar 文件;得到 jar 文件以后就可以利用 JD-GUI 将得到的 jar 文件打开就可以直接查看 apk 的 java 源码了。我们花了那么大心思写的程序就这么容易被别人拿到源码是不是很不甘心,现在我就告诉你对抗 JD-GUI 查看源码的方法。我们在用 JD-GUI

How to decompile an android app from the google play store

丶灬走出姿态 提交于 2019-12-03 10:14:51
问题 I want to decompile one android app that is available on google play store. Can anybody suggest to me an online tool or any apktool that will help me to decompile source code of apk? Thanks in advance. 回答1: Install which app you need from the playstore. Install Apk Extractor from playstore. Extract the apk using that Apk Extractor app. Just go to this link JavaDecompilers Choose file and do Upload and DEcompile. You will get the zip file. 来源: https://stackoverflow.com/questions/43752446/how

What's platformBuildVersionCode and platformBuildVersionName in Extracted Apk's

99封情书 提交于 2019-12-03 09:59:11
问题 Extracted an Apk using APKTool getting the manifest.xml like this, <manifest xmlns:"http://schemas.android.com/apk/res/android" android:versionCode="31" android:versionName="3.1" package="xxx.xxx.xxx" platformBuildVersionCode="22" platformBuildVersionName="5.1.1-1819727"> <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="22" /> Need to know what's platformBuildVersionCode and platformBuildVersionName Already Checked this,What is "platformBuildVersionCode" in AndroidManifest.xml?

Terminal can&#039;t run apktool [closed]

匿名 (未验证) 提交于 2019-12-03 01:34:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using macOSX, and trying to extract all the files in a APK file, I've extracted it with zip and unzip. Used dex2jar to extract classes.dex to jar file and decompiled it. Now when I am in my last step, using APKtool to decode the apk file, however, it shows "-bash: apktool: command not found " eventhough I put all 3 files(aapt, apktool and apktool.jar) into one folder. How can I decompile with my apktool now? 回答1: If you are using relative paths to execute apktool, and you are cd d to the directory they are in, you have to prefix the