#!/system/bin/sh # APK-bundled wrap.sh (2026-09-16, ARM64_TRANSLATION_LAYER.md - trace_agent # LD_PRELOAD deployment investigation). The loose-file mechanism # (/data/local/tmp/wrap.) was confirmed NOT invoked by zygote # on this specific Galaxy A9/Samsung build - a canary marker file placed by # that script never got created across multiple relaunches, root and # non-root, SELinux Enforcing and an attempted Permissive switch. This is # the OTHER officially documented NDK mechanism (developer.android.com/ndk/ # guides/wrap-script): a wrap.sh bundled alongside the app's own native # libraries, picked up automatically for a debuggable app. Points LD_PRELOAD # at the app's own private files dir (not this APK-bundled location) so the # actual libtrace_agent.so can still be updated by just `run-as`-copying a # freshly-built one in, without needing to reinstall the whole APK each # iteration. export LD_PRELOAD=/data/data/com.ea.games.nfs13_arm/files/libtrace_agent.so exec "$@"