0x2 发现问题
先看看经过hex之后resources.arsc的apk文件反编译情况
apktool报错信息
I: Loading resource table...
Exception in thread "main" java.lang.NullPointerException
at brut.androlib.res.data.value.ResValueFactory.factory(ResValueFactory.java:70)
at brut.androlib.res.decoder.ARSCDecoder.readValue(ARSCDecoder.java:259)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:203)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:191)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:159)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:116)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:78)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:47)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:538)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:63)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:55)
at brut.androlib.Androlib.getResTable(Androlib.java:64)
at brut.androlib.ApkDecoder.setTargetSdkVersion(ApkDecoder.java:209)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:92)
at brut.apktool.Main.cmdDecode(Main.java:165)
at brut.apktool.Main.main(Main.java:81)
ShakaApktool报错信息
I: 常规资源列表...
I: 反编译资源文件...
I: 反编译 values */* XMLs...
Exception in thread "main" java.lang.NullPointerException
at b.a.d.d.b.c(Unknown Source)
at b.a.d.a.a.v.h(Unknown Source)
at b.a.d.a.a.u.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)
报错信息都是Exception in thread "main" java.lang.NullPointerException
这个应该很好理解空指针异常,为什么会出现这种情况呢,直接进行ShakaApktool或apktool源码调试来查找问题(怎么调试这里就不说了)
通过调试可以发现string反编译到最后直接就抛出了异常,那么知道具体问题出在哪里,那么我们就接着往下走吧