Make a live ad request while running on the device, and view the logs. There should be a log at the info level that says:
I/Ads: To get test ads on this device, call adRequest.addTestDevice("YOUR_HASHED_DEVICE_ID");
Since the SDK hashes your device ID, it is much easier and cleaner to grab this number directly through the logs rather than bothering to try to grab the Android device ID, and doing some manual hashing to try to get this same number.