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
BIN
ACardEmulator/app/src/main/res/drawable-hdpi/ic_action_copy.png
Normal file
|
After Width: | Height: | Size: 375 B |
BIN
ACardEmulator/app/src/main/res/drawable-hdpi/ic_action_delete.png
Executable file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
ACardEmulator/app/src/main/res/drawable-hdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
BIN
ACardEmulator/app/src/main/res/drawable-mdpi/ic_action_copy.png
Normal file
|
After Width: | Height: | Size: 284 B |
BIN
ACardEmulator/app/src/main/res/drawable-mdpi/ic_action_delete.png
Executable file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
ACardEmulator/app/src/main/res/drawable-mdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
ACardEmulator/app/src/main/res/drawable-xhdpi/ic_action_copy.png
Normal file
|
After Width: | Height: | Size: 351 B |
BIN
ACardEmulator/app/src/main/res/drawable-xhdpi/ic_action_delete.png
Executable file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
ACardEmulator/app/src/main/res/drawable-xhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 464 B |
BIN
ACardEmulator/app/src/main/res/drawable-xxhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
29
ACardEmulator/app/src/main/res/layout/activity_main.xml
Normal 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>
|
||||
16
ACardEmulator/app/src/main/res/menu/main.xml
Normal 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>
|
||||
6
ACardEmulator/app/src/main/res/values/dimens.xml
Normal 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>
|
||||
25
ACardEmulator/app/src/main/res/values/strings.xml
Normal 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>
|
||||
8
ACardEmulator/app/src/main/res/values/styles.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
14
ACardEmulator/app/src/main/res/xml/aid_list.xml
Normal 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>
|
||||