Wednesday, September 19, 2007

Repair: USB Device Refuses to Initialize

The past few days have been PC hell for me. Some strange behavior has cropped up my my system that has earned it the right to be re-formatted. Since I am traveling however, I don’t have access to my backup drives or my install CD’s for my new system. So in the meantime, I needed to work around the issues I was having.

A few months ago I wrote about Hacking my Motorola Razr to use as a broadband modem while I travel. This has been working great for the past few months, up until about 3 days ago. Now my system has been behaving odd for the past few days. Things like the “Safely remove this Device” icon disappearing. To resolve that I had to go under Device Manager, right-mouse click on any of the USB disks I had (in my case it was my IPod), go to Policies, and manually click on the Safetly Remove Hardware link in the description text. Ever since that issue has not appeared.

However, the issue that has been driving me nuts is the fact that my Razr stopped working. Everytime I would connect it to my machine, I would get the New Hardware Found wizard and an error stating “An error occured during the installation of this device Fatal Error during installation…”. Now I searched and searched for a few days and found nothing but garbage advice. Things like totally remove all USB devices under Device Manager did not resolve this problem (nor do I think they are the correct solution). I cleared every USB device entry under the registry to reinitialize the know USB device catalog (not something I recommend, and even if you do, backup backup backup). This also didn’t fix the issue. I reinstalled the drivers, updated the drivers, yet nothing would get this device to work. I could plug it into another machine and it would work fine. I could even plug it in running VMWare and set VMWare to use it, with VMWare recognizing the device and it working correctly. So that narrows it down to something software related.

So how did I fix the problem? Well, I went back to good old fasion detective work to figure it out, and worked on blind faith and a prayer. I did a search for any files modified within the past day hoping that some sort of log was laying around. What I came across was 2 log files, setupapi.log and setupact.log (information about these files can be found here). When I opened the file I came across the following entry in the setupapi.log:

#-019 Searching for hardware ID(s): usb\vid_22b8&pid_2a62&rev_0001,usb\vid_22b8&pid_2a62
#-018 Searching for compatible ID(s): usb\class_02&subclass_02&prot_01,usb\class_02&subclass_02,usb\class_02
#-198 Command line processed: C:\WINDOWS\system32\services.exe
#I022 Found "USB\VID_22B8&PID_2A62" in C:\WINDOWS\inf\oem44.inf; Device: "Motorola USB Modem"; Driver: "Motorola USB Modem"; Provider: "Motorola"; Mfg: "Motorola"; Section name: "USB1XCDMA".
#I023 Actual install section: [USB1XCDMA.NT]. Rank: 0x00000001. Effective driver date: 06/18/2007.
#-166 Device install function: DIF_SELECTBESTCOMPATDRV.
#I063 Selected driver installs from section [USB1XCDMA] in "c:\windows\inf\oem44.inf".
#I320 Class GUID of device remains: {4D36E96D-E325-11CE-BFC1-08002BE10318}.
#I060 Set selected driver.
#I058 Selected best compatible driver.
#-166 Device install function: DIF_INSTALLDEVICEFILES.
#I124 Doing copy-only install of "USB\VID_22B8&PID_2A62\5&B4DCBF&0&2".
#-166 Device install function: DIF_REGISTER_COINSTALLERS.
#I056 Coinstallers registered.
#-166 Device install function: DIF_INSTALLINTERFACES.
#-011 Installing section [USB1XCDMA.NT.Interfaces] from "c:\windows\inf\oem44.inf".
#I054 Interfaces installed.
#-166 Device install function: DIF_INSTALLDEVICE.
#E151 Coinstaller 3 of 3 failed. Error 1603: Fatal error during installation.

Huh… what is the CoInstaller? I checked the next file hoping to find another clue:

WdfCoInstaller: [09/18/2007 16:38.06.531] Update process returned error code :error(1603) Fatal error during installation.
. Possible causes are running free version of coinstaller on checked version of OS or vice versa. Look at the Kmdf documentation as to what steps need to be followed to install the correct versionof the coinstaller

What is this? Another clue. So there is definitely a problem with this WdfCoInstaller. A nother search on my system turned up the final clue, a log file called Wdf01005Inst.log. I took a look inside of that:

0.047: 2007/09/18 16:38:06.312 (local)
0.047: c:\6cdccf09bac8c0c517fbc0e694\update\update.exe (version 6.3.4.0)
0.047: Hotfix started with following command line: /quiet
0.047: In Function GetBuildType, line 1170, RegQueryValueEx failed with error 0x2
0.047: C:\WINDOWS\system32\DRIVERS\wdf01000.sys is Present
0.047: FileVersion of C:\WINDOWS\system32\DRIVERS\wdf01000.sys is Greater Than 1.5.5600.0
0.047: Condition Check for Line 1 of PreRequisite returned FALSE
0.047: ReadStringFromInf: UpdSpGetLineText failed: 0xe0000102
0.047: Wdf01005 Setup encountered an error: Setup cannot continue because one or more prerequisites required to install Wdf01005 failed. For More details check the Log File c:\windows\Wdf01005Inst.log
0.062: ReadStringFromInf: UpdSpGetLineText failed: 0xe0000102
0.062: Setup cannot continue because one or more prerequisites required to install Wdf01005 failed. For More details check the Log File c:\windows\Wdf01005Inst.log
0.062: Update.exe extended error code = 0xf0f4
0.062: Update.exe return code was masked to 0x643 for MSI custom action compliance.


This solidifies it, I had tracked down the problem. I made a backup copy of the C:\Windows\system32\Drivers\wdf01000.sys and deleted it. When I re-ran the install, it worked fine. Thanks to logs I was able to track down the issue, not the fall back street level tech resolution of reformat and reinstall OS.

Although I fixed my issues, I am still going to reformat my system. I haven’t installed anything or changed anything that would cause this previously working setup to change, especially something that relies on Kernel Mode drivers. So without any relevant changes to my system, with yet changing behavior, it would leave me to believe something else is afoot. So better safe than sorry. time, unfortunately, is not something I have the luxury of having at the moment to track down issues.

53 comments:

Anonymous said...

Bro thank you so much i no you posted this a long time ago and no one has left a comment or said thanks man but THANK YOU ibe been trying for weeks to figure out what the problem was The funny thing was i was just about to reinstall my operating system to get this to work thank you thank you

Anonymous said...

Standing Ovation
Well done

Solved many of my install problems in one simple step.

Thanks for your diligence.

Anonymous said...

yes indeed well done this is great work. thanks

Anonymous said...

Awesome!!! I spent already desperate hours trying to bring my Motorola modem back to work!

Your analysis and trick with deleting the wdf01000.sys solved my issue and saved my day.

(Luckily I found the Coinstaller error message in the setupapi.log, so Google was able to find your solution ...)

Anonymous said...

My issue was w/ a different installer, but this fixed it just the same.

Thanks for having this up!

Anonymous said...

THANK YOU SO MUCH saved me hours of working :D

Anonymous said...

I'm having the same problem with my son's KRZR K1m, but I could not find the file you mentioned above.

I'm running Windows XP with SP2.

Any idea what I have to do to get MPT working with a K1m and Windows XP?

Thanks,

Dave

Anonymous said...

Opps.. It turns out my son's laptop is running Windows XP Media Center Edition with SP2.

wdf01000.sys does not exist on the system.

Any help would be greatly appreciated.

Thanks,

Dave

John Ward said...

Im not really an expert on mobile phone hacking. The phone I use is a V3C Razr from Verizon.

These directions fixed my issues with Motorola Driver Installer. Check http://www.hacktherazr.com/ to see if they have the appropriate drivers for the KRAZR.

Anonymous said...

Thanks for the link John.

Actually, this isn't for hacking the phone. MPT is Motorola Phone Tools. It is used to save the address book, sync calendar with MS Outlook and other functions.

For some reason, I can't get the tool to work with the KRAZR.

Hirsch said...

I find it quite interesting that almost any USB communication device seems to be dependent upon this .sys file when it fails. My particular issue was related to Motorola Phone Tools, and once I removed this .sys file, detection of my Motorola USB Modem and enumeration of the device and associated drivers completed without issue.

Sadly, Microsoft has not documented anything in particular to this file being corrupted and its associated side-effects. Someone obviously needs to post this where it catches more attention!

Great find, and much appreciated.

Anonymous said...

Thanks a million.I have spent 2 days trying to install cordless keyboard and mouse on mini usb receiver.exact same problem with 'fatal error' and driver install.I finally found the log file after the app opened every time i detected the hardware.i googled the log file and found your post.i deleted the file and ran update and BOOM! keyboard and mouse now running on current drivers Thanks again!

Anonymous said...

Man thanks a million! Great detective work!!!

Unknown said...

You are my new God.

Anonymous said...

thanks so much. what a legend! this has been annoying me for so long.

Anonymous said...

This was extremely helpful. Thanks very much for posting it. It was a great feeling to hear the chirp of my RAZR again when I plugged it in.

Raj said...

Thanks bro!!!!

Worked like a charm!!

Anonymous said...

Excellent! Thanks for posting this! I found it in a Google search and by following your post, I discovered that my problem is identical to yours! It's funny that Wdf01005Inst.log tells you to check itself for more details - Ummm - DUH?

Anonymous said...

Mate!!!

Worked like a charm...

Owe you a beer!!!!!!!!!!

Anonymous said...

Thank you so much!

I spent (only)a day trying to troubleshoot why my Motorola cell phones would load on one of my PC's but not another.

Thank goodness I came across your post! That's what it was. MPT now supports both Verizon phones.

Like the other poster says, I owe you a beer too!!!!

Anonymous said...

I can't believe this really worked. I just deleted that w sys file and now when I plug it in the pc is recognizing and downloading new software and not giving me that fatal error during installation. Thank you!

Anonymous said...

Awesome man!! I don't know how you figure to look at the logs, It did not cross my mind at all... I had the exact same problem and thanks to your finding I am my son's hero of the day!!!

Thanks a lot!!1

Anonymous said...

Super!! Was already looking for more than two hours why my mouse would not work againg.... this was THE answer!

Anonymous said...

Excellent - Thankyou so much for that. Have been trying for hours to get my Cordless Trackman Optical working again following a Windows reinstall. There is nothing on the Logitech or Microsoft websites, nothing on any other forum, and nothing worked - except this fix. Now works perfectly again. Cheers

Robyn said...

Came across this via Google and just wanted to say thank you. I had a USB device that was causing me grief for two days and your solution was spot on. Everything managed to work afterwards. Thank you again.

Greg said...

You are my new best friend. I have tried everything and in the end it was nothing more than deleting that one file. After days and days of fruitless efforts, you have saved me. Thank you. Thank you. Thank you.

Anonymous said...

Man...you are a stud. To simply reiterate what everyone else here has been saying. Thank you so much. A year later your suggestion is helping people. I have contacted Verizon to let them know of this solution so that in the future perhaps they will have a clue. Thanks a million.

Anonymous said...

Sweet! Second link Google pulled up and it's the one that worked, even after scouring Motorola's website. Good job man!

Anonymous said...

Nice work! You saved me hours of me troubleshooting my Logitech LX7. Thank you!

Unknown said...

THIS SOLUTION WORKED FOR ME! Thank you! I can now stop wasting hours getting my N95 8GB to link up with my PC.

Anonymous said...

Who is this guy?? I think we should erect some sort of statue for him.

This goes down in the history books as the most helpful post on the planet!!!!

Hoorah! I'm going to run down the High Street naked !!!

Anonymous said...

Brilliant, thanks ever so much!!!

Cheers!

Anonymous said...

Worked for me as well! I'm using Windows 2000 and had the same issue with my Motorola Phone Tools. I renamed this file to bad_WDF01000.SYS and my Motorola driver installation went with no problems. Windows reinstalled WDF01000.SYS I compared the renamed and new files - they are identical so the file was not corrupted. I don't really understand what went wrong, never the less may God bless you, thank you for posting!

Anonymous said...

Me too. I've just wasted two weekends trying to get my phone N73) working. Folowed many useless leads. This post fixed it in 5 mins. Many thanks

Anonymous said...

wow very excellent!!!
just took me less than 5 mins and everything was set!!!
tanx a bunch!!!!

Anonymous said...

Se q no me vas a entender lo q te diga pero me re ayudo lo q pusistes amigo!!! te lo agradesco!!

Anonymous said...

Thank you soooo much. I've been trying to find a solution to this "motorola usb modem" problem after countless searches until I found your advice. Great work on your part.

pearlheartgtr said...

Thank you! I had done an XP SP2 repair last night and had to reinstall SP3. Went to charge my phone today and it wouldn't install the drivers.

Thanks again for this fix!!!

Anonymous said...

Fantastic!
I was wrestling with this for days and pretty much resigned on the whole process.I think this may be a result of XP-SP3 install earlier in the month.

Thanks !!!

Anonymous said...

Unfrikenbelievable!!
I've spent many an hour trying to fix just this problem. Nowhere....I mean nowhere..is there any fix for this problem online. I was just about to give up till I stumbled onto your post.
I agree with all the other posters,
a truely wonderful find! ty ty ty!
Everything works as it should...again.

bows humbly,
Ralph Anderson
1/13/09

Anonymous said...

First of all thank you, you da man...
Well I need to different phones to my PC all the time so is there a permanent way to remove this wdf01000.sys check.
Please advise.

Anonymous said...

Thank you thank you thank you thank you thank you thank you THANK YOU!

Searched the net high and low for a solution to this problem before finding your post. You are a legend!

Anonymous said...

Awesome!! Scratched my head for days with this one, your fix was perfect. Thanks!

Anonymous said...

Excellent man! I contacted the motorola customer care guys and they didn't have any clue whatsoever!!

Anonymous said...

Outstanding! A whole days of work lost, and then I find this.

MDTDLV@aol.com said...

Dude i spent days on end trying to figure this out and I was just simply going mad. I don't know how to thank you enough, Thanks Again!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

John said...

I salute you friend for being quite helpful with your expert knowledge of fact finding & sharing unselfishly your findings. Nearly threw all my toys out of the cot before i saw this. Thank you.

Anonymous said...

Good Work!

Jing Li Teng said...

hey thanks again for the well informed entry. The info probably saved me a ton of time! Well i deleted the .sys file and 'upgraded' current driver for my razr. NOw everything works! HEHHE

MrPatol said...

GREAT solution here http://forum.xda-developers.com/showthread.php?p=4522605&posted=1#post4522605

Anonymous said...

Worked for me too man, Thanks. Good Karma coming....

Unknown said...

Thanks,it worked perfectly in my case too.

cognitdiss said...

Damn- my phone works fine, but thanks anyways dude, I can only aspire to get so much props over a single post!