Copy protection for android ndk .so shared library

2019-08-17 05:02发布

问题:

I've built an app that uses my own NDK compiled .so shared library. I don't care about the copy protection or obfuscation of my app, it's just a client calling an API, but I do care of my native .so library.

Is there any way of copy protecting my native library in android so it can't be used outside my app?

Thanks.

回答1:

I'm pretty sure there's no fool-proof way to do that.

But you might be able to obfuscate it in some way or another, to make it a little bit more difficult.



回答2:

The simpliest way is to detect inside .so the package name of application and to fail if it mismatches allowed.