文章

被hook恶搞

被hook恶搞

hook

Fatal Exception: java.lang.IllegalArgumentException: result has type long, got java.lang.String at android.os.BaseBundle.getLong(<Xposed>)

报错堆栈:
fyh0o
疑问:

  1. 代码调用是在 Log 输出时调用,但线上包不会输出 Log
  2. ReferrerDetails�的 getInstallBeginTimestampSeconds 逻辑,即使存了 String 值,获取到的也是 0L 默认值,不会崩溃
    • 看了代码是报错在 Google Install Referer 中
1
2
3
public long getInstallBeginTimestampSeconds() {
    return this.mOriginalBundle.getLong("install_begin_timestamp_seconds");
}
  • getLong 逻辑
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
public long getLong(String key) {
    unparcel();
    return getLong(key, 0L);
}
public long getLong(String key, long defaultValue) {
    unparcel();
    Object o = mMap.get(key);
    if (o == null) {
        return defaultValue;
    }
    try {
        return (Long) o;
    } catch (ClassCastException e) {
        typeWarning(key, o, "Long", defaultValue, e);
        return defaultValue;
    }
}
  1. 再加上上面堆栈有带 Xposed 字眼,可以推测这是有人在用 Xposed 框架恶搞我们的 APP
本文由作者按照 CC BY 4.0 进行授权