[Kindle Fire General] soupmagnet:
Anyone that spends any time on these forums can attest that this has been an ongoing problem for quite some time, and as long as I've been here, there hasn't been any concrete solution that users can rally around.

A while back, I bought a used laptop for the purpose of running Linux. Mac doesn't have good support for dual booting and there are certain unavoidable issues when running on a VM - but, I digress. This laptop came with Windows XP, and while I have no real purpose for it, I decided to keep in on there, just in case. Recently, I decided to see how hard it really was to get ADB to connect in Windows. I've found, while it isn't really that difficult, I can see why there are so many people having trouble with it. A lot of the information out there regarding this topic is kind of all over the place and none of it really helps users to understand why they're being instructed to do these things. So when something doesn't work exactly like a tutorial says it should, many people are left wondering what to do next and then go on to try other things they don't understand, while all at the same time accomplishing nothing. I created the SoupKit to try and alleviate some of the problem, and while it has been moderately successful in doing so, there are still many for whom it is out of the question. So...the purpose of this thread is to talk about what I have learned from this process and open a discussion on how to apply what I've learned to coming up with a solution that will work for everyone.

That being said...

I'm using the Kindle Fire Utility's 'install_drivers.bat' as an example because it seems to be the the goto choice for many users and it is a much better solution than installing the entire Android SDK, but there are some caveats...so keep reading.

The very first problem I ran into when trying to get ADB to work in Windows was the unsigned driver issue. There are many tutorials out there for installing unsigned drivers and disabling signature checking for each of the different operating systems but I found that even disabling signature checking alone didn't do much good. In the case of the Kindle Fire Utility, drivers are installed via the Windows Driver Package Installation Wizard (dpinst.exe), so disabling signature checking for the system alone may have no effect. The solution I found from the Microsoft's Dev center library, is to run the driver install package with the "Legacy Mode" (/lm) switch on.

In the KFU's 'install_drivers.bat', there are two lines used to envoke the 'dpinst.exe', one for 32bit and one for 64bit machines:

::We are 32bit, lets run 32bit installer.
[B]start .\drivers\dpinst32.exe [/B]
) ELSE (
::We are 64bit, lets run 32bit installer.
[B]start .\drivers\dpinst64.exe[/B]

before Legacy Mode

View attachment 1785520

To enable Legacy Mode and disable signature checking for the dpinst.exe, those lines should be edited like so:

::We are 32bit, lets run 32bit installer.
[B]start .\drivers\dpinst32.exe /lm[/B]
) ELSE (
::We are 64bit, lets run 32bit installer.
[B]start .\drivers\dpinst64.exe /lm[/B]

after Legacy Mode

View attachment 1785521

Considering the fact that Microsoft doesn't like to update too much, that fix should work across all Windows operating systems. (if not, let me know)

The next problem I ran into was that the KFU's 'install_drivers.bat' didn't create the '.android' folder in the User directory where the 'adb_usb.ini' should go. I'm not quite sure why...I barely know anything about Windows batch scripting, but from what I can tell, this should work:

if not EXIST %userprofile%\.android\ ( mkdir %userprofile%\.android\ )
copy drivers\kindle\adb_usb.ini %userprofile%\.android\adb_usb.ini

...which is basically saying, "If the '.android' folder doesn't exist in the User directory, create it, then copy the 'adb_usb.ini' file to it." The '%userprofile%', I'm guessing, is a Windows batch global variable that represents the current user's home directory, much like "$HOME" in Linux. Why that didn't work for me or for a lot of users I've seen, I couldn't say, but I was able to create the directory via the command line very easily (apparently you can't create directories in Explorer that start with a "." ). When you open a command prompt in Windows, it should start from the User directory (C:\Documents and Settings\Username) by default. With that being the case, anyone can ensure the directory is created with the following command:

mkdir .android

Copying the 'adb_usb.ini' to the .android folder is pretty straightforward and can be done via the command line or Windows Explorer.

Now here's where things gets a little tricky...

hardware IDs

.

Not really tricky, but it is clearly the source of many of the problems users are experiencing. For every ROM, bootloader, and (as of late) recovery build, the hardware IDs that are listed for that build may vary. Why is this important? Because KFU's 'android_winusb.inf' only accommodates a small number of hardware IDs, and depending on your build, you could be left out.

When you plug your device into the USB, something

should

show up in the Device Manager. You can check the hardware ID listed for your device in the state that it's in by looking at the device's properties in the Device manager.

View attachment 1785518

From there (speaking from a Windows XP perspective) you should be able to click on the details tab and select "Hardware Ids" from the drop-down menu.

View attachment 1785519

In the 'android_winusb.inf' that comes with the KFU, there are hardware ID's already listed...

;Kindle Fire
%SingleAdbInterface% = USB_Install, USB\VID_1949&PID_0006
%CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0006&REV_0100
...
...

...but you'll need to add the hardware ID for whatever your device is reporting in the particular state that it's in. So using the image posted earlier as an example, you would have to add the following:

%SingleAdbInterface% = USB_Install, USB\VID_1949&PID_0006&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0006&REV_0216&MI_01

A couple of things to note when doing this:

If you're using a custom ROM, chances are it can be in one of three states; Android (ADB) debugging, UMS & MTP. Do not add the hardware ID for MTP or UMS (UMS is when the stock Kindle Fire shows the black screen with a USB cable and the "disconnect" button). Doing so will most likely break your ability to mount your sdcard to USB.

If you've already installed the drivers before editing the 'android_winusb.inf' to accommodate the new hardware IDs, you may need to manually uninstall the drivers and remove the 'android_winusb' folder from yourWINDOWS directory and reboot. The exact location of this folder may vary between different versions of Windows, but I couldn't say for sure. I can, however, explain where it is in Windows XP and hopefully you can find it on your own OS and reply to this post if the location is different.

In the WINDOWS directory under "system32', I found a hidden folder called 'DRVSTORE' (you may have to enable showing of hidden folders). In that folder, you should see something similar to the following (assuming you have already run the 'install_drivers.bat'):

View attachment 1785492

Just delete that folder, reboot, edit the 'android_winusb.inf' that comes with KFU and run the 'install_drivers.bat' again.

With this information, anyone should be able to get ADB working in Windows with little or no problem. Obviously, each Windows version is different, so if you see something that is different in your OS, please reply to this post so I can edit it accordingly.

P.S. With that being said, I decided to gather a bunch of the most popular ROM's and recovery's hardware IDs and created a more comprehensive list that should work in 90% of all situations (if you have a hardware ID that is different, post it so we can add it to the list):

[Google.NTx86]
;Kindle Fire
%SingleAdbInterface% = USB_Install, USB\VID_1949&PID_0006
%CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0006&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0006&REV_0100&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0006&REV_0100
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_0100
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_0100&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_1949&PID_0001
%CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0001&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0001&REV_0216&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_1949&PID_0004&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0004&REV_0216&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_1949&PID_0007&MI_00
%CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0007&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0007&REV_0216&MI_00
%SingleAdbInterface% = USB_Install, USB\VID_1949&PID_0004&MI_00
%CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0004&REV_0216&MI_00
%SingleAdbInterface% = USB_Install, USB\VID_1949&PID_0006&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0006&REV_0216&MI_01

[Google.NTamd64]
;Kindle Fire
%SingleAdbInterface% = USB_Install, USB\VID_1949&PID_0006
%CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0006&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0006&REV_0100&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0006&REV_0100
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_0100
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_0100&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_1949&PID_0001
%CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0001&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0001&REV_0216&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_1949&PID_0004&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0004&REV_0216&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_1949&PID_0007&MI_00
%CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0007&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0007&REV_0216&MI_00
%SingleAdbInterface% = USB_Install, USB\VID_1949&PID_0004&MI_00
%CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0004&REV_0216&MI_00
%SingleAdbInterface% = USB_Install, USB\VID_1949&PID_0006&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0006&REV_0216&MI_01

I hope this helps people to figure out what's going on and how to get ADB working properly. If anyone has any questions or has something to add PLEASE let us know so I can edit this post accordingly. Also, if you have found this informative, or if it helps you in figuring out how to get things working, please consider hitting the thanks button. Your appreciation is MUCH appreciated. Thank you.

Credit goes to kinfauns for spotting this problem ages ago. I'm surprised it is so constantly overlooked.