From e36c4e351c02fb8774c63d50fbcc650f14bb0598 Mon Sep 17 00:00:00 2001 From: Enginex0 Date: Fri, 6 Feb 2026 22:34:02 +0100 Subject: [PATCH] feat(module): add action.sh and uninstall.sh lifecycle scripts action.sh clears persistent key storage on user trigger. uninstall.sh kills daemon processes and removes all module artifacts while preserving target.txt and keybox config. --- module/action.sh | 11 +++++++++++ module/uninstall.sh | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100644 module/action.sh create mode 100644 module/uninstall.sh diff --git a/module/action.sh b/module/action.sh new file mode 100644 index 0000000..00ae7bf --- /dev/null +++ b/module/action.sh @@ -0,0 +1,11 @@ +#!/system/bin/sh +MODDIR=${0%/*} +CONFIG_DIR=/data/adb/tricky_store + +if [ -d "$CONFIG_DIR/persistent_keys" ]; then + rm -rf "$CONFIG_DIR/persistent_keys" + mkdir -p "$CONFIG_DIR/persistent_keys" + echo "Persistent key storage cleared" +else + echo "No persistent key storage found" +fi diff --git a/module/uninstall.sh b/module/uninstall.sh new file mode 100644 index 0000000..faf1ddc --- /dev/null +++ b/module/uninstall.sh @@ -0,0 +1,11 @@ +#!/system/bin/sh +MODDIR=${0%/*} +CONFIG_DIR=/data/adb/tricky_store + +# Kill daemon and supervisor +for pid in $(pidof TEESimulator) $(pidof supervisor) $(pidof daemon); do + kill -9 "$pid" 2>/dev/null +done + +rm -rf "$CONFIG_DIR/persistent_keys" +rm -f "$CONFIG_DIR/tee_status.txt"