Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug,root检测存在问题 #1

Open
df13954 opened this issue Jun 5, 2024 · 0 comments
Open

bug,root检测存在问题 #1

df13954 opened this issue Jun 5, 2024 · 0 comments

Comments

@df13954
Copy link

df13954 commented Jun 5, 2024

代码中检测设备的属性:

int check_system_property(){
    char value[5] = {0};
    char value1[5] = {0};
    __system_property_get("ro.secure",value);
    LOGD("ro.secure : %s",value);
    __system_property_get("ro.debuggable",value1);
    LOGD("ro.debuggable : %s:",value);
    if(value[0] == 0x31 || value1[0] == 0x31)
        return 1;
    else
        return 0;

}

日志输出中LOGD("ro.debuggable : %s:",value);这里输出的是ro.secure的值,debug的值应该是value1

我查了资料ro.secure的值正常设备,应该是1,这里代码判断如果等于1,就是root。应该取反了。
在一个正常设备中,发现了root了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant