Thanks for the detailed bug report. Have you tried using the Google binaries?
Does this also happen there? IIRC upstream fixed some bugs related to
smartcards in recent releases.
- Bug#1012451: apksigner: Using PKCS11 keystore fails... dev
- Bug#1012451: [Android-tools-devel] Bug#1012451... Hans-Christoph Steiner