Skip to content

Commit 322e38d

Browse files
committed
en/zh: Add en version of tips in KdNetRDP.md
1 parent 8119f2d commit 322e38d

File tree

7 files changed

+61
-7
lines changed

7 files changed

+61
-7
lines changed

.vitepress/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ function sidebarDocs(): DefaultTheme.SidebarItem[] {
6565
items: [
6666
{ text: 'Setup KDNET', link: '/WindowsDebug/SetupKDNET.md'},
6767
{ text: 'Setup KDCOM', link: '/WindowsDebug/SetupKDCOM.md'},
68+
{ text: 'RDP via KdNet', link: '/WindowsDebug/KdNetRDP.md'},
6869
]
6970
},
7071
{

WindowsDebug/KdNetRDP.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# KdNet Remote Desktop
2+
> This method is intended for early-stage debugging. You can connect to the target device's Windows remote desktop via KdNet to test touch, USB, etc.
3+
> References and tutorials adapted from the [WOA Project](https://github.com/WOA-Project/).
4+
5+
## Preparation
6+
- A device that has just had Windows deployed and has not been booted yet.
7+
- The ESP partition's ESP FLAG must have been set correctly before deploying Windows.
8+
- The phone is currently in Mass Storage Mode and connected to the PC.
9+
- You have read the [KDNET setup guide](/WindowsDebug/SetupKDNET.md) and performed the full procedure at least once.
10+
- Download `unattend.xml` from [unattend.xml](/WindowsDebug/KdNetRDP/unattend.xml).
11+
12+
:::warning Note
13+
The unattended file only takes effect on the first boot. Make sure you have just finished deploying the system and installed drivers.
14+
- For installing Windows see [Windows installation summary](/InstallationGuides/WindowsInstallation.md).
15+
- For driver installation see [Install Drivers](/InstallationGuides/InstallDrivers.md).
16+
:::
17+
18+
## Configure Unattended Setup
19+
- Open File Explorer and locate the system drive of the phone.
20+
- Enter `\Windows\Panther\`.
21+
- Copy the `unattend.xml` you downloaded into this folder.
22+
+ Optional: you can modify the `LocalUser` in `unattend.xml` to change the created username.
23+
- Eject the disk and reboot the phone, then boot into UEFI.
24+
- Wait for the system to boot. The normal flow is:
25+
+ Spinning wheel -> Getting devices ready -> Ready -> Automatic reboot
26+
- After the automatic reboot, boot UEFI again. The normal flow is:
27+
+ Spinning wheel -> OOBE -> Enter desktop as user `LocalUser`
28+
- Note both steps are automated; you only need to boot UEFI twice.
29+
- If on first boot you see a "Windows could not complete the installation... click OK to restart" message, check the ESP FLAG and reinstall Windows if necessary.
30+
31+
## Windbg Connection
32+
- Follow the KDNET setup steps in [SetupKDNET](/WindowsDebug/SetupKDNET.md#setup-bcd) to configure KDNET and connect.
33+
+ If the debugger auto-breaks, click `Go` in the top-left of Windbg or type `g` and press Enter in the command line.
34+
- After the phone boots into Windows, click the `Break` button in the top-left of Windbg. In the command line area enter `!process 0 1` and press Enter, then wait for the output to finish.
35+
- Pick any process, click the blue data link after `Peb`, Windbg will execute the command and dump a lot of data.
36+
![Process](/WindowsDebug/KdNetRDP/Process.png)
37+
- In the output find `USERDOMAIN` and copy the value after it. It is usually like `PHONE-XXXXX` or `DESKTOP-XXXX`.
38+
![UserDomain](/WindowsDebug/KdNetRDP/UserDomain.png)
39+
:::tip
40+
If the selected Peb output does not contain `USERDOMAIN`, try another process's Peb.
41+
:::
42+
43+
## RDP Connection
44+
- Open the built-in Windows Remote Desktop tool (`Remote Desktop Connection`). You can search it in the Start menu or press `Win+R` and run `mstsc`.
45+
- Enter the `USERDOMAIN` you copied in the `Computer` field and click Connect.
46+
![Connect](/WindowsDebug/KdNetRDP/mstsc.png)
47+
- The username is `LocalUser`, or whatever you set in `unattend.xml`.
48+
- There is no password; enter the username and connect. If you are warned about a certificate, ignore/accept it.
49+
- If Remote Desktop connects successfully, the setup is complete — start your debugging session!
50+
![Connected](/WindowsDebug/KdNetRDP/Connected.png)
51+
52+
## References
53+
- [MSDN: Answer file (unattend.xml)](https://learn.microsoft.com/zh-cn/windows-hardware/manufacture/desktop/update-windows-settings-and-scripts-create-your-own-answer-file-sxs)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

zh/WindowsDebug/KdNetRDP.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,21 @@
3333
+ 如果中途自动`break`了,可以点击左上角的`Go`或在命令行输入`g`然后回车
3434
- 在手机进入系统后,点击Windbg窗口左上角`break`按钮,在窗口中间的命令行中输入`!process 0 1`并回车,等待输出完毕
3535
- 随便找一个Process,点击`Peb`后面的蓝色数据,Windbg会执行命令并输出一大堆内容。
36-
![Process](Resources/KdNetRDP/Process.png)
36+
![Process](/WindowsDebug/KdNetRDP/Process.png)
3737
- 在输出的内容中找到`USERDOMAIN`, 复制后面的内容,一般为为`PHONE-XXXXX``DESKTOP-XXXX`
38-
![UserDomain](Resources/KdNetRDP/UserDomain.png)
39-
:::tip
40-
如果点开一个Peb里面没有USERDOMAIN的话, 可以考虑换一个Process的Peb
41-
:::
38+
![UserDomain](/WindowsDebug/KdNetRDP/UserDomain.png)
39+
:::tip
40+
如果点开一个Peb里面没有`USERDOMAIN`的话, 可以考虑换一个Process的`Peb`
41+
:::
4242

4343
## RDP连接
4444
- 打开Windows自带的RDP工具`远程桌面连接`, 你可以在开始菜单搜索到, 或者按`Win+R`在运行窗口输入`mstsc`
4545
- 输入刚才复制的`USERDOMAIN`, 填入计算机一栏中,点击连接
46-
![连接](Resources/KdNetRDP/mstsc.png)
46+
![连接](/WindowsDebug/KdNetRDP/mstsc.png)
4747
- 用户名为`LocalUser`, 或者你在`unattend.xml`中自定义的用户名。
4848
- 没有密码,输入用户名连接即可,如果提示证书不对,点击忽略确认即可。
4949
- 如果远程桌面连接窗口成功连接到系统,则一切配置完成,开启你的调试之旅吧!
50-
![连接成功](Resources/KdNetRDP/Connected.png)
50+
![连接成功](/WindowsDebug/KdNetRDP/Connected.png)
5151

5252
## 参考链接
5353
- [MSDN: 应答文件](https://learn.microsoft.com/zh-cn/windows-hardware/manufacture/desktop/update-windows-settings-and-scripts-create-your-own-answer-file-sxs)

0 commit comments

Comments
 (0)