How to get IMEI number after update android version 10

update android version 10

device tool not working for getting IMEI number

Android has added restrictions on who can access the non-resettable device identifiers such as the IMEI number starting from Android 10 and limited the apps that can use it to the apps that have the READ_PRIVILEGED_PHONE_STATE permission which isn’t available for non-platform apps :confused: If try to access any of these identifiers a security exception occurs. On Android 10 and hiegher, so unfortunately, there is no way to get the IMEI on Android 10 and hiegher unless your app is a platform app :grimacing:
See also here , there has been many topics about this as well for example and this
However, it you shouldn’t collect your users IMEI address any way.

3 Likes

@Mohamed_Tamer plz provide blocks


Blocks for what?

@Mohamed_Tamer any other option for device permanent value… like IMEI

If you just want to get a unique id, then you can generate one random string and save to tinybd, and read from tinydb everytime.

If you want to get the same id even if you re install the app, you may save the string in a file on sdcard.

You can name the file name start with a dot, that will make the file invisible, unless the phone is rooted.

@Kevinkun i want to say that. device id auto generate item yes or no

Use device serial number

@Haivaan it is different for all device and always permanent yes or no plz

Permanent and unique

@Haivaan how to get it

@Haivaan this is not working

You can have a try:
http://www.kevinkun.cn/tools.html
This need write external storage permission.

1 Like

you can use device ID

@Kodular might want to add a note in the documentation…
Taifun

1 Like