Time for action — adding a Kindle Fire to ADB
It only takes one line of text to add the Kindle Fire to the list of devices that ADB knows about. The harder part is tracking down the text file to edit, and getting ADB to restart after making the changes. Things are more involved with Windows than Mac, because you also have to configure the USB driver, so the two systems are shown here as separate processes:
For Windows:
- In Windows Explorer, navigate to where the file
adb_usb.ini
is located, atC:\Users\yourusername\.android\
. - Open the text file
adb_usb.ini
in a text editor. The file has no visible line breaks, so Wordpad would be a better option than Notepad. - On the line after the three instruction lines, type
0x1949
. - Make sure there are no blank lines, and the last character in the text file should be the
9
at the end of0x1949
. - Save.
- Navigate to where
android_winusb.inf
is located, atC:\Program Files (x86)\Android\android-sdk\extras\google\usb_driver\
. - 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 to the file.
- Open
android_winusb.inf
in Notepad. - Add these three lines to the
[Google.NTx86]
and[Google.NTamd64]
sections, and save the file.;Kindle Fire %SingleAdbInterface% = USB_Install, USB\VID_1949&PID_0006 %CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0006&MI_01
- You will need to set the Kindle to use the Google USB driver that you just edited.
- In the Windows control panel, Device Manager, find the Kindle entry in the list that is under USB.
- Right-click on the Kindle entry and choose Update Driver Software….
- Choose the option that lets you find the driver on your local drive, navigate to the
google\usb_driver\
folder, and select it to be the new driver. - When the driver is updated, open a command window (handy trick: Shift+right-click on the desktop and select Open command window here).
- Change directories to where the ADB tool is located, by typing the following:
cd C:\Program Files (x86)\Android\android-sdk\platform-tools\
- Type these three lines, with pressing Enter after each line:
adb kill-server adb start-server adb devices
- You should see the Kindle Fire listed (as an obscure looking number), as well as the virtual device, if you still have that running.
For Mac (MUCH simpler!):
- Navigate to where the file
adb_usb.ini
is located. On Mac, in Finder, select the menu Go | Go to Folder…, and type in~/.android/
. - Open the file
adb_usb.ini
in a text editor. - On the line after the three instruction lines, type
0x1949
. - Make sure there are no blank lines; the last character in the text file would be the
9
at the end of0x1949
. - Save.
- Open Utilities | Terminal.
- You can let OSX know how to find ADB from anywhere, by typing this line (replace
yourusername
with your user name, and also change the path if you installed the Android SDK to a different location):export PATH=$PATH:/Users/yourusername/Documents/android-sdk-macosx/platform-tools
- Now, enter the same three lines we did with Windows:
adb kill-server adb start-server adb devices
- Again, you should see the Kindle Fire listed.
What just happened?
I suspect that you're going to have nightmares about all those steps! It took a lot of searching on the web to find some of those 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 by 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 to test for iOS
If you carefully went through all those 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, here are the steps required for testing an app in the iOS simulator.