diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 2bae78c..568b4d7 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -65,15 +65,11 @@ jobs: - name: Setup release directory run: mv rayhunter-daemon/rayhunter-daemon rootshell/rootshell serial-* dist - name: Archive release directory - uses: thedoctor0/zip-release@0.7.5 - with: - type: 'zip' - filename: 'release.zip' - directory: 'dist' + run: tar -cvf release.tar dist # TODO: have this create a release directly - name: Upload release uses: actions/upload-artifact@v4 with: - name: release.zip - path: dist/release.zip + name: release.tar + path: release.tar if-no-files-found: error diff --git a/dist/install-common.sh b/dist/install-common.sh old mode 100644 new mode 100755 index a02b30d..964d111 --- a/dist/install-common.sh +++ b/dist/install-common.sh @@ -21,7 +21,8 @@ check_adb() { force_debug_mode() { # Force a switch into the debug mode to enable ADB - $(SERIAL_PATH) AT + echo "$SERIAL_PATH" + "$SERIAL_PATH" AT echo -n "adb enabled, waiting for reboot" until adb shell true 2> /dev/null do @@ -34,11 +35,11 @@ force_debug_mode() { setup_rootshell() { _adb_push rootshell /tmp/ - $(SERIAL_PATH) "AT+SYSCMD=mv /tmp/rootshell /bin/rootshell" + "$SERIAL_PATH" "AT+SYSCMD=cp /tmp/rootshell /bin/rootshell" sleep 1 - $(SERIAL_PATH) "AT+SYSCMD=chown root /bin/rootshell" + "$SERIAL_PATH" "AT+SYSCMD=chown root /bin/rootshell" sleep 1 - $(SERIAL_PATH) "AT+SYSCMD=chmod 4755 /bin/rootshell" + "$SERIAL_PATH" "AT+SYSCMD=chmod 4755 /bin/rootshell" echo "we have root!" adb shell /bin/rootshell -c id } @@ -48,13 +49,13 @@ _adb_push() { } setup_rayhunter() { - adb shell '/bin/rootshell -c "mkdir /data/rayhunter"' + adb shell '/bin/rootshell -c "mkdir -p /data/rayhunter"' _adb_push config.toml.example /data/rayhunter/config.toml _adb_push rayhunter-daemon /data/rayhunter/ _adb_push scripts/rayhunter_daemon /tmp/rayhunter_daemon _adb_push scripts/misc-daemon /tmp/misc-daemon - adb shell '/bin/rootshell -c "mv /tmp/rayhunter_daemon /etc/init.d/rayhunter_daemon"' - adb shell '/bin/rootshell -c "mv /tmp/misc-daemon /etc/init.d/misc-daemon"' + adb shell '/bin/rootshell -c "cp /tmp/rayhunter_daemon /etc/init.d/rayhunter_daemon"' + adb shell '/bin/rootshell -c "cp /tmp/misc-daemon /etc/init.d/misc-daemon"' adb shell '/bin/rootshell -c "chmod 755 /etc/init.d/rayhunter_daemon"' adb shell '/bin/rootshell -c "chmod 755 /etc/init.d/misc-daemon"' adb shell '/bin/rootshell -c "/etc/init.d/rayhunter_daemon start"' diff --git a/dist/install-linux.sh b/dist/install-linux.sh old mode 100644 new mode 100755 diff --git a/dist/install-mac.sh b/dist/install-mac.sh old mode 100644 new mode 100755