hce

DESFire EV1 card emulation

只愿长相守 提交于 2019-11-29 00:15:41
I need to emulate a DESFire EV1 card on an Android device. However, I'm confused on how to use the Mifare SDK (lite or advanced) with the HCE. Is that even possible? I need to start the project and I had a lot of researches about how the data are stored and ciphered in the DESFire cards but I ended up with the fact that I need to use Mifare SDK on HCE. First of all, you cannot use the MIFARE SDK to emulate cards. The MIFARE SDK provides reader-side functionality only. Second, you cannot emulate the whole functionality of MIFARE DESFire (EV1) cards using Android HCE. However, you can emulate

Host card emulation on Android (4.4 / KitKat and above) with Nexus 5

℡╲_俬逩灬. 提交于 2019-11-28 21:56:06
I'm trying to emulate an NFC tag with my Nexus 5 according to this document , but my service is never invoke. Should I turn off Android beam? I'd like to emulate a simple tag containing a url. The reader is a Nexus 7 (2012) and I've figured out the process like a simple scan of a NFC tag using Android beam on Nexus 7. In addition I'm a bit confused about aid-filter name. Is there a list of them? I'm sure that I don't understand something. Thanks First of all (though this does not directly answer your question), the preferred way to transfer a URL between two Android NFC device is to use

KitKat: How to route APDUs to the SIM

。_饼干妹妹 提交于 2019-11-28 19:54:13
I want to route APDUs I get from an NFC Reader to the SIM Card. According to the HCE documentation I thought it would be possible simply by creating an OffHostApduService with the according routing-entries (which I did). Sadly, the SIM does not seem to get any APDUs. SELECT-Commands that work when the SIM is directly attached to my workstation by a SIM-Reader return with 6a82 (File not found). In LogCat I found two interesting bits of information: Every time I shoot a select command which should be routed to the SIM, I get these entries: 01-14 10:44:18.501: D/BrcmNfcJni(1009): RoutingManager:

Can an Android NFC phone act as an NFC tag?

女生的网名这么多〃 提交于 2019-11-28 15:19:00
From what I have understood so far, an NFC phone will act as an NFC reader which will read data from an NFC tag. Now my question is, can we switch this around? Can we make an Android NFC phone behave as the tag which an NFC reader will get data from? Thanks for your assistance. At this time, I would answer "no" or "with difficulty", but that could change over time as the android NFC API evolves. There are three modes of NFC interaction: Reader-Writer: The phone reads tags and writes to them. It's not emulating a card instead an NFC reader/writer device. Hence, you can't emulate a tag in this

Passing information to a HostApduService from another Context

浪子不回头ぞ 提交于 2019-11-28 13:49:47
This has been asked before with no responses, so I will try to phrase the question a bit differently. What are the various ways to pass some data to an Android Service without being able to bind to it or start it myself? Here's the issue - I have a HostApduService that is started by the operating system on every NFC card transaction. It requires the permission android.permission.BIND_NFC_SERVICE , which is a system permission, so my application can't bind to it. I don't want to leave data at rest so anything that gets written to the disk is a no-go. I thought of a few possible solutions, but

Can I prevent Host Card Emulation service from being triggered by select AID?

偶尔善良 提交于 2019-11-28 12:50:55
I have an Android app with a service registered to Android beam and a service registered to host card emulation. I want to decide when to enable/disable the HCE service in the code. The HCE service in the manifest looks like this - <service android:name="com.bimo.verifonewallet.service.MyHostApduService" android:exported="true" android:permission="android.permission.BIND_NFC_SERVICE" > <intent-filter> <action android:name="android.nfc.cardemulation.action.HOST_APDU_SERVICE" /> </intent-filter> <meta-data android:name="android.nfc.cardemulation.host_apdu_service" android:resource="@xml

Do I have to know what the AID of a card is for card emulation with Android HCE?

隐身守侯 提交于 2019-11-28 06:11:00
问题 I merely want to emulate a transit card with an Android application using HCE. I'm confused about the AID of the card. Do I have to know what the AID of the card is? According to Host-based Card Emulation document: If you are emulating cards for an existing NFC reader infrastructure, the AIDs that those readers are looking for are typically well-known and publicly registered (for example, the AIDs of payment networks such as Visa and MasterCard). So, what is the point? P.S. I don't think the

Application not visible in Tap and Pay

随声附和 提交于 2019-11-28 01:17:50
问题 What is the key thing to adjust in NFC HCE application to get it visible under settings NFC Tap and Pay Following code returns true for the app, so it's capable of payment: boolean isDefault = CardEmulation .getInstance(NfcAdapter.getDefaultAdapter(this)) .isDefaultServiceForCategory( new ComponentName(this, MyPaymentService.class), CardEmulation.CATEGORY_PAYMENT); Service declaration in manifest: <service android:name="my.package.MyPaymentService" android:exported="true" android:permission=

Card emulation via software NFC

你。 提交于 2019-11-27 15:33:20
问题 After reading a lot of questions, i decided to post this one. I read that stock version of android does not support API's for card emulation. Also, we cannot write custom applications to secure element embedded in nfc controllers due to keys managed by google/samsung. I need to emulate a card (mifare or desfire etc). The option i can see is doing it via software. I have a ACR122U reader and i've tested that NFC P2P mode works fine with the Nexus-S that i have. 1) I came across a site that

DESFire EV1 card emulation

耗尽温柔 提交于 2019-11-27 15:31:15
问题 I need to emulate a DESFire EV1 card on an Android device. However, I'm confused on how to use the Mifare SDK (lite or advanced) with the HCE. Is that even possible? I need to start the project and I had a lot of researches about how the data are stored and ciphered in the DESFire cards but I ended up with the fact that I need to use Mifare SDK on HCE. 回答1: First of all, you cannot use the MIFARE SDK to emulate cards. The MIFARE SDK provides reader-side functionality only. Second, you cannot