Changed to model/host function

This commit is contained in:
Thandi M 2022-11-18 00:16:31 -05:00
parent 829c387dc4
commit 25d8e2f10e

View file

@ -1363,16 +1363,16 @@ get_model() {
if [[ -d /android/system/ || -d /system/app/ ]]; then if [[ -d /android/system/ || -d /system/app/ ]]; then
model="$(getprop ro.product.brand) $(getprop ro.product.model)" model="$(getprop ro.product.brand) $(getprop ro.product.model)"
elif [[ -f /sys/devices/virtual/dmi/id/board_vendor ||
-f /sys/devices/virtual/dmi/id/board_name ]]; then
model=$(< /sys/devices/virtual/dmi/id/board_vendor)
model+=" $(< /sys/devices/virtual/dmi/id/board_name)"
elif [[ -f /sys/devices/virtual/dmi/id/product_name || elif [[ -f /sys/devices/virtual/dmi/id/product_name ||
-f /sys/devices/virtual/dmi/id/product_version ]]; then -f /sys/devices/virtual/dmi/id/product_version ]]; then
model=$(< /sys/devices/virtual/dmi/id/product_name) model=$(< /sys/devices/virtual/dmi/id/product_name)
model+=" $(< /sys/devices/virtual/dmi/id/product_version)" model+=" $(< /sys/devices/virtual/dmi/id/product_version)"
elif [[ -f /sys/devices/virtual/dmi/id/board_vendor ||
-f /sys/devices/virtual/dmi/id/board_name ]]; then
model=$(< /sys/devices/virtual/dmi/id/board_vendor)
model+=" $(< /sys/devices/virtual/dmi/id/board_name)"
elif [[ -f /sys/firmware/devicetree/base/model ]]; then elif [[ -f /sys/firmware/devicetree/base/model ]]; then
model=$(< /sys/firmware/devicetree/base/model) model=$(< /sys/firmware/devicetree/base/model)