-
Notifications
You must be signed in to change notification settings - Fork 63
[UNMAINTAINED] Web SCAPI
The SIMalliance OpenMobile API can get integrated in the Android platform with the SmartCard API. Android using the shared library can get access to Secure Elements using the interfaces defined in the OMAPI spec.
However, browser based applications gain importance with new HTML5 features and the benefit that browser applications are platform independent compared to native applications for the mobile device. Making the OpenMobile API available in the browser provides the possibility to create security aware applications using features of Secure Elements in HTML applications as well.
The WebScapi (SmartCard API for the Web) project is still a very early prototype but will get extended over the time.
- add the SmartCard API patch file(s) as normal to build the system
- download the webscapi-1_0_0.tgz and extract the content
- apply the WebScapi patch with
$ cd <ANDROID_ROOT_DIR>
$ patch -p1 < <path_to_my_patches>/webscapi.patch
- build & flash the system as normal...not yet...
make
and flashed on a device the corresponding files are included in the system.img
properly but when accessing the browser plugin it will cause an exception similar to:E/dalvikvm( 667): Dex cache directory isn't writable: /data/dalvik-cache
I/dalvikvm( 667): Unable to open or create cache for /system/app/WebScapi.apk (/data/dalvik-cache/system@app@WebScapi.apk@classes.dex)
E/PluginManager( 667): Can't find plugin's class: com.gieseckedevrient.android.webscapi.TransportPlugin
E/browser ( 667): Console: Uncaught TypeError: Object #<HTMLObjectElement> has no method 'createSEService' file:///sdcard/WebScapi.js:23
- either build the system with odex files:
and flash normally or$ make -jX WITH_DEXPREOPT=true
- install the browser plugin APK like a normal application:
and reboot.$ adb remount
$ adb shell rm /system/app/WebScapi.apk
$ cd <ANDROID_ROOT_DIR>
$ adb install out/target/product/<platform>/system/app/WebScapi.apk
Even now, it turned out that the current implementation is only accessible when builing the ENG target, USERDEBUG & USER will not work.
Ensure to compile withlunch full_crespo-eng
$ adb push packages/apps/WebScapi/html/index.html /sdcard/
$ adb push packages/apps/WebScapi/html/WebScapi.js /sdcard/
Within the browser, open the URI
file:///sdcard/index.html

The PerformanceTester application will be converted to HTML in a next step.
Include the Javascript code from
WebScapi.js
as provided in the sample application, create an instance of SEService
and use all interfaces of the OpenMobile API as is native Android applications.Developed and tested with android-4.0.3_r1 with Nexus S and SIM & SmartMX as Secure Element.
- Introduction
- How To
- Access Control
- UICC Support
- ASSD Support
- MSC Support
- PC/SC Interface
- Service Layer
- Applications
- FAQS
- Abbreviations
- Contributions