Real Device Environment Installation

So far, you have completed installing the development environment for an emulator target machine. But if your target machine is a real device (for example, a mobile phone or a tablet with the Intel Inside logo), you need to install and configure the development environment for it. This chapter discusses how to build an application development with a real Android device, including how to install drivers and connect the device to your development host machine. Later, you see how to create an application and test it on both an emulator and a real device.

Mobile Phone Setting

There are many ways to set up a real device to support the Android SDK adb connection, and the settings vary from device to device. For example, in the case of the Lenovo K900 smartphone, you open the debugging function of the Android device by selecting Settings ➤ Applications ➤ Development and clicking USB Debugging. For some other devices, the USB Debugging option is not available because the developer option by default is not enabled. One example is the Dell Venue 8 Android tablet. To enable the developer option on a Dell Venue Android tablet, you need to go to Settings ➤ About ➤ Build Number; tap Build Number seven times to enable the Dell Venue Developer Option, which will then appear under System Category.

Installing the USB Driver on the Host Machine

This chapter uses the Lenovo K900 smartphone as an example of how to install a mobile phone USB driver on the host machine:

1. Connect the mobile phone to the development PC via USB cable.

2. The mobile phone is named Unknown Device in Device Manager (see Figure 4-1).

Figure 4-1. Lenovo K900 ADB device in Device Manager (a yellow ? appears on top of the icon if Device Manager is unable to recognize the mobile phone when a USB driver is not installed)

3. Install the driver. The driver can be found from the phone manufacturer or sometimes, as for the K900, from the emulated CD-ROM device when the phone USB connection is set to Driver Installation mode.

When you connect a Lenovo phone using a USB cable to your Windows laptop, a

CD-ROM is mounted to the directory as shown in Figure 4-2. The file structure of the USB memory stick of the Lenovo Intel phone is

E: Lenovo Kxxx Mobile phone driver>dir 2011-09-21 09:08 30 Autorun.inf

2012-03-23 17:10 2,366,976 bootstrap.exe

2012-03-23 17:15 69 bootstrap.ini

2012-03-23 10:57 10,993,152 LeDrivers.msi

Figure 4-2. Directory display on the Windows host machine

4. Double-click LeDrivers.msi, and start installing the USB driver (see Figure 4-3).

Figure 4-3. Lenovo K900 Device Drivers Setup dialog

5. Restart the host machine after installation.

You can see that the ADB interface has been installed. In the software list, the Lenovo Racer-A Device Drivers have been successfully installed (see Figure 4-4).

Figure 4-4. Software list for the Lenovo K900 after installation

< Prev   CONTENTS   Next >