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文 ...
随机推荐
- HDU 4321 Contest 3
题意:给定a和b,n,让你求b+a, b+2*a, .......b+n*a里面有多少1. 当统计第K位的时候 可以注意到 第 B+T*A 和 B+(T+2^(K+1))*A 位是相同的 那么 第K位 ...
- POJ 1721
好像不需要用到开方什么的... 可以知道,一副牌即是一个循环,那么,由于GCD(L,K)=1,所以一次洗牌后,亦是一个循环.其实,K次洗牌等于是T^(2^K)了.既然是循环,必定有周期.那么,周期是多 ...
- jQuery——map()函数以及它的java实现
map()函数小简单介绍 map()函数一直都是我觉得比較有用的函数之中的一个,为什么这么说呢? 先来考虑一下.你是否碰到过下面场景:须要遍历一组对象取出每一个对象的某个属性(比方id)而且用分隔符隔 ...
- OC 自己定义 setDateFormat 显示格式
-(NSString *)getStringFromDate:(NSDate *)aDate { NSDateFormatter *dateFormater=[[NSDateFormatter all ...
- php 设计模式之观察者模式(订阅者模式)
php 设计模式之观察者模式 实例 没用设计模式的代码,这样的代码要是把最上面那部分也要符合要求加进来,就要修改代码,不符合宁增不改的原则 介绍 观察者模式定义对象的一对多依赖,这样一来,当一个对象改 ...
- VSCode向上的代码提示消除
VSCode虽然好用, 但是有些用户体验实在非常差, 比如这种往上面弹的类型提示... 在用户设置中增加: "editor.parameterHints": false
- 在ubuntu下访问windows硬盘出现错误:Error mounting /dev/sda7 at /media
在终端输入以下代码: sudo apt-get install ntfs-3g sudo ntfsfix /dev/sda7 运行完后: 这样就可以成功访问了.
- direct2d: antialiasing and drawing a line with a 1 pixel stroke
http://xboxforums.create.msdn.com/forums/t/61448.aspx I'm currently porting a number of custom MFC C ...
- hiho 1572 - set.upper_bound,排序树
链接 小Hi家的阳台上摆着一排N个空花盆,编号1~N.从第一天开始,小Hi每天会选择其中一个还空着花盆,栽种一株月季花,直到N个花盆都栽种满月季. 我们知道小Hi每天选择的花盆的编号依次是A1, A2 ...
- hiho1079 - 数据结构 线段树(入门题,离散化)
题目链接 描述 小Hi和小Ho在回国之后,重新过起了朝7晚5的学生生活,当然了,他们还是在一直学习着各种算法~ 这天小Hi和小Ho所在的学校举办社团文化节,各大社团都在宣传栏上贴起了海报,但是贴来贴去 ...