首页
社区
课程
招聘
未解决 [求助]frida引用枚举值,导致global reference table overflow (max=51200)
发表于: 2020-12-31 12:00 2511

未解决 [求助]frida引用枚举值,导致global reference table overflow (max=51200)

2020-12-31 12:00
2511

最近在用FRIDA修改安卓的的网络状态后,手机运行几个小时就出现异常,检测日志发现是JAVA的全局应用超过大小导致的,日志里出现 global reference table overflow (max=51200) ,请问要如何赋值,才能及时释放引用呢。代码是这样的:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
Java.perform(function () {
    var networkInfo = Java.use("android.net.NetworkInfo");
    var netmanager = Java.use("com.android.server.ConnectivityService");
    netmanager.getActiveNetworkInfo.implementation = function () {
        var netInfo = networkInfo.$new(1, 0, "WIFI", "subWifi");
        //var netState = Java.use("android.net.NetworkInfo$State");
        var netDetailedState = Java.use("android.net.NetworkInfo$DetailedState");
        netInfo.mIsAvailable.value = true;
        netInfo.setDetailedState(netDetailedState.CONNECTED.value,null,null);
        //netInfo.mState.value = netState.CONNECTED.value;
        //netInfo.mDetailedState.value = netDetailedState.CONNECTED.value;
        //console.log("getActiveNetworkInfo2 "+netInfo.toString());
        return netInfo;
    };

打印的日志如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
12-31 03:26:44.292 25573 26775 F art     : art/runtime/indirect_reference_table.cc:116] JNI ERROR (app bug): global reference table overflow (max=51200)
12-31 03:26:44.292 25573 26775 F art     : art/runtime/indirect_reference_table.cc:116] global reference table dump:
12-31 03:26:44.292 25573 26775 F art     : art/runtime/indirect_reference_table.cc:116]   Last 10 entries (of 51199):
12-31 03:26:44.292 25573 26775 F art     : art/runtime/indirect_reference_table.cc:116]     51198: 0x70e45128 android.net.NetworkInfo$DetailedState
12-31 03:26:44.292 25573 26775 F art     : art/runtime/indirect_reference_table.cc:116]     51197: 0x70e45128 android.net.NetworkInfo$DetailedState
12-31 03:26:44.292 25573 26775 F art     : art/runtime/indirect_reference_table.cc:116]     51196: 0x70e45128 android.net.NetworkInfo$DetailedState
12-31 03:26:44.292 25573 26775 F art     : art/runtime/indirect_reference_table.cc:116]     51195: 0x70e45128 android.net.NetworkInfo$DetailedState
12-31 03:26:44.292 25573 26775 F art     : art/runtime/indirect_reference_table.cc:116]     51194: 0x70e45128 android.net.NetworkInfo$DetailedState
12-31 03:26:44.292 25573 26775 F art     : art/runtime/indirect_reference_table.cc:116]     51193: 0x70e45128 android.net.NetworkInfo$DetailedState
12-31 03:26:44.292 25573 26775 F art     : art/runtime/indirect_reference_table.cc:116]     51192: 0x70e45128 android.net.NetworkInfo$DetailedState
12-31 03:26:44.292 25573 26775 F art     : art/runtime/indirect_reference_table.cc:116]     51191: 0x70e45128 android.net.NetworkInfo$DetailedState
12-31 03:26:44.292 25573 26775 F art     : art/runtime/indirect_reference_table.cc:116]     51190: 0x70e45128 android.net.NetworkInfo$DetailedState
12-31 03:26:44.292 25573 26775 F art     : art/runtime/indirect_reference_table.cc:116]     51189: 0x70e45128 android.net.NetworkInfo$DetailedState
12-31 03:26:44.292 25573 26775 F art     : art/runtime/indirect_reference_table.cc:116]   Summary:
12-31 03:26:44.292 25573 26775 F art     : art/runtime/indirect_reference_table.cc:116]         1 of com.android.server.power.PowerManagerService

[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)

收藏
免费 0
支持
分享
最新回复 (0)
游客
登录 | 注册 方可回帖
返回
//