mirror of
https://github.com/anomalyco/hex.git
synced 2026-11-27 07:58:01 +01:00
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Why: Google Play Protect blocks Hex Preview 2332 as a harmful app. libhexspeech.so linked
stock ggml code Hex never runs: ggml_abort's backtrace reads /proc/self/status for TracerPid,
forks, and execs gdb or lldb after prctl(PR_SET_PTRACER); ggml's backend registry can scan for
libggml-*.so (GGML_BACKEND_PATH, /proc/self/exe) and dlopen them. A keyboard's process should
not carry code that forks, executes programs, sets a ptracer or loads shared objects from a path.
What changed (android/app/src/main/cpp):
- ggml-no-debugger.patch, applied when CMake fetches whisper.cpp d1be6fd (patch -p1 -N -t -F0):
on Android, ggml_print_backtrace() prints only ggml's in-process unwinder backtrace.
Removed behaviour: the TracerPid check, pipe, fork, execlp of gdb/lldb, prctl(PR_SET_PTRACER)
and waitpid. A whisper.cpp bump the patch no longer fits fails configure, so the code can't
return silently.
- Hidden visibility, function and data sections, --gc-sections and --exclude-libs,ALL: only the
JNIEXPORT entry points are exported, so ggml's unused backend loader and the libc++
filesystem code it pulled in are dropped at link time. Removed: the 3,717 other exported
whisper/ggml/libc++ symbols, which nothing outside the library uses.
- check-imports.cmake (POST_BUILD) fails the build if libhexspeech.so imports fork, execlp,
execve, prctl, dlopen or system.
- .gitattributes: the patch's blank context lines are not whitespace errors.
- Debug, release (Play) and preview build the same project; Play and preview libraries are
byte-identical.
Verified (stripped arm64 release/preview libraries, dev
|
||
| .. | ||
| src | ||
| build.gradle.kts | ||
| proguard-rules.pro | ||