From b6a0ad6bdc1dc1e3c91e7ba3e260f1d99990dcf9 Mon Sep 17 00:00:00 2001 From: Cooper Quintin Date: Wed, 31 Jan 2024 22:00:25 -0800 Subject: [PATCH] fixing bugs in install script --- install.sh | 11 ++++++++++- make.sh | 1 + scripts/rayhunter_daemon | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 3c830df..b03e0e0 100755 --- a/install.sh +++ b/install.sh @@ -6,7 +6,7 @@ cargo build --release cd .. # Force a switch into the debug mode to enable ADB target/x86_64-unknown-linux-gnu/debug/serial AT -echo -n "device rooted, waiting for reboot" +echo -n "adb enabled, waiting for reboot" until adb shell true 2> /dev/null do echo -n . @@ -22,4 +22,13 @@ sleep 1 target/x86_64-unknown-linux-gnu/debug/serial "AT+SYSCMD=chmod 4755 /bin/rootshell" echo "we have root!" adb shell /bin/rootshell -c id +adb shell '/bin/rootshell -c "mkdir /data/rayhunter"' +adb push config.toml.example /data/rayhunter/config.toml +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 "chmod 755 /etc/init.d/rayhunter_daemon"' +adb shell '/bin/rootshell -c "chmod 755 /etc/init.d/misc-daemon"' ./make.sh +adb shell '/bin/rootshell -c "/etc/init.d/rayhunter_daemon start"' diff --git a/make.sh b/make.sh index e343dde..39483f3 100755 --- a/make.sh +++ b/make.sh @@ -1,2 +1,3 @@ cargo build --release adb push target/armv7-unknown-linux-gnueabihf/release/rayhunter /data/rayhunter/rayhunter +adb shell '/bin/rootshell -c "/etc/init.d/rayhunter_daemon restart"' \ No newline at end of file diff --git a/scripts/rayhunter_daemon b/scripts/rayhunter_daemon index d190b73..90704ec 100644 --- a/scripts/rayhunter_daemon +++ b/scripts/rayhunter_daemon @@ -1,4 +1,4 @@ -#! /bin/sshell +#! /bin/bash set -e