You would probably want to use ANDROID_ID.
This is how you can query its value via adb shell:
settings get secure android_id
Or by querying the settings content provider:
content query --uri content://settings/secure/android_id --projection value