Android_Anti_Debug icon indicating copy to clipboard operation
Android_Anti_Debug copied to clipboard

ptrace(PTRACE_TRACEME,0 ,0 ,0);这个方案确定好使?依然可以调试呀

Open huopochuan opened this issue 5 years ago • 1 comments

JNICALL Java_com_sec_gtoad_antidebug_MainActivity_stringFromPtrace( JNIEnv env, jobject / this */) { int check = ptrace(PTRACE_TRACEME,0 ,0 ,0); LOGI("ret of ptrace : %d",check); std::string hello = "Hello from ptrace"; if(check != 0){ hello = "Debug from ptrace"; } return env->NewStringUTF(hello.c_str()); }

huopochuan avatar Nov 28 '20 09:11 huopochuan

any updates on this? i find in a stackoverflow comment that ptrace command needs root accesss so this code snippet ptrace(PTRACE_TRACEME,0,0,0) , always gonna reurn -1(error) ... is there any other alternatives found?

bala-murugan-dev avatar May 29 '24 05:05 bala-murugan-dev