forked from daynix/UsbDk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UsbDk: Added documentation on WDF log generation
Also added a .reg file to quickly add the registry settings needed for the log generation. Signed-off-by: Leonid Bloch <[email protected]> Signed-off-by: Dmitry Fleytman <[email protected]>
- Loading branch information
Showing
2 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
1) Download and install the latest version of UsbDk, if you haven't done so | ||
already. It is available from: | ||
|
||
https://github.com/daynix/UsbDk/releases | ||
|
||
2) Download the latest WDK from here: | ||
|
||
https://msdn.microsoft.com/en-us/windows/hardware/hh852365.aspx | ||
|
||
Look for the link named "Download WDK 8.1 Update", or whatever the latest | ||
version is. It is advised to use the latest version always. | ||
|
||
3) Enable local kernel-mode debugging: | ||
|
||
a) Open a Command Prompt window as the Administrator. | ||
b) Enter "bcdedit /debug on". | ||
c) Enter "bcdedit /dbgsettings local". | ||
d) Reboot the computer. | ||
|
||
4) Set logging parameters for UsbDk: run the "Tools/RegSettingsForWdfLog.reg" | ||
file from UsbDk source tree on the intended machine. | ||
|
||
* ALTERNATIVELY, these, and other settings can be set using a GUI: | ||
|
||
a) Launch WdfVerifier. Its default path should look like that: | ||
"C:\Program Files (x86)\Windows Kits\8.1\Tools\x64\wdfverifier.exe" | ||
b) Under the "WDF Drivers" tab look for "UsbDk.sys" and click the plus sign | ||
near it. Change the following settings (right-click to change): | ||
|
||
i) Set VerifierOn to "ON" | ||
ii) Set VerboseOn to "ON" | ||
iii) Set LogPages to "16" | ||
iv) Set VerifyDownLevel to "ON" | ||
|
||
c) Click "Apply", and reboot the machine if prompted. | ||
|
||
5) Start the WinDbg debugger, that was installed as a part of WDK: | ||
|
||
a) Open a Command Prompt window as the Administrator. | ||
b) Change directory to where WinDbg is installed. FOR EXAMPLE: | ||
'cd "C:\Program Files (x86)\Windows Kits\8.1\Debuggers\x64"' | ||
c) Run WinDbg connected to the local machine: "windbg -kl" | ||
d) Load the WDF debugger extension: | ||
"!load wdfkd.dll" | ||
e) Load the system symbols: | ||
".symfix+" | ||
".reload" | ||
f) Specify the WDF .tmf file. FOR EXAMPLE: | ||
"!wdftmffile C:\temp\Wudf01011.tmf" | ||
|
||
* The default path to this file looks like: | ||
"C:\Program Files (x86)\Windows Kits\8.1\Tools\x64\Tracing", | ||
but it is necessary to copy it to some folder with no spaces in its | ||
name, such as "C:\temp\", in the example above. | ||
* Please make sure to choose the file for the correct WDF version, it is | ||
1.11 in the example above. | ||
|
||
6) Dump the log with "!wdflogdump <driver_name>.sys". FOR EXAMPLE: | ||
"!wdflogdump usbdk.sys" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Windows Registry Editor Version 5.00 | ||
|
||
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsbDk\Parameters\Wdf] | ||
"VerifierOn"=dword:00000001 | ||
"VerboseOn"=dword:00000001 | ||
"LogPages"=dword:00000010 | ||
"VerifyDownLevel"=dword:00000001 | ||
"EnhancedVerifierOptions"=dword:00000001 |