feat(logging): per-UID NDJSON on external storage
Move debug diagnostics off /data/local/tmp/teesim to /data/media/0/TEESimulator (visible at /sdcard/TEESimulator), so users can pull them without a root explorer. The logging code runs in the keystore SELinux domain, so a debug-only media_rw_data_file grant plus a debug-only diag.sh fragment gate the plane: diag.sh's presence is the signal service.sh (setup) and action.sh (export) test. customize.sh extracts diag.sh on debug installs or sweeps the dir on release, since the release keystore domain cannot remove it itself. Replace the per-call .bin parcel dumps (a fresh undecodable file per generateKey) with one NDJSON record per event on the UID's own file, carrying decoded fields plus the raw parcel as base64 for the offline parsers. computeIfAbsent makes per-UID writer creation atomic.
This commit is contained in:
+1
-1
@@ -158,7 +158,7 @@ deploy_zip() {
|
||||
|
||||
if [[ "$CLEAR_LOGS" == true ]]; then
|
||||
bold "==> Clearing per-UID diagnostic logs"
|
||||
adb shell "rm -f /data/local/tmp/teesim/teesim-uid-*" 2>/dev/null || true
|
||||
adb shell "rm -rf /data/media/0/TEESimulator /data/local/tmp/teesim" 2>/dev/null || true
|
||||
fi
|
||||
|
||||
bold "==> Deploying $name"
|
||||
|
||||
Reference in New Issue
Block a user