adb -d shell (or adb -e shell).
This command will help you in most of the cases, if you are too lazy to type the full ID.
-d - Direct an adb command to the only attached USB device. Returns an error when more than one USB device is attached.
-e - Direct an adb command to the only running emulator. Returns an error when more than one emulator is running.