-
Notifications
You must be signed in to change notification settings - Fork 14
/
inventory.sh
executable file
·43 lines (38 loc) · 1.31 KB
/
inventory.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
# Created by Sujay Davalgi
#
# Gets all the device details to be recorded in inventory list
#
# Usage: ./inventory.sh [<Device Serial>]
# Command line Arguments (Optional):
# $1 - Input the device serial
# IF the serial number is not provided, it will display the list of attached devices to pick from
. ./library/mainFunctions.sh
. ./library/textFormatting.sh
. ./library/deviceOperations.sh
if [ $# -lt 1 ]; then
getDeviceChoice
else
buildDeviceSnArray
deviceSerial="$1"
fi
displaySelectedDevice $deviceSerial
if [ $( isAdbDevice $deviceSerial ) == "true" ]; then
echo -e -n " Device Type : "
adb -s $deviceSerial wait-for-device shell getprop "gsm.current.phone-type"
echo -e -n " Serial : "
adb -s $deviceSerial wait-for-device get-serialno
echo -e -n " Manufacturer : "
adb -s $deviceSerial wait-for-device shell getprop "ro.product.manufacturer"
echo -e -n " Model : "
adb -s $deviceSerial wait-for-device shell getprop "ro.product.model"
echo -e -n " Android Version : "
adb -s $deviceSerial wait-for-device shell getprop "ro.build.version.release"
echo -e -n " Android Build : "
adb -s $deviceSerial wait-for-device shell getprop "ro.build.id"
echo -e -n " IMEI : "
adb -s $deviceSerial wait-for-device shell getprop "ro.gsm.imei"
echo ""
else
echo " Device is not in 'adb' mode"
fi