Android ADB commands to get the device properties

后端 未结 4 1687
独厮守ぢ
独厮守ぢ 2020-12-02 04:53

I am trying to get the device properties from ADB commands. I can how ever get those values by running sample android application. How ever I wish to get using adb shell com

4条回答
  •  一个人的身影
    2020-12-02 05:46

    For Power-Shell

    ./adb shell getprop | Select-String -Pattern '(model)|(version.sdk)|(manufacturer)|(platform)|(serialno)|(product.name)|(brand)'
    

    For linux(burrowing asnwer from @0x8BADF00D)

    adb shell getprop | grep "model\|version.sdk\|manufacturer\|hardware\|platform\|revision\|serialno\|product.name\|brand"
    

    For single string find in power shell

    ./adb shell getprop | Select-String -Pattern 'model'
    

    or

    ./adb shell getprop | Select-String -Pattern '(model)'
    

    For multiple

    ./adb shell getprop | Select-String -Pattern '(a|b|c|d)'
    

提交回复
热议问题