SoTap Lightweight in-app JNI (.so) behavior logger for Andro... #1367
+92
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
SoTap: Android Native Telemetry Library
SoTap is a lightweight Android native (.so) library that logs the runtime behavior of other JNI (.so) libraries within the same app process. It is designed to aid reverse engineering and dynamic analysis by providing in-app native telemetry without root.
What It Does
🔧 Technical Details
Early JNI instrumentation via preloading: Insert
System.loadLibrary("sotap")
early (e.g., static initializer) so the logger initializes before other JNI libs. This ensures subsequent native loads and interactions are observable from process start.Resilient logging with multi-path fallback: Write logs to app-internal paths first, then external paths; if all fail due to sandbox/permissions, fall back to Logcat. This pattern guarantees telemetry even under restrictive storage conditions.
ABI-aligned deployment: Always deploy the ABI-matching build (
arm64-v8a
,armeabi-v7a
) so the loader can resolvelibsotap.so
and avoidUnsatisfiedLinkError
, ensuring the instrumentation is active.🤖 Agent Actions
I explored HackTricks to find the best place for SoTap-related content and confirmed there is no existing coverage of process-local, no-root JNI telemetry via preloaded .so. This technique is most relevant to Android native reversing/dynamic analysis, with secondary relevance to malware analysis. I updated existing pages accordingly (no new pages created):
What I updated
{{#ref}}
../../../mobile-pentesting/android-app-pentesting/reversing-native-libraries.md
{{#endref}}
Why these locations
References added
No other existing HackTricks content covered this lightweight, no-root, in-app JNI telemetry approach, so these additions fill that gap.
This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.
🗑️ File Cleanup