JAndroidCard - martinpaljak/jcardsim GitHub Wiki

"soft JavaCard" for Android HCE

[!NOTE] This is just an idea, maybe a student will pick it up.

Step 1. Prep

  • you have a standard JavaCard applet YourApplet that replies "Hello, World!" to a simple APDU.
  • you compile this into a unstripped .cap file with ant-javacard (step before CAP conversion)
  • use java -jar jandroidcard.jar -install YourApplet.cap -params ... much like with GlobalPlatformPro to convert the .jar to .dex and add install manifest. You will end up with a "YourApplet.zip" file (format/contents/extension to be clarified)

Step 2. Run

Step 3. Profit!

  • mostly for the lulz
  • maybe route some crypto ops in the jcardsim JC API to Keychain etc

[!NOTE] This is not unlike https://frankmorgner.github.io/vsmartcard/ACardEmulator/README.html or https://web.archive.org/web/20240927032835/https://github.com/martinpaljak/mobiil-idkaart but the idea here is to make a single Android app and dynamically load applets into it. And the possible hooking up of the simulator to Keychain backends or other similar shenanigans.