I have been busy in recent months and haven’t written an article for a long time
Now security issues are more and more concerned, how to protect, many manufacturers have launched their own reinforcement scheme.
Here is a set of anti – debugging methods that I developed myself during the development process.
if (Debug.isDebuggerConnected()) {
throw RuntimeException("don't do no no")}Copy the code
Write the above code as a Kotlin inline method, woven in at various points in the business process
inline fun check(a) {
if (Debug.isDebuggerConnected()) {
throw RuntimeException("don't do no no")}}Copy the code
. check() ...Copy the code
That would drive most debugging people crazy