Global Configuration

omvll.config

The global OMVLLConfig instance. Modify its attributes before returning from omvll_get_config() to apply global settings:

@lru_cache(maxsize=1)
def omvll_get_config() -> omvll.ObfuscationConfig:
    omvll.config.shuffle_functions = True
    omvll.config.inline_jni_wrappers = True
    omvll.config.pass_phases = {
        omvll.Pass.Arithmetic: {omvll.Phase.Early},
    }
    return MyConfig()
class omvll.OMVLLConfig

Global configuration object controlling O-MVLL’s overall behavior. Accessed via omvll.config.

property global_func_exclude

Function name substrings to exclude from all obfuscation passes.

Default: [].

Type:

list[str]

property global_mod_exclude

Module name substrings to exclude from all obfuscation passes. A module whose path contains any of these strings is skipped entirely. For example, adding "b/" would exclude a module at a/b/c/d.cpp.

Default: [].

Type:

list[str]

property inline_jni_wrappers

Force inlining of JNI C++ wrapper methods such as:

const jchar* GetStringChars(jstring string, jboolean* isCopy)
{ return functions->GetStringChars(this, string, isCopy); }

Default: True.

Type:

bool

property output_folder

Directory where O-MVLL writes output files (e.g. log files). Created automatically if it does not exist. An empty string disables file output.

Default: "".

Type:

str

property pass_phases

Maps each pass to the LLVM pipeline phase(s) it runs in. Passes absent from this dictionary default to Early.

omvll.config.pass_phases = {
    omvll.Pass.Arithmetic:       {omvll.Phase.Early},
    omvll.Pass.BreakControlFlow: {omvll.Phase.Last},
    omvll.Pass.StringEncoding:   {omvll.Phase.Early, omvll.Phase.Last},
}
Type:

dict[Pass, set[Phase]]

property probability_seed

Seed for the random number generator used by probability-based passes (e.g. BasicBlockDuplicateWithProbability). A fixed seed makes obfuscation output deterministic across builds.

Default: 1.

Type:

int

property shuffle_functions

Randomize the order of functions within each module so that two builds of the same source do not place functions at the same relative positions.

Default: True.

Type:

bool

Pass Phases

class omvll.Phase(self: omvll.Phase, value: int)

Enum representing the two LLVM optimization pipeline phases where obfuscation passes can be registered. Used as values in pass_phases.

Early

Runs before LLVM’s optimizer. Default phase for all passes.

Last

Runs after LLVM’s optimizer.

Members:

Early

Last

class omvll.Pass(self: omvll.Pass, value: int)

Enum representing all available obfuscation passes. Used as keys in pass_phases.

Value

Corresponding callback

Pass.AntiHook

anti_hooking()

Pass.Arithmetic

obfuscate_arithmetic()

Pass.BasicBlockDuplicate

basic_block_duplicate()

Pass.BreakControlFlow

break_control_flow()

Pass.Cleaning

(ObjC metadata cleaner — no callback)

Pass.ControlFlowFlattening

flatten_cfg()

Pass.FunctionOutline

function_outline()

Pass.IndirectBranch

indirect_branch()

Pass.IndirectCall

indirect_call()

Pass.OpaqueConstants

obfuscate_constants()

Pass.OpaqueFieldAccess

obfuscate_struct_access(), obfuscate_variable_access()

Pass.StringEncoding

obfuscate_string()

Members:

AntiHook

FunctionOutline

StringEncoding

OpaqueFieldAccess

BasicBlockDuplicate

ControlFlowFlattening

BreakControlFlow

OpaqueConstants

Arithmetic

IndirectCall

IndirectBranch

Cleaning