Skip to content

Commit

Permalink
update scripts/getinfo.sh
Browse files Browse the repository at this point in the history
Signed-off-by: yanbuyu <[email protected]>
  • Loading branch information
yanbuyu committed Apr 9, 2022
1 parent f871011 commit 6ac2fd9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/getinfo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down

0 comments on commit 6ac2fd9

Please sign in to comment.