Skip to content

Commit 8f7447e

Browse files
committed
feat: Environment variables host and port of the hdc server
1 parent e4e987e commit 8f7447e

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,29 @@ python3 -m uiviewer -p <PORT>
5656

5757
```
5858

59+
# Environment
60+
If you need to connect to a remote HDC Server or ADB server for remote device debugging, you must set the required environment variables before starting uiviewer.
61+
62+
HarmonyOS
63+
```bash
64+
export HDC_SERVER_HOST=127.0.0.1 # Replace with the remote host
65+
export HDC_SERVER_PORT=8710
66+
```
67+
68+
Android
69+
```
70+
export ANDROID_ADB_SERVER_HOST=127.0.0.1 # Replace with the remote host
71+
export ANDROID_ADB_SERVER_PORT=5037
72+
```
73+
74+
Remove Environment Variables, To unset the environment variables:
75+
```
76+
unset HDC_SERVER_HOST
77+
unset HDC_SERVER_PORT
78+
79+
unset ANDROID_ADB_SERVER_HOST
80+
unset ANDROID_ADB_SERVER_PORT
81+
```
5982

6083

6184
# Tips

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ aiofiles = "^23.1.0"
1818
uiautomator2 = "^3.0.0"
1919
facebook-wda = "^1.0.5"
2020
tidevice = "^0.12.10"
21-
hmdriver2 = "^1.3.1"
21+
hmdriver2 = "^1.4.0"
2222

2323
[tool.poetry.extras]
2424

0 commit comments

Comments
 (0)