Repository navigation
Device Debugging Toolset
Prebuilt binary-analysis and debugging tools for the Miyoo Mini+, which can be downloaded from the main MMP repository.
| Binary | Version | Linkage | Use Cases |
|---|---|---|---|
addr2line |
binutils 2.32 | dynamic glibc | Map addresses to source lines with DEBUG info. |
nm |
↑ | ↑ | List symbols in binaries and object files. |
objdump |
↑ | ↑ | Disassemble code and inspect relocations. |
readelf |
↑ | ↑ | Inspect ELF headers, sections, and dependencies. |
file |
5.39 | ↑ | Identify file types using MAGIC <magic.mgc>. |
gdb |
8.3.1 | ↑ | Debug programs directly on the device via GDB. |
gdbserver |
8.3.1 | static | Let host's GDB debug a program on the device. |
strace |
5.10 | ↑ | Trace a process's system calls. |
ldd |
Shell script | -- | Show shared library dependencies. |
Note
Dynamic tools use the device's existing glibc loader and libraries; including /lib/ld-linux-armhf.so.3, /lib/libc.so.6; and, where needed, /lib/libdl.so.2 or /lib/libm.so.6.
# SSH connection details for your Miyoo Mini+ device will depend on your firmware and LAN setup:
ipAddress="192.168.1.128"
user="root"
remoteDirectory="/mnt/SDCARD/.tmp_update/bin"
# Read the SSH password:
read -r -s -p "SSH password: " SSHPASS
export SSHPASS
printf '\n'
# Copy the contents of the 'binaries' directory to the '$remoteDirectory'.
# '-O' forces the legacy SCP protocol for SSH servers without SFTP support:
sshpass -e scp \
-O \
-r \
-o StrictHostKeyChecking=accept-new \
-o MACs=hmac-sha1 \
binaries/* \
"$user@$ipAddress:$remoteDirectory/"
unset SSHPASSNote
Remember to replace the ipAddress, user, and remoteDirectory variables with values that match your firmware and LAN setup.
After copying the binaries over, you can SSH into the device and add the tools to its PATH:
export PATH="/mnt/SDCARD/.tmp_update/bin:$PATH"
# 'MAGIC' lets 'file' find 'magic.mgc' without passing '--magic-file' each time:
export MAGIC="/mnt/SDCARD/.tmp_update/bin/magic.mgc"For remote debugging, start gdbserver on the device and connect to it from GDB on the WSL host:
# On the Miyoo Mini+ device:
/mnt/SDCARD/.tmp_update/bin/gdbserver :1234 /mnt/SDCARD/path/To/Program# On the WSL host:
target remote 192.168.1.128:1234Note
A full on-device gdb binary is also included in the binaries bundle, but the gdbserver workflow is generally more responsive and lighter on the Miyoo Mini+.
Run build.sh from the main MMP repository when you need to regenerate the binaries/ bundle.
./build.shThe script downloads source archives into src/downloads/, extracts them under src/, cross-compiles the tools, and stages the result in binaries/.
Source archives and extracted build trees are regenerated as needed, and are not kept as repository source files.
The source versions are fixed in build.sh:
| Tool(s) | Source package | Version |
|---|---|---|
readelf, objdump, nm, addr2line
|
binutils | 2.32 |
file, magic.mgc
|
file | 5.39 |
gdb, gdbserver
|
gdb | 8.3.1 |
ldd |
Shell script | -- |
strace |
strace | 5.10 |
-
gdbis built without TUI, curses, expat, Python, or Guile to avoid extra on-device dependencies. -
gdbhaslibstdc++andlibgcclinked in, so those do not need to be installed separately on the Miyoo Mini+.
⬅️ Previous Article
Deployment and Testing
Next Article ➡️
TBD