Skip to content

Commit

Permalink
test sshd additionally
Browse files Browse the repository at this point in the history
  • Loading branch information
cre4ture committed Jan 25, 2024
1 parent 876880f commit 3e94a94
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions util/android-commands.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ If you have multiple devices, use the ANDROID_SERIAL environment variable to
specify which to connect to."
}

start_sshd() {
adb shell input text "pkg upgrade" && hit_enter && hit_enter
adb shell input text "pkg install openssh" && hit_enter && hit_enter
adb shell input text "sshd" && hit_enter && hit_enter
}

hit_enter() {
adb shell input keyevent 66
}
Expand Down Expand Up @@ -202,11 +208,16 @@ snapshot() {

echo "Prepare and install system packages"
probe='/sdcard/sourceslist.probe'

Check failure on line 210 in util/android-commands.sh

View workflow job for this annotation

GitHub Actions / Style/spelling (ubuntu-latest, feat_os_unix)

ERROR: Unknown word (sourceslist) (file:'util/android-commands.sh', line:210)
run_termux_command "\"echo 'deb https://grimler.se/termux-packages-24 stable main' > \$PREFIX/etc/apt/sources.list; echo \$? > $probe\"" "$probe"
command="echo 'deb https://grimler.se/termux-packages-24 stable main' > \$PREFIX/etc/apt/sources.list; echo \$? > $probe"
run_termux_command ${command@Q} "$probe"
probe='/sdcard/pkg.probe'
command="'mkdir -vp ~/.cargo/bin; yes | pkg install rust binutils openssl tar -y; echo \$? > $probe'"
command="'mkdir -vp ~/.cargo/bin; yes | pkg install openssh rust binutils openssl tar -y; sshd; echo \$? > $probe'"
run_termux_command "$command" "$probe" || return

adb forward tcp:9022 tcp:8022

ssh -p 9022 termux@127.0.0.1 echo Hello SSH World \$USER

echo "Installing cargo-nextest"
probe='/sdcard/nextest.probe'
# We need to install nextest via cargo currently, since there is no pre-built binary for android x86
Expand Down

0 comments on commit 3e94a94

Please sign in to comment.