What parameter differentiates between emulated device and real android device? - emulation

I am trying to get a unique parameter so that an application can distinguish between a real android device and an emulator.

The fingerprint usually contains "generic" and the PRODUCT usually contains "sdk", you could additionally check for "vbox" in the fingerprint.

Related

BLE Peripheral not displaying correctly

I am currently having some issues with connecting to my peripheral. The bluetooth module in our peripheral does not seem to be advertising a name initially. I've have found that once I connect to the peripheral for the first time it will update the name and my scanner is then able to see the correct name.
I have no understanding why this is the case. I have also tried it using the Swift app we are developing, as well as a range of Bluetooth scanners on iOS and Android so I do not believe that this is an OS or programming error on the scanner side.
Is there a specific parameter that should be set on the peripheral. As I am just the app developer I do not have very much understanding about how the module is handing the process.
Any help would be much appreciated.
Just to confirm the scanner does not see a name for the peripheral until it has connected once. After this it will start displaying the name. Once the peripherals name is changed the old name is still being displayed until I have connected to it once again.
To display the name of device you need to see in advertisementData Dictionary which contains several keys depending on your device, in callback of didDiscoverPeripheral from CentralManager.
- (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary<NSString *, id> *)advertisementData RSSI:(NSNumber *)RSSI
You can look for key CBAdvertisementDataLocalNameKey.
If you do not see the name, you can make changes in your firmware to include a name in GATT characteristic .
You can use LightBlue app to verify once. This is a good app on app-store to test your BLE device.

Is there an option for get connected remote device name in ble?

I use esp-idf v3.0 and esp32 chip.
My esp32 is a gatt server and I communicate with a specific android app which is the gatt client.
In our system, there is a need for me to save some info for previous remote devices which were disconnected for future connection. For this reason I need some ID of the remote device, and for that I used the android bd address, but after experiments and some info from google, I understood that the bd address from android is unstable since it doesn't show the actual physical address.
Thus, I want to use the name of the android device as an ID (of course we will make sure to set our android machines to have a unique name).
But I can't find in the docs any option for reading the remote device name.
I would like to know if there is any function or example code for reading the connected devices name.
The common solution is to pair the devices. When you do that, you get the IRK (identity resolving key) which can be used to see if a given Bluetooth device address is derived using that particular IRK.

How do you get the actual name of a bluetooth low energy device?

I need to get the friendly device name from a ble sensor. I want to find the device and tell the user they are connected to "My Home Sensor" for example. I can find the device, but I don't know how to find that data.
In regular bluetooth, I believe I can use BLUETOOTH_DEVICE_INFO or winsock.
Is there a bluetooth low energy equivalent to bluetooth's BLUETOOTH_DEVICE_INFO?
If possible, could you please provide an example for how to get the information (i.e. device name)?
I'm using Windows 8.1, c++ and visual studio 2013. I've been referencing windows dev docs, but I haven't found anything useful yet.
Thanks!
Assuming that you are able to get connected with the GATT Server, when you parse the GAP profile of the device, you will find an attribute for Device Name under Generic Access Profile (GAP).
This is a list of all the standard GATT Services and their UUIDs. UUID for GAP is 0x1800.
You can look for the list of all the standard Characteristics and their UUIDs. For the Device Name Characteristic, it is 0x2A00.
This explains that the Device Name characteristic is a part of the GAP.

Getting Unique Id from all java phones especially from S40 devices

I have requirement of getting an unique identification number programmatically from all j2me supported phones.
As we already know getting IMEI / IMSI in S40 devices is almost not possible, bluetooth MAC address / obex push profile UUID may help. But for this, bluetooth should be turned on in mobile. And I don't know how many devices will support jsr82.
Is there some other unique id which will differentiate j2me devices?
Use the value of System.currentTimeMillis() when the user first starts the app. Unless two users start their app at precisely the same millisecond (v. unlikely), this will be unique.
Just now i got answer from other source:
There are no other unique IDs than IMEI, Bluetooth or WLAN (when available) MAC addresses. Redesign your solution not to depend on such entirely, or so that some ID you generate/assign yourself is sufficient (possibly in conjuntion with a username/password combination).
Any other ideas?

mac/xcode setting up a specific UUID for Bluetooth

I've been playing with the Bluetooh sample from the Xcode RFCOMM_SPP which is what would do the job for me so I modified it but the discover devices does not pick a few simpler SPP devices(like a GPS)
I had a similar issue when doing the Android version and after digging I found out if I set up a proper UUID manually I'm on easy street and that got me rolling there really cool
Now back to the MAC I'm trying to see if the same process can be applied I see they have this IOBluetoothSDPUUID which picks a pre-cooked UUID, my guess is that if I do there what I did in Android I'd be able to see and interface with the GPS.
Is it possible to set a UUID manually like adding it to the h files? Or is it blocked for "Made for Apple" devices like in the iPhone?
Are you programming for the MAC or iOS devices (iphone / ipad )
Bluetooth SPP profile is not supported (publicly) on iOS devices.
see this http://support.apple.com/kb/HT3647?viewlocale=en_US
So if you want to do something custom on these devices using non public interfaces, the only way is joining the MFi program

Resources