Android Question Get device S/N number

Blu Blu

Member
Licensed User
Hello everyone,

I understand there are similar threads, such as this one: Grab Serial Number of Device. However, I would like to know if there have been any updates or changes recently.

In our company, we need to register the hardware serial number (S/N) printed on the back of our devices. On Windows, I can easily retrieve it using the ADB command $ adb devices. Is there a similar way to achieve this functionality directly on the device using B4X?


DEVICE.jpg


Thank you for your help!
 

MicroDrie

Well-Known Member
Licensed User
Longtime User
Starting with Android 10 (API 29) and later, non-system apps can no longer access the device serial number, even with the READ_PHONE_STATE6 permission.
Alternatively, you might consider using Generate Unique Id on Android No permissions Needed from Addo. Addo has tested and determined that the value does not change after a factory reset. This seems to be an alternative to determine which unique device it is by software.
 
Upvote 0