Hello. I have a Smart card, called CertGate, that was delivered with a properitary, precompiled JNI/NDK library. The smart card works by having the end user app access a file /cgmstrx.sdx in the root of the SD card.
This works by having the end user app read/write APDU's to a interface in the JNI library, the JNI library translates those APDU's to writes and reads to the cgmstrx.sdx file. The specification of how APDU's are read/written to this file are properitary and not available to the customers of the certgate card. Now to the problem: Since the new Android 4.4.2 SD card policy prevents writes to the SD card except for the app userspace folder, its not possible to write rawly to the SD card, and thus the function of the SD SmartCard is lost. However, if you use a OPEN_DOCUMENT intent and a file picker in the end user app, you could have the end user select the cgmstrx.sdx file in the root of SD card, and thus gain r/w permission to this file through a file descriptor. However, I wonder, is it possible to redirect all outgoing file calls (read/writes) from a precompiled JNI library, to instead go through the file descriptor returned by the intent? Eg if I could in some way "override" the raw file open method called by any libraries (some proprietary .so files) loaded by my app, to go through my app and then I dont open the file, instead I just pass the "OPEN_DOCUMENT" file descriptor directly. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

