-
-
Notifications
You must be signed in to change notification settings - Fork 12.2k
Description
For testing purpose
shell getprop ro.product.model
returns models as SM-G960F (Galaxy S9) for samsung devices.
Things like Motorola return readable user-friendly names, i.e. Motorola E4 Plus.
But sometimes they don't: XT1635-02 (Motorola Z Play).
I remember all models which i work with by heart. But eye catches easily when you have window named Samsung Galaxy S6 Edge+ (SM-G928F)
shell settings get secure bluetooth_name
returns almost on every device (Galaxy S4 mini is still GT-9195. But it's initially called like that so doesn't matter) its name if it wasn't changed by user.
How reasonable is getting the name from settings?
It's kind of slow. Or maybe i'm doing that wrong. Because if you make loop which gets info about all connected devices
#!/bin/bash
for serial in $(adb devices | awk 'NR>1{print $1}');
do
echo $(adb -s $serial shell settings get secure bluetooth_name | sed "s/\\r//g")
done
it would work significantly slower than
#!/bin/bash
for serial in $(adb devices | awk 'NR>1{print $1}');
do
echo $(adb -s $serial shell getprop ro.product.model | sed "s/\\r//g")
done