Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get Vendor ID of Android powered device dynamically

Tags:

android

I want to get the Vendor ID of my Android Device through my code.

I have read this: http://developer.android.com/tools/device.html, but it does not tell you how to retrieve it through code.

I have even searched in android.os.Build.<attributes> but none of them gives the VendorID.

Can any one tell me?

like image 566
Shrikant Ballal Avatar asked Oct 04 '12 07:10

Shrikant Ballal


People also ask

How do I get a vendor ID?

Locate the unknown device, right-click on it, and select Properties. Navigate to the Details tab. Click on the Property dropdown menu, and select Hardware Ids from the list of options. Now, the number next to VID or VEN is the Vendor ID.

Where do I find the vendor ID on my phone?

Fortunately, there's an easy way to find the Vendor ID (and Product ID) of any device connected to a Windows PC. The device doesn't even need drivers for this approach to work: Start Device Manager. In the Hardware tree, right-click the hardware entry for the device for which the Vendor ID is to be determined.

How do I find the UUID on my Android phone?

As the requirement for most of applications is to identify a particular installation and not a physical device, a good solution to get unique id for an user if to use UUID class. String uniqueID = UUID. randomUUID(). toString();

How can you identify a uniquely device?

Settings. Secure#ANDROID_ID returns the Android ID as an unique for each user 64-bit hex string. It's known to be null sometimes, it's documented as "can change upon factory reset". Use at your own risk, and it can be easily changed on a rooted phone.


2 Answers

If you are running Ubuntu/Linux just type in terminal lsusb -v and press enter. It will bring out details of all USB devices. Check for a field called idVendor in the results and find your device.

E.g. my Motorola Defy (vendor id = 22b8) gives:

idVendor           0x22b8 Motorola PCS
like image 80
Ajith Memana Avatar answered Sep 30 '22 17:09

Ajith Memana


may be android.os.Build.MANUFACTURER is what you are looking for..

There is also one more field called brand android.os.Build.BRAND which specify The brand (e.g., carrier) the software is customized for, if any.

You can also try our Phone Info app from app store to check these value on your device.

like image 25
Praful Bhatnagar Avatar answered Sep 30 '22 15:09

Praful Bhatnagar