Anyone did the actual android anti-debug check. I know there are things like
IsDebuggerConnected()
boolean isDebuggable = (0 != (getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE));
I’m looking for something which is like ptrace using NDK or any other mechanism where the handle of the process cannot be debugged by others. Like, a self-debug in diff thread when the application starts which doesnot allow other debugger to get hold of the process.
Any insight on this will be very useful.
There is no way to reliably prevent debugging and reverse engineering your application. You can make it more difficult by obfiscation, but if it is worth to reverse engineer , it will be done ( Sovjet IT specialists did managed to reverse engineer System 360 and even patched it in machine code ) – so it is just not worth the effort.