Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installer fixes #42

Merged
merged 2 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/src/daemon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ async fn run_server(
.route("/", get(|| async { Redirect::permanent("/index.html") }))
.route("/*path", get(serve_static))
.with_state(state);
let addr = SocketAddr::from(([127, 0, 0, 1], config.port));
let addr = SocketAddr::from(([0, 0, 0, 0], config.port));
let listener = TcpListener::bind(&addr).await.unwrap();
task_tracker.spawn(async move {
info!("The orca is hunting for stingrays...");
Expand Down
21 changes: 11 additions & 10 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
cd serial
cargo build_pc
cd ..
cd rootshell
cargo build --release
cd ..
#!/bin/env bash

set -e

cargo build --bin serial
cargo build --bin rootshell --target armv7-unknown-linux-gnueabihf --release

# Force a switch into the debug mode to enable ADB
target/x86_64-unknown-linux-gnu/debug/serial AT
cargo run --bin serial -- AT
echo -n "adb enabled, waiting for reboot"
until adb shell true 2> /dev/null
do
Expand All @@ -15,11 +16,11 @@ done
echo
echo "it's alive!"
adb push target/armv7-unknown-linux-gnueabihf/release/rootshell /tmp/
target/x86_64-unknown-linux-gnu/debug/serial "AT+SYSCMD=mv /tmp/rootshell /bin/rootshell"
cargo run --bin serial -- "AT+SYSCMD=mv /tmp/rootshell /bin/rootshell"
sleep 1
target/x86_64-unknown-linux-gnu/debug/serial "AT+SYSCMD=chown root /bin/rootshell"
cargo run --bin serial -- "AT+SYSCMD=chown root /bin/rootshell"
sleep 1
target/x86_64-unknown-linux-gnu/debug/serial "AT+SYSCMD=chmod 4755 /bin/rootshell"
cargo run --bin 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"'
Expand Down
Loading