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