<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.3dbrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=GaryOderNichts</id>
	<title>3dbrew - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.3dbrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=GaryOderNichts"/>
	<link rel="alternate" type="text/html" href="https://www.3dbrew.org/wiki/Special:Contributions/GaryOderNichts"/>
	<updated>2026-04-15T15:16:17Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Amiibo&amp;diff=21968</id>
		<title>Amiibo</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Amiibo&amp;diff=21968"/>
		<updated>2022-09-21T10:47:23Z</updated>

		<summary type="html">&lt;p&gt;GaryOderNichts: Create table for nfc page 0x4&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Amiibo&#039;&#039;&#039; are [[NFC_Services|NFC]] figures made by Nintendo, used in games in different forms (different in each game). It can be used with the New3DS and the Old3DS with an [[IR_Services|IR]] [[NFC_adapter|peripheral]].&lt;br /&gt;
&lt;br /&gt;
= Tag information =&lt;br /&gt;
* Model: [http://www.nxp.com/products/identification_and_security/smart_label_and_tag_ics/ntag/series/NTAG213_215_216.html NTAG215]&lt;br /&gt;
* Manufacturer: NXP Semiconductor&lt;br /&gt;
* Page size: 4 bytes&lt;br /&gt;
* Page count: 135 pages (540 bytes)&lt;br /&gt;
* Data pages: 126 pages (504 bytes)&lt;br /&gt;
&lt;br /&gt;
= Page layout =&lt;br /&gt;
Excluding the auth-related configuration pages at the end, the structure of the NFC pages is the following:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  NFC page&lt;br /&gt;
!  Total pages&lt;br /&gt;
!  Raw byte offset in EEPROM&lt;br /&gt;
!  Total byte size&lt;br /&gt;
!  Writable&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x3&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0xC&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Standard NTAG215: 9-byte serial-number, &amp;quot;internal&amp;quot; u8 value, then the two lock bytes which must match raw binary &amp;quot;0F E0&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0xC&lt;br /&gt;
| 0x4&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Standard NTAG215: &amp;quot;Capability Container (CC)&amp;quot;. Must match raw binary &amp;quot;F1 10 FF EE&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x4&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Last 3-bytes here are used with the following HMAC where the size is 0x1DF-bytes. The u16 starting at byte1 is used for the first two bytes in the 0x40-byte input buffer for Amiibo [[Process_Services_PXI|crypto]] init.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x1&lt;br /&gt;
| Magic (Always 0xA5)&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0x2&lt;br /&gt;
| Incremented each time the Amiibo is written to.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3&lt;br /&gt;
| 0x1&lt;br /&gt;
| Figure version (always 0x00)&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| 0x5&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x14&lt;br /&gt;
| 0x20&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| The system crypts 0x1A0-bytes with some data from here, see below.&lt;br /&gt;
|-&lt;br /&gt;
| 0xD&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x34&lt;br /&gt;
| 0x20&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| SHA256-(HMAC?) hash. The first 0x18-bytes of this hash is section3 in the encrypted buffer.&lt;br /&gt;
|-&lt;br /&gt;
| 0x15&lt;br /&gt;
| 0xB&lt;br /&gt;
| 0x54&lt;br /&gt;
| 0x2C&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| This is plaintext data, see below.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x80&lt;br /&gt;
| 0x20&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| SHA256-HMAC hash over 0x1DF-bytes: first 3-bytes are from the last 3-bytes of page[4], the rest is over the first 0x1DC-bytes of the plaintext data.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| 0x45&lt;br /&gt;
| 0xA0&lt;br /&gt;
| 0x114&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| This is section1 in the encrypted buffer.&lt;br /&gt;
|-&lt;br /&gt;
| 0x6D&lt;br /&gt;
| 0x15&lt;br /&gt;
| 0x1B4&lt;br /&gt;
| 0x54&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| This is section2 in the encrypted buffer.&lt;br /&gt;
|-&lt;br /&gt;
| 0x82&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0x208&lt;br /&gt;
| 0x4&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Standard NTAG215: first 3-bytes are dynamic lock bytes. Must match raw binary &amp;quot;01 00 0F&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x83&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0x20C&lt;br /&gt;
| 0x4&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Standard NTAG215: CFG0. Must match raw binary &amp;quot;00 00 00 04&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x84&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0x210&lt;br /&gt;
| 0x4&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Standard NTAG215: CFG1. Must match raw binary &amp;quot;5F 00 00 00&amp;quot;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Specifications can be found on this image, which is a compilation of screenshots made by scanning a Samus amiibo with the Android App &amp;quot;NFC TagInfo&amp;quot;:&lt;br /&gt;
[[File:Amiibonfctaginfo.png|500px]]&lt;br /&gt;
&lt;br /&gt;
See here regarding the Amiibo [[Process_Services_PXI|encryption]].&lt;br /&gt;
&lt;br /&gt;
= Data structures =&lt;br /&gt;
&lt;br /&gt;
== Structure of the data starting at page 0x15 ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| Amiibo Identification Block&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x4&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0xC&lt;br /&gt;
| 0x20&lt;br /&gt;
| Probably a SHA256-(HMAC?) hash.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Structure of Amiibo Identification Block===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x2&lt;br /&gt;
| Game &amp;amp; Character ID&lt;br /&gt;
| First 10 bits are the Game ID and last 6 bits are Character ID.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| 0x1&lt;br /&gt;
| Character variant&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x3&lt;br /&gt;
| 0x1&lt;br /&gt;
| Amiibo Figure Type&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x2&lt;br /&gt;
| Amiibo Model Number&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| 0x1&lt;br /&gt;
| Amiibo Series&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x7&lt;br /&gt;
| 0x1&lt;br /&gt;
| Format Version&lt;br /&gt;
| Always 0x02&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Encrypted data buffer structure ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Encrypted buffer offset&lt;br /&gt;
!  Raw byte offset in NFC EEPROM&lt;br /&gt;
!  NFC page&lt;br /&gt;
!  Byte size&lt;br /&gt;
!  Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x14&lt;br /&gt;
| 0x5&lt;br /&gt;
| 0x20&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0xA0&lt;br /&gt;
| 0x28&lt;br /&gt;
| 0x114&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x134&lt;br /&gt;
| 0x1B4&lt;br /&gt;
| 0x6D&lt;br /&gt;
| 0x54&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x188&lt;br /&gt;
| 0x34&lt;br /&gt;
| 0xD&lt;br /&gt;
| 0x18&lt;br /&gt;
| This data is included in the crypto buffer, even though this data isn&#039;t actually encrypted(this is part of a hash).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Structure of the plaintext data ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0xB0&lt;br /&gt;
| Amiibo settings are stored within here.&lt;br /&gt;
|-&lt;br /&gt;
| 0xB0&lt;br /&gt;
| 0xD8&lt;br /&gt;
| AppData, for the user-application specified in the above Amiibo settings. The data stored here is application-specific. The data stored here is normally all big-endian, even when the user-application is only for 3DS systems. Note that this data is initially uninitialized, and at least some of it will stay that way unless an application clears/initializes *all* of it.&lt;br /&gt;
|-&lt;br /&gt;
| 0x188&lt;br /&gt;
| 0x18&lt;br /&gt;
| Not used in &amp;quot;decrypted&amp;quot; form, since this isn&#039;t encrypted to begin with.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Structure of Amiibo settings ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x1&lt;br /&gt;
| Flags. The low 4-bits here are copied to the struct used with [[NFC:GetAmiiboSettings]]. The below setup date is only loaded when bit4 and/or bit5 here are set, otherwise value 0 is used instead for the date. Bit4=1 indicates that the Amiibo was setup with [[amiibo Settings]]: [[NFC:GetAmiiboSettings]] will return an all-zero struct when this is not set.&lt;br /&gt;
Bit5=1 indicates that the AppData was [[NFC:InitializeWriteAppData|initialized]]. [[NFC:InitializeWriteAppData]] will return an error if this is value 1, when successful that command will then set this bit to value 1.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0x1&lt;br /&gt;
| Country Code ID, [[Config_Savegame|from]] the system which setup this amiibo. This is copied to the struct used with [[NFC:GetAmiiboSettings]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| 0x2&lt;br /&gt;
| This big-endian u16 counter is incremented each time that the CRC32 at offset 0x8 gets updated by [[NFC:InitializeWriteAppData]], due to that value not matching the calculated one. When this value is already 0xFFFF, this counter won&#039;t be updated anymore.&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x2&lt;br /&gt;
| u16 big-endian date value, see below. This is the date for when the Amiibo was initially setup in [[amiibo Settings]]. This is also written by [[NFC:InitializeWriteAppData]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| 0x2&lt;br /&gt;
| u16 big-endian date value, see below. This is the date for when the Amiibo was last written to.&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x4&lt;br /&gt;
| Big-endian CRC32 value with initialval=~0, with the 8-byte output from [[Cfg:GenHashConsoleUnique]]. This is written by [[NFC:InitializeWriteAppData]], when the current value doesn&#039;t match the calculated one.&lt;br /&gt;
|-&lt;br /&gt;
| 0xC&lt;br /&gt;
| 0x14(10*2)&lt;br /&gt;
| UTF-16BE Amiibo nickname. &lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x60&lt;br /&gt;
| Owner [[Mii_Maker|Mii]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x80&lt;br /&gt;
| 0x8&lt;br /&gt;
| Big-endian application programID/titleID from the application which [[NFC:InitializeWriteAppData|initialized]] the AppData, zero otherwise. This is only written, not compared with the user application titleID: doing the latter would break games&#039; cross-platform compatibility with 3DS&amp;lt;&amp;gt;Wii U(Super Smash Bros 3DS/Wii U for example).&lt;br /&gt;
|-&lt;br /&gt;
| 0x88&lt;br /&gt;
| 0x2&lt;br /&gt;
| u16 big-endian. This value is incremented each time the Amiibo is written to. When this value is already 0xFFFF, this counter won&#039;t be updated anymore.&lt;br /&gt;
|-&lt;br /&gt;
| 0x8A&lt;br /&gt;
| 0x4&lt;br /&gt;
| Big-endian u32 Amiibo AppID.&lt;br /&gt;
|-&lt;br /&gt;
| 0x8E&lt;br /&gt;
| 0x2&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x90&lt;br /&gt;
| 0x20&lt;br /&gt;
| Probably a SHA256-HMAC hash.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Format of the big-endian date values:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0-4&lt;br /&gt;
| Day&lt;br /&gt;
|-&lt;br /&gt;
| 5-8&lt;br /&gt;
| Month&lt;br /&gt;
|-&lt;br /&gt;
| 9-15&lt;br /&gt;
| Year, relative to 2000.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= 3DS read/write procedure =&lt;br /&gt;
Note this is the procedure used by the console, but isn&#039;t the only way of reading them.&lt;br /&gt;
&lt;br /&gt;
== Read procedure ==&lt;br /&gt;
* GET_VERSION&lt;br /&gt;
* READ, startpage=0x03.&lt;br /&gt;
* PWD_AUTH. Key is based on UID.&lt;br /&gt;
* FAST_READ: startpage=0x00, endpage=0x3B&lt;br /&gt;
* FAST_READ: startpage=0x3C, endpage=0x77&lt;br /&gt;
* FAST_READ: startpage=0x78, endpage=0x86&lt;br /&gt;
&lt;br /&gt;
Therefore, *all* pages from the Amiibo NFC tag are read, including the configuration pages at the end.&lt;br /&gt;
&lt;br /&gt;
== Write procedure ==&lt;br /&gt;
* GET_VERSION&lt;br /&gt;
* READ, startpage=0x03.&lt;br /&gt;
* PWD_AUTH. Key is based on UID.&lt;br /&gt;
* Multiple WRITE commands for writing to pages 0x04..0x0C. The first byte for page[4] is zero here.&lt;br /&gt;
* Multiple WRITE commands for writing to pages 0x20..0x81.&lt;br /&gt;
* Use the last 3 commands from the above reading section.&lt;br /&gt;
* WRITE: page=0x04, same data as before except first byte is 0xA5 this time.&lt;br /&gt;
* FAST_READ: startpage=0x04, endpage=0x04&lt;br /&gt;
&lt;br /&gt;
=Games using Amiibo AppData=&lt;br /&gt;
The following is a list of games which actually store game-specific data on Amiibo, not *just* using Amiibo for checking character IDs:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Name&lt;br /&gt;
!  Available for (New)3DS&lt;br /&gt;
!  Available for Wii U&lt;br /&gt;
!  Amiibo AppID&lt;br /&gt;
!  AppData structure / link to info&lt;br /&gt;
!  AppData modification for exploitation notes.&lt;br /&gt;
|-&lt;br /&gt;
| Super Smash Bros&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| 0x10110E00&lt;br /&gt;
| [https://github.com/yellows8/smash3ds-tools/wiki/SmashAmiiboAppData]&lt;br /&gt;
| No crash ever triggered via AppData fuzzing.&lt;br /&gt;
|-&lt;br /&gt;
| Mario Party 10&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| ?&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
|-&lt;br /&gt;
| Animal Crossing: Happy Home Designer&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| 0x0014F000&lt;br /&gt;
| N/A&lt;br /&gt;
| The initial AppData handling doesn&#039;t appear to have any vuln(s), going by manual code-RE for update v2.0. Fuzzing wasn&#039;t attempted.&lt;br /&gt;
|-&lt;br /&gt;
| Chibi-Robo!: Zip Lash&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| 0x00152600&lt;br /&gt;
| The entire AppData is read by the game, but only the first 0x10-bytes are actually used.&lt;br /&gt;
| No crash ever triggered via AppData fuzzing.&lt;br /&gt;
|-&lt;br /&gt;
| Mario &amp;amp; Luigi: Paper Jam&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| 0x00132600&lt;br /&gt;
| Starts with the process-name(&amp;quot;MILLION&amp;quot;). The rest seems to be bitmasks maybe?&lt;br /&gt;
| No crash ever triggered via AppData fuzzing, when viewing &amp;quot;character cards&amp;quot;(just unlocks various cards).&lt;br /&gt;
|-&lt;br /&gt;
| The Legend of Zelda: Twilight Princess HD&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| 0x1019C800&lt;br /&gt;
| Unknown.&lt;br /&gt;
| No crash/hang ever occurred when using amiibo in-game for &amp;quot;Cave of Shadows&amp;quot;.&lt;br /&gt;
With the amiibo quick-start option at the title-screen, only errors ever occurred(&amp;lt;quick-start data not found&amp;gt; / &amp;lt;quick-start data is for another user&amp;gt;).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= External links =&lt;br /&gt;
* [http://wiiubrew.org/wiki/Wii_U_GamePad Wii U Gamepad and Amiibo information on WiiUBrew].&lt;/div&gt;</summary>
		<author><name>GaryOderNichts</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Amiibo&amp;diff=21954</id>
		<title>Amiibo</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Amiibo&amp;diff=21954"/>
		<updated>2022-08-31T16:32:13Z</updated>

		<summary type="html">&lt;p&gt;GaryOderNichts: Wii U&amp;#039;s ntag.rpl calls this field &amp;quot;Format version&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Amiibo&#039;&#039;&#039; are [[NFC_Services|NFC]] figures made by Nintendo, used in games in different forms (different in each game). It can be used with the New3DS and the Old3DS with an [[IR_Services|IR]] [[NFC_adapter|peripheral]].&lt;br /&gt;
&lt;br /&gt;
= Tag information =&lt;br /&gt;
* Model: [http://www.nxp.com/products/identification_and_security/smart_label_and_tag_ics/ntag/series/NTAG213_215_216.html NTAG215]&lt;br /&gt;
* Manufacturer: NXP Semiconductor&lt;br /&gt;
* Page size: 4 bytes&lt;br /&gt;
* Page count: 135 pages (540 bytes)&lt;br /&gt;
* Data pages: 126 pages (504 bytes)&lt;br /&gt;
&lt;br /&gt;
= Page layout =&lt;br /&gt;
Excluding the auth-related configuration pages at the end, the structure of the NFC pages is the following:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  NFC page&lt;br /&gt;
!  Total pages&lt;br /&gt;
!  Raw byte offset in EEPROM&lt;br /&gt;
!  Total byte size&lt;br /&gt;
!  Writable&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x3&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0xC&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Standard NTAG215: 9-byte serial-number, &amp;quot;internal&amp;quot; u8 value, then the two lock bytes which must match raw binary &amp;quot;0F E0&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0xC&lt;br /&gt;
| 0x4&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Standard NTAG215: &amp;quot;Capability Container (CC)&amp;quot;. Must match raw binary &amp;quot;F1 10 FF EE&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x4&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Last 3-bytes here are used with the following HMAC where the size is 0x1DF-bytes. The u16 starting at byte1 is used for the first two bytes in the 0x40-byte input buffer for Amiibo [[Process_Services_PXI|crypto]] init. The first byte must be 0xA5. The remaining bytes are initially(before the Amiibo is written to) all-zero. Byte[2](maybe big-endian u16 starting at byte1?) here is incremented each time the Amiibo is written to.&lt;br /&gt;
|-&lt;br /&gt;
| 0x5&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x14&lt;br /&gt;
| 0x20&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| The system crypts 0x1A0-bytes with some data from here, see below.&lt;br /&gt;
|-&lt;br /&gt;
| 0xD&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x34&lt;br /&gt;
| 0x20&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| SHA256-(HMAC?) hash. The first 0x18-bytes of this hash is section3 in the encrypted buffer.&lt;br /&gt;
|-&lt;br /&gt;
| 0x15&lt;br /&gt;
| 0xB&lt;br /&gt;
| 0x54&lt;br /&gt;
| 0x2C&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| This is plaintext data, see below.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x80&lt;br /&gt;
| 0x20&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| SHA256-HMAC hash over 0x1DF-bytes: first 3-bytes are from the last 3-bytes of page[4], the rest is over the first 0x1DC-bytes of the plaintext data.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| 0x45&lt;br /&gt;
| 0xA0&lt;br /&gt;
| 0x114&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| This is section1 in the encrypted buffer.&lt;br /&gt;
|-&lt;br /&gt;
| 0x6D&lt;br /&gt;
| 0x15&lt;br /&gt;
| 0x1B4&lt;br /&gt;
| 0x54&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| This is section2 in the encrypted buffer.&lt;br /&gt;
|-&lt;br /&gt;
| 0x82&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0x208&lt;br /&gt;
| 0x4&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Standard NTAG215: first 3-bytes are dynamic lock bytes. Must match raw binary &amp;quot;01 00 0F&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x83&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0x20C&lt;br /&gt;
| 0x4&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Standard NTAG215: CFG0. Must match raw binary &amp;quot;00 00 00 04&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x84&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0x210&lt;br /&gt;
| 0x4&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| Standard NTAG215: CFG1. Must match raw binary &amp;quot;5F 00 00 00&amp;quot;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Specifications can be found on this image, which is a compilation of screenshots made by scanning a Samus amiibo with the Android App &amp;quot;NFC TagInfo&amp;quot;:&lt;br /&gt;
[[File:Amiibonfctaginfo.png|500px]]&lt;br /&gt;
&lt;br /&gt;
See here regarding the Amiibo [[Process_Services_PXI|encryption]].&lt;br /&gt;
&lt;br /&gt;
= Data structures =&lt;br /&gt;
&lt;br /&gt;
== Structure of the data starting at page 0x15 ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| Amiibo Identification Block&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x4&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0xC&lt;br /&gt;
| 0x20&lt;br /&gt;
| Probably a SHA256-(HMAC?) hash.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Structure of Amiibo Identification Block===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x2&lt;br /&gt;
| Game &amp;amp; Character ID&lt;br /&gt;
| First 10 bits are the Game ID and last 6 bits are Character ID.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| 0x1&lt;br /&gt;
| Character variant&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x3&lt;br /&gt;
| 0x1&lt;br /&gt;
| Amiibo Figure Type&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x2&lt;br /&gt;
| Amiibo Model Number&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| 0x1&lt;br /&gt;
| Amiibo Series&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x7&lt;br /&gt;
| 0x1&lt;br /&gt;
| Version&lt;br /&gt;
| Always 0x02&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Encrypted data buffer structure ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Encrypted buffer offset&lt;br /&gt;
!  Raw byte offset in NFC EEPROM&lt;br /&gt;
!  NFC page&lt;br /&gt;
!  Byte size&lt;br /&gt;
!  Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x14&lt;br /&gt;
| 0x5&lt;br /&gt;
| 0x20&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0xA0&lt;br /&gt;
| 0x28&lt;br /&gt;
| 0x114&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x134&lt;br /&gt;
| 0x1B4&lt;br /&gt;
| 0x6D&lt;br /&gt;
| 0x54&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x188&lt;br /&gt;
| 0x34&lt;br /&gt;
| 0xD&lt;br /&gt;
| 0x18&lt;br /&gt;
| This data is included in the crypto buffer, even though this data isn&#039;t actually encrypted(this is part of a hash).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Structure of the plaintext data ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0xB0&lt;br /&gt;
| Amiibo settings are stored within here.&lt;br /&gt;
|-&lt;br /&gt;
| 0xB0&lt;br /&gt;
| 0xD8&lt;br /&gt;
| AppData, for the user-application specified in the above Amiibo settings. The data stored here is application-specific. The data stored here is normally all big-endian, even when the user-application is only for 3DS systems. Note that this data is initially uninitialized, and at least some of it will stay that way unless an application clears/initializes *all* of it.&lt;br /&gt;
|-&lt;br /&gt;
| 0x188&lt;br /&gt;
| 0x18&lt;br /&gt;
| Not used in &amp;quot;decrypted&amp;quot; form, since this isn&#039;t encrypted to begin with.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Structure of Amiibo settings ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x1&lt;br /&gt;
| Flags. The low 4-bits here are copied to the struct used with [[NFC:GetAmiiboSettings]]. The below setup date is only loaded when bit4 and/or bit5 here are set, otherwise value 0 is used instead for the date. Bit4=1 indicates that the Amiibo was setup with [[amiibo Settings]]: [[NFC:GetAmiiboSettings]] will return an all-zero struct when this is not set.&lt;br /&gt;
Bit5=1 indicates that the AppData was [[NFC:InitializeWriteAppData|initialized]]. [[NFC:InitializeWriteAppData]] will return an error if this is value 1, when successful that command will then set this bit to value 1.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0x1&lt;br /&gt;
| Country Code ID, [[Config_Savegame|from]] the system which setup this amiibo. This is copied to the struct used with [[NFC:GetAmiiboSettings]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| 0x2&lt;br /&gt;
| This big-endian u16 counter is incremented each time that the CRC32 at offset 0x8 gets updated by [[NFC:InitializeWriteAppData]], due to that value not matching the calculated one. When this value is already 0xFFFF, this counter won&#039;t be updated anymore.&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x2&lt;br /&gt;
| u16 big-endian date value, see below. This is the date for when the Amiibo was initially setup in [[amiibo Settings]]. This is also written by [[NFC:InitializeWriteAppData]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| 0x2&lt;br /&gt;
| u16 big-endian date value, see below. This is the date for when the Amiibo was last written to.&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x4&lt;br /&gt;
| Big-endian CRC32 value with initialval=~0, with the 8-byte output from [[Cfg:GenHashConsoleUnique]]. This is written by [[NFC:InitializeWriteAppData]], when the current value doesn&#039;t match the calculated one.&lt;br /&gt;
|-&lt;br /&gt;
| 0xC&lt;br /&gt;
| 0x14(10*2)&lt;br /&gt;
| UTF-16BE Amiibo nickname. &lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x60&lt;br /&gt;
| Owner [[Mii_Maker|Mii]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x80&lt;br /&gt;
| 0x8&lt;br /&gt;
| Big-endian application programID/titleID from the application which [[NFC:InitializeWriteAppData|initialized]] the AppData, zero otherwise. This is only written, not compared with the user application titleID: doing the latter would break games&#039; cross-platform compatibility with 3DS&amp;lt;&amp;gt;Wii U(Super Smash Bros 3DS/Wii U for example).&lt;br /&gt;
|-&lt;br /&gt;
| 0x88&lt;br /&gt;
| 0x2&lt;br /&gt;
| u16 big-endian. This value is incremented each time the Amiibo is written to. When this value is already 0xFFFF, this counter won&#039;t be updated anymore.&lt;br /&gt;
|-&lt;br /&gt;
| 0x8A&lt;br /&gt;
| 0x4&lt;br /&gt;
| Big-endian u32 Amiibo AppID.&lt;br /&gt;
|-&lt;br /&gt;
| 0x8E&lt;br /&gt;
| 0x2&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x90&lt;br /&gt;
| 0x20&lt;br /&gt;
| Probably a SHA256-HMAC hash.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Format of the big-endian date values:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0-4&lt;br /&gt;
| Day&lt;br /&gt;
|-&lt;br /&gt;
| 5-8&lt;br /&gt;
| Month&lt;br /&gt;
|-&lt;br /&gt;
| 9-15&lt;br /&gt;
| Year, relative to 2000.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= 3DS read/write procedure =&lt;br /&gt;
Note this is the procedure used by the console, but isn&#039;t the only way of reading them.&lt;br /&gt;
&lt;br /&gt;
== Read procedure ==&lt;br /&gt;
* GET_VERSION&lt;br /&gt;
* READ, startpage=0x03.&lt;br /&gt;
* PWD_AUTH. Key is based on UID.&lt;br /&gt;
* FAST_READ: startpage=0x00, endpage=0x3B&lt;br /&gt;
* FAST_READ: startpage=0x3C, endpage=0x77&lt;br /&gt;
* FAST_READ: startpage=0x78, endpage=0x86&lt;br /&gt;
&lt;br /&gt;
Therefore, *all* pages from the Amiibo NFC tag are read, including the configuration pages at the end.&lt;br /&gt;
&lt;br /&gt;
== Write procedure ==&lt;br /&gt;
* GET_VERSION&lt;br /&gt;
* READ, startpage=0x03.&lt;br /&gt;
* PWD_AUTH. Key is based on UID.&lt;br /&gt;
* Multiple WRITE commands for writing to pages 0x04..0x0C. The first byte for page[4] is zero here.&lt;br /&gt;
* Multiple WRITE commands for writing to pages 0x20..0x81.&lt;br /&gt;
* Use the last 3 commands from the above reading section.&lt;br /&gt;
* WRITE: page=0x04, same data as before except first byte is 0xA5 this time.&lt;br /&gt;
* FAST_READ: startpage=0x04, endpage=0x04&lt;br /&gt;
&lt;br /&gt;
=Games using Amiibo AppData=&lt;br /&gt;
The following is a list of games which actually store game-specific data on Amiibo, not *just* using Amiibo for checking character IDs:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Name&lt;br /&gt;
!  Available for (New)3DS&lt;br /&gt;
!  Available for Wii U&lt;br /&gt;
!  Amiibo AppID&lt;br /&gt;
!  AppData structure / link to info&lt;br /&gt;
!  AppData modification for exploitation notes.&lt;br /&gt;
|-&lt;br /&gt;
| Super Smash Bros&lt;br /&gt;
| Yes&lt;br /&gt;
| Yes&lt;br /&gt;
| 0x10110E00&lt;br /&gt;
| [https://github.com/yellows8/smash3ds-tools/wiki/SmashAmiiboAppData]&lt;br /&gt;
| No crash ever triggered via AppData fuzzing.&lt;br /&gt;
|-&lt;br /&gt;
| Mario Party 10&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| ?&lt;br /&gt;
| N/A&lt;br /&gt;
| N/A&lt;br /&gt;
|-&lt;br /&gt;
| Animal Crossing: Happy Home Designer&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| 0x0014F000&lt;br /&gt;
| N/A&lt;br /&gt;
| The initial AppData handling doesn&#039;t appear to have any vuln(s), going by manual code-RE for update v2.0. Fuzzing wasn&#039;t attempted.&lt;br /&gt;
|-&lt;br /&gt;
| Chibi-Robo!: Zip Lash&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| 0x00152600&lt;br /&gt;
| The entire AppData is read by the game, but only the first 0x10-bytes are actually used.&lt;br /&gt;
| No crash ever triggered via AppData fuzzing.&lt;br /&gt;
|-&lt;br /&gt;
| Mario &amp;amp; Luigi: Paper Jam&lt;br /&gt;
| Yes&lt;br /&gt;
| No&lt;br /&gt;
| 0x00132600&lt;br /&gt;
| Starts with the process-name(&amp;quot;MILLION&amp;quot;). The rest seems to be bitmasks maybe?&lt;br /&gt;
| No crash ever triggered via AppData fuzzing, when viewing &amp;quot;character cards&amp;quot;(just unlocks various cards).&lt;br /&gt;
|-&lt;br /&gt;
| The Legend of Zelda: Twilight Princess HD&lt;br /&gt;
| No&lt;br /&gt;
| Yes&lt;br /&gt;
| 0x1019C800&lt;br /&gt;
| Unknown.&lt;br /&gt;
| No crash/hang ever occurred when using amiibo in-game for &amp;quot;Cave of Shadows&amp;quot;.&lt;br /&gt;
With the amiibo quick-start option at the title-screen, only errors ever occurred(&amp;lt;quick-start data not found&amp;gt; / &amp;lt;quick-start data is for another user&amp;gt;).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= External links =&lt;br /&gt;
* [http://wiiubrew.org/wiki/Wii_U_GamePad Wii U Gamepad and Amiibo information on WiiUBrew].&lt;/div&gt;</summary>
		<author><name>GaryOderNichts</name></author>
	</entry>
</feed>