Getting Android Device Identifier From ADB and Android SDK

前端 未结 12 1181
一生所求
一生所求 2021-01-30 17:24

I am looking for the easiest way to get a unique android device identifier from both the Android adb and the Android ADK itself.

For example, when i use the adb \'devi

12条回答
  •  忘掉有多难
    2021-01-30 17:50

    I use adb. First I list the attached device ID numbers with the following command:

    adb devices
    

    And the output will look something like this:

    List of devices attached
    YOGAA1BBB412    device
    

    From the previous output, you will need the device ID number (eg: YOGAA1BBB412). To get the Device ID, I use the following adb command:

    adb -s YOGAA1BBB412 shell getprop | grep product.model
    

    And the output looks like this:

    [ro.product.model]: [Lenovo YT3-X90F]
    

提交回复
热议问题