fixed MUSCLE applet installation

This commit is contained in:
Frank Morgner
2015-07-29 11:02:47 +02:00
parent ad333168e0
commit cd89058cbc
2 changed files with 12 additions and 5 deletions

View File

@@ -118,7 +118,12 @@ public class SimulatorService extends HostApduService {
name = getResources().getString(R.string.applet_muscle); name = getResources().getString(R.string.applet_muscle);
aid = getResources().getString(R.string.aid_muscle); aid = getResources().getString(R.string.aid_muscle);
try { try {
simulator.installApplet(AIDUtil.create(aid), CardEdge.class);
byte[] aid_bytes = Util.hexStringToByteArray(aid);
byte[] inst_params = new byte[aid.length()+1];
inst_params[0] = (byte) aid_bytes.length;
System.arraycopy(aid_bytes, 0, inst_params, 1, aid_bytes.length);
simulator.installApplet(AIDUtil.create(aid), CardEdge.class, inst_params, (short) 0, (byte) inst_params.length);
extra_install += "\n" + name + " (AID: " + aid + ")"; extra_install += "\n" + name + " (AID: " + aid + ")";
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();

View File

@@ -24,10 +24,11 @@ The emulator uses Android's |HCE| to fetch APDUs from a contact-less reader and
delegate them to Java Card Applets. The app includes the Java Card simulation delegate them to Java Card Applets. The app includes the Java Card simulation
runtime of jCardSim_ as well as the following Java Card applets: runtime of jCardSim_ as well as the following Java Card applets:
- `Hello World applet`_ (application identifier ``F000000001``) - `Hello World Applet`_ (application identifier ``F000000001``)
- `OpenPGP applet`_ (application identifier ``D2760001240102000000000000010000``) - `OpenPGP Applet`_ (application identifier ``D2760001240102000000000000010000``)
- `OATH applet`_ (application identifier ``A000000527210101``) - `OATH Applet`_ (application identifier ``A000000527210101``)
- `ISO applet`_ (application identifier ``F276A288BCFBA69D34F31001``) - `ISO Applet`_ (application identifier ``F276A288BCFBA69D34F31001``)
- `MUSCLE Applet`_ (application identifier ``A00000000101``)
.. tikz:: Simulate a contact-less smart card with Android Smart Card Emulator .. tikz:: Simulate a contact-less smart card with Android Smart Card Emulator
:stringsubst: :stringsubst:
@@ -103,6 +104,7 @@ Notes and References
.. _OpenPGP Applet: https://developers.yubico.com/ykneo-openpgp/ .. _OpenPGP Applet: https://developers.yubico.com/ykneo-openpgp/
.. _OATH Applet: https://developers.yubico.com/ykneo-oath/ .. _OATH Applet: https://developers.yubico.com/ykneo-oath/
.. _ISO Applet: http://www.pwendland.net/IsoApplet/ .. _ISO Applet: http://www.pwendland.net/IsoApplet/
.. _MUSCLE Applet: https://github.com/martinpaljak/MuscleApplet/tree/d005f36209bdd7020bac0d783b228243126fd2f8
.. _Virtual Keycard: https://github.com/eriknellessen/Virtual-Keycard .. _Virtual Keycard: https://github.com/eriknellessen/Virtual-Keycard
.. _F-Droid: https://f-droid.org/repository/browse/?fdid=com.vsmartcard.remotesmartcardreader.app .. _F-Droid: https://f-droid.org/repository/browse/?fdid=com.vsmartcard.remotesmartcardreader.app
.. _Android Studio: http://developer.android.com/sdk/installing/studio.html .. _Android Studio: http://developer.android.com/sdk/installing/studio.html