当前位置: 移动技术网 > IT编程>移动开发>Android > 解决AndroidKiller APK 反编译失败,无法继续下一步源码反编译!

解决AndroidKiller APK 反编译失败,无法继续下一步源码反编译!

2019年09月29日  | 移动技术网IT编程  | 我要评论

乌兰浩特市政府网,淘宝网址导航,93号航班下载

报错背景

今天使用androidkiller v1.3.1,反编译一个apk,遇到如下报错:

当前 apktool 使用版本:android killer default apktool
正在反编译 apk,请稍等...
>i: 使用 shakaapktool 2.0.0-20150914
>i: 正在加载资源列表...
>i: 反编译 androidmanifest.xml 与资源...
>i: 正在从框架文件加载资源列表: c:\users\lijie01\apktool\framework\1.apk
>i: 常规资源列表...
>i: 反编译资源文件...
>i: 反编译 values */* xmls...
>exception in thread "main" b.a.a.e: resource spec: 0x01010571
>   at b.a.d.a.p.a(unknown source)
>   at b.a.d.a.q.a(unknown source)
>   at org.c.b.b.c.a(unknown source)
>   at com.rover12421.shaka.a.b.p.a(unknown source)
>   at b.a.d.a.p.b(unknown source)
>   at b.a.d.a.w.a(unknown source)
>   at b.a.d.a.w.a(unknown source)
>   at b.a.d.a.a.t.d(unknown source)
>   at b.a.d.a.a.t.a(unknown source)
>   at b.a.d.a.a.u.h(unknown source)
>   at b.a.d.a.a.w.a(unknown source)
>   at b.a.d.a.a.w.a(unknown source)
>   at b.a.d.a.a(unknown source)
>   at b.a.d.a.c(unknown source)
>   at b.a.a.b(unknown source)
>   at b.a.e.a(unknown source)
>   at b.b.a.a(unknown source)
>   at b.b.a.a(unknown source)
>   at com.rover12421.shaka.cli.main.main(unknown source)
apk 反编译失败,无法继续下一步源码反编译!

解决

参考这位大佬的博客: 进行解决:

下载新版本的apktool地址:https://down.52pojie.cn/tools/android_tools/

然后打开androidkiller_v1.3.1路径,进行替换,注意名字要改成和原来一样的名字。

更换好之后,重新运行androidkiller:

当前 apktool 使用版本:android killer default apktool
正在反编译 apk,请稍等...
>i: 使用 shakaapktool 3.0.0-20170503
>i: 正在加载资源列表...
>i: 反编译 androidmanifest.xml 与资源...
>i: 正在从框架文件加载资源列表: c:\users\lijie01\appdata\local\apktool\framework\1.apk
>i: 常规资源列表...
>i: 反编译资源文件...
>i: 反编译 values */* xmls...
>java.lang.nullpointerexception
>   at b.a.d.a.a.x.a(unknown source)
>   at b.a.d.a.a.x.a(unknown source)
>   at b.a.d.a.a(unknown source)
>   at b.a.d.a.c(unknown source)
>   at b.a.a.b(unknown source)
>   at b.a.c.a(unknown source)
>   at b.b.a.a(unknown source)
>   at b.b.a.a(unknown source)
>   at com.rover12421.shaka.cli.main.main(unknown source)
>exception in thread "main" java.lang.illegalargumentexception: expected element name 'style' and not 'resources'
>   at org.e.a.a.c(unknown source)
>   at b.a.d.a.a(unknown source)
>   at b.a.d.a.c(unknown source)
>   at b.a.a.b(unknown source)
>   at b.a.c.a(unknown source)
>   at b.b.a.a(unknown source)
>   at b.b.a.a(unknown source)
>   at com.rover12421.shaka.cli.main.main(unknown source)
apk 反编译失败,无法继续下一步源码反编译!

虽然还是报错,但是注意看报错信息,已经报不同错了,
>exception in thread "main" java.lang.illegalargumentexception: expected element name 'style' and not 'resources'

继续搜索这个错误,然后根据这个大佬的文章进行如下步骤:

使用androidkillerplugin

下载

下载地址:https://github.com/supperlitt/androidkillerplugin/releases

修改配置

注意,一定要修改正确这个路径,不然androidkillerplugin解压的文件不会解压到你本地的androidkiller路径下,还是会失败的。

使用

基本上都是报解压文件失败,这个时候自己手动压解一下就好。

手动压解过程:

在重新执行androidkillerplugin,

解压成功,

如果项目比较大,那么这个过程就会稍微耗时长。

反编译成功

在历史工程中重新打开一下,

反编译成功。

总结

学好使用原生apktool、dex2jar很重要,这样能更好理解android反编译,并且遇到问题自己也能解决,不会像上面那样 工具报错了,自己没有排错的能力,只能查搜索引擎。

后面会写文章介绍apktool、dex2jar的原理,喜欢可以给我留言、关注、点赞这样我就会有更大的动力,更快的出文章。

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网