Android smartphones are identified by Google through a unique 16 character long alphanumeric code called the device ID. This device ID is generated the first time you boot your Android device and stays there forever. When you erase everything and reset your device to factory defaults, this ID is overwritten and re-generated. Similarly, if you install a new ROM then this device ID can be overwritten and re-generated. If you are trying to find this ID then you will have a difficult time finding it from the Android settings. But you can find it easily using two quick methods:
Easiest way to find the device ID in Android is by using a free app called “Device ID”. You can get this app from the Google Play store (https://play.google.com/store/apps/details?id=com.evozi.deviceid&hl=en). After you install this app in your Android device, you can launch it and it will display the device ID on the first screen. You can tap on the device ID to copy it to clipboard, share it with others, and so on. The app has many more features, but we are interested in just the device ID portion.
If you have enabled the developer menu in Android and enabled the USB debugging then you won’t need any apps to find the device ID. All you have to do is connect your Android device to your PC and give the command adb shell settings get secure android_id. This will display the device ID for your Android smartphone instantly. You can note it down and use whenever it is needed.
If you get null, blank or a dummy device ID (like 123457890ABCDEF), then you would need either a factory reset of your device so that it can generate a new device ID or you can contact the device manufacturer for fixing your smartphone.