From 335d6df3ab7663341dea876165a7acf1188541e5 Mon Sep 17 00:00:00 2001 From: Xu Tianliang Date: Wed, 19 Jan 2022 01:03:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=AE=A1=E7=90=86=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E6=AD=A3=E7=A1=AE=E5=AE=89=E8=A3=85=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 某些ROM中即使将apk文件复制到/system/app目录下,pm命令也无法识别出应用被安装. 故判断应用安装并不会返回预想的'package:/system/...',而是毫无输出从而返回错误. 故增加判断条件以正确安装管理应用 --- v2ray/scripts/start.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/v2ray/scripts/start.sh b/v2ray/scripts/start.sh index 79a6ee5..e0479a7 100644 --- a/v2ray/scripts/start.sh +++ b/v2ray/scripts/start.sh @@ -12,7 +12,9 @@ start_proxy () { # /system app can not run # check the app was installed to /data/ at ervery boot AppIn=`pm list packages -f | grep lintian` -if [[ "$AppIn" = package:/system* ]]; then +if [ $? == 1 ]; then + pm install /data/adb/modules/v2ray/system/app/Stk/v2manager.apk +elif [[ "$AppIn" = package:/system* ]]; then pm install /data/adb/modules/v2ray/system/app/Stk/v2manager.apk fi