What native obfuscation changes
Native code compiles to machine instructions, so obfuscation works on a different surface than the DEX transformations applied to Java and Kotlin. A protector usually changes a small set of things.
- Symbol stripping removes names. The dynamic symbol table keeps only the entries the loader needs, and the local symbols that labelled internal functions, file names and source paths are gone, so the listing arrives without an index.
- Control flow stops matching the source shape. A protector inserts dispatchers, opaque predicates and reordered blocks so that a decompiler emits branches that never execute and misses branches that do. The computation stays correct because the application still has to work.
- String transforms can hide selected literals. Follow each decoder and use site; clear strings elsewhere can still help.
- Import and call tables are altered. Some libraries resolve the functions they call at runtime through a lookup rather than a direct entry, which hides from the import table who they talk to.
What the ABI and calling convention fix in place
Use the documented ABI at platform boundaries, then inspect the conventions used by internal functions. On ARM, integer arguments travel in the first registers and further arguments go on the stack, the return value arrives in a defined register, and every call has to respect stack alignment and preserve a defined set of registers. Use the calling convention, callers and data flow to infer types, then validate them. Register use alone does not reveal a complete source-level type.
The loader-facing ELF structures provide starting points. Internal calls can use custom conventions or runtime symbol resolution. Inspect each boundary rather than assuming every internal function follows an exported interface.
Map JNI lookup and registration
JNI is the strongest of those constraints and the most useful in practice. JNI supports name lookup through Java_ exports and explicit registration through RegisterNatives. Inspect both paths, including registration after startup. Renaming classes in the DEX pass changes the expected spelling, and the two sides have to agree or the call fails at runtime.
Use those links to map entry points, then check the loader and initialization state that make them active. Read the Java declaration and descriptor for input and return types. Ordinary JNI uses JNIEnv* followed by an object or class reference; Android CriticalNative has a different ABI. Reading one of them tells you what data crosses the boundary in each direction, and locating the ones that carry interesting arguments tells you where the application's hidden work begins. A registered native entry can dispatch several operations. Find registration wherever it occurs, including later loading paths.
Narrowing the code that must be read
A shared library in a mobile application usually matters for a small part of one flow: a signing routine, a key schedule, a serializer, or a piece of request assembly. Mapping the JNI surface first converts an unbounded reading problem into a defined one.
Map the relevant function addresses, registration data and callers, then record inputs and outputs under controlled tests. The result is a set of functions with known inputs and outputs, sorted by how often they are called on the path you care about. Strings resolved at runtime add a second type of evidence: a hook on the routine that rebuilds a literal, or on the memory allocation that receives it, reveals the plaintext that the file withheld.
From there the reading effort goes to a handful of functions rather than the whole binary. When a function is short enough to follow by hand, the instruction listing is sufficient. When it is large and flattened, observations constrain the behavior to reproduce; test changed inputs and state before treating them as a general rule. The goal is a client that produces the same output as the app, and the values crossing the JNI boundary define that output precisely.
Technical sources
Related work
Reviewed 19 October 2026 · SReverse research desk