Files
Tricky-Addon-Update-Target-…/module/common/get_denylist.sh
KOWX712 596c92ba18 Read app from DenlyList
For Magisk only
2024-11-18 20:19:40 +08:00

20 lines
442 B
Bash

#!/system/bin/sh
if [ -f "/data/adb/apd" ] || [ -f "/data/adb/ksud" ]; then
exit 1
fi
MODPATH=${0%/*}
OUTPUT="$MODPATH/denylist"
# Get Magisk denylist
magisk --denylist ls 2>/dev/null | \
awk -F'|' '{print $1}' | \
grep -v "isolated" | \
sort | uniq > "$OUTPUT"
# Check if the output file is successfully created
if [ ! -s "$OUTPUT" ]; then
echo "Failed to retrieve Magisk denylist or no packages found." > "$OUTPUT"
exit 1
fi