alibaba / alibaba/AndFix

混淆之后,apkpatch的时候出现java.lang.RuntimeException

Open
#29 20 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
7k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

没混淆之前是没有问题的,但增加了混淆之后就出现异常

```
-keep class com.alipay.euler.andfix.AndFix { *; }
-keep class com.alipay.euler.andfix.annotation.MethodReplace { *; }
-keep class * extends java.lang.annotation.Annotation
-keepclasseswithmembernames class * {
native ;
}
```

是我操作出现了问题了吗? 这个问题搞了好久,求帮助

异常信息:

```
java.lang.RuntimeException: can,t add new Field:a(I), in class :Lcom/euler/a/a;
at com.euler.patch.diff.DiffInfo.addAddedFields(DiffInfo.java:77)
at com.euler.patch.diff.DexDiffer.compareField(DexDiffer.java:132)
at com.euler.patch.diff.DexDiffer.compareField(DexDiffer.java:101)
at com.euler.patch.diff.DexDiffer.compareField(DexDiffer.java:95)
at com.euler.patch.diff.DexDiffer.diff(DexDiffer.java:32)
at com.euler.patch.ApkPatch.doPatch(ApkPatch.java:68)
at com.euler.patch.Main.main(Main.java:97)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure with the reported obfuscation and keep rules, then trace the stack from ApkPatch.java through DexDiffer.java to DiffInfo.java, especially the addAddedFields path. Compare the obfuscated class and field data involved in the exception; done means apkpatch completes without the reported RuntimeException.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.