64 bit USB driver

Status
Not open for further replies.
Search This thread

aziwoqpd

Member
Jun 28, 2007
18
1
Dunno if anyone actually uses 64 bit Vista around here, but if you do, I made a 64 bit version of the USB driver. It's unsigned, so before installing it you'll have to put Vista into test mode or it will refuse to load the driver:

1) Type "bcdedit /set testsigning on" at an admin command prompt
2) Reboot
3) Check to see if the desktop says "Test Mode" on the corners

(I'm not paying $300/yr for a kernel code signing certificate)

After that you should be able to install it like a normal driver. If adb seems to be freezing occassionally, try using adb_fixed.exe instead (don't forget to kill the adb server first).
 

Attachments

  • android_x64.zip
    2 MB · Views: 23,955
  • Like
Reactions: kalehua4791

twistkill

Senior Member
Sep 23, 2006
304
25
Dallas, TX
dammit! a bit too late...i used vmware on my 64bit vista to create a virtual machine and 32 bit drivers..lol
but thank you for the drivers...will make my life easier :)

and welcome to xdadevs!
 

swarttsc

Member
Apr 14, 2006
21
0
36
Marysville
thank you, I like wise used a work around and dual booted xp and xp x64 so I could use the drivers but I will definilty thankfully switch back over to x64 now thanks much!
 

Koush

Retired Recognized Developer
Sep 21, 2007
917
871
Dunno if anyone actually uses 64 bit Vista around here, but if you do, I made a 64 bit version of the USB driver. It's unsigned, so before installing it you'll have to put Vista into test mode or it will refuse to load the driver:

1) Type "bcdedit /set testsigning on" at an admin command prompt
2) Reboot
3) Check to see if the desktop says "Test Mode" on the corners

(I'm not paying $300/yr for a kernel code signing certificate)

After that you should be able to install it like a normal driver. If adb seems to be freezing occassionally, try using adb_fixed.exe instead (don't forget to kill the adb server first).

Awesome! You should see if you can get the changes submitted to Google and then they might be inclined to release it with their signing cert.
 

JesusFreke

Inactive Recognized Developer
Oct 23, 2008
736
54
Dallas
Nice job aziwoqpd! I don't use vista myself, but lack of 64 bit vista drivers was a glaring problem.

Mods: this should probably be stickied :)
 
Z

zaalander

Guest
Source ?

Hey, that's sounds really great ! Congratulations...

Can you provide the sources to your modifications ?

I'd like to be able to rebuild this myself. Yes, I'm a little anxious at the idea of installing a random driver from the Internet on my system ;-)
 

aziwoqpd

Member
Jun 28, 2007
18
1
adb_fixed just includes this patch: http://www.telesphoreo.org/pipermail/g1-hackers/2008-December/000191.html

I've attached a diff of the changes I made to the driver. Basically the only difference is that a pointer used for communication between the 32bit DLL and the 64bit driver needs to be explicitly defined as a 32bit pointer so that it's only 4 bytes wide. I also changed the version of Microsoft's WDF library to 1.7 since that's what I already had installed.

You'll also need the driver development kit (the WDK) from Microsoft to compile and link the thing. It's a (big!) free download, though. Just google for "WDK". It includes a command line utility called "build" that's not unlike make for userland code (you can try to use Google's Visual Studio files, but you'll have to hack them to work with x64 and they just end up calling build.exe anyway). For Vista you'll also have to test-sign the driver with a dummy certificate (the WDK help files have a walkthrough somewhere covering this). Or you could pay $300 a year to globalsign for a key! What a deal....

Hmm, it's not letting me attach the file. I'll just paste it:
Code:
diff -U4 -r ./common/android_usb_common_defines.h /mnt/sukiyaki/dev/andusb/common/android_usb_common_defines.h
--- ./common/android_usb_common_defines.h	2008-10-31 17:43:13.000000000 -0700
+++ /mnt/sukiyaki/dev/andusb/common/android_usb_common_defines.h	2008-11-14 14:18:51.439171200 -0800
@@ -132,8 +132,8 @@
   ULONG transfer_size;
 
   /// Pointer to the actual buffer for ADB_CTL_BULK_WRITE request. This field
   /// is not used in ADB_CTL_BULK_READ request.
-  void* write_buffer;
+  void* POINTER_32 write_buffer;
 };
 
 #endif  // ANDROID_USB_COMMON_DEFINES_H__
diff -U4 -r ./driver/android_usb.inf /mnt/sukiyaki/dev/andusb/driver/android_usb.inf
--- ./driver/android_usb.inf	2008-10-31 17:43:13.000000000 -0700
+++ /mnt/sukiyaki/dev/andusb/driver/android_usb.inf	2008-11-14 15:54:04.556495700 -0800
@@ -10,9 +10,9 @@
 Class=USB
 ClassGuid={F72FE0D4-CBCB-407d-8814-9ED673D0DD6B}
 Provider=%GOOG%
 DriverVer=date,1.0.0009.00000
-CatalogFile=androidusb.cat
+;CatalogFile=androidusb.cat
 
 ; ================= Class section =====================
 
 [ClassInstall32]
@@ -27,9 +27,9 @@
 
 ; ================= Device section =====================
 
 [Manufacturer]
-%MfgName%=Google,NTx86
+%MfgName%=Google,NTamd64
 
 ; For Win2K
 [Google]
 ; For loopback testing
@@ -38,9 +38,9 @@
 %USB\VID_0BB4&PID_0C01.DeviceDescRelease%=androidusb.Dev, USB\VID_0BB4&PID_0C01
 %USB\VID_0BB4&PID_0C02&MI_01.DeviceDescRelease%=androidusb.Dev, USB\VID_0BB4&PID_0C02&MI_01
 
 ; For XP and later
-[Google.NTx86]
+[Google.NTamd64]
 ; For loopback testing
 %USB\VID_18D1&PID_DDDD.DeviceDescTest%=androidusb.Dev, USB\VID_18D1&PID_DDDD
 ; HTC Dream
 %USB\VID_0BB4&PID_0C01.DeviceDescRelease%=androidusb.Dev, USB\VID_0BB4&PID_0C01
@@ -85,21 +85,21 @@
 AddReg=CoInstaller_AddReg
 CopyFiles=CoInstaller_CopyFiles
 
 [CoInstaller_CopyFiles]
-wdfcoinstaller01005.dll
+wdfcoinstaller01007.dll
 
 [SourceDisksFiles]
-wdfcoinstaller01005.dll=1 ; make sure the number matches with SourceDisksNames
+wdfcoinstaller01007.dll=1 ; make sure the number matches with SourceDisksNames
 
 [CoInstaller_AddReg]
-HKR,,CoInstallers32,0x00010000, "wdfcoinstaller01005.dll,WdfCoInstaller"
+HKR,,CoInstallers32,0x00010000, "wdfcoinstaller01007.dll,WdfCoInstaller"
 
 [androidusb.Dev.NT.Wdf]
 KmdfService = androidusb, androidusb_wdfsect
 
 [androidusb_wdfsect]
-KmdfLibraryVersion = 1.5
+KmdfLibraryVersion = 1.7
 
 ;---------------------------------------------------------------;
 
 [Strings]
 

SiXiam

Senior Member
Jan 2, 2009
58
0
Thanks, I registered just so I could download that driver... :)

Just got my G1 flashed to the hacked RC and I wanted to play with some tethering on Vista X64...
 

mastercut

Senior Member
Dec 5, 2006
125
13
I don't know if can help to sign the 64 bit driver , i try to post.

Test-signing the Micro Framework USB driver for installation on Vista 64-bit systems

The 64-bit version of Windows Vista requires all kernel mode drivers or services to pass a validation. In this follow-up of building USB driver in the Micro Framework, I’ll briefly outline the necessary steps to sign a driver that meets the requirement. These steps are intended for users working in a development environment. If you are planning to distribute drivers to third-parties, you should submit the driver for a WHQL signature or use a software publisher certificate. For more information about the bigger picture, review the kernel-mode signing guide on the WHQL website.

Let’s get on with the technical process. I’ve assumed you have a 64-bit Micro Framework USB driver built. If not, you’ll need to use the WDK and the WDK setup script, SETENV.BAT, to build the porting kit sample driver for an x64 (64-bit) Vista operating system. See the prior blog for detailed steps.

1. Open a command prompt with administrative privileges.

2. Run the command to enable test signed kernel mode drivers.
BCDEDIT /SET TESTSIGNING ON

3. Confirm the setting is correct by listing the Windows Boot Loader settings.
BCDEDIT /ENUM

4. Reboot to enable the new boot loader setting.
SHUTDOWN –t 60 –r
Notice the desktop background displays a new water mark after the reboot.

5. Open a command prompt and run the WDK SETENV.BAT command.
C:\apps\WDK\bin\SETENV.BAT C:\apps\WDK fre x64

6. Change directory to the porting kit root.

7. Set up the certificates folder.
MD Certificates
CD Certificates

8. Generate a self-signed certificate and private key.
Makecert –r –pe –ss MFCertificateStore –n “CN=MicroFrameworkOEM” OEMCertificate.cer

9. Open a MMC console and snap-in certificates for the current user. You will see the MFCertificateStore containing a private key and certificate. The certificate containing the public key is in a file called OEMCertificate.cer.

10. Add the certificate to the trusted publisher store.
Using the MMC certificate snap-in, right-click on the Trusted Publisher folder. Select import. Browse to the PK\Certificates\OEMCertificate.cer file.

11. Next, create a CAT file. First change directories to the Drivers\Vista64 folder. This folder contains the 64-bit USB driver under amd64 and the INF file.
CD BUILDOUTPUT\DRIVERS\VISTA64

12. Edit the INF file so that the version is 6.0.0.1 (or later as it matches the OS) and the driver date string is current.



13. Create a CAT file. The parameter to the “/driver” option must be the full path. Confirm the INF2CAT status output displays success with no warnings or errors.
INF2CAT /driver:C:\PK\Buildoutput\Drivers\Vista64\ /OS:Vista_x64

14. Sign the CAT file. The tool will use the the private key stored safely in the workstation certificate store.
SIGNTOOL sign /v /s MFCertificateStore /n MicroframeworkOEM /t http://timestamp.verisign.com/scripts.timestamp.dll MFUSB_PortingKitSample.cat

15. Verify the digital signature.
SIGNTOOL verify /kp /c MFUSB_PortingKitSample.cat amd64\MFUSB_PortingKitSample.sys

16. Plug in the Micro Framework device and install the newly signed driver. You’ll notice a pop-up that asks for permission to install the driver.

The steps above provide a process for signing 64-bit drivers that I use for Vista 64-bit testing. It is good to know the steps. But combined with the prior blog describing USB driver building, the labor to perform all these steps is too time-consuming. We’ll follow-up at a later time how to automate most if not all steps using the POWERSHELL toolset.

Jeff Simon
.Net Micro Framework
SDET - Porting Kit
 

kscasper13

Senior Member
Oct 30, 2007
256
96
Fort Lauderdale, FL
Vista 64 Development Mode Driver?

I'm runnin vista 64, and i can't get the "64 bit driver" that i found somewhere on here to work in Debug/Development Mode. anyone have one that they KNOW works?
 
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Dunno if anyone actually uses 64 bit Vista around here, but if you do, I made a 64 bit version of the USB driver. It's unsigned, so before installing it you'll have to put Vista into test mode or it will refuse to load the driver:

    1) Type "bcdedit /set testsigning on" at an admin command prompt
    2) Reboot
    3) Check to see if the desktop says "Test Mode" on the corners

    (I'm not paying $300/yr for a kernel code signing certificate)

    After that you should be able to install it like a normal driver. If adb seems to be freezing occassionally, try using adb_fixed.exe instead (don't forget to kill the adb server first).
    1
    hi guys, ive rebooted my machine and it is now in test mode.
    i plug in the usb to the gphone after enabling USB debugging but windows isnt bringing up a notification (like it did before) to ask to install the driver
    any ideas how to manually install it?
    cheers

    Use the driver supplied with the new SDK.

    Thread closed due to a new official driver out.