Merge pull request #324 from konimex/android2
Added and changed some Android commands
This commit is contained in:
commit
f3a907458f
10
neofetch
10
neofetch
|
@ -41,7 +41,10 @@ getos() {
|
||||||
getmodel() {
|
getmodel() {
|
||||||
case "$os" in
|
case "$os" in
|
||||||
"Linux")
|
"Linux")
|
||||||
if [ -f /sys/devices/virtual/dmi/id/product_name ] ||\
|
if [ -d "/system/app/" ] && [ -d "/system/priv-app" ]; then
|
||||||
|
model="$(getprop ro.product.brand) $(getprop ro.product.model)"
|
||||||
|
|
||||||
|
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="$(cat /sys/devices/virtual/dmi/id/product_{name,version} 2>/dev/null)"
|
model="$(cat /sys/devices/virtual/dmi/id/product_{name,version} 2>/dev/null)"
|
||||||
model="${model/To Be Filled*}"
|
model="${model/To Be Filled*}"
|
||||||
|
@ -640,7 +643,10 @@ getcpu() {
|
||||||
case "$os" in
|
case "$os" in
|
||||||
"Linux" | "Windows")
|
"Linux" | "Windows")
|
||||||
# Get cpu name
|
# Get cpu name
|
||||||
cpu="$(awk -F ': | @' '/model name|Processor/ {printf $2; exit}' /proc/cpuinfo)"
|
case "$distro" in
|
||||||
|
"Android"*) cpu="$(getprop ro.product.board)" ;;
|
||||||
|
*) cpu="$(awk -F ': | @' '/model name|Processor/ {printf $2; exit}' /proc/cpuinfo)" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
# Get cpu speed
|
# Get cpu speed
|
||||||
if [ -d "/sys/devices/system/cpu/cpu0/cpufreq" ]; then
|
if [ -d "/sys/devices/system/cpu/cpu0/cpufreq" ]; then
|
||||||
|
|
Reference in New Issue