From 3d114bc46845dd46c96665f101fe1d43581d3dca Mon Sep 17 00:00:00 2001 From: wangzhongjie Date: Mon, 20 Jan 2025 08:59:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=84=9A=E6=9C=AC=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 23 +++++++++++++++++++++++ script.bat | 27 +++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 Makefile create mode 100644 script.bat diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..10174537 --- /dev/null +++ b/Makefile @@ -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 \ No newline at end of file diff --git a/script.bat b/script.bat new file mode 100644 index 00000000..7c57964b --- /dev/null +++ b/script.bat @@ -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 \ No newline at end of file