Smali学习笔记
Sas学习笔记

Sas学习笔记人文社会科学学院高等教育学专业张宁S100081674整个SAS程序结构可以分为两个部分,数据data步与过程proc步。
data步1:输入数据(包括手动输入数据、从文本文件中导入数据)a使用手动方法输入数据基本形式是:Data 数据集;Input 变量名(包括格式设置);/*在input语句中需要指定的格式必须和cards中数据的格式一致,需要考虑字符型与数值型数据的不同,以及是否是标准数据,根据实际情况调整数据格式设定*//* 同时在读入数据的时候,需要参考数据的形式,指定输入的起始位置与字符数,包括使用@指针控制、指定起始列终止列、指定字符数等*/其他语句;/*循环语句,选择语句等*//*sas表达式:sas运算符(包括算数、比较、逻辑)sas函数(包括算数函数、常用函数等)*/Cards ;数据;/*其中数据之间默认为空格作为分隔符,如果分隔符为其他符号,则要在input语句中指定delimiter=‘’*/Run;b使用文本文件导入法基本形式是:Data 数据集;变量属性设定;Infile‘文件地址’(firstobs=,obs= ,missover);Input;其他语句;/*循环语句,选择语句,sas表达式*/Run;当然输入数据的时候可以直接使用sas导入数据选项,根据情况设定形式,导入数据。
c总之在data步中常见的语句有:DA TA语句PUT语句——输出语句SET语句——读取观测语句ATTRIB语句——设定变量属性赋值语句——计算SAS表达式,给变量赋值DROP语句——删除变量语句KEEP语句——保留变量语句IF语句——条件语句DO-END语句——循环语句DELETE语句——删除语句OUTPUT语句——输出到数据集语句COMMENT语句——注释语句ARRAY语句——数组语句在实际操作中,可以灵活的使用这些语句实现数据处理。
2:同时在数据步中可以使用语句实现数据集的加工、合并和拼接a数据集排序/*事先对SAS数据集进行排序,是其它SAS程序通过使用BY语句直接调用该数据集及对数据集进行合并或串接的前提*/PROC SORT OPTIONS ;BY 〔DESCENDING〕变量名列表;END;b数据集串联/*在串联中必须要求同一个变量在不同数据集中数据形式一致,如果不一致,则需使用put函数将数据形式转换*/Concatenate方式Data 新数据集;Set 输入数据集1 输入数据集2 ……;/*可以使用(in=变量k)的形式检测来自哪个数据集*/Run;Interleave方式:Data 新数据集;Set 输入数据集1 输入数据集2 ……;By by-variables ;/*必须排序*/Run;c数据集并联/*用MERGE 语句并接SAS数据集*/MERGE (一对一合并)DATA 新数据集;MERGE 输入数据集1 输入数据集2 ……;RUN;MATCH MERGE(匹配合并)DATA 新数据集;MERGE 输入数据集1 输入数据集2 ……;BY by-variables ;RUN;d修改数据集modify/*modify语句修改数据集,并且此过程不能形成新的数据集,并且不需要排序*/data主数据集名称;modify 主数据集名称更新数据集名称;run;Update/*可以产生新的数据集,需要使用by排序*/data 数据集名称update 主数据集名称更新数据集名称;by变量名称;/*该语句必须出现,而且必须在该data步之前对update语句中的数据集进行排序*/run;Proc步该过程常用的sas语句有:V AR语句—指定分析变量MODEL语句—指定统计建模的模型/*一般采用‘因变量=自变量/选项’的形式*/BY语句—指定分组变量/*使用之前一般要使用proc sort语句进行排序*/CLASS语句—指定分类变量OUTPUT语句—指定输出结果存放的数据集FREQ语句—指定一个重复数变量WEIGHT语句—指定一个权重变量ID语句—指定用来标识观测的变量WHERE语句—选择输入数据集的一个行子集进行分析LABEL语句—为变量指定一个临时标签FORMAT语句—为变量输出规定一个输出格式/*过程步中规定的格式只是在本次运算中起作用,而数据步中规定的实行在整个数据集中永久存在*/1:使用proc print语句输出表格PROC FORMAT;V ALUE ;/*使用该语句定义用户格式*/PROC PRINT DATA 数据集SPLIT='*' ;/*使用该语句控制显示中的格式,使其按要求换行*/ID 变量名; /*把指定的变量在取消obs 的情况下排在表格最左列*/V AR 变量列表;/*需要输出的变量*/WHERE 条件表达式…;SUM 变量序列;/*变量需要处理的形式*/BY 变量名; /*在先前进行排序的情况下,对数据进行分组并要求每组进行小计*/PAGEBY 变量序列;/*是报告表格按组分页*/TITLEn'语句';/*使用该语句控制表头显示可以最多有十个标注*/FOOTNOTEn语句';LABEL 变量1= ‘label(标*签)’……;/*控制表头显示,可使用起始中split=定义的方式美化表格*/FORMA T ;/*用户自定格式的使用*/RUN;2:使用proc tabulate语句输出汇总表格PROC FORMAT;V ALUE ;/*使用该语句定义用户格式*/PROC TABULATE data 数据集options;CLASS /*分类变量,可以是数值型也可以是字符型*/;V AR ;/*分析变量,必须是数值型*/FORMAT ;/*用户自定格式的使用*/TABLE page-v,row-v,colum-v / options;/*table语句中使用的变量必须是class与var中定义过的变量*//*包括元素与操作符,根据操作符的不同控制表格格式,无=每个变量占一单独列;,=两个表达式产生一个二维列表分别代表行和列;两个,=三维列表分别是页行列;*隔开两个表示交叉列表*//*options选项控制表格其他形式,如使用rts控制第一列宽度*/KEYLABEL ;/*使用该语句为all类变量以及所有的统计量加标记*/TITLEn'语句';/*使用该语句控制表头显示可以最多有十个标注*/FOOTNOTEn语句';LABEL 变量1= ‘label(标*签)’……;/*控制表头显示,可使用起始中split=定义的方式美化表格*/RUN;3:使用proc gplot语句绘制散点及折线图PROC GPLOT DATA=数据集;PLOT 纵坐标变量*横坐标变量/选项;/*控制坐标轴:HAXIS=Values|Axisn定义水平轴的刻度;VAXIS=Values|Axisn定义垂直轴的刻度;NOAXIS取消坐标轴及相关的文字;CAXIS=Color定义坐标轴的颜色;CTEXT=Color定义坐标轴文本的颜色*//*加框:FRAME加框;CFRAME= Color给坐标轴包围的区域填色*/ SYMBOL V=I=W=C=;/*V=NONE;PLUS'+';STAR'*';SQUARE'方块';DIAMOND'菱形';TRIANGLG'三角形'*//*I= NONE ;JOIN'直线连接';SPLINE'光滑曲线连接';NEEDLE'从数据到横坐标画垂直线'*//*C=RED;GREEN;BLUE;ORANGE*/LABEL ; 变量1= ‘label(标*签)’……;/*控制表头显示,可使用起始中split=定义的方式美化表格*/TITLE C=颜色H=高度及单位F=字体;/*使用该语句控制表头显示可以最多有十个标注*/FOOTNOTE C=颜色H=高度及单位F=字体;RUN;4:使用proc gcharts语句绘制饼图及柱状图PATTERN c=颜色v=花纹;PROC GCHART DA TA=数据集;VBAR|HBAR|PIE|STAR|BLOCK/*垂直柱状图/水平柱状图/圆饼图/星形图/立体柱状图*/分类变量名列/选项;/*DISCRET/*指定分类方式*/MIDPOINT=列举值/*指定分组中点*/ SUMV AR=变量名/*指定分析变量*/TYPE=FREQ|SUM|MEAN|PCT /*指定统计量(无SUMVAR时缺省为FREQ,否则为SUM )*/GROUP=变量名/*指定分组作图*/SUBGROUP=变量名/*指定柱内分组*/FILL=S(SOLID)|X(CROSS)/*设定饼图的花纹*/*/LABEL ; 变量1= ‘label(标*签)’……;/*控制表头显示,可使用起始中split=定义的方式美化表格*/TITLE C=颜色H=高度及单位F=字体;/*使用该语句控制表头显示可以最多有十个标注*/FOOTNOTE C=颜色H=高度及单位F=字体;RUN;5:使用proc univariate、means、freq语句进行定量资料的统计描述PROC UNIV ARIATE DATA= 数据集名options;/*NOPRINT禁止统计报告在OUTPUT视窗中输出PLOT 绘出茎叶图、箱式图和正态概率图FREQ 给出频数表NORMAL 对变量进行正态性检验*/V AR 变量名列;BY 变量名列; /*排序*/FREQ 变量名;WEIGHT 变量名;ID 变量名;OUTPUT OUT= 数据集名关键字= 新变量名列.../*常用关键字有:基本统计量:N MEAN STD(标准差)CV(变异系数)SUM VAR(方差)RANG 百分位数描述:MIN P1 P5 P10 Q1 MEDIAN Q3 P90 P95 P99MAX与假设检验有关的统计量有:STDMEAN(标准误)T */pctlpts=百分位数, ...pctlpre=新变量名列;Run;PROC MEANS [ DATA= 数据集名选项统计量关键字列表;/*选项有:NOPRINT 禁止统计在OUTPUT视窗中输出MAXDEC=n 给出列表输出的最大小数位数,缺省值为2*/V AR 变量名列;BY 变量名列;CLASS 变量名列;FREQ 变量名;WEIGHT 变量名;ID 变量名列;OUTPUT OUT= 数据集名关键字= 新变量名列... ;/*关键字有:基本统计量有:N MEAN STD(标准差)CV(变异系数)SUM VAR(方差)RANG MIN MAX;与假设检验有关的统计量有:STDERR(标准误)T PRT(与t对应的p值) LCLM(可信区间下限) UCLM(可信区间上限)*/Run;PROC FREQ data+;TABLES 请求式/ 选项;/* 常用选项有ORDER=FREQ 按频数递减顺序排列ORDER=DATA 按数据集中出现的顺序排列ORDER=INTERNAL 按内部值排列(缺省) ORDER=FORMATTED 按外部格式值排列*/WEIGHT 变量名;BY 变量名列;Run;6:使用proc corr过程进行相关系数计算(相关关系散点图可以参照gplot语句)PROC CORR DATA=数据集OPTIONS;/*PEARSON 计算皮尔逊相关系数(缺省值);SPEARMAN 计算斯皮尔曼等级相关系数;NOSIMPLE 不打印输出各变量的描述性统计量;NOPROB 省略检验统计量p-值;COV(COVARIANCE) 打印协方差矩阵;NOCCORR 储存时省略相关系数;OUTP=指定皮尔逊相关系数存储的数据集;OUTS= 指定斯皮尔曼相关系数存储的数据集*/ V AR 变量名列;WITH 变量名列;/*计算with指定变量与var指定变量之间的相关系数*/PARTIAL 变量名列;RUN;7:使用proc reg过程进行回归分析PROC REG DATA= 数据集名OPTIONS;/*SIMPLE 计算并打印各变量的基本描述性统计量;SXORR 打印各变量的相关行列式;NOPRINT不打印输出;OUTEST=数据集名指定回归值输出的数据集;COVOUT=数据集名将所估计的协方差阵存入数据集;OUTSSCP=数据集名指定相关矩阵输出的数据集*/V AR 变量名列;BY 变量名列;FREQ 变量名列;MODEL 因变量=自变量/OPTIONS;/*model语句的作用可分为以下四个方面:1.关于报表打印的选项NOPRINT不打印MODEL语句所界定的分析结果;ALL 打印MODEL语句所有分析结果*//*2.界定参数估计值的选项STB 打印标准化回归系数;COVB 输出估计值的协方差阵;VIF 输出方差膨胀因子;COLLIN 进行多元共线性分析*//*3.关于预测值、预测误差的选项P计算每一个观测值y的期望值及其标准误;R 在P选项的基础上对预测误差做进一步分析;CLI 输出单个预测值95﹪的置信区间;CLM 输出预测值均值95﹪的置信区间;INFLUENCE 分析观测值对参数估计和模型预测值的影响*//*4.关于界定回归模型的选项SELECTION=none|forward|backward|stepwise|cp |rsquare|adjrsq 指定自动进行变量选择的方法;NOINT 规定回归模型中不包含截距项.*/OUTPUT OUT=数据集名关键字=新变量名列;RUN;PROC GPLOT DA TA=数据集;/*做回归图*/PLOT 纵轴变量名*横轴变量名;SYMBOL V=符号C=颜色I=none|rl|rq|rc /*不加线线性二次三次*/其他选项;RUN;。
AS3.0学习笔记_原创

Action Script 学习笔记1 在AS里,数据类型分为两种,基本数据类型和复杂数据类型。
2 基本(简单)数据类型分为:int:32位整数型,运行时比number占的内存要小,属于Number类型number:64位整数型,可以表示长整形,也可以表示浮点类型,功能多,但占内存大String:字符串数据类型uint:无符号,也就是无正负整形。
这里的符号是在二进制码中的符号,我们知道,对一般的整形,二进制码中的第一位是符号位,而unit类型舍去了这个符号位,第一位还可以继续赋值,无正负,全部视为正数。
我们一般用unit来作为颜色值。
属于Number类型。
Boolean:布尔数据类型,即逻辑数据类型Null:空值。
和“”的区别是:null状态下,只在栈内存中开辟了一个空间存放所声明的变量;但若为空值“”,则会另辟在内存中另辟一个地址,用来存放“”,也就是消耗了两块内存区域。
void:未定义数据类型,3 除了基本数据类型外,其他都是复杂数据类型,可以概括为:String,Object,Array,对象等。
即:复杂数据类型都是由基本数据类型组成的,或者由其他复杂数据类型组成的。
AS3.0中包含了大量内建的复杂数据类型,我们也可以自己设置复杂数据类型。
4 凡是继承DisplayObjectContainer的类的子类,都属于容器。
简单得说,容器就是拥有子集列表的一个对象。
5 Sprite类是显示列表构造块。
是一个可以显示图形同时可以包含子项的显示列表节点。
因此,Sprite是一种容器,我们可以理解它为一张画布,有了它我们可以画各种图形,也可以把画好的东西贴上去,通过不同的组件拼凑出一张完整的图案。
代码见:代码/testAS3.0_7.2-7.6/com/xbax/as3/HelloWorld6 如果不使用Sprite.addChild()等方法,则不会将该组件添加到画板上,自然我们就看不到任何显示了。
Android 反编译 -smali语法

Android 反编译 -smali语法前言前面我们有说过android反编译的工具,如何进行反编译。
反编译后可以得到jar或者得到smali文件。
Android采用的是java语言进行开发,但是Android 系统有自己的虚拟机Dalvik,代码编译最终不是采用的java的class,而是使用的smali。
我们反编译得到的代码,jar的话可能很多地方无法正确的解释出来,如果我们反编译的是smali则可以正确的理解程序的意思。
因此,我们有必要熟悉smali语法。
类型的表示java里面包含两种类型,原始类型和引用类型(包括对象),同时映射到smali也是有这两大类型。
原始类型1.V void (只能用于返回值类型)2.Z boolean3. B byte4.S short5. C char6.I int7.J long8. F float9. D Double对象类型1.Lpackage/name/ObjectName; 相当于java中的.ObjectNameL 表示这是一个对象类型package/name 该对象所在的包ObjectName 对象名称; 标识对象名称的结束数组的表示[I 表示一个int型的一维数组,相当于int[];增加一个维度增加一个[,如[[I表示int[][]数组每一个维度最多255个;对象数组表示也是类似,如String数组的表示是[Ljava/lang/String寄存器与变量java中变量都是存放在内存中的,android为了提高性能,变量都是存放在寄存器中的,寄存器为32位,可以支持任何类型,其中long和double是64为的,需要使用两个寄存器保存。
寄存器采用v和p来命名v表示本地寄存器,p表示参数寄存器,关系如下如果一个方法有两个本地变量,有三个参数1.v0 第一个本地寄存器2.v1 第二个本地寄存器3.v2 p0 (this)4.v3 p1 第一个参数5.v4 p2 第二个参数6.v5 p3 第三个参数当然,如果是静态方法的话就只有5个寄存器了,不需要存this了。
smali基础

Smali基础1.背景知识使用Apktool反编译apk 文件后,会在反编译工程目录下生成一个smali 文件夹,里面存放着所有反编译出的smali 文件,这些文件会根据程序包的层次结构生成相应的目录,程序中所有的类都会在相应的目录下生成独立的smali 文件。
smali 文件的代码通常情况下比较长,而且指令繁多,在阅读时很难用肉眼捕捉到重点。
无论是普通类、抽象类、接口类或者内部类,在反编译出的代码中,它们都以单独的smali文件来存放。
每个smali 文件都由若干条语句组成,所有的语句都遵循着一套语法规范。
2.文件头在smali 文件的头3 行描述了当前类的一些信息,格式如下。
.class < 访问权限> [ 修饰关键字] < 类名>.super < 父类名>.source <源文件名>2.1.数据类型在smali中,数据类型和Android中的一样,只是对应的符号有变化:B---byteC---charD---doubleF---floatI---intJ---longS---shortV---voidZ---boolean[XXX---arrayLxxx/yyy---object这里解析下最后两项,数组的表示方式是:在基本类型前加上前中括号“[”,例如int数组和float数组分别表示为:[I、[F;对象的表示则以L作为开头,格式是LpackageName/objectName;(注意必须有个分号跟在最后),例如String对象在smali中为:Ljava/lang/String;,其中java/lang对应ng包,String就是定义在该包中的一个对象。
或许有人问,既然类是用LpackageName/objectName;来表示,那类里面的内部类又如何在smali中引用呢?答案是:LpackageName/objectName$subObjectName;。
SAM学习笔记

对一个endposendpos等价类中长度最长的所有位置再向前添加一个字符那么由于性质2这个等价类必定会被分割成若干个新的endposendpos等价类一开始有11个点每次划分最多只能产生22个新节点由于初始endposendpos集合大小才nn最多划分n?1n?1次所以自然只会有2n?12n?1个状态
Loading [MathJax]/jax/element/mml/optable/GeneralPunctuation.js
考虑到\textbf{endpos}总个数最多才2n个,又通过性质(1)注意到对于两个\textbf{endpos}相同的状态所有转移边也相同,于是自然想到把每个\textbf{endpos}等价类缩成一个点,形成了一 个\operatorname{DAG}:
增量法构造\textbf{sam} 强行背板子部分 具体过程:每次插入一个字符c的时候,新增节点o,从上一次新增的状态p,不断跳link,沿途所有状态全部链向o,直到某个状态u有转移边ch(q,c)指向点v,直接将link(o)链向v,如果不满足性 质len(v)=len(u)+1,那就再新建一个节点q,使得len(v)=len(u)+1,link(q)=link(v)+1,然后把o和v连到q上然后往上跳,过程中把全部指向v的转移边全指向q。 结合代码理解: int fa[maxn<<1],ch[maxn<<1][28],psiz[maxn<<1],len[maxn<<1]; int lstp=1,cnt=1; inline void extend(int c){ int p=lstp,np=lstp=++cnt; len[np]=len[p]+1,psiz[np]=1; for (;p&&!ch[p][c];p=fa[p]) ch[p][c]=np; if(!p){
VBA学习笔记

EXCEL之VBA 学习笔记姓名:刘磊时间:2015年9目录第一章VBA基础知识 (3)第二章工作簿以及工作表的操作 (9)第三章:单元格区域操作 (14)第四章:事件程序: (36)第五章:VBA数组 (43)第一章VBA基础知识1:代码帮助:F12:代码换行:下划线+空格+回车3:.常用代码操作excel中的对象(1)、工作簿(Workbooks)Workbooks(N)第N个工作簿Workbooks (”工作簿名”)ActiveWorkbook 活动工作簿ThisWorkBook 代码所在工作簿(2)、工作表(Worksheets)Sheets(N)第N个工作表Sheets("工作表名")SheetN 第N个工作表ActiveSheet 活动工作表worksheets 与Sheets的区别(3)、单元格(cells)Range (”单元格地址")Cells(行号,列号)[A1]单元格简写Activecell 活动单元格Selection 当前被选取的区域4:常量与变量(1。
)常量:常量是定义了之后就不做变化了.常量定义格式:Const 常量名= 常量表达式(2)。
变量:在定义之后还能再次赋值变量定义格式:Dim 变量As 变量类型5:数据类型(1.)VBA中的常见数据类型:类型注释简写占用内存Integer 整型%2ByteSingle 单精度! 4ByteDouble 双精度# 8ByteLong 长整型& 4ByteString 字符型$ 定长或变长( 变长字符串最多可包含大约20 亿( 2^31)个字符. 定长字符串可包含1 到大约64K (2^16 ) 个字符.)Currency 货币型@ 8Byte6:if条件语句1。
单行形式1(If。
.。
Then)If 条件判断Then 条件成立结果注意在单行形式中,按照If。
Then 判断的结果也可以执行多条语句。
samil语法

samil语法
由于“samil”是一种编程语言,因此它有其特定的语法规则。
以下
是“samil”语言的语法特点:
1. 表达式:表达式可以是变量、常量、字符串、函数、操作符和括
号的组合。
例如,“a=1+2”、“b=4*5-6”、“c=fun(a,b)” 等。
2. 变量:变量名必须以字母或下划线开头,可以包含数字、字母和
下划线。
例如,“a”、“var_1”、“myVar” 等。
3. 常量:常量是一些固定的数值或字符串,例如:“3.14159”、
“'hello world'”等。
4. 数据类型:samil支持各种不同的数据类型,包括整数、浮点数、布尔值、字符串、数组、哈希表等。
5. 函数:函数由关键字“func”后跟函数名和参数列表组成。
函数
可以返回一个值或不返回任何值。
例如:“func sum(a, b) { return
a+b; }”、“func print(s) { console.log(s); }”等。
6. 语句:语句是程序中执行某些操作的行为单元。
samil支持循环
语句、条件语句、跳转语句等。
例如:“if (a>b) { print('a is
greater than b'); }”、“for (i=0; i<10; i++) { print(i); }”、“while (i<10) { i++; }”等。
总之,samil语法是比较简单易懂的,但需要注意细节。
程序员需要
认真熟悉语言规范,才能写出高效、健壮的代码。
smail语法

Dalvik opcodesAuthor: Gabor PallerVx values in the table denote a Dalvik register. Depending on the instruction, 16, 256 or 64kregisters can be accessed. Operations on long and double values use two registers, e.g. a doublevalue addressed in the V0 register occupies the V0 and V1 registers.Boolean values are stored as 1 for true and 0 for false. Operations on booleans are translated into integer operations.All the examples are in hig-endian format, e.g. 0F00 0A00 is coded as0F, 00, 0A, 00 sequence.Note there are no explanation/example at some instructions. This means that I have not seen thatinstruction "in the wild" and its presence/name is only known from Android opcode constant list.Opcode(hex)Opcode name Explanation Example00 nop No operation 0000 - nop01 move vx,vy Moves the content of vy into vx. Bothregisters must be in the first 256register range. 0110 - move v0, v1 Moves v1 into v0.02 move/from16vx,vy Moves the content of vy into vx. vymay be in the 64k register range whilevx is one of the first 256 registers.0200 1900 - move/from16 v0, v25Moves v25 into v0.03 move/1604 move-wide05 move-wide/from16vx,vy Moves a long/double value from vy tovx. vy may be in the 64k registerrange while wx is one of the first 256registers.0516 0000 - move-wide/from16 v22, v0Moves v0 into v22.06 move-wide/1607 move-object vx,vy Moves the object reference from vy tovx. 0781 - move-object v1, v8Moves the object reference in v8 to v1.08 move-object/from16 vx,vy Moves the object reference from vy tovx, vy can address 64k registers andvx can address 256 registers.0801 1500 - move-object/from16 v1, v21Move the object reference in v21 to v1.09 move-object/160 A move-result vx Move the result value of the previousmethod invocation into vx.0A00 - move-result v0Move the return value of a previous method invocationinto v0.0 B move-result-widevxMove the long/double result value ofthe previous method invocation intovx,vx+1.0B02 - move-result-wide v2Move the long/double result value of the previousmethod invocation into v2,v3.0 C move-result-objectvxMove the result object reference ofthe previous method invocation intovx.0C00 - move-result-object v00 D move-exception vx Move the exception object referencethrown during a method invocationinto vx.0D19 - move-exception v25Ereturn-void Return without a return value 0E00 - return-void0F return vx Return with vx return value 0F00 - return v0Returns with return value in v0.10 return-wide vx Return with double/long result invx,vx+1. 1000 - return-wide v0Returns with a double/long value in v0,v1.11 return-object vx Return with vx object reference value. 1100 - return-object v0Returns with object reference value in v012 const/4 vx,lit4 Puts the 4 bit constant into vx 1221 - const/4 v1, #int2Moves literal 2 into v1. The destination register is in thelower 4 bit in the second byte, the literal 2 is in thehigher 4 bit.13 const/16 vx,lit16 Puts the 16 bit constant into vx 1300 0A00 - const/16 v0, #int 10Puts the literal constant of 10 into v0.14 const vx, lit32 Puts the integer constant into vx 1400 4E61 BC00 - const v0, #12345678 // #00BC614EMoves literal 12345678 into v0.15 const/high16 v0,lit16 Puts the 16 bit constant into thetopmost bits of the register. Used toinitialize float values.1500 2041 - const/high16 v0, #float 10.0 // #41200000Moves the floating literal of 10.0 into v0. The 16 bitliteral in the instruction carries the top 16 bits of thefloating point number.16 const-wide/16 vx,lit16 Puts the integer constant into vx andvx+1 registers, expanding the integerconstant into a long constant..1600 0A00 - const-wide/16 v0, #long 10Moves literal 10 into v0 and v1 registers.17 const-wide/32 vx,lit32 Puts the 32 bit constant into vx andvx+1 registers, expanding the integerconstant into a long constant.1702 4e61 bc00 - const-wide/32 v2, #long 12345678 //#00bc614ePuts #12345678 into v2 and v3 registers.18 const-wide vx,lit64 Puts the 64 bit constant into vx andvx+1 registers.1802 874b 6b5d 54dc 2b00- const-wide v2, #long12345678901234567 // #002bdc545d6b4b87Puts #12345678901234567 into v2 and v3 registers.19 const-wide/high16 Puts the 16 bit constant into the 1900 2440 - const-wide/high16 v0, #double 10.0 //vx,lit16 highest 16 bit of vx and vx+1registers. Used to initialize doublevalues. #402400000Puts the double constant of 10.0 into v0 register.1 A const-stringvx,string_idPuts reference to a string constantidentified by string_id into vx.1A08 0000 - const-string v8, "" // string@0000Puts reference to string@0000 (entry #0 in the stringtable) into v8.1Bconst-string-jumbo1 C const-classvx,type_idMoves the class object of a classidentified by type_id (e.g.Object.class) into vx.1C00 0100 - const-class v0, Test3 // type@0001Moves reference to Test3.class (entry#1 in the type idtable) into1 D monitor-enter vx Obtains the monitor of the objectreferenced by vx.1D03 - monitor-enter v3Obtains the monitor of the object referenced by v3.1 E monitor-exit Releases the monitor of the objectreferenced by vx.1E03 - monitor-exit v3Releases the monitor of the object referenced by v3.1F check-cast vx,type_id Checks whether the object referencein vx can be cast to an instance of aclass referenced by type_id. ThrowsClassCastException if the cast is notpossible, continues executionotherwise.1F04 0100 - check-cast v4, Test3 // type@0001Checks whether the object reference in v4 can be castto type@0001 (entry #1 in the type id table)20 instance-ofvx,vy,type_id Checks whether vy is instance of aclass identified by type_id. Sets vxnon-zero if it is, 0 otherwise.2040 0100 - instance-of v0, v4, Test3 // type@0001Checks whether the object reference in v4 is aninstance of type@0001 (entry #1 in the type id table).Sets v0 to non-zero if v4 is instance of Test3, 0otherwise.21 array-length vx,vy Calculates the number of elements ofthe array referenced by vy and putsthe length value into vx. 2111 - array-length v1, v1Calculates the number of elements of the array referenced by v1 and puts the result into v1.22 new-instancevx,type Instantiates an object type and putsthe reference of the newly createdinstance into vx.2200 1500 - new-instance v0, java.io.FileInputStream //type@0015Instantiates type@0015 (entry #15H in the type table)and puts its reference into v0.23 new-arrayvx,vy,type_id Generates a new array of type_id typeand vy element size and puts thereference to the array into vx.2312 2500 - new-array v2, v1, char[] // type@0025Generates a new array of type@0025 type and v1 sizeand puts the reference to the new array into v2.24 filled-new-array{parameters},type_id Generates a new array of type_id andfills it with the parameters5. Referenceto the newly generated array can beobtained by a move-result-objectinstruction, immediately following thefilled-new-array instruction.2420 530D 0000 - filled-new-array {v0,v0},[I //type@0D53Generates a new array of type@0D53. The array's sizewill be 2 and both elements will be filled with thecontents of v0 register.25 filled-new-array-range Generates a new array of type_id andfills it with a range of parameters.2503 0600 1300 - filled-new-array/range {v19..v21}, [B// type@0006{vx..vy},type_id Reference to the newly generatedarray can be obtained by amove-result-object instruction,immediately following thefilled-new-array instruction. Generates a new array of type@0D53. The array's size will be 3 and the elements will be filled using thev19,v20 and v21 registers4.26 fill-array-datavx,array_data_offset Fills the array referenced by vx withthe static data. The location of thestatic data is the sum of the positionof the current instruction and theoffset2606 2500 0000 - fill-array-data v6, 00e6 // +0025Fills the array referenced by v0 with the static data atcurrent instruction+25H words location. The offset isexpressed as a 32-bit number. The static data is storedin the following format:0003 // Table type: static array data0400 // Byte per array element (in this case, 4 byteintegers)0300 0000 // Number of elements in the table0100 0000 // Element #0: integer 10200 0000 // Element #1: integer 20300 0000 // Element #2: integer327 throw vx Throws an exception object. Thereference of the exception object is invx. 2700 - throw v0Throws an exception. The exception object reference is in v0.28 goto target Unconditional jump by short offset2. 28F0 - goto 0005 // -0010Jumps to current position-16 words (hex 10). 0005 isthe label of the target instruction.29 goto/16 target Unconditional jump by 16 bit offset2. 2900 0FFE - goto/16 002f // -01f1Jumps to the current position-1F1H words. 002F is thelabel of the target instruction.2Agoto/32 target2 B packed-switchvx,tableImplements a switch statement wherethe case constants are close to eachother. The instruction uses an indextable. vx indexes into this table to findthe offset of the instruction for aparticular case. If vx falls out of theindex table, the execution continueson the next instruction (default case).2B02 0C00 0000 - packed-switch v2, 000c // +000cExecute a packed switch according to the switchargument in v2. The position of the index table is atcurrent instruction+0CH words. The table looks like thefollowing:0001 // Table type: packed switch table0300 // number of elements0000 0000 // element base0500 0000 0: 00000005 // case 0: +000000050700 0000 1: 00000007 // case 1: +000000070900 0000 2: 00000009 // case 2: +000000092 C sparse-switchvx,tableImplements a switch statement withsparse case table. The instructionuses a lookup table with caseconstants and offsets for each caseconstant. If there is no match in the2C02 0c00 0000 - sparse-switch v2, 000c // +000cExecute a sparse switch according to the switchargument in v2. The position of the lookup table is atcurrent instruction+0CH words. The table looks like thefollowing.table, execution continues on the next instruction (default case). 0002 // Table type: sparse switch table0300 // number of elements9cff ffff // first case: -100fa00 0000 // second case constant: 250e803 0000 // third case constant: 10000500 0000 // offset for the first case constant: +5 0700 0000 // offset for the second case constant: +7 0900 0000 // offset for the third case constant: +92 D cmpl-float Compares the float values in vy andvz and sets the integer value in vxaccordingly32D00 0607 - cmpl-float v0, v6, v7Compares the float values in v6 and v7 then sets v0accordingly. NaN bias is less-than, the instruction willreturn -1 if any of the parameters is NaN.2 E cmpg-float vx, vy,vzCompares the float values in vy andvz and sets the integer value in vxaccordingly3.2E00 0607 - cmpg-float v0, v6, v7Compares the float values in v6 and v7 then sets v0accordingly. NaN bias is greater-than, the instructionwill return 1 if any of the parameters is NaN.2F cmpl-doublevx,vy,vz Compares the double values in vy andvz2 and sets the integer value in vxaccordingly3.2F19 0608 - cmpl-double v25, v6, v8Compares the double values in v6,v7 and v8,v9 andsets v25 accordingly. NaN bias is less-than, theinstruction will return -1 if any of the parameters is NaN.30 cmpg-double vx,vy, vz Compares the double values in vy andvz2 and sets the integer value in vxaccordingly3.3000 080A - cmpg-double v0, v8, v10Compares the double values in v8,v9 and v10,v11 thensets v0 accordingly. NaN bias is greater-than, theinstruction will return 1 if any of the parameters is NaN.31 cmp-long vx, vy, vz Compares the long values in vy andvz and sets the integer value in vxaccordingly3. 3100 0204 - cmp-long v0, v2, v4Compares the long values in v2 and v4 then sets v0 accordingly.32 if-eq vx,vy,target Jumps to target if vx==vy2. vx and vyare integer values. 32b3 6600 - if-eq v3, v11, 0080 // +0066Jumps to the current position+66H words if v3==v11. 0080 is the label of the target instruction.33 if-ne vx,vy,target Jumps to target if vx!=vy2. vx and vyare integer values. 33A3 1000 - if-ne v3, v10, 002c // +0010Jumps to the current position+10H words if v3!=v10. 002c is the label of the target instruction.34 if-lt vx,vy,target Jumps to target is vx<vy2. vx and vyare integer values. 3432 CBFF - if-lt v2, v3, 0023 // -0035Jumps to the current position-35H words if v2<v3. 0023 is the label of the target instruction.35 if-ge vx, vy,target Jumps to target if vx>=vy2. vx and vyare integer values. 3510 1B00 - if-ge v0, v1, 002b // +001bJumps to the current position+1BH words if v0>=v1. 002b is the label of the target instruction.36 if-gt vx,vy,target Jumps to target if vx>vy2. vx and vyare integer values. 3610 1B00 - if-ge v0, v1, 002b // +001bJumps to the current position+1BH words if v0>v1. 002b is the label of the target instruction.37 if-le vx,vy,target Jumps to target if vx<=vy2. vx and vyare integer values. 3756 0B00 - if-le v6, v5, 0144 // +000bJumps to the current position+0BH words if v6<=v5.0144 is the label of the target instruction.38 if-eqz vx,target Jumps to target if vx==02. vx is aninteger value. 3802 1900 - if-eqz v2, 0038 // +0019Jumps to the current position+19H words if v2==0. 0038 is the label of the target instruction.39 if-nez vx,target Checks vx and jumps if vx isnonzero2. 3902 1200 - if-nez v2, 0014 // +0012Jumps to current position+18 words (hex 12) if v2 is nonzero. 0014 is the label of the target instruction.3 A if-ltz vx,target Checks vx and jumps if vx<02. 3A00 1600 - if-ltz v0, 002d // +0016Jumps to the current position+16H words if v0<0. 002dis the label of the target instruction.3 B if-gez vx,target Checks vx and jumps if vx>=02. 3B00 1600 - if-gez v0, 002d // +0016Jumps to the current position+16H words if v0 >=0.002d is the label of the target instruction.3 C if-gtz vx,target Checks vx and jumps if vx>02. 3C00 1D00 - if-gtz v0, 004a // +001dJumps to the current position+1DH words if v0>0. 004Ais the label of the target instruction.3 D if-lez vx,target Checks vx and jumps if vx<=02. 3D00 1D00 - if-lez v0, 004a // +001dJumps to the current position+1DH words if v0<=0.004A is the label of the target instruction.3Eunused_3E 3F unused_3F40 unused_4041 unused_4142 unused_4243 unused_4344 aget vx,vy,vz Gets an integer value of an objectreference array into vx. The array isreferenced by vy and is indexed by vz. 4407 0306 - aget v7, v3, v6Gets an integer array element. The array is referenced by v3 and the element is indexed by v6. The element will be put into v7.45 aget-wide vx,vy,vz Gets a long/double value oflong/double array into vx,vx+1. Thearray is referenced by vy and isindexed by vz. 4505 0104 - aget-wide v5, v1, v4Gets a long/double array element. The array is referenced by v1 and the element is indexed by v4. The element will be put into v5,v6.46 aget-objectvx,vy,vz Gets an object reference value of anobject reference array into vx. Thearray is referenced by vy and isindexed by vz.4602 0200 - aget-object v2, v2, v0Gets an object reference array element. The array isreferenced by v2 and the element is indexed by v0. Theelement will be put into v2.47 aget-booleanvx,vy,vz Gets a boolean value of a booleanarray into vx. The array is referencedby vy and is indexed by vz.4700 0001 - aget-boolean v0, v0, v1Gets a boolean array element. The array is referencedby v0 and the element is indexed by v1. The elementwill be put into v0.48 aget-byte vx,vy,vz Gets a byte value of a byte array into 4800 0001 - aget-byte v0, v0, v1vx. The array is referenced by vy and is indexed by vz. Gets a byte array element. The array is referenced by v0 and the element is indexed by v1. The element will be put into v0.49 aget-char vx, vy,vz Gets a char value of a characterarray into vx. The element is indexedby vz, the array object is referencedby vy 4905 0003 - aget-char v5, v0, v3Gets a character array element. The array is referenced by v0 and the element is indexed by v3. The element will be put into v5.4 A aget-short vx,vy,vz Gets a short value of a short arrayinto vx. The element is indexed by vz,the array object is referenced by vy.4A00 0001 - aget-short v0, v0, v1Gets a short array element. The array is referenced byv0 and the element is indexed by v1. The element willbe put into v0.4 B aput vx,vy,vz Puts the integer value in vx into anelement of an integer array. Theelement is indexed by vz, the arrayobject is referenced by vy.4B00 0305 - aput v0, v3, v5Puts the integer value in v2 into an integer arrayreferenced by v0. The target array element is indexedby v1.4 C aput-wide vx,vy,vz Puts the double/long value in vx,vx+1into a double/long array. The array isreferenced by vy, the element isindexed by vz.4C05 0104 - aput-wide v5, v1, v4Puts the double/long value in v5,v6 into a double/longarray referenced by v1. The target array element isindexed by v4.4 D aput-objectvx,vy,vzPuts the object reference value in vxinto an element of an object referencearray. The element is indexed by vz,the array object is referenced by vy.4D02 0100 - aput-object v2, v1, v0Puts the object reference value in v2 into an objectreference array referenced by v0. The target arrayelement is indexed by v1.4 E aput-booleanvx,vy,vzPuts the boolean value in vx into anelement of a boolean array. Theelement is indexed by vz, the arrayobject is referenced by vy.4E01 0002 - aput-boolean v1, v0, v2Puts the boolean value in v1 into an object referencearray referenced by v0. The target array element isindexed by v2.4F aput-byte vx,vy,vz Puts the byte value in vx into anelement of a byte array. The elementis indexed by vz, the array object isreferenced by vy. 4F02 0001 - aput-byte v2, v0, v1Puts the boolean value in v2 into a byte array referenced by v0. The target array element is indexed by v1.50 aput-char vx,vy,vz Puts the char value in vx into anelement of a character array. Theelement is indexed by vz, the arrayobject is referenced by vy. 5003 0001 - aput-char v3, v0, v1Puts the character value in v3 into a character array referenced by v0. The target array element is indexed by v1.51 aput-short vx,vy,vz Puts the short value in vx into anelement of a short array. The elementis indexed by vz, the array object isreferenced by vy. 5102 0001 - aput-short v2, v0, v1Puts the short value in v2 into a character array referenced by v0. The target array element is indexed by v1.52 iget vx, vy, field_id Reads an instance field into vx. Theinstance is referenced by vy. 5210 0300 - iget v0, v1, Test2.i6:I // field@0003 Reads field@0003 into v0 (entry #3 in the field id table). The instance is referenced by v1.53 iget-widevx,vy,field_id Reads an instance field into vx1. Theinstance is referenced by vy.5320 0400 - iget-wide v0, v2, T est2.l0:J // field@0004Reads field@0004 into v0 and v1 registers (entry #4 inthe field id table). The instance is referenced by v2.54 iget-objectvx,vy,field_id Reads an object reference instancefield into vx. The instance isreferenced by vy.iget-object v1, v2,LineReader.fis:Ljava/io/FileInputStream; // field@0002Reads field@0002 into v1 (entry #2 in the field idtable). The instance is referenced by v2.55 iget-booleanvx,vy,field_id Reads a boolean instance field intovx. The instance is referenced by vy.55FC 0000 - iget-boolean v12, v15, Test2.b0:Z //field@0000Reads the boolean field@0000 into v12 register (entry#0 in the field id table). The instance is referenced byv15.56 iget-bytevx,vy,field_id Reads a byte instance field into vx.The instance is referenced by vy.5632 0100 - iget-byte v2, v3, Test3.bi1:B // field@0001Reads the char field@0001 into v2 register (entry #1 inthe field id table). The instance is referenced by v3.57 iget-charvx,vy,field_id Reads a char instance field into vx.The instance is referenced by vy.5720 0300 - iget-char v0, v2, Test3.ci1:C // field@0003Reads the char field@0003 into v0 register (entry #3 inthe field id table). The instance is referenced by v2.58 iget-shortvx,vy,field_id Reads a short instance field into vx.The instance is referenced by vy.5830 0800 - iget-short v0, v3, Test3.si1:S // field@0008Reads the short field@0008 into v0 register (entry #8 inthe field id table). The instance is referenced by v3.59 iput vx,vy, field_id Puts vx into an instance field. Theinstance is referenced by vy. 5920 0200 - iput v0,v2, Test2.i6:I // field@0002Stores v0 into field@0002 (entry #2 in the field id table). The instance is referenced by v2.5 A iput-wide vx,vy,field_idPuts the wide value located in vx andvx+1 registers into an instance field.The instance is referenced by vy.5A20 0000 - iput-wide v0,v2, Test2.d0:D // field@0000Stores the wide value in v0, v1 registers intofield@0000 (entry #0 in the field id table). The instanceis referenced by v2.5 B iput-objectvx,vy,field_idPuts the object reference in vx into aninstance field. The instance isreferenced by vy.5B20 0000 - iput-object v0, v2,LineReader.bis:Ljava/io/BufferedInputStream; //field@0000Stores the object reference in v0 into field@0000 (entry#0 in the field table). The instance is referenced by v2.5 C iput-boolean vx,vy,field_idPuts the boolean value located in vxinto an instance field. The instance isreferenced by vy.5C30 0000 - iput-boolean v0, v3, Test2.b0:Z //field@0000Puts the boolean value in v0 into field@0000 (entry #0in the field id table). The instance is referenced by v3.5 D iput-bytevx,vy,field_idPuts the byte value located in vx intoan instance field. The instance isreferenced by vy.5D20 0100 - iput-byte v0, v2, T est3.bi1:B // field@0001Puts the boolean value in v0 into field@0001 (entry #1in the field id table). The instance is referenced by v2.5 E iput-charvx,vy,field_idPuts the char value located in vx intoan instance field. The instance isreferenced by vy.5E20 0300 - iput-char v0, v2, T est3.ci1:C // field@0003Puts the char value in v0 into field@0003 (entry #3 inthe field id table). The instance is referenced by v2.5F iput-shortvx,vy,field_id Puts the short value located in vx intoan instance field. The instance isreferenced by vy.5F21 0800 - iput-short v1, v2, Test3.si1:S // field@0008Puts the short value in v1 into field@0008 (entry #8 inthe field id table). The instance is referenced by v2.60 sget vx,field_id Reads the integer field identified bythe field_id into vx. 6000 0700 - sget v0, Test3.is1:I // field@0007Reads field@0007 (entry #7 in the field id table) into v0.61 sget-wide vx,field_id Reads the static field identified by thefield_id into vx and vx+1 registers.6100 0500 - sget-wide v0, Test2.l1:J // field@0005Reads field@0005 (entry #5 in the field id table) into v0and v1 registers.62 sget-objectvx,field_id Reads the object reference fieldidentified by the field_id into vx.6201 0C00 - sget-object v1,Test3.os1:Ljava/lang/Object; // field@000cReads field@000c (entry #CH in the field id table) intov1.63 sget-booleanvx,field_id Reads the boolean static fieldidentified by the field_id into vx.6300 0C00 - sget-boolean v0, Test2.sb:Z // field@000cReads boolean field@000c (entry #12 in the field idtable) into v0.64 sget-bytevx,field_id Reads the byte static field identifiedby the field_id into vx.6400 0200 - sget-byte v0, Test3.bs1:B // field@0002Reads byte field@0002 (entry #2 in the field id table)into v0.65 sget-charvx,field_id Reads the char static field identifiedby the field_id into vx.6500 0700 - sget-char v0, Test3.cs1:C // field@0007Reads byte field@0007 (entry #7 in the field id table)into v0.66 sget-shortvx,field_id Reads the short static field identifiedby the field_id into vx.6600 0B00 - sget-short v0, Test3.ss1:S // field@000bReads short field@000b (entry #BH in the field id table)into v0.67 sput vx, field_id Puts vx into a static field. 6700 0100 - sput v0, Test2.i5:I // field@0001Stores v0 into field@0001 (entry #1 in the field id table).68 sput-wide vx,field_id Puts vx and vx+1 into a static field. 6800 0500 - sput-wide v0, Test2.l1:J // field@0005Puts the long value in v0 and v1 into the field@0005static field (entry #5 in the field id table).69 sput-objectvx,field_id Puts object reference in vx into astatic field.6900 0c00 - sput-object v0,Test3.os1:Ljava/lang/Object; // field@000cPuts the object reference value in v0 into thefield@000c static field (entry #CH in the field id table).6 A sput-booleanvx,field_idPuts boolean value in vx into a staticfield.6A00 0300 - sput-boolean v0, Test3.bls1:Z //field@0003Puts the byte value in v0 into the field@0003 static field(entry #3 in the field id table).6 B sput-bytevx,field_idPuts byte value in vx into a static field. 6B00 0200 - sput-byte v0, Test3.bs1:B // field@0002Puts the byte value in v0 into the field@0002 static field(entry #2 in the field id table).6 C sput-charvx,field_idPuts char value in vx into a static field. 6C01 0700 - sput-char v1, Test3.cs1:C // field@0007Puts the char value in v1 into the field@0007 static field(entry #7 in the field id table).6 D sput-shortvx,field_idPuts short value in vx into a staticfield.6D00 0B00 - sput-short v0, Test3.ss1:S // field@000bPuts the short value in v0 into the field@000b staticfield (entry #BH in the field id table).6 E invoke-virtual{ parameters },methodtocallInvokes a virtual method withparameters.6E53 0600 0421 - invoke-virtual { v4, v0, v1, v2, v3},Test2.method5:(IIII)V // method@0006Invokes the 6th method in the method table with thefollowing arguments: v4 is the "this" instance, v0, v1,v2, and v3 are the method parameters. The methodhas 5 arguments (4 MSB bits of the second byte)5.6F invoke-super{parameter},methodtocall Invokes the virtual method of theimmediate parent class.6F10 A601 0100 invoke-super{v1},java.io.FilterOutputStream.close:()V //method@01a6Invokes method@01a6 with one parameter, v1.70 invoke-direct{ parameters },methodtocall Invokes a method with parameterswithout the virtual method resolution.7010 0800 0100 - invoke-direct {v1},ng.Object.<init>:()V // method@0008Invokes the 8th method in the method table with justone parameter, v1 is the "this" instance5.71 invoke-static{parameters},methodtocall Invokes a static method withparameters.7110 3400 0400 - invoke-static {v4},ng.Integer.parseInt:( Ljava/lang/String;)I //method@0034Invokes method@34 static method. The method iscalled with one parameter, v45.72 invoke-interface{parameters},methodtocall Invokes an interface method. 7240 2102 3154 invoke-interface {v1, v3, v4, v5},mwfw.IReceivingProtocolAdapter.receivePackage:(ILjava/lang/String;Ljava/io/InputStream;)Z //method@0221Invokes method@221 interface method usingparameters in v1,v3,v4 and v55.73 unused_7374 invoke-virtual/range{vx..vy},methodtocall Invokes virtual method with a range ofregisters. The instruction specifies thefirst register and the number ofregisters to be passed to the method.7403 0600 1300 - invoke-virtual {v19..v21},Test2.method5:(IIII)V // method@0006Invokes the 6th method in the method table with thefollowing arguments: v19 is the "this" instance, v20 andv21 are the method parameters.75 invoke-super/range Invokes the virtual method of theimmediate parent class. Theinstruction specifies the first registerand the number of registers to bepassed to the method.7501 A601 0100 invoke-super{v1},java.io.FilterOutputStream.close:()V //method@01a6Invokes method@01a6 with one parameter, v1.76 invoke-direct/range{vx..vy},methodtocall Invokes direct method with a range ofregisters. The instruction specifies thefirst register and the number ofregisters to be passed to the method.7603 3A00 1300 - invoke-direct/range{v19..21},ng.Object.<init>:()V // method@003aInvokes method@3A with 1 parameters (second byte ofthe instruction=03). The parameter is stored in v19(5th,6th bytes of the instruction).77 invoke-static/range{vx..vy},methodtoc Invokes static method with a range ofregisters. The instruction specifies thefirst register and the number of7703 3A00 1300 - invoke-static/range{v19..21},ng.Integer.parseInt:( Ljava/lang/String;)I // method@0034。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
目录
1 Dalvik 与 Smali..........................................................................................................................3 1.1 Dalvik 虚拟机概述........................................................................................................3 1.2 Dalvik 虚拟机与 Java 虚拟机的区别 ...........................................................................3 1.3 Smali 概述.....................................................................................................................3
3 Smali 语法规范与格式.............................................................................................................7 3.1 Dalvik 虚拟机字节码指令格式....................................................................................7 3.2 Dalvik 虚拟机字节码的类型、方法和字段的表示方法 ..........................................31 3.2.1 类型.................................................................................................................31 3.2.2 方法.................................................................................................................32 3.2.3 字段.................................................................................................................32 3.3 Dalvik 虚拟机字节码指令解析..................................................................................32 3.3.1 两种不同的寄存器表示法.............................................................................32 3.3.2 空指令.............................................................................................................33 3.3.3 数据操作指令.................................................................................................33 3.3.4 返回指令.........................................................................................................33 3.3.5 数据定义指令.................................................................................................34 3.3.6 锁指令.............................................................................................................34 3.3.7 实例操作指令.................................................................................................34 3.3.8 数组操作指令.................................................................................................34 3.3.9 异常指令.........................................................................................................35 3.3.10 跳转指令.........................................................................................................35 3.3.11 比较指令.........................................................................................................35 3.3.12 字段操作指令.................................................................................................36 3.3.13 方法调用指令.................................................................................................36 3.3.14 数据转换.........................................................................................................37 3.3.15 数据运算.........................................................................................................37 3.4 Smali 格式结构...........................................................................................................37 3.4.1 文件格式.........................................................................................................37 3.4.2 类的结构.........................................................................................................40
修改记录 文档创建 修订,完善
文档修改记录
提交人 吴Leabharlann 栩 邹军华版本 V1.0 V2.源 【Smali 学习笔记】
4.1.2 代码动态调试法.............................................................................................42 4.2 代码修改方法.............................................................................................................42 5 参考资料:.............................................................................................................................45
2 反编译、编译、打包...............................................................................................................3 2.1 使用 smali 和 baksmali.................................................................................................3 2.2 使用 apktool .................................................................................................................4 2.2.1 APK 组成 ...........................................................................................................4 2.2.2 使用方法...........................................................................................................4 2.2.3 反编译、编译过程...........................................................................................5 2.3 deodex...........................................................................................................................6