How to get IMEI number after update android version 10

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.