# \[ODK Table\] - Device Id

**URL:** <https://forum.odk-x.org/t/odk-table-device-id/840>\
**Category:** Support\
**Created:** [July 30, 2020, 8:38am UTC](https://forum.odk-x.org/t/odk-table-device-id/840 "2020-07-30T08:38:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thien\_Mai](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/thien_mai/32/375_2.png) [@Thien\_Mai](https://forum.odk-x.org/u/Thien_Mai)\
**Post date:** [July 30, 2020, 8:38am UTC](https://forum.odk-x.org/t/odk-table-device-id/840/1 "2020-07-30T08:38:35Z")

</div>

Hi,

I have a custom application on ODK Table. A call to `odkCommonIf.getProperty("deviceid")` on older Android returns Phone’s IMEI number, but on Android 10 it returns a string of hex characters.

I could not find detailed description of device id in the ODK documentation. When does it return IMEI number? When does it NOT return IMEI number (because of android’s security policy)?

---

<div class="post-metadata">

**Author:** ![elmps2018](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/elmps2018/32/105_2.png) [@elmps2018](https://forum.odk-x.org/u/elmps2018)\
**Post date:** [July 30, 2020, 2:44pm UTC](https://forum.odk-x.org/t/odk-table-device-id/840/2 "2020-07-30T14:44:52Z")

</div>

Hi @Thien_Mai!

I don’t think there is an equivalent to deviceid, see:

> [@Metadata collection in ODK2](https://forum.odk-x.org/t/metadata-collection-in-odk2/338):
>
> Hi there, I am currently trying out ODK2 to test its capabilities compared to ODK and other similar data collection tools. While going trough the documentation of ODK2 I noticed that metadata collection, which is done in ODK by adding special question types in the XLSForm-file, is not mentioned. Regardless, I tried to add those question types to an ODK2 application (in case it was simply neglected in the documentation), but the .xlsx file gets rejected by the XLSX Converter due to unknown que…

We generally track users in the field rather than devices to achieve a similar goal.  
This is however an item that other folks have mentioned before, so if you want to add it to the features here on the Forum or raise an issue on github that will be helpful!

---

<div class="post-metadata">

**Author:** ![bengreen](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/bengreen/32/106_2.png) [@bengreen](https://forum.odk-x.org/u/bengreen)\
**Post date:** [July 31, 2020, 8:09am UTC](https://forum.odk-x.org/t/odk-table-device-id/840/3 "2020-07-31T08:09:45Z")

</div>

Hi @Thien_Mai,

It looks like this is an Android 10 restriction rather than an ODK-X issue:

> Starting in Android 10, apps must have the `READ_PRIVILEGED_PHONE_STATE` privileged permission in order to access the device’s non-resettable identifiers, which include both IMEI and serial number.

> **[Android 10'daki gizlilikle ilgili değişiklikler  |  Android Developers](https://developer.android.com/about/versions/10/privacy/changes?hl=tr)**
