简体   繁体   English

当NFC读取器未发送“ SELECT AID” APDU时,在Android上模拟智能卡

[英]Emulate a smart card on Android when the NFC Reader does not send a “SELECT AID” APDU

I have read the Android documentation about NFC and found that it could emulate an NFC tag. 我阅读了有关NFC的Android文档,发现它可以模拟NFC标签。 However it requires that you register which AID you serve. 但是,这要求您注册要提供的AID。

Is it possible to create an application that handles communication if the NFC reader does not send a "SELECT AID" APDU? 如果NFC阅读器未发送“ SELECT AID” APDU,是否可以创建处理通讯的应用程序? Either by creating an application where the AID in the manifest file is empty, or create some sort of default application. 通过创建清单文件中AID为空的应用程序,或创建某种默认应用程序。

I don't mind if the application has to be in the foreground, if that helps in any way. 我不介意应用程序是否必须位于前台,如果有任何帮助的话。

Thank you in advance. 先感谢您。

No, the Android API currently does not support this. 否,Android API当前不支持此功能。 Commands are only routed to applications upon reception of a SELECT (by AID/DF name) command that matches an AID registered to the system. 仅在接收到与注册到系统的AID相匹配的SELECT(按AID / DF名称)命令后,命令才会路由到应用程序。 As of Android 4.4.4 there is no mechanism to define a catch-all/default app. 从Android 4.4.4开始,没有机制可以定义全部/默认应用。

It seems that Android devices currently only use the AID-based routing mechanism defined in the NFC Forum NCI specification. 似乎Android设备当前仅使用NFC论坛NCI规范中定义的基于AID的路由机制。 However, the NCI specification also defines protocol-based and technology-based routing. 但是,NCI规范还定义了基于协议和基于技术的路由。 These routing mechanisms could instruct the NFC controller to forward all communication regardless of a SELECT (by AID/DF name) command to the application processor/Android system. 这些路由机制可以指示NFC控制器将所有通信转发给应用处理器/ Android系统,而不考虑SELECT(通过AID / DF名称)命令。 Consequently, it might be possible to implement a modified Andoid system that permits default routing of all communication to an app, but it's unclear if the NFC controllers used in Android devices support protocol-based or technology-based routing mechanisms (support for them seems to be optional). 因此,可能有可能实现经过修改的Andoid系统,该系统允许默认路由到应用程序的所有通信,但是目前尚不清楚Android设备中使用的NFC控制器是否支持基于协议的路由或基于技术的路由机制(对它们的支持似乎是可选的)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM