简体   繁体   中英

Is it possible to make .so library from java code?

I write programs on Java for Android. I am trying to hide my java code from decompilation. Is it possible to make .so library from java code?

To "hide my java code from decompilation" you should use proguard .

The ProGuard tool shrinks, optimizes, and obfuscates your code by removing unused code and renaming classes, fields, and methods with semantically obscure names. The result is a smaller sized .apk file that is more difficult to reverse engineer.

No obfuscation is perfect, but at least with proguard, the attacker can't get back to the same source code you started with.

And remember even with compiled c in a .so it can be reverse engineered, so it's not like that's a better solution.

In response to your question:

Is it possible to make .so library from java code?

No you can't, you have to use JNI and write C code that implements the native functions you define in your Java code. This way, the .so library is compiled from C code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM