Created
October 6, 2020 13:26
-
-
Save letroll/115e552fb0ba113ba11a69a7df17b886 to your computer and use it in GitHub Desktop.
[android device information] get android device information with adb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#adb shell getprop gsm.baseband.imei | |
#adb shell "service call iphonesubinfo 1 | cut -c 52-66 | tr -d '.[:space:]'" | |
#!/bin/bash | |
# Get the device properties | |
adb shell getprop | grep "model\|version.sdk\|manufacturer\|ro.serialno\|product.name\|brand\|version.release\|build.id\|security_patch" | sed 's/ro\.//g' | |
# get the device ime | |
echo "[device.imei]: [$(adb shell service call iphonesubinfo 1 | awk -F "'" '{print $2}' | sed '1 d'| tr -d '\n' | tr -d '.' | tr -d ' ')]" | |
# get the device phone number | |
echo "[device.phonenumber]: [$(adb shell service call iphonesubinfo 19 | awk -F "'" '{print $2}' | sed '1 d'| tr -d '\n' | tr -d '.' | tr -d ' ')]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment