fix overwriting return value in one case
[RRG-proxmark3.git] / doc / jooki_notes.md
blobaa950fdfa5ea6a90ed92473ac8e64a6b30591b60
1 # Jooki Figurine Notes
2 <a id="top"></a>
4 # Table of Contents
5 - [Jooki Figurine Notes](#jooki-figurine-notes)
6 - [Table of Contents](#table-of-contents)
7   - [Jooki proxmark commands](#jooki-proxmark-commands)
8     - [Decoding NDEF URL parameter](#decoding-ndef-url-parameter)
9     - [Encoding NDEF record](#encoding-ndef-record)
10     - [Simulation](#simulation)
11     - [Cloning to a NTAG213 tag](#cloning-to-a-ntag213-tag)
12     - [List of known figurine types](#list-of-known-figurine-types)
16 - NTAG213 (Should be tested if other NTAG2xx work)
17 - A single NDEF record of type URL
18 - Physical figurines are Fox, Dragon, Knight, Ghost, Whale, Generic Flat. Than there are variations of those figures with different colors.
20 ## Jooki proxmark commands
21 ^[Top](#top)
23 You can `encode`, `decode` a NDEF record, write with `clone` a record to a card or simulate with`sim`.
25 ### Decoding NDEF URL parameter
26 ^[Top](#top)
28 `hf jooki decode -d g+t07s57aX1bB6tk`
30 ### Encoding NDEF record
31 ^[Top](#top)
33 You can either use figurine abbreviation arguments:
34 ```
35     --dragon 
36     --fox   
37     --ghost
38     --knight 
39     --whale   
40     --blackdragon   
41     --blackfox     
42     --blackknight 
43     --blackwhale 
44     --whitedragon 
45     --whitefox    
46     --whiteknight 
47     --whitewhale 
48 ```
49 Or pass directly the figurine type id `--tid` and figurine id `--fid`
51 Example encoding NDEF record for UID `04010203040506`
53 `hf jooki encode --uid 04010203040506 --tid 1 --fid 1`
55 or use `--dragon` parameter to achieve the same:
58 `hf jooki encode --uid 04010203040506 --dragon`
60 Output:
61 ```
62 [=] Encoded URL.. 67 2B 74 30 37 73 35 37 61 58 31 62  ( g+t07s57aX1bB6tk )
63 [=] Figurine..... 01 00 - Figurine, Dragon
64 [=] iv........... 80 77 51 
65 [=] uid.......... 04 01 02 03 04 05 06 
66 [=] NDEF raw..... 0103A00C340329D101255504732E6A6F6F6B692E726F636B732F732F3F733D672B743037733537615831624236746B0AFE000000
67 ```
69 Use `-r` parameter to read UID directly from tag.
71 ### Simulation
72 ^[Top](#top)
74 To simulate the above figurine use the encoded URL parameter given in `encode` output and type following command into your proxmark:
76 `hf jooki sim -b g+t07s57aX1bB6tk`
78 If no parameter is given to the simulation command, last loaded dump is used.
80 ### Cloning to a NTAG213 tag
81 ^[Top](#top)
83 ```
84     hf jooki clone [-h] [-b <base64>] [-d <hex>] [-p <hex>]
86 options:
87     -h, --help                     This help
88     -b, --b64 <base64>             base64 url parameter
89     -d, --data <hex>               raw NDEF bytes
90     -p, --pwd <hex>                password for authentication (EV1/NTAG 4 bytes)
92 examples/notes:
93     hf jooki clone -d <hex bytes>  -> where hex is raw NDEFhf jooki clone --b64 7WzlgEzqLgwTnWNy --> using base64 url parameter
94 ```
96 Use either the above NDEF raw output from `encode` to write a new record to a tag:
98 `hf jooki clone -d 0103A00C340329D101255504732E6A6F6F6B692E726F636B732F732F3F733D672B743037733537615831624236746B0AFE000000`
100 or use the base64 encoded parameter to clone:
102 `hf jooki clone -b A5wlbrkq6QoKh9w1
105 Note: Jooki doesn't like more than one NDEF record, so make sure you just have one. Check with `hf mfu ndefread`
107 ### List of known figurine types
108 ^[Top](#top)
110 `Value`|`Figurine Type`|
111 |------|---------------|
112 **01** | Stones |
113 **02** | Generic Flat |         
114 **03** | System Commands |          
115 **04** | Tests |
117 | `Figurine Type` | `Figurine ID` | `Figurine`           |
118 |---------------|-------------|--------------------------|
119 | 01            | 00          | 狐狸 Fox                 |
120 | 01            | 01          | 龙 Dragon                |
121 | 01            | 02          | 骑士 Knight              |
122 | 01            | 03          | 鬼 Ghost                 |
123 | 01            | 04          | 鲸 Whale                 |
124 | 01            | 05          | ThankYou                 |
125 | 01            | 06          | Black.Fox                |
126 | 01            | 07          | Black.Dragon             |
127 | 01            | 08          | Black.Whale              |
128 | 01            | 09          | Black.Knight             |
129 | 01            | 0a          | White.Fox                |
130 | 01            | 0b          | White.Dragon             |
131 | 01            | 0c          | White.Whale              |
132 | 01            | 0d          | White.Knight             |
133 |               |             |                          |
134 |     `02`      |             |      `Generic Flat`      |
135 | 02            | 00          | 圆盘 Generic Flat        |
136 | 02            | 01          | unknown_0201             |
137 |               |             |                          |
138 |     `03`      |             |    `System Commands`     |
139 | 03            | 00          | sys.record               |
140 | 03            | 01          | sys.factory_mode_on      |
141 | 03            | 02          | sys.factory_mode_off     |
142 | 03            | 03          | sys.airplane_mode_on     |
143 | 03            | 04          | sys.airplane_mode_off    |
144 | 03            | 05          | sys.toy_safe_on          |
145 | 03            | 06          | sys.toy_safe_off         |
146 | 03            | 07          | sys.wifi_on              |
147 | 03            | 08          | sys.wifi_off             |
148 | 03            | 09          | sys.bt_on                |
149 | 03            | 0a          | sys.bt_off               |
150 | 03            | 0b          | sys.production_finished  |
151 |               |             |                          |
152 |     `04`      |             |         `Tests`          |
153 | 04            | 00          | Hello test.0             |
154 | 04            | 01          | Hello test.1             |
155 | 04            | 02          | Hello test.2             |
156 | 04            | 03          | Hello test.3             |
157 | 04            | 04          | Hello test.4             |
158 | 04            | 05          | Hello test.5             |
159 | 04            | 06          | Hello test.6             |
160 | 04            | 07          | Hello test.7             |
161 | 04            | 08          | Hello test.8             |
162 | 04            | 09          | Hello test.9             |
163 | 04            | 0a          | Hello unknown_040A       |
164 | 04            | 10          | Hello test.10            |
165 | 04            | 11          | Hello test.11            |
166 | 04            | 12          | Hello test.12            |
167 | 04            | 13          | Hello test.13            |
168 | 04            | 14          | Hello test.14            |
169 | 04            | 15          | Hello test.15            |
170 | 04            | 16          | Hello test.16            |
171 | 04            | 17          | Hello test.17            |
172 | 04            | 18          | Hello test.18            |
173 | 04            | 19          | Hello test.19            |