From 6b28139c1f47cef51c1c0dfd7dec0d16c41d49ae Mon Sep 17 00:00:00 2001 From: "Hermes (pixel)" Date: Sun, 8 Nov 2026 14:36:58 +0100 Subject: [PATCH] Skills von pixel: software-development/android-debugging-from-termux --- .../android-debugging-from-termux/SKILL.md | 5 ++++ .../references/mvt-spyware-check.md | 25 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 skills/software-development/android-debugging-from-termux/references/mvt-spyware-check.md diff --git a/skills/software-development/android-debugging-from-termux/SKILL.md b/skills/software-development/android-debugging-from-termux/SKILL.md index e0c4bf3..15f6005 100644 --- a/skills/software-development/android-debugging-from-termux/SKILL.md +++ b/skills/software-development/android-debugging-from-termux/SKILL.md @@ -27,6 +27,11 @@ Key context that is easy to get wrong: exist — any tool that needs `sh` (most Java-based `app_process` wrappers: `content`, `cmd` on some builds) silently fails with "cannot execute: required file not found". - `logcat` works fine via absolute path. +- Hermes exports `LD_LIBRARY_PATH` pointing at its bundled runtime libs; Termux's own `python`/`pip` then load a mismatched libpython (`dlopen failed: cannot locate symbol _PyType_AllocNoTrack`). Run Termux Python tools with `env -u LD_LIBRARY_PATH …` (or `unset LD_LIBRARY_PATH` first in the command). Plain `python` in PATH is Hermes's venv (no pip) — use `/data/data/com.termux/files/usr/bin/python`. +- pip installs that compile Rust wheels (pydantic-core, cryptography) take 5–10 min on-device: start them with `terminal(background=true, notify=true)` and log to a file, because a foreground timeout kills pip mid-build. + +## Security / spyware check (MVT) +Install MVT into its own venv, check app IDs against the IOCs right away (works without ADB), then do the full `check-adb` once wireless debugging is paired (§4). Recipe and the IOC matcher are in `references/mvt-spyware-check.md`. Report to the user in German plain text: IOC hits, unknown-installer apps worth a look, and what was NOT covered yet. ## Tailscale / tailnet connectivity - Non-root Termux tailscaled usually runs `--tun=userspace-networking` → proxy-only (SOCKS5/HTTP on localhost); stock Android browsers don't use local proxies, so browser access to tailnet names needs the official Tailscale app (real VpnService) or a TUN-capable proxy client. diff --git a/skills/software-development/android-debugging-from-termux/references/mvt-spyware-check.md b/skills/software-development/android-debugging-from-termux/references/mvt-spyware-check.md new file mode 100644 index 0000000..18be77f --- /dev/null +++ b/skills/software-development/android-debugging-from-termux/references/mvt-spyware-check.md @@ -0,0 +1,25 @@ +# MVT (mvt-project) on the phone itself, from Termux + +## Install (verified) +```bash +unset LD_LIBRARY_PATH +pkg install -y python-pip python-cryptography rust # rust is needed for the pydantic-core build +/data/data/com.termux/files/usr/bin/python -m venv --system-site-packages --without-pip ~/mvt-venv +# run in the background, it takes several minutes: +env -u LD_LIBRARY_PATH ~/mvt-venv/bin/python -m pip install mvt > ~/mvt-install.log 2>&1 +env -u LD_LIBRARY_PATH ~/mvt-venv/bin/mvt-android download-iocs # -> ~/.local/share/mvt/indicators/*.stix2 +``` +- `--without-pip`: venv's ensurepip fails here. The system pip is reused through `--system-site-packages`. +- If even plain Termux python fails to `import array`, run `pkg upgrade python` (a partial upgrade leaves lib-dynload out of sync). + +## Quick check without ADB (app IDs vs IOCs) +```bash +/system/bin/pm list packages -f -i -U > ~/pkgs.txt +``` +Line format: `package:= installer= uid:`. Parse the package with `\.apk=(\S+)\s+installer`. Pull the IOC app IDs from the STIX `pattern` fields with the regex `app:id\s*=\s*'([^']+)'`, then intersect the two sets. +Also list the `/data/app` packages with `installer=null`. These are sideloaded via adb or restored from a backup, so mention them as "worth a look", not as a finding. +Limits: this check covers app IDs only. Processes, logs, SMS/URLs, files and settings need `mvt-android check-adb` (or androidqf) over a paired ADB session. + +## Full scan +Pair via wireless debugging (SKILL.md §4), then: +`env -u LD_LIBRARY_PATH ~/mvt-venv/bin/mvt-android check-adb --output ~/mvt-out`