Android app for demonstrating memory safety behavior across different Android ROM configurations (Stock Android, LineageOS, /e/OS, GrapheneOS), with a focus on how each allocator responds to classic memory misuse patterns such as double-free, use-after-free, and heap overflow.
The test suite is derived from the hardened_malloc reference tests and is compiled as a native
shared library (libmemtests.so) loaded by the app at runtime.
app/: Android application source and native test library.docs/: project notes, methodology, and recorded results.
Build and install the app via Android Studio or Gradle:
./gradlew installDebugThen launch the app on the target device and trigger individual tests from the UI. Capture logcat output with:
adb logcat -s memtests memtests-ui- Test results are recorded manually in
docs/results.mdper ROM/device configuration. - The native test suite is derived from GrapheneOS/hardened_malloc reference tests; that repository is the authoritative source for the original test definitions.
- The native library is built with
-O0 -g3 -fno-omit-frame-pointerin debug builds to preserve stack frames in crash dumps.