Manually Enabling Kernel Debugging in W10M

Follow these steps to enable Kernel Debugging on your Windows Mobile device to allow you to connect to WinDbg over USB (other methods also exist but are not covered here.. yet)

Requirements:

  • Kernel Debug files from Windows IoT ARM32, you may not need all the files.
  • WinDbg Classic/WinDbg Preview Installed and set up.
  • USB Data Cable
  • Internet Access/Offline Debugging Symbols Internet Access is the preferred method as Microsoft stopped Symbol Packs and WinDbg will attempt to fetch any symbols needed. Offline ones I provide are not many but can be hound here.
  • Access to Mass Storage Mode Either with Unlocked Bootloader and Developer Menu, or Interop Unlocked with Production Developer Menu. (production version not compatible with 15xxx builds)

Guide

Make sure to fetch the Requirements above. Any drive paths below (e.g D:\EFIESP) change it to what letter your MainOS drive is.

- Enter Mass Storage and connect to your PC. 
- Navigate to "D:\EFIESP\EFI\Microsoft\Boot\" and make a copy of the file "BCD"

- Open Command Prompt as an Administrator
- Type these commands pressing enter after each command:

          bcdedit /store "D:\EFIESP\EFI\Microsoft\Boot\BCD" /set {default} debug on

          bcdedit /store "D:\EFIESP\EFI\Microsoft\Boot\BCD" /dbgsettings usb targetname:WINMOB

          bcdedit /store "D:\EFIESP\EFI\Microsoft\Boot\BCD" /set {default} dbgtransport kdusb.dll


- You can close the Command Prompt Window now.

- Extract/Open "W10M_kd.zip" and copy the files to "D:\Windows\System32". Don't replace any files that ask to be replaced (No issue if you do replace) 

- Launch WinDbg as Administrator.
- Goto [File > Attach a Kernel > USB Tab]
- In the "Target Name" box type: WINMOB
- (Optional) Tick Break on Connection it interrupt Booting with the debugger
- (First Run of WinDbg) When asked to install a driver from 'Microsoft', accept installing the driver. It is for USB Debugging Drivers

- Reboot back into "Normal Mode"
- Windbg should detect the device during boot!

- MTP/Data Access may be blocked while Kernel Debugging is active.
- Device will likely run a bit slower, this is standard when Debugging.
- Debugging Symbols are publically available on Microsoft Symbol Servers, WinDbg will attempt to download the .pdb file needed.

How to Disable KD
- Either Copy back your backed up BCD file
or
- Enter Mass Storage Mode and run this command like above:

         bcdedit /store "D:\EFIESP\EFI\Microsoft\Boot\BCD" /set {default} debug off

Made with ‌

Drag and Drop Website Builder