固件被错误地转储。在您的文件中,所有出现的字节0A
都已替换为0D 0A
. 看起来像行尾问题。可能是您用来转储固件的工具0D
在每个0A
.
替换0D 0A
with 的所有实例后0A
,它的大小应该是 256 KiB(262144 字节)。以前它的大小为 263788 字节 ~ 257.6 KiB。
作为参考,我在这里上传了固定固件
$ ./sfk196-linux-64.exe replace dump.bin -binary /0d0a/0a/ -yes
[total hits/matching patterns/non-matching patterns]
[1644/1/0] dump.bin -1644 bytes
1 files checked, 1 changed.
$ du -b dump.bin
262144 dump.bin
此外,您可以在固定固件上使用nrf5x-tools进行验证。
$ python3 ./nrfident.py bin ../dump.bin 2>/dev/null
############################ nRF5-tool ############################
##### #####
##### Identifying nRF5x firmwares #####
##### #####
###################################################################
Binary file provided ../dump.bin
Computing signature from binary
Signature: 26d6240e598f89b8aeabcecb96f3c5595b07bfc315b969a13aca34b2e61a7dc0
Searching for signature in nRF.db
=========================
SDK version: 8.1.0
SoftDevice version: s110
NRF: nrf51822
=========================
SDK version: 9.0.0
SoftDevice version: s110
NRF: nrf51822
=========================
SDK version: 10.0.0
SoftDevice version: s110
NRF: nrf51822
=========================
SDK version: 8.0.0
SoftDevice version: s110
NRF: nrf51822
==================
nRF5x signature written to file nRF_ver in current directory
nRF_ver path must be provided when running nrfreverse.py from IDA
*****
Binary mapping
*****
SoftDevice : s110
Card version : xxaa
*****
RAM address : 0x20002000
RAM length : 0x2000
ROM address : 0x18000
ROM length : 0x28000
*****
Binary mapping
*****
SoftDevice : s110
Card version : xxab
*****
RAM address : 0x20002000
RAM length : 0x2000
ROM address : 0x18000
ROM length : 0x8000
*****
Binary mapping
*****
SoftDevice : s110
Card version : xxac
*****
RAM address : 0x20002000
RAM length : 0x6000
ROM address : 0x18000
ROM length : 0x28000
使用语言在 Ghidra 中加载二进制文件ARM-Cortex-32-little
,代码是可读的。

仍然有一些错误,但那些是因为我还没有创建内存段。有关更多信息,请查看nRF51 系列参考手册,第 - 5 节。
