Skip to content

Commit d69d762

Browse files
committed
Test version (Fix #8)
1 parent 85877f0 commit d69d762

File tree

2 files changed

+22
-21
lines changed

2 files changed

+22
-21
lines changed

common/functions.sh

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -226,18 +226,7 @@ prop_process() {
226226
done <$1
227227
}
228228

229-
# Check available
230-
q=$(find /system -name "apns-conf.xml" -type f)
231-
232-
if [ -z "$q" ]; then
233-
ui_print "- This operating ROM is not supported."
234-
ui_print " 目标 ROM 不受支持!"
235-
ui_print "- We hope to collect some information to help us. To confirm the problem, the collected information will be output to /sdcard/$MODID-debug.log. You can choose whether to send the log to the developer after reading the log file."
236-
ui_print " 我们希望收集一些信息以帮助我们确认这个问题,收集的信息将会输出到 /sdcard/unsupportedrom-debug.log。您可以在阅读 log 后选择是否发送 log 给开发者。"
237-
debug_log unsupportedrom
238-
abort
239-
fi
240-
229+
# Check MIUI
241230
MIUI=$(grep_prop "ro.miui.ui.version.*")
242231
MIUI_framework=$(pm list packages | grep com.xiaomi.xmsf)
243232
if [ $MIUI ]; then
@@ -260,6 +249,26 @@ if [ $MIUI ]; then
260249
fi
261250
fi
262251

252+
# Check available
253+
detect_system=$(find /system -name "apns-conf.xml" -type f)
254+
extra_detect_product=$(find /product -name "apns-conf.xml" -type f)
255+
extra_detect_etc=$(find /etc -name "apns-conf.xml" -type f)
256+
257+
if [ -n "$detect_system" ]; then
258+
q="$detect_system"
259+
elif [ -n "$extra_detect_product"]; then
260+
q="$extra_detect_product"
261+
elif [ -n "$extra_detect_etc"]; then
262+
q="$extra_detect_etc"
263+
else
264+
ui_print "- This operating ROM is not supported."
265+
ui_print " 目标 ROM 不受支持!"
266+
ui_print "- We hope to collect some information to help us. To confirm the problem, the collected information will be output to /sdcard/$MODID-debug.log. You can choose whether to send the log to the developer after reading the log file."
267+
ui_print " 我们希望收集一些信息以帮助我们确认这个问题,收集的信息将会输出到 /sdcard/unsupportedrom-debug.log。您可以在阅读 log 后选择是否发送 log 给开发者。"
268+
debug_log unsupportedrom
269+
abort
270+
fi
271+
263272
# Set variables
264273
[ $API -lt 26 ] && DYNLIB=false
265274
[ -z $DYNLIB ] && DYNLIB=false
@@ -309,14 +318,6 @@ if [ -f $INFO ]; then
309318
rm -f $INFO
310319
fi
311320

312-
ui_print "- APN configuration file found in the following directory"
313-
ui_print " 在以下目录发现 APN 配置文件"
314-
ui_print " "
315-
ui_print "============="
316-
ui_print "$q"
317-
ui_print "============="
318-
ui_print " "
319-
320321
if [ $(echo "$q" | wc -l) -ge 2 ]; then
321322
ui_print "- Warning! APN profile found in multiple locations!"
322323
ui_print " 警告!在多个目录发现 APN 配置文件!"

common/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
if [ $REPLACEALL = "true" ]; then
2-
for i in $(find /system -name "apns-conf.xml" -type f); do
2+
for i in "$q"; do
33
APNCONFDIR="$MODPATH/${i%/*}"
44
if [[ ! -d "$APNCONFDIR" ]]; then
55
mkdir -p "$APNCONFDIR"

0 commit comments

Comments
 (0)