Time for action – adding Kindle Fire to ADB

It only takes one line of text to add Kindle Fire to the list of devices that ADB knows about. The hard part is tracking down the text file to edit and getting ADB to restart after making the required changes. Things are more involved when using Windows than with Mac because you also have to configure the USB driver, so the two systems are shown here as separate steps.

The steps to be followed for adding a Kindle Fire to ADB for a Windows OS are as follows:

  1. In Windows Explorer, navigate to C:Usersyourusername.android where the adv_usb.ini file is located.
  2. Open the adv_usb.ini text file in a text editor. The file has no visible line breaks, so it is better to use WordPad than NotePad.
  3. On the line after the three instruction lines, type 0x1949.
  4. Make sure that there are no blank lines; the last character in the text file would be 9 at the end of 0x1949.
  5. Now, save the file.
  6. Navigate to C:Program Files (x86)Androidandroid-sdkextrasgoogleusb_driver where android_winusb.inf is located.
  7. Right-click on the file and in Properties, Security, select Users from the list and click on Edit to set the permissions, so that you are allowed to write the file.
  8. Open the android_winusb.inf file in NotePad.
  9. Add the following three lines to the [Google.NTx86] and [Google.NTamd64] sections and save the file:
    ;Kindle Fire
    %SingleAdbInterface% = USB_Install, USBVID_1949&PID_0006
    %CompositeAdbInterface% = USB_Install, USBVID_1949&PID_0006&MI_01
  10. You need to set the Kindle so that it uses the Google USB driver that you just edited.
  11. In the Windows control panel, navigate to Device Manager and find the Kindle entry in the list that is under USB.
  12. Right-click on the Kindle entry and choose Update Driver Software….
  13. Choose the option that lets you find the driver on your local drive, navigate to the googleusb_driver folder, and then select it to be the new driver.
  14. When the driver is updated, open a command window (a handy trick to open a command window is to use Shift-right-click on the desktop and to choose "Open command window here").
  15. Change the directories to where the ADB tool is located by typing:
    cd C:Program Files (x86)Androidandroid-sdkplatform-tools
    
  16. Type the following three line of code and press Enter after each line:
    adb kill-server
    adb start-server
    adb devices
    
  17. You should see the Kindle Fire listed (as an obscure looking number) as well as the virtual device if you still have that running.

The steps to be followed for a Mac (MUCH simpler!) system are as follows:

  1. Navigate to where the adv_usb.ini file is located. On Mac, in Finder, select the menu by navigating to Go | Go to Folder… and type ~/.android/in.
  2. Open the adv_usb.ini file in a text editor.
  3. On the line after the three instruction lines, type 0x1949.
  4. Make sure that there are no blank lines; the last character in the text file would be 9 at the end of 0x1949.
  5. Save the adv_usb.ini file.
  6. Navigate to Utilities | Terminal.
  7. You can let OS X know how to find ADB from anywhere by typing the following line (replace yourusername with your actual username and also change the path if you've installed the Android SDK to some other location):
    export PATH=$PATH:/Users/yourusername/Documents/android-sdk-macosx/platform-tools
    
  8. Now, try the same three lines as we did with Windows:
    adb kill-server
    adb start-server
    adb devices
    
  9. Again, you should see the Kindle Fire listed here.

What just happened?

I suspect that you're going to have nightmares about all these steps! It took a lot of research on the Web to find out some of these obscure hacks. The general case with Android devices on Windows is that you have to modify the USB driver for the device to be handled using the Google USB driver, and you may have to modify the adb_usb.ini file (on Mac too) for the device to be considered as an ADB compatible device.

Getting ready for test development on an iOS device

If you carefully went through all these Android steps, especially on Windows, you will hopefully be amused by the brevity of this section! There is a catch though; you can't really test on an iOS device from LiveCode. We'll look at what you have to do instead in a moment, but first, we'll look at the steps required to test an app in the iOS simulator.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset