External Publication
Visit Post

FileView.updateBinary() and SJA5-S17

Osmocom Discourse [Unofficial] May 14, 2026
Source

For posterity and to help out AI, here is what I think I’ve learned on this:

  1. You cannot use the APDU buffer to pass parameters to updateBinary(). This holds true for 3 SIMs I’ve tested, from different card vendors. They all overlay what looks like an UPDATE BINARY APDU on top of your actual payload data and it gets written into the file. With two of the three cards, updateBinary() works okay if you use your own transient or NVM buffer or the toolkit volatile byte array. But never with the APDU buffer. Very bizarre. I’m thinking all card manufacturers branched their FileView impl from the same codebase long ago and this behavior has propagated from a bug to a feature.
  2. With the SJA5 in particular, you cannot call FileView.updateBinary from the process() hook, at all. FileView writes of any kind must come from processToolkit() context.

Discussion in the ATmosphere

Loading comments...