Created
April 18, 2025 05:54
-
-
Save megaacheyounes/2dc0550aae202e2e783946c12d19f800 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
@REM take screenshot on HarmonyOS Next device using HDC CLI (windows script) | |
@REM Requirements: | |
@REM 1. add hdc.exe to environment varilable (path) | |
@REM 2. connect watch with PC using command: hdc tconn <ip>:5555 | |
@REM screenshots will be saved to the same folder as this script | |
set timestamp=%time:~0,2%_%time:~3,2%_%time:~6,2% | |
set spath="/data/local/tmp/harmony_screeshot_%timestamp%.jpeg" | |
set spath=%spath: =_% | |
echo %spath% | |
hdc shell snapshot_display -f %spath% | |
hdc file recv %spath% | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment