Skip to content

Commit

Permalink
next try
Browse files Browse the repository at this point in the history
  • Loading branch information
cre4ture committed Jan 25, 2024
1 parent 5f0a865 commit 70de5f4
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion util/android-commands.sh
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,35 @@ run_command_via_ssh() {
ssh -p 9022 termux@127.0.0.1 $@
}

navigate_down() {
adb shell input keyevent 20
}

hit_space_key() {
adb shell input text "\ "
}

termux_change_rep() {
probe='/sdcard/change_repo.probe'
adb shell input text "termux-change-repo" && hit_enter
sleep 1
hit_enter # select mirror group option
sleep 1
navigate_down
navigate_down
navigate_down # select europe
hit_space_key
hit_enter
}

snapshot() {
apk="$1"
echo "Running snapshot"
adb install -g "$apk"

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

Check failure on line 239 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:239)
command="'echo deb https://grimler.se/termux-packages-24 stable main > \$PREFIX/etc/apt/sources.list; echo \$? > $probe'"
command="'echo deb https://grimler.se/termux-packages-24 stable main | dd of=\$PREFIX/etc/apt/sources.list; echo \$? > $probe'"
run_termux_command "$command" "$probe"
probe='/sdcard/pkg.probe'
command="'mkdir -vp ~/.cargo/bin; yes | pkg install openssh rust binutils openssl tar -y && sshd; echo \$? > $probe'"
Expand Down

0 comments on commit 70de5f4

Please sign in to comment.