关于android 生成apkapk反编译其中一个函数怎么有点复杂,谁帮我看下谢谢

 上传我的文档
 下载
 收藏
该文档贡献者很忙,什么也没留下。
 下载此文档
正在努力加载中...
android如何防止apk程序被反编译
下载积分:400
内容提示:android如何防止apk程序被反编译
文档格式:DOC|
浏览次数:18|
上传日期: 16:24:35|
文档星级:
该用户还上传了这些文档
android如何防止apk程序被反编译
官方公共微信Android apk反编译基础(apktoos)图文教程
本文主要介绍了Android apk反编译基础,使用的工具是apktoos,我们将用图文的方式说明apktoos工具的使用方式,你可以参考这个方法反编译其它APK试试看了
很久有写过一个广工图书馆主页一个类爬虫的demo(因为没接口,只能扒取静态网页),实现一些图书馆系统的一些功能。但最近发现图书馆系统在html页面上做了手脚,一页html页面中嵌入了几千行的注释,并有了自己的App,应该是为了增加扒取的流量成本来防止别人去扒取网页,不过加注释这手段就不敢恭维了,内网访问速度还行,但外网访问的话体验很差的。&
&如下图:一堆注释,导致一个网页要2MB
主页上的APP,必然是用了图书馆的后台接口和服务器交互的,从而想试试用反编译的手段来看看APP使用了什么接口。(另外更简单可以通过来给Android手机抓包分析其接口,再用Wireshark来分析tcp包,不过你想要知道全部接口的话,可能需要一个个接口去调用,会比较麻烦,采用反编译,可能集中在一个类中找到这些接口)。
首先要准备的工具:(了解更多反编译工具可以去看雪论坛下载或者学习-)APKTool是GOOGLE提供的APK编译工具,需要JAVA运行环境。可以对APK进行反编译,使用它可以将其反编译成非常接近打包前的原始格式。逆向AndroidManifest.xml、资源文件&resources.arsc以及将dex文件反编译成可以调试的smali文件。修改后,可以将其编译回apk文件。APKTool也可以用来汉化Android软件然后重新打包发布。&官方:/p/android-apktool/&
解压缩APKTool,并把要反编译的APK放入目录中
反编译:通过CMD进入上面的目录,执行命令:&apktool decode ZhaoBenShu.apk outdir&&
稍等片刻完成反编译,反编译后的文件会在outdir目录下。
& & ---outdir目录结构
res :资源文件,跟adnroid工程目录下的res基本一样,各种UI图片 &XML布局文件 &values xml文件(多了一个public.xml,有各个资源的id号(R.java中的id))smail:这个是重点文件夹,里面都是smail格式文件,是Dalvik虚拟机执行的操作码(Dalvik opcodes),这些操作吗有自己的语法,如果有学过JNI的话,&这些语法还是比较容易看懂和理解的。AndroidManifest.xml:Android工程下的AndroidManifest.xmlapktool.yml:用于重打包。
smail语法:(全部语法请)
smail中的数据类型签名跟java中的是一样的,如下。
B---byteC---charD---doubleF---floatI---intJ---longS---shortV---voidZ---boolean[XXX---arrayLxxx/yyy---object
&&& smail代码例子:
&初看smail文件,可能会觉得有一些凌乱。不过只要把几种语法弄懂了,就可以很好地阅读smail文件。&smail比较常用语法 ( 非全部)分为: 赋值,取值,函数调用,if语句,返回值等。赋值取值:例子:&iget-object v6, p0, Lcom/zbsh/code/clas/ClassSystem$9;-&val$vBarCodes:Ljava/util/ArrayL
iget个取值操作,i=instance,是用来instance filed(实例变量),object是类的意思。&v6是本地寄存器,p0在这里是代表this(在非static函数正代表this,在static函数中代表第一个参数)。Lcom/zbsh/code/clas/ClassSystem是表示包路径为&Lcom/zbsh/code/clas下的ClassSystem类,-&相当于C/C++的箭头操作符,后面是类中的变量或者方法vBarCodes是ClassSystem中的一个变量,Ljava/util/ArrayList是vBarCodes这个变量的类型 (是java中类的签名)
把ClassSystem中vBarCodes的值存放在寄存器v6中,vBarCodes的类型必须是对象,且是实例变量非静态变量。其中object可以是替换成基本数据类型:iget-boolean&&&iget-byte&&iget-char&&&iget-short等等。
sget- [type]用来获取static变量。(少了一个p0,因为静态变量是没有this的)
aget-[type]用来获取array类型。
[x]get vx, vy,把寄存器vy中的值赋给vx。
同样都有以下几种:iput-[type]sput-[type]aput-[type]也支持寄存器和寄存器之间的赋值,寄存器和变量之间的赋值。函数调用:&invoke-direct 调用private函数invoke-super 调用父类函数invoke-static 调用静态函数invoke-virtual 用于调用protected或public函数(相当于C++的虚函数,java的重载函数,只有protect和public能够重载)还有一种比较特殊的:invoke-xxxxx/range:参数多于5个的时候,要加/rang&例子:invoke-virtual {v4, v1}, Ljava/lang/S-&equals(Ljava/lang/O)Z&v4是this,代表&Ljava/lang/String的一个实例,v1是函数的第一个参数,在这里是调用放在V4寄存器中类型为Ljava/lang/String的实例的equal ()方法,并传入参数v1,返回的结果是Z类型,也就是boolean类型。如果是invoke-static{v4, v1},&不同遇在于invoke-virtual {v4, v1}的是v4不是this,而是第一个参数。v1是第二个参数,所调用的方法需要两个参数。
获取返回值:
move-result vx&:把上一个方法返回的值,存在寄存器 vx中。返回返回值:return-void&&&没返回。return vx&&&&&& 返回寄存器中vx的值 &。
if语句:if-eq vx,vy,target:eq:equal &如果vx==xy 跳转到target目标代码,否则执行顺序执行下一句代码if-ne vx,vy,target:nq :not equal &如果vx!=xy 跳转到target目标代码,否则执行顺序执行下一句代码&&&&&&&if-eqz vx,target:eqz : equal zero &如果vx==0 跳转到target目标代码,否则执行顺序执行下一句代码&&&&&if-nez vx,target:nez :not equal zero&&&如果vx!=0 跳转到target目标代码,否则执行顺序执行下一句代码& &&
读smail,找接口:&&&以搜索接口为例子:根据文件命名找到GropZbshFind.smali这个文件,应该就是搜索Activity。
在其中有一段代码:
代码如下:# virtual methods.method public onCreate(Landroid/os/B)V
.parameter "savedInstanceState"&/font&&/p&
&p&&font face="Courier New"&
invoke-super {p0, p1}, Lcom/zbsh/code/thrd/GroupA-&onCreate(Landroid/os/B)V&/font&&/p&
&p&&font face="Courier New"&
const-class v0, Lcom/zbsh/code/ZbshFindM&/font&&/p&
&p&&font face="Courier New"&
invoke-virtual {v0}, Ljava/lang/C-&getName()Ljava/lang/S&/font&&/p&
&p&&font face="Courier New"&
move-result-object v0&/font&&/p&
&p&&font face="Courier New"&
new-instance v1, Landroid/content/I&/font&&/p&
&p&&font face="Courier New"&
const-class v2, Lcom/zbsh/code/ZbshFindM&/font&&/p&
&p&&font face="Courier New"&
invoke-direct {v1, p0, v2}, Landroid/content/I-&(Landroid/content/CLjava/lang/C)V&/font&&/p&
&p&&font face="Courier New"&
invoke-virtual {p0, v0, v1}, Lcom/zbsh/code/GropZbshF-&startChildActivity(Ljava/lang/SLandroid/content/I)V&/font&&/p&
&p&&font face="Courier New"&
return-void.end method&
很明显是通过startActivity来启动ZbshFindMain这个Activity,
在ZbshFindMain中找到Onclick方法。
代码如下:# virtual methods.method public onClick(Landroid/view/V)V
.........省略一坨代码...........iget-object v0, v5, Lcom/zbsh/code/clas/ClassS-&ipAddress:Ljava/lang/S&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
.local v0, ipAddress:Ljava/lang/S
new-instance v5, Ljava/lang/StringB&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
invoke-static {v0}, Ljava/lang/S-&valueOf(Ljava/lang/O)Ljava/lang/S&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
move-result-object v6&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
invoke-direct {v5, v6}, Ljava/lang/StringB-&(Ljava/lang/S)V&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
const-string v6, "Find/GetBookList.aspx?a="&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
invoke-virtual {v5, v6}, Ljava/lang/StringB-&append(Ljava/lang/S)Ljava/lang/StringB&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
move-result-object v5&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
const-string v6, "gdut"&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
invoke-virtual {v5, v6}, Ljava/lang/StringB-&append(Ljava/lang/S)Ljava/lang/StringB&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
move-result-object v5&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
const-string v6, "&b="&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
invoke-virtual {v5, v6}, Ljava/lang/StringB-&append(Ljava/lang/S)Ljava/lang/StringB&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
move-result-object v6&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
iget-object v5, p0, Lcom/zbsh/code/ZbshFindMain$4;-&this$0:Lcom/zbsh/code/ZbshFindM&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
invoke-virtual {v5}, Lcom/zbsh/code/ZbshFindM-&getApplication()Landroid/app/A&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
move-result-object v5&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
check-cast v5, Lcom/zbsh/code/clas/ApplZ&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
iget-object v5, v5, Lcom/zbsh/code/clas/ApplZ-&iSystem:Lcom/zbsh/code/clas/ClassS&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
iget-object v5, v5, Lcom/zbsh/code/clas/ClassS-&searchType:Ljava/lang/S&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
invoke-virtual {v6, v5}, Ljava/lang/StringB-&append(Ljava/lang/S)Ljava/lang/StringB&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
move-result-object v5&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
const-string v6, "&c="&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
invoke-virtual {v5, v6}, Ljava/lang/StringB-&append(Ljava/lang/S)Ljava/lang/StringB&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
move-result-object v6&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
iget-object v5, p0, Lcom/zbsh/code/ZbshFindMain$4;-&this$0:Lcom/zbsh/code/ZbshFindM&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
invoke-virtual {v5}, Lcom/zbsh/code/ZbshFindM-&getApplication()Landroid/app/A&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
move-result-object v5&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
check-cast v5, Lcom/zbsh/code/clas/ApplZ&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
iget-object v5, v5, Lcom/zbsh/code/clas/ApplZ-&iSystem:Lcom/zbsh/code/clas/ClassS&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
iget-object v5, v5, Lcom/zbsh/code/clas/ClassS-&inputKeywords:Ljava/lang/S&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
invoke-virtual {v6, v5}, Ljava/lang/StringB-&append(Ljava/lang/S)Ljava/lang/StringB&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
move-result-object v5&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
const-string v6, "&d="&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
invoke-virtual {v5, v6}, Ljava/lang/StringB-&append(Ljava/lang/S)Ljava/lang/StringB&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
move-result-object v5&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
sget v6, Lcom/zbsh/code/clas/ClassDataP-&count:I&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
invoke-virtual {v5, v6}, Ljava/lang/StringB-&append(I)Ljava/lang/StringB&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
move-result-object v5&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
const-string v6, "&e="&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
invoke-virtual {v5, v6}, Ljava/lang/StringB-&append(Ljava/lang/S)Ljava/lang/StringB&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
move-result-object v5&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
sget v6, Lcom/zbsh/code/clas/ClassDataP-&page:I&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
invoke-virtual {v5, v6}, Ljava/lang/StringB-&append(I)Ljava/lang/StringB&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
move-result-object v5&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
invoke-virtual {v5}, Ljava/lang/StringB-&toString()Ljava/lang/S&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
move-result-object v3&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
.local v3, urlPath:Ljava/lang/S
iget-object v5, p0, Lcom/zbsh/code/ZbshFindMain$4;-&this$0:Lcom/zbsh/code/ZbshFindM&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
invoke-virtual {v5}, Lcom/zbsh/code/ZbshFindM-&getApplication()Landroid/app/A&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
move-result-object v5&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
check-cast v5, Lcom/zbsh/code/clas/ApplZ&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
iget-object v5, v5, Lcom/zbsh/code/clas/ApplZ-&iSystem:Lcom/zbsh/code/clas/ClassS&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
iget-object v6, p0, Lcom/zbsh/code/ZbshFindMain$4;-&this$0:Lcom/zbsh/code/ZbshFindM&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
iget-object v6, v6, Lcom/zbsh/code/ZbshFindM-&mUIHandler:Landroid/os/H&/font&&/pre&
&pre class="brush: highlight: [5, 15]; html-script: true"&&font face=""&
invoke-virtual {v5, v0, v3, v6}, Lcom/zbsh/code/clas/ClassS-&GetFindOnThread(Ljava/lang/SLjava/lang/SLandroid/os/H)V
上面这段代码,实现的是通过StringBuilder,通过append方法,拼成一个地址出来,再调用ClassS-&GetFindOnThread这个方法,传入参数,进行一个异步图书搜索的任务。
再从ClassDataParameter.smali中找到一些定义host地址常量。代码如下:.line 20
const-string v0, "&a href="http://59.41.253.11:7778/"&http://59.41.253.11:7778/&/a&"&/p&
sput-object v0, Lcom/zbsh/code/clas/ClassDataP-&IPADDRESS_TEL:Ljava/lang/S&/p&
const-string v0, "&a href="http://222.200.98.173:7778/"&http://222.200.98.173:7778/&/a&"&/p&
sput-object v0, Lcom/zbsh/code/clas/ClassDataP-&IPADDRESS_EDU:Ljava/lang/String
我们可以拼出图书搜索的接口是:
返回的是Json数据格式化下:代码如下:{
"error": "0",
"findtotal": "1612",
"findcache": "41.htm",
"find_list": [
"CtrlNo": "70658",
"Isbn": "7-301-03477-6 ",
"Title": "Java教程(Internet面向对象程序设计)",
"Author": "Mary Campione",
"Edition": " ",
"Publisher": "北大版",
"PubDate": "97.12"
"CtrlNo": "70657",
"Isbn": "7-301-03476-8 ",
"Title": "Java类手册",
"Author": "Patrick Chan",
"Edition": " ",
"Publisher": "北大版",
"PubDate": "97.12"
"CtrlNo": "605337",
"Isbn": "978-7-115-30271-7 ",
"Title": "Java 7基础教程= Java 7 for absolute beginners",
"Author": "(美) Jay Bryant著;李鹏, 韩智译",
"Edition": " ",
"Publisher": "人民邮电出版社",
"PubDate": "2013.01"
"CtrlNo": "604835",
"Isbn": "978-7-302-30346-6 ",
"Title": "Java改错学习法 [专著]",
"Author": "朱福喜编著",
"Edition": " ",
"Publisher": "清华大学出版社",
"PubDate": "2013"
其次:&&&&&&&&还可以通过反编译更强大的用处是用来修改smali代码,再重打包apk,来破解一些收费软件,去除广告之类,或者了解一些优秀软件的实现逻辑。Android如何防止apk程序被反编译—来自一个程序猿的心声(转的)_反编译吧_百度贴吧
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&签到排名:今日本吧第个签到,本吧因你更精彩,明天继续来努力!
本吧签到人数:0成为超级会员,使用一键签到本月漏签0次!成为超级会员,赠送8张补签卡连续签到:天&&累计签到:天超级会员单次开通12个月以上,赠送连续签到卡3张
关注:4,902贴子:
Android如何防止apk程序被反编译—来自一个程序猿的心声(转的)收藏
为Android应用开发者,不得不面对一个尴尬的局面,就是自己辛辛苦苦开发的应用可以被别人很轻易的就反编译出来,天下痛苦之事莫过于此啊,本文会介绍一种防止apk程序被反编译的方法,感兴趣的朋友可以了解下哦
作为Android应用开发者,不得不面对一个尴尬的局面,就是自己辛辛苦苦开发的应用可以被别人很轻易的就反编译出来。Google似乎也发现了这个问题,从SDK2.3开始我们可以看到在android-sdk-windows\tools\下面多了一proguard文件夹
roguard是一个java代码混淆的工具,通过proguard,别人即使反编译你的apk包,也只会看到一些让人很难看懂的代码,从而达到保护代码的作用。 下面具体说一说怎么样让SDK2.3下的proguard.cfg文件起作用,先来看看android-sdk-windows\tools\lib\proguard.cfg的内容: 复制代码代码如下:-optimizationpasses 5 -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -dontpreverify -verbose -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* -keep public class * extends android.app.Activity -keep public class * extends android.app.Application -keep public class * extends android.app.Service -keep public class * extends android.content.BroadcastReceiver -keep public class * extends android.content.ContentProvider -keep public class * extends android.app.backup.BackupAgentHelper -keep public class * extends android.preference.Preference -keep public class com.android.vending.licensing.ILicensingService -keepclasseswithmembernames class * { native &methods&; } -keepclasseswithmembernames class * { public &init&(android.content.Context, android.util.AttributeSet); } -keepclasseswithmembernames class * { public &init&(android.content.Context, android.util.AttributeSet, int); } -keepclassmembers enum * { public static **[] values(); public static ** valueOf(java.lang.String); } -keep class * implements android.os.Parcelable { public static final android.os.Parcelable$Creator *; }
从脚本中可以看到,混淆中保留了继承自Activity、Service、Application、BroadcastReceiver、ContentProvider等基本组件以及com.android.vending.licensing.ILicensingService, 并保留了所有的Native变量名及类名,所有类中部分以设定了固定参数格式的构造函数,枚举等等。(详细信息请参考&proguard_path&/examples中的例子及注释。) 让proguard.cfg起作用的做法很简单,就是在eclipse自动生成的default.properties文件中加上一句“proguard.config=proguard.cfg”就可以了 完整的default.properties文件应该如下: 复制代码代码如下:# This file is automatically generated by Android Tools. # Do not modify this file -- YOUR CHANGES WILL BE ERASED! # # This file must be checked in Version Control Systems. # # To customize properties used by the Ant build system use, # &build.properties&, and override values to adapt the script to your # project structure. # Project target. target=android-9 proguard.config=proguard.cfg
大功告成,正常的编译签名后就可以防止代码被反编译了。反编译经过代码混淆的apk得到的代码应该类似于下面的效果,是很难看懂的:
如果您使用的是2.3之前的SDK版本也没关系,把上面的proguard.cfg文件复制一份放到项目中,然后进行相同的操作即可
当爱一个人,却无法拥有他时,自己面对着一个选择:放弃还是继续。包括你在内的很多人都说:放弃吧,不要再浪费青春。但是,自己却明白,自己真的放不下。如果能放下,早都已经放下了,根本不会到现在的地步。所以,当黑夜来临的时候,我只能孤独的思念一个人。
登录百度帐号推荐应用
为兴趣而生,贴吧更懂你。或android APK文件反编译软件、APK反编译命令、APK反编译方法 - 极乐鸟网站(Will)
现在位置:
>正文_android APK文件反编译软件、APK反编译命令、APK反编译方法
android APK文件反编译软件、APK反编译命令、APK反编译方法
转载整理的一篇文章,多年以前大家都在研究的一个问题,也是一个对策与政策的抗衡。
这里说的就是android程序apk文件的反编译与防止apk文件被反编译。
这篇文章主要说的是APK文件的反编译方法。
jdgui这是一个很久之前大家都在使用的源码查看工具,之前我也用过,但总感觉有很多代码不能被很好地解析出来,今天要介绍的这个小工具也和jdgui差不多。下面就是详细APK反编译的步骤。
1.下载本文下面的附件APK_Decompiler.zip,解压并复制到你的&SDK_Path&\platform-tools目录下。(之前网络上的APK反编译教程中,需要下载3个小软件包,我这里为了方便就直接合成了,所以下载完就直接放到刚才说的目录下就OK了)
2.将要反编译的apk文件复制到&SDK_Path&\platform-tools目录下
3.在命令行窗口中,执行以下命令(其中,YourAPKNM是你要反编译的apk文件名,DestFolder是你要生成的文件夹名字)
apktool d YourAPKNM.apk DestFolder
执行之后,AndroidDemo目录中的所有.xml文件变成可读格式。
4.将要反编译的apk文件的文件扩展名改为zip,解压,得到classes.dex,并将classes.dex复制到&SDK_Path&\platform-tools目录下
5.在命令行窗口执行dex2jar classes.dex,执行之后,在当前目录中便生成了classes_dex2jar.jar
6.下载附件中的XJad2.2工具,解压,运行里面的XJad.exe,剩下的就不用说了,不用不知道,一用就知道了。。。
转载原文的地址如下,多谢分享。
.cn/s/blog_2aq9.html
分享本文至:
WRITTEN BY
极乐鸟博客http://jileniao.net
看了本文是不是觉得很赞,那就赶紧点击下面按钮分享给身边的朋友吧!
第三步执行完后,有这个错误。
Input file (xxx.apk) was not found or was not readable.
先记录下,后续会找到解决方法。}

我要回帖

更多关于 android apk 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信