alibaba / alibaba/AndFix

签名之后就错误了,不知道什么情况,自己也加上了混淆配置

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

Description

自己混淆应该是正确的。希望作者在Demo程序中加入避免混淆的代码。我加入的混淆代码是:

-keep class \* extends java.lang.annotation.Annotation
-keepclasseswithmembernames class \* {
native ;
}

错误日志为:
11-06 09:08:12.877: E/AndroidRuntime(3652): java.lang.IncompatibleClassChangeError: Couldn't find com.alipay.euler.andfix.annotation.MethodReplace.clazz
11-06 09:08:12.877: E/AndroidRuntime(3652): at libcore.reflect.AnnotationAccess.toAnnotationInstance(AnnotationAccess.java:659)
11-06 09:08:12.877: E/AndroidRuntime(3652): at libcore.reflect.AnnotationAccess.toAnnotationInstance(AnnotationAccess.java:641)
11-06 09:08:12.877: E/AndroidRuntime(3652): at libcore.reflect.AnnotationAccess.getDeclaredAnnotation(AnnotationAccess.java:171)
11-06 09:08:12.877: E/AndroidRuntime(3652): at java.lang.reflect.Method.getAnnotation(Method.java:300)
11-06 09:08:12.877: E/AndroidRuntime(3652): at com.alipay.euler.andfix.a.a(AndFixManager.java:199)
11-06 09:08:12.877: E/AndroidRuntime(3652): at com.alipay.euler.andfix.a.a(AndFixManager.java:179)
11-06 09:08:12.877: E/AndroidRuntime(3652): at com.alipay.euler.andfix.a.b.a(PatchManager.java:238)
11-06 09:08:12.877: E/AndroidRuntime(3652): at com.alipay.euler.andfix.a.b.b(PatchManager.java:165)
11-06 09:08:12.877: E/AndroidRuntime(3652): at com.ddsc.dotbaby.app.AppContext.onCreate(AppContext.java:87)
11-06 09:08:12.877: E/AndroidRuntime(3652): at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the obfuscated Demo build and the annotation lookup shown in AndFixManager.java, especially the calls from AppContext.onCreate and PatchManager.java. Reproduce the signed build with the reported keep rules, then verify that startup no longer raises IncompatibleClassChangeError while reading MethodReplace.clazz.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.