Skip to content

Deployment and Testing

Luís Pinto edited this page Jun 22, 2026 · 10 revisions

If the firmware installed on your Miyoo Mini+ device (e.g. Onion OS) supports the SSH protocol, then testing cycles can be accelerated by not having to manually copy binaries to the SD card.
You can also leverage sshpass to avoid repeated password prompts, as demonstrated below.

# SSH connection details for your Miyoo Mini+ will depend on its firmware and your LAN setup:
ipAddress="192.168.1.128"
user="root"
remoteDirectory="/mnt/SDCARD/helloWorld"

sshOptions=(
    -o StrictHostKeyChecking=accept-new
    -o MACs=hmac-sha1
    -o IgnoreUnknown=WarnWeakCrypto
    -o WarnWeakCrypto=no
)

# Read the SSH password:
read -r -s -p "SSH password: " SSHPASS && printf '\n'
export SSHPASS

# Create the $remoteDirectory on the Miyoo Mini+:
sshpass -e ssh \
    "${sshOptions[@]}" \
    "$user@$ipAddress" \
    "mkdir -p '$remoteDirectory'"

# Copy the 'helloWorld' binary to it:
sshpass -e ssh \
    "${sshOptions[@]}" \
    "$user@$ipAddress" \
    "cat > '$remoteDirectory/helloWorld' && chmod 755 '$remoteDirectory/helloWorld'" \
    < "$HOME/src/mmiyoo/helloWorld/helloWorld"

# Mark the binary as runnable, then run it on the Miyoo Mini+:
sshpass -e ssh \
    "${sshOptions[@]}" \
    "$user@$ipAddress" \
    "chmod +x '$remoteDirectory/helloWorld' && '$remoteDirectory/helloWorld'"

unset SSHPASS

Note

Remember to replace the ipAddress, user, and remoteDirectory variables with values that match your firmware and LAN setup.


Previous Article
Hello World

Next Article
Device Debugging Toolset

Clone this wiki locally