I need to generate a reliable device ID. I’m using Secure.getString(this.getContentResolver(), Secure.ANDROID_ID) at the moment, but it changes after factory reset or with flashing another ROM. Could you suggest a truly hardware ID that cannot be changed?
Upd: none of the solutions suggested so far help: the suggested IDs either can change, or not always available, or both. And I definitely need it to survive reinstallation, too.
I haven’t found anything better than
Secure.getString(this.getContentResolver(), Secure.ANDROID_ID)so have to continue using it, despite its shortcoming.