I am looking for the easiest way to get a unique android device identifier from both the Android adb and the Android ADK itself.
For example, when i use the adb \'devi
adb shell settings get secure android_id
This command returns ANDROID_ID but it may not be the same as ANDROID_ID received at code level. The application can use different min API level and the value obtained from adb shell may not match
It was possible to get the ANDROID_ID from [net.hostname] prop. It worked in API level 23.
Command to get the android_id for API level 23
adb shell getprop net.hostname
In android 8.0 and above this prop returns null due to android privacy policy changes. Hence, ANDROID_ID doesn't remain to be a reliable method of unique device id comparison.