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
0

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

You can use
adb shell dumpsys bluetooth_manager
See full answer here: Find connected bluetooth device name using adb?
Try this:
It returns all device properties which should also contain the name that you are looking for. I got multiple name properties:
I think you are looking for ro.product.nickname. You can get it with this command on Mac/Linux:
The Windows command should be similar. Something like this: