Mob devices grab info - kowwwalski/docs GitHub Wiki

Android devices

#!/bin/bash
#
vendor=$(adb shell getprop ro.product.manufacturer | tr -d '\r')
model=$(adb shell getprop ro.product.model | tr -d '\r')
serial=$(adb get-serialno | tr -d '\r')
imei=$(adb shell service call iphonesubinfo 1 | awk -F"'" 'NR>1 { gsub(/\./,"",$2); imei=imei $2 } END {print imei}' | tr -d ' ')
ram=$(adb shell "cat /proc/meminfo" | head -1 | awk '{printf "%.0f\n", $2/1024/1024}'i | bc -l)
#
echo -e "|| $vendor| $model| $serial| $imei| | | $ram GB||" >> ~/phones.csv

iOS devices

Apple Configurator 2 required

#!/bin/bash
#
cfgutil get deviceType >> ~/apple.txt
cfgutil get serialNumber >> ~/apple.txt
cfgutil get IMEI >> ~/apple.txt
cfgutil get totalDiskCapacity >> ~/apple.txt
echo ---- >> ~/apple.txt