Implemented Android Smart Card Emulator

Includes jCardSim to emulate the following Java Card Applets in
Android's host card emulation:

- jCardSim Team's Hello World Applet
- Philip Wendland's ISO Applet
- Yubico's OpenPGP Applet
- Yubico's OATH Applet
This commit is contained in:
Frank Morgner
2015-03-07 02:40:41 +01:00
parent ccdcee36b6
commit dae12a816a
60 changed files with 4034 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -0,0 +1,29 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
android:keepScreenOn="true"
tools:context="com.vsmartcard.remotesmartcardreader.app.MainActivity">
<HorizontalScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_alignParentBottom="true">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:id="@+id/textViewLog"
android:typeface="monospace" />
</HorizontalScrollView>
</RelativeLayout>

View File

@@ -0,0 +1,16 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.vsmartcard.remotesmartcardreader.app.MainActivity" >
<item android:id="@+id/action_copy"
android:title="@string/action_copy"
android:icon="@drawable/ic_action_copy"
app:showAsAction="withText" />
<item android:id="@+id/action_delete"
android:title="@string/action_delete"
android:icon="@drawable/ic_action_delete"
app:showAsAction="withText" />
</menu>

View File

@@ -0,0 +1,6 @@
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
</resources>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Smart Card Emulator</string>
<string name="status_error">Error</string>
<string name="status_disconnected">Disconnected from terminal</string>
<string name="status_capdu">C-APDU</string>
<string name="status_rapdu">R-APDU</string>
<string name="status_install">Installed Applets</string>
<string name="action_restart">Restart Emulator</string>
<string name="action_copy">Copy Log</string>
<string name="action_delete">Clear Log</string>
<string name="aid_isoapplet">f276a288bcfba69d34f31001</string>
<string name="applet_isoapplet">Philip Wendland\'s ISO Applet</string>
<string name="aid_helloworld">F000000001</string>
<string name="applet_helloworld">jCardSim Team\'s Hello World Applet</string>
<string name="aid_openpgp">D2760001240102000000000000010000</string>
<string name="applet_openpgp">Yubico\'s OpenPGP Applet</string>
<string name="aid_oath">a000000527210101</string>
<string name="applet_oath">Yubico\'s OATH Applet</string>
</resources>

View File

@@ -0,0 +1,8 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>
</resources>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<host-apdu-service xmlns:android="http://schemas.android.com/apk/res/android"
android:description="@string/app_name"
android:requireDeviceUnlock="false">
<aid-group android:description="@string/applet_isoapplet" android:category="other">
<aid-filter android:name="@string/aid_isoapplet"/>
</aid-group>
<aid-group android:description="@string/applet_helloworld" android:category="other">
<aid-filter android:name="@string/aid_helloworld"/>
</aid-group>
</host-apdu-service>