We used to get Device ID/IMEI using the following command:
adb shell dumpsys iphonesubinfo
But since last Android update (5.0 - Lollilop),
ADB command to get device IMEI:
adb shell "service call iphonesubinfo 1 | cut -c 52-66 | tr -d '.[:space:]'"
ADB command to get device phone number:
adb shell "service call iphonesubinfo 18 | cut -c 52-66 | tr -d '.[:space:]+'"
ADB command to get Android ID:
adb shell settings get secure android_id
ADB command to get device Serial Number:
adb shell getprop ro.serialno
Note: No root is needed for any of the above commands