From 6ac2fd9e7bcb51068ae87ddb55be07e5024e6380 Mon Sep 17 00:00:00 2001 From: yanbuyu Date: Sun, 10 Apr 2022 05:58:53 +0800 Subject: [PATCH] update scripts/getinfo.sh Signed-off-by: yanbuyu --- scripts/getinfo.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/getinfo.sh b/scripts/getinfo.sh index df6c8d0..c1db8ba 100755 --- a/scripts/getinfo.sh +++ b/scripts/getinfo.sh @@ -44,7 +44,7 @@ fi getName "ro.product.model" $systemBuildProp MODEL="$getValue" ##获取build_xxx.prop路径 -vendorBuildProps=$(ls /vendor/*.prop 2>/dev/null) +vendorBuildProps=$(ls /vendor/*build*.prop | sed 's#/vendor/build.prop##' 2>/dev/null)" /vendor/build.prop" for buildProp in $vendorBuildProps;do getName "ro.product.vendor.device" $buildProp if [ "$getValue" ] && [ "$getValue" == "$DEVICE" ] && [ ! "$MODEL" ];then @@ -58,6 +58,12 @@ if [ ! "$MODEL" ];then getName "ro.product.vendor.model" $vendorBuildProp MODEL="$getValue" fi +##兼容sgsi +if [ ! "$MODEL" ];then + getName "ro.product.system.model" $systemBuildProp + MODEL="$getValue" +fi + ##判断是否为小米或红米 getName "ro.build.fingerprint=" $systemBuildProp fingerprint="$getValue"