L-JINBIN / ApkSignatureKiller

一键破解APK签名校验
830 stars 223 forks source link

multidex issue: Unsigned short value out of range: 65536 #10

Open jiashie opened 2 years ago

jiashie commented 2 years ago

目标apk: Gboard_v11.6.06 classes.dex里的"方法数"已经达到上限65535,所以在dex里加入HookApplication会失败。可能这种情况需要把classes.dex里的一些类移到其它dex(建议最后一个dex?)里吧。至于移动哪些类,能自动处理吗

正在读取APK:Gboard_v11.6.06_align.apk --正在处理AndroidManifest.xml --正在处理classes.dex Exception in thread "main" org.jf.util.ExceptionWithContext: Exception occurred while writing code_item for method Lmwj;->values()[Lmwj; at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:825) at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:268) at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:246) at cc.binmt.signature.NKillSignatureTool.processDex(NKillSignatureTool.java:127) at cc.binmt.signature.NKillSignatureTool.process(NKillSignatureTool.java:68) at cc.binmt.signature.NKillSignatureTool.main(NKillSignatureTool.java:33) Caused by: org.jf.util.ExceptionWithContext: Error while writing instruction at code offset 0x2 at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1098) at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:821) ... 5 more Caused by: org.jf.util.ExceptionWithContext: Unsigned short value out of range: 65536 at org.jf.dexlib2.writer.DexDataWriter.writeUshort(DexDataWriter.java:119) at org.jf.dexlib2.writer.InstructionWriter.write(InstructionWriter.java:358) at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1058) ... 6 more