Skip to main content

PyAmiibo

PyAmiibo helps to read, modify and write dump files of Nintendo Amiibo figures. PyAmiibo is capable of parsing most NTAG properties, as well as some Amiibo data.

IMPORTANT: To decrypt and encrypt Amiibo data, you will need two master keys, commonly called unfixed-info.bin and locked-secret.bin. They are not provided.

You can also view the full PyAmiibo docs on ReadTheDocs.


It is based on Marcos Del Sol Vives’ reverse engineering efforts of the Amiibo cryptography (amiitool, reddit).

So why does PyAmiibo exist? amiitool is a C binary, difficult to use in other tools (especially web-based tools). It also re-arranges the sections of the dump file when decrypting, and doesn’t seem to support editing dumps (e.g. changing the UID). Even though PyAmiibo doesn’t use any of amiitool’s code and contains a lot of my own research into the NTAG format and Amiibo data, it would not have been possible without Marcos’ efforts.

Usage

PyAmiibo is Python 3 only, if you get an error installing it this is the most likely reason.

pip install pyamiibo

PyAmiibo is mainly a library, but also contains some simple command-line tools:

$ # convert hexadecimal data to binary, note the quotes!
$ amiibo hex2bin "F1 A3 65 .." unfixed-info.bin
$ # get help for a subcommand
$ amiibo uid --help
$ # update the UID on an existing dump
$ amiibo uid old.bin "04 FF FF FF FF FF FF" new.bin

The master keys must be in the current directory for some commands to work!

It’s also very easy to use in a script or interpreter session:

from amiibo import AmiiboDump, AmiiboMasterKey
with open('unfixed-info.bin', 'rb') as fp_d, \
        open('locked-secret.bin', 'rb') as fp_t:
    master_keys = AmiiboMasterKey.from_separate_bin(
        fp_d.read(), fp_t.read())

with open('dump.bin', 'rb') as fp:
    dump = AmiiboDump(master_keys, fp.read())

print('old', dump.uid_hex)
dump.unlock()
dump.uid_hex = '04 FF FF FF FF FF FF'
dump.lock()
dump.unset_lock_bytes()
print('new', dump.uid_hex)

with open('new.bin', 'wb') as fp:
    fp.write(dump.data)

Development

Use pipenv to install the development dependencies, and make sure flake8 and pylint pass before a PR is submitted.

pipenv install --three --dev
pipenv shell
isort -y
flake8 amiibo/
pylint amiibo/
sphinx-build -b html docs/ docs/_build

Release files for pyamiibo 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyamiibo 0.2
File Size Uploaded
pyamiibo-0.2.tar.gz 23.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyamiibo 0.2
File Interpreter ABI Platform
pyamiibo-0.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 51.1 kB

Release files / pyamiibo-0.2.tar.gz

Download URL pyamiibo-0.2.tar.gz
Size 23.6 kB
Tags Source
SHA-256 checksum
How to use checksums
63b0c26dd4a6805b3e8655797be93f195d13fe611548eb21111fec4890345542
BLAKE2b-256 checksum
How to use checksums
98e18c607119025439816e0b778db8132da850ac6470b9dbb6ac9258d397c7d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pyamiibo-0.2-py2.py3-none-any.whl

Download URL pyamiibo-0.2-py2.py3-none-any.whl
Size 27.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
f5482eaeb653c6c7677f64e2b44f3d9a0a4b4f9d36dd0fb4b8b02839716ebf03
BLAKE2b-256 checksum
How to use checksums
e171bfe582bf46b7bec226309d11f8d7c0e274ab54892e860f2780f7676dd326
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page