Skip to content

Commit c91365a

Browse files
committed
scripts: generate app list on installation if it doesn't exist
1 parent 3e063b2 commit c91365a

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

module/customize.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
SKIPUNZIP=0
66
MODDIR="/data/adb/modules/system_app_nuker"
77
PERSIST_DIR="/data/adb/system_app_nuker"
8+
APP_LIST="$PERSIST_DIR/app_list.json"
89

910
# import config
1011
uninstall_fallback=false
@@ -199,6 +200,14 @@ while IFS='=' read key _; do
199200
done < "$PERSIST_DIR/config.sh"
200201
echo "[*] Tip: You could edit config.sh in /data/adb/system_app_nuker/config.sh"
201202
echo ""
203+
204+
#
205+
if [ ! -f "$APP_LIST" ]; then
206+
echo "[+] Generating app list..."
207+
. "$MODPATH/service.sh"
208+
echo ""
209+
fi
210+
202211
echo "[✓] System App Nuker has been set up successfully."
203212

204213
# warn KSU or APatch user if module would not be mounted globally

module/service.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ refresh_applist=true
1414
# === FUNCTIONS ===
1515

1616
# appt binary
17-
aapt() { "$MODDIR/common/aapt" "$@"; }
17+
if [ -f "$MODDIR/common/aapt" ]; then
18+
aapt() { "$MODDIR/common/aapt" "$@"; }
19+
elif [ -f "$MODPATH/common/aapt" ]; then
20+
aapt() { "$MODPATH/common/aapt" "$@"; }
21+
fi
22+
1823

1924
# create applist cache
2025
create_applist() {

0 commit comments

Comments
 (0)