I have an android device, which when registered to an account renames itself after the account name. I need to get that name using adb.

3

There are 3 best solutions below

2
On

Try this:

./adb shell getprop

It returns all device properties which should also contain the name that you are looking for. I got multiple name properties:

[ro.product.name]: [TA-1032_00WW]
[ro.product.nickname]: [Nokia 3]
[ro.vendor.product.name]: [NE1_00WW_FIH]

I think you are looking for ro.product.nickname. You can get it with this command on Mac/Linux:

./adb shell getprop | grep "ro.product.nickname"

The Windows command should be similar. Something like this:

adb shell 
getprop | grep -e 'ro.product.nickname'
0
On

I think you can use the adb devices -l argument there to get the info and the you can just filter the output to obtain the model ej:

❯ adb devices -l
List of devices attached
16fb60660205           device usb:1245184X product:daisy model:Mi_A2_Lite device:daisy_sprout transport_id:7
9A101FFBA003K4         device usb:1179648X product:coral model:Pixel_4_XL device:coral transport_id:8
1
On

You can use

adb shell dumpsys bluetooth_manager

See full answer here: Find connected bluetooth device name using adb?