To set up your Android device, first select Settings→Applications→Development→USB debugging to initiate development mode on your device. On some devices, such as the Samsung Galaxy Tab, you need to set this first before plugging the device into your development computer; otherwise, the selection is grayed out. When your device is in debug mode, a bug-looking icon appears in the upper-left corner.
Select Settings→Applications→Development→Stay awake to prevent the screen from going to sleep while you are working and testing.
Plug your device into the USB port of your development computer. When your device is connected via USB, a fork-shaped icon appears in the upper-left corner. Figure 2-1 shows the bug and fork icons in the upper-left corner of the screen.