feat: 脚本文件

This commit is contained in:
wangzhongjie 2025-01-20 08:59:16 +08:00
parent c912d437dd
commit 3d114bc468
2 changed files with 50 additions and 0 deletions

23
Makefile Normal file
View File

@ -0,0 +1,23 @@
TOOLCHAIN_PATH := /Users/wangzhongjie/Library/OpenHarmony/Sdk/9/toolchains
logs:
cd $(TOOLCHAIN_PATH) && \
./hdc file recv /mnt/hmdfs/100/account/device_view/local/files/duolun/logs /Users/wangzhongjie/Desktop/log
hilog:
cd $(TOOLCHAIN_PATH) && \
./hdc kill && \
./hdc shell "tar -czvf /data/log.tar.gz /data/log/" && \
./hdc file recv /data/log.tar.gz /Users/wangzhongjie/Desktop/log && \
./hdc shell "rm -rf /data/log.tar.gz"
open:
cd $(TOOLCHAIN_PATH) && \
./hdc kill && \
./hdc shell hilog -w stop && \
./hdc shell hilog -r && \
./hdc shell hilog -w start -l 100M -m none && \
./hdc shell hilog -Q pidoff && \
./hdc shell hilog -p off && \
./hdc shell hilog -b D && \
./hdc shell hilog -w start -t kmsg -m none

27
script.bat Normal file
View File

@ -0,0 +1,27 @@
@echo off
set TOOLCHAIN_DIR=C:\Users\wangzhongjie\Library\OpenHarmony\Sdk\9\toolchains
:logs
cd %TOOLCHAIN_DIR%
hdc.exe file recv /mnt/hmdfs/100/account/device_view/local/files/duolun/logs C:\Users\wangzhongjie\Desktop\log
goto :eof
:hilog
cd %TOOLCHAIN_DIR%
hdc.exe kill
hdc.exe shell "tar -czvf /data/log.tar.gz /data/log/"
hdc.exe file recv /data/log.tar.gz C:\Users\wangzhongjie\Desktop\log
hdc.exe shell "rm -rf /data/log.tar.gz"
goto :eof
:open
cd %TOOLCHAIN_DIR%
hdc.exe kill
hdc.exe shell hilog -w stop
hdc.exe shell hilog -r
hdc.exe shell hilog -w start -l 100M -m none
hdc.exe shell hilog -Q pidoff
hdc.exe shell hilog -p off
hdc.exe shell hilog -b D
hdc.exe shell hilog -w start -t kmsg -m none
goto :eof