diff --git a/Makefile b/Makefile index 260405d..0bd2283 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ TOOLCHAIN_PATH=./mac DOWNLOAD_PATH=../logs SCAN_PATH=../scan +SELFSTART_PATH=../selfstart # 下载轨迹 stud: cd $(TOOLCHAIN_PATH) && \ @@ -39,7 +40,17 @@ record: cd $(TOOLCHAIN_PATH) && \ ./hdc shell mount -o remount,rw / \ ./hdc file send ../sprecord/librtsprecord.z.so /system/lib/module/libhiserialsdk.z.so - +# 关闭自启 +selfstart: + cd $(TOOLCHAIN_PATH) && \ + ./hdc shell mount -o remount,rw / \ + ./hdc shell rm -rf /data/* \ + ./hdc shell rm -rf /system/app/com.ohos.launcher/* \ + ./hdc file send ${SELFSTART_PATH}\Launcher.hap /system/app/com.ohos.launcher \ + ./hdc file send ${SELFSTART_PATH}\Launcher_Settings.hap /system/app/com.ohos.launcher \ + ./hdc shell sync \ + ./hdc shell reboot + diff --git a/selfStart/Launcher.hap b/selfStart/Launcher.hap new file mode 100644 index 0000000..1ef628f Binary files /dev/null and b/selfStart/Launcher.hap differ diff --git a/selfStart/Launcher_Settings.hap b/selfStart/Launcher_Settings.hap new file mode 100644 index 0000000..9e9aede Binary files /dev/null and b/selfStart/Launcher_Settings.hap differ diff --git a/自动拉起app.bat b/自动拉起app.bat new file mode 100644 index 0000000..31b9d57 --- /dev/null +++ b/自动拉起app.bat @@ -0,0 +1,17 @@ +@echo off +set filepath=.\selfStart +set hdc=hdc +%hdc% shell mount -o remount,rw / + +%hdc% shell rm -rf /data/* + +%hdc% shell rm -rf /system/app/com.ohos.launcher/* +%hdc% file send %filepath%\Launcher.hap /system/app/com.ohos.launcher +%hdc% file send %filepath%\Launcher_Settings.hap /system/app/com.ohos.launcher + +%hdc% shell sync + +::%hdc% shell /system/bin/udevadm trigger + +%hdc% shell reboot +