File tree Expand file tree Collapse file tree 2 files changed +10
-17
lines changed
Expand file tree Collapse file tree 2 files changed +10
-17
lines changed Original file line number Diff line number Diff line change @@ -26,13 +26,15 @@ download() {
2626}
2727
2828get_xposed () {
29- touch " $XPOSED "
29+ mkdir -p " $MODPATH /tmp"
30+ touch " $XPOSED " " $SKIPLIST "
3031 pm list packages -3 | cut -d' :' -f2 | grep -vxF -f " $SKIPLIST " | grep -vxF -f " $XPOSED " | while read -r PACKAGE; do
31- APK_PATH=$( pm path " $PACKAGE " | grep " base.apk" | cut -d' :' -f2 | tr -d ' \r' )
32- if [ -n " $APK_PATH " ]; then
33- if aapt dump xmltree " $APK_PATH " AndroidManifest.xml 2> /dev/null | grep -qE " xposed.category|xposeddescription" ; then
34- echo " $PACKAGE " >> " $XPOSED "
35- fi
32+ APK_PATH=$( pm path " $PACKAGE " 2> /dev/null | head -n1 | cut -d: -f2)
33+ [ -z " $APK_PATH " ] && continue
34+ if unzip -p $APK_PATH AndroidManifest.xml | tr -d ' \0' | grep -q " xposedmodule" ; then
35+ echo " $PACKAGE " >> " $XPOSED "
36+ else
37+ echo " $PACKAGE " >> " $SKIPLIST "
3638 fi
3739 done
3840 cat " $XPOSED "
Original file line number Diff line number Diff line change 6767
6868# Optimization
6969OUTPUT_APP=" $MODPATH /webui/applist.json"
70- OUTPUT_SKIP=" $MODPATH /common/tmp/skiplist"
71- OUTPUT_XPOSED=" $MODPATH /common/tmp/xposed"
7270
7371until [ " $( getprop sys.boot_completed) " = " 1" ]; do
7472 sleep 1
8684
8785# Initialize cache files to save app list and skip list
8886echo " [" > " $OUTPUT_APP "
89- echo " # This file is generated from service.sh to speed up load time" > " $OUTPUT_SKIP "
9087
9188# Get list of third party apps and specific system apps, then cache app name
9289# Check Xposed module
@@ -99,17 +96,11 @@ echo "# This file is generated from service.sh to speed up load time" > "$OUTPUT
9996 APP_NAME=$( aapt dump badging " $APK_PATH " 2> /dev/null | grep " application-label:" | sed " s/application-label://g; s/'//g" | tr -d ' \n' )
10097 [ -z " $APP_NAME " ] && APP_NAME=" $PACKAGE "
10198 echo " {\" app_name\" : \" $APP_NAME \" , \" package_name\" : \" $PACKAGE \" }," >> " $OUTPUT_APP "
102-
103- # Check if app is Xposed module and add to skip list if not
104- touch " $OUTPUT_XPOSED "
105- if aapt dump xmltree " $APK_PATH " AndroidManifest.xml 2> /dev/null | grep -qE " xposed.category|xposeddescription" ; then
106- echo " $PACKAGE " >> " $OUTPUT_XPOSED "
107- else
108- echo " $PACKAGE " >> " $OUTPUT_SKIP "
109- fi
11099done
111100
112101sed -i ' $ s/,$//' " $OUTPUT_APP "
113102echo " ]" >> " $OUTPUT_APP "
114103
104+ sh " $MODPATH /common/get_extra.sh" --xposed > /dev/null 2>&1 &
105+
115106[ -f " $MODPATH /action.sh" ] && rm -rf " /data/adb/modules/TA_utl"
You can’t perform that action at this time.
0 commit comments