Meituan-Dianping / Robust

Robust is an Android HotFix solution with high compatibility and high stability. Robust can fix bugs immediately without a reboot.
Apache License 2.0
4.42k stars 807 forks source link

修复Auto-Patch插件中对新增class的继承或实现方法名没混淆的bug #239

Closed limengyun2008 closed 6 years ago

limengyun2008 commented 6 years ago

这个bug是这么发现的 retrofit2 有这么一个接口

public interface Callback {
  void onResponse(Call call, SsResponse response);
  void onFailure(Call call, Throwable t);
}

混淆后假设 onResponse 变成 a, onFailure变成 b

原来的接口实现是OldCallback,现在要在某些情况下用Patch新增的NewCallback 这样NewCallback中的onResponse和onFailure必须被混淆成a和b。

但现有逻辑smali混淆过后onResponse和onFailure函数名仍然是明文。

Change-Id: Ic4f8226bd201ed48d06cc826723c767319a5a96d