android 反编译和代码解读
二 错误代码还原规则
if…else 语句:
反编译代码
if (paramBoolean)
paramTextView.setTextColor(-16727809);
while (true)
{
return;
paramTextView.setTextColor(-1315861);
}
还原后
if (paramBoolean)
{
paramTextView.setTextColor(-16727809);
}
else
{
paramTextView.setTextColor(-1315861);
}
会把if ..esle 反编译成 if …while(true)结构.
反编译代码
if (paramInt1 != 1)
break label185;
if (this.countChild_1 == null)
{
this.countChild_1 = new PokerCountChild(this.mContext);
this.countChild_1 = new PokerCountChild(this.mContext);
this.countChild_1.setPosition((int)(0.83D * BaseGameActivity.screenWidth
- this.countChild_1.getWidth()), (int)(0.2D * BaseGameActivity.screenHeight));
this.countChild_1.setCount(paramInt2);
addOneChild(this.countChild_1);
if (paramInt2 == 0)
this.countChild_1.setAlpha(0);
}
this.countChild_1.setCount(paramInt2);
}
label185:
do
return;
while (paramInt1 != 2);
if (this.countChild_2 == null)
{
this.countChild_2 = new PokerCountChild(this.mContext);
this.countChild_2 = new PokerCountChild(this.mContext);
this.countChild_2.setPosition((int)(0.17D * BaseGameActivity.screenWidth),
(int)(0.2D * BaseGameActivity.screenHeight));
this.countChild_2.setCount(paramInt2);
addOneChild(this.countChild_2);
if (paramInt2 == 0)
this.countChild_2.setAlpha(0);
}
this.countChild_2.setCount(paramInt2);
还原
if(i == 1)
{
if(countChild_1 == null)
{
countChild_1 = new PokerCountChild(mContext);
countChild_1 = new PokerCountChild(mContext);
countChild_1.setPosition((int)(0.83D *
(double)BaseGameActivity.screenWidth - (double)countChild_1.getWidth()),
(int)(0.2D * (double)BaseGameActivity.screenHeight));
countChild_1.setCount(j);
addOneChild(countChild_1);
if(j == 0)
countChild_1.setAlpha(0);
}
countChild_1.setCount(j);
} else
if(i == 2)
{
if(countChild_2 == null)
{
countChild_2 = new PokerCountChild(mContext);
countChild_2 = new PokerCountChild(mContext);
countChild_2.setPosition((int)(0.17D *
(double)BaseGameActivity.screenWidth), (int)(0.2D *
(double)BaseGameActivity.screenHeight));
countChild_2.setCount(j);
addOneChild(countChild_2);
if(j == 0)
countChild_2.setAlpha(0);
}
countChild_2.setCount(j);
return;
}
会将语句倒序,出现break label结构
反编译代码
jd-gui有时会将whilei语句翻译成if,此处要将if改成while
switch语句
反编译代码
switch (this.mBand)
{
default:
case 0:
case 1:
case 2:
}
while (true)
{
return;
this.mBand.setText("FM1");
continue;
this.mBand.setText("FM2");
continue;
this.mBand.setText("AM");
}
还原
switch (mBand)
{
case 0:
mBand.setText("FM1");
break;
case 1:
mBand.setText("FM2");
break;
case 2:
mBand.setText("AM");
break;
default:
}
switch规则就是一个continue对应一个case.要注意是是要外层的continue才算数,在if里的continue不算
enum枚举
还原

jd-gui
http://www.qiaodiqiu.com/how-to-read-java-confusion-after-the-anti-compiled-code.html
http://blog.csdn.net/xyz_fly/article/details/8014455
http://blog.csdn.net/hp_2008/article/details/8626010
jad
http://blog.csdn.net/z3h/article/details/2515287
http://blog.csdn.net/z3h/article/details/2640522
android 反编译和代码解读的更多相关文章
- Android反编译 -- 错误代码还原
PS:如果阅读体验不好,可以尝试Github版 (<-点左边) 1. setColor(-16777216) 反编译的代码中会有很多setColor(int)的情况,比如setColor(-16 ...
- Android Apk的反编译与代码混淆
一.反编译 1.获取工具: 既然是反编译,肯定要用到一些相关的工具,工具可以到这里下载,里面包含三个文件夹,用于反编译,查看反编译之后的代码: 其实这两工具都是google官方出的,也可在google ...
- Android反编译(三)之重签名
Android反编译(三) 之重签名 [目录] 1.原理 2.工具与准备工作 3.操作步骤 4.装X技巧 5.问题 1.原理 1).APK签名的要点 a.所有的应用程序都必须有数字证书 ,Androi ...
- Atitti.java android反编译解决方案-----虚拟机方案
Atitti.java android反编译解决方案-----虚拟机方案 哈哈,终极解决方案是虚拟机...c++也可以反编译为汇编代码,但无需担心,因为读懂汇编太麻烦..只要不能拿到c++源码就可.. ...
- Android反编译工具的使用-Android Killer
今天百度搜索“Android反编译”搜索出来的结果大多数都是比较传统的教程.刚接触反编译的时候,我也是从这些教程慢慢学起的.在后来的学习过程中,我接触到比较方便操作的Android反编译.在这,我将使 ...
- Android 反编译
Android 反编译 步骤:1.下载apktool 工具,这一步 主要是反编译 xml 文件. 步骤:2 把xx.smali 文件转为java 工具 (单个) 图形界面 下载dex2jar 和xj ...
- 转 谈谈android反编译和防止反编译的方法
谈谈android反编译和防止反编译的方法 android基于java的,而java反编译工具很强悍,所以对正常apk应用程序基本上可以做到100%反编译还原. 因此开发人员如果不准备开源自己的项 ...
- Android 反编译apk 详解
测试环境: win 7 使用工具: CSDN上下载地址: apktool (资源文件获取) 下载 dex2jar(源码文件获取) 下载 jd-gui (源码查看) ...
- Android 反编译工具简介
Android 反编译工具: 所需工具:1 apktool : 用于获取资源文件 2 dex2Jar : 用于将classes.dex转化成jar文件 2 jd-gui: 将jar文件转化成java文 ...
随机推荐
- ASP.NET-HTTP响应标头
Reponse Headers 理论上所有的响应头信息都应该是回应请求头的.但是服务端为了效率,安全,还有其他方面的考虑,会添加相对应的响应头信息,从上图可以看到: Cache-Control:mus ...
- ASP.NET-优化websit
如何优化一个网站 1.如果是数据库的问题则尝试添加索引.优化SQL语句,如果是算法的问题,则优化算法. 2.如果对于一些不经常改动的页面可以使用静态页技术! 3.对于一些数据不需要及时更新的而且取数据 ...
- Libvirt中windows虚拟机的动态内存管理
非常短的前提 Libvirt支持对虚拟机进行内存动态扩展,可是windows虚拟机首先须要安装virtio-win驱动. KVM提供的virtio-win驱动下载地址: http://www.linu ...
- Cocos2d-x 常见宏
1)NS_CC_BEGIN cocos2d命名空间開始 2) NS_CC_END cocos2d命名空间结束 3)USING_NS_CC 声明cocos2d命名空间 4)CC_SYNTHESIZE_ ...
- IOS 数据存储之 SQLite具体解释
在IOS开发中常常会须要存储数据,对于比較少量的数据能够採取文件的形式存储,比方使用plist文件.归档等,可是对于大量的数据,就须要使用数据库,在IOS开发中数据库存储能够直接通过SQL訪问数据库, ...
- bzoj1066: [SCOI2007]蜥蜴(最大流)
1066: [SCOI2007]蜥蜴 题目:传送门 题解: 哇QTT大佬一眼秒算法...ORT 其实很容易就可以看出来是一道最大流 因为有边的使用限制,那么就可以直接当成是流量来处理嘛 因为是对点进行 ...
- m_Orchestrate learning system---一、amazeui如何使用
m_Orchestrate learning system---一.amazeui如何使用 一.总结 一句话总结:先花几分钟把所有功能稍微看一下,然后做的时候就会特别快,所以,多学习,学得越多做的越快 ...
- [JZOJ NOIP2018模拟10.19]
T1写炸了今天,期望70却落了个20...连链上的都没有写对 T3什么什么线段树分治套AC自动机,表示我完全自闭了,幸好考场上没有杠T3 总体比赛还是比较舒服,暴力分给的蛮足的,不像昨天那样 T1:林 ...
- autocomplete="off" 不起作用解决方案
autocomplete属性是表单字段中的HTML5新属性,该属性有两种状态值,分别为"on" 和 "off",该属性可省略:省略属性值后默认值为"o ...
- Kettle学习系列之kettle的下载、安装和初步使用(windows平台下)(图文详解)
不多说,直接上干货! kettle的下载 Kettle可以在http://kettle.pentaho.org/网站下载 http://sourceforge.n ...