Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Illegal Forward Reference #19

Open
barkatthemoon18 opened this issue Mar 28, 2021 · 2 comments
Open

Illegal Forward Reference #19

barkatthemoon18 opened this issue Mar 28, 2021 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@barkatthemoon18
Copy link

Greetings.

First off, great work! I started using enigma to obfuscate Strings and it worked perfectly so far, but when I use static initializer to load native library (NDK) it fails with the title's name.
Is there any way to prevent Enigma from obfuscate that static initializer without excluding the whole code, or obfuscate it as well?

Example error:

public class A {
  static { 
    System.loadLibrary("somelib"); <- Illegal Forward Reference
  }
}

Appreciate any guidance or help.

Thanks!

@christopherney
Copy link
Owner

Hi,

You can ignore the class with the JNI call by using the falling option:

enigma​.​ignoredClasses ​=​ [​"​com.your.package-name.A.java​"​]

@obirawa
Copy link

obirawa commented Apr 22, 2021

As a workaround, put the String as a constant in a dedicated class and add that class to the ignored classes

@christopherney christopherney added the help wanted Extra attention is needed label Jul 19, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants