Read app from DenlyList

For Magisk only
This commit is contained in:
KOWX712
2024-11-18 20:19:40 +08:00
parent 1f3c1e960a
commit 596c92ba18
5 changed files with 81 additions and 6 deletions
+20
View File
@@ -0,0 +1,20 @@
#!/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