Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
wgreenberg committed May 22, 2024
1 parent b4b52e2 commit e50d7bd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,15 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: dist
- name: Archive release
- name: Setup release directory
run: mv rayhunter-daemon/rayhunter-daemon rootshell/rootshell serial-* dist
- name: Archive release directory
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: 'release.zip'
directory: 'dist'
# TODO: have this create a release directly
- name: Upload release
uses: actions/upload-artifact@v4
with:
Expand Down
File renamed without changes.
13 changes: 9 additions & 4 deletions dist/install-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ force_debug_mode() {
}

setup_rootshell() {
adb push target/armv7-unknown-linux-gnueabihf/release/rootshell /tmp/
_adb_push rootshell /tmp/
$(SERIAL_PATH) "AT+SYSCMD=mv /tmp/rootshell /bin/rootshell"
sleep 1
$(SERIAL_PATH) "AT+SYSCMD=chown root /bin/rootshell"
Expand All @@ -43,11 +43,16 @@ setup_rootshell() {
adb shell /bin/rootshell -c id
}

_adb_push() {
adb push "$(dirname "$0")/$1" "$2"
}

setup_rayhunter() {
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_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 "chmod 755 /etc/init.d/rayhunter_daemon"'
Expand Down

0 comments on commit e50d7bd

Please sign in to comment.