Skip to first unread message

D.D.

unread,
Mar 4, 2017, 1:45:34 PM3/4/17
to Android-x86
Hello!

I'd like to request the support for external NFC readers in Android-x86. Currently there's no NFC and HCE support at all. Now I have USB NFC reader ACR1281U-C1 by ACS. It perfectly works with these utilities been written especially for ACS readers by Thomas Skjølberg:
- ACR 1281 USB NFC Reader Utils: https://play.google.com/store/apps/details?id=com.skjolberg.acr1281u&hl=ru
- External NFC Reader Service: https://play.google.com/store/apps/details?id=com.skjolberg.nfc.external
- API for External NFC Reader Service: https://github.com/skjolber/external-nfc-api
- External NFC Client: https://github.com/skjolber/external-nfc-api/tree/master/externalNFCClient

But with these tools I cannot provide "out-of-box" NFC support in such way that other apps would know that the OS has NFC ability. That would require a custom ROM and some untrivial programming exercises. Now those apps state that NFC doesn't exist or is disabled.

My suggestion is that you might integrate External NFC Reader Service and its API into the next Android-x86 build and optimize current OS sources to work with it in drop-in replacement manner.

Chih-Wei Huang

unread,
Mar 5, 2017, 1:32:55 AM3/5/17
to Android-x86
If you can donate some devices to the developers
for testing and debugging, that would be possible.
Otherwise I don't think anyone is interesting in doing it.


--
Chih-Wei
Android-x86 project
http://www.android-x86.org

D.D.

unread,
Mar 5, 2017, 9:13:01 AM3/5/17
to Android-x86
Chih-Wei Huang

Well, now I have just one such device, which I mentioned above. But I feel like I'm ready to donate some money for you to buy one such reader (if you're ready to make changes to the sources, of course). These devices are not so expensive, e.g. ACR122U is about $48 and ACR1281U is $57. Please, check your local stores/sites because the prices may vary slightly.
What about the interest... As I know there are many smartphones without NFC or with NFC not being able to read Mifare standards. Now the owner of such phone has only one way - to purchase another phone with "normal" NFC. It's kinda expensive and not always practical, I think. External NFC readers for virtual Android system might be another possibility to work with NFC tags and cards, which are common thing now.

Michael Goffioul

unread,
Mar 5, 2017, 12:47:36 PM3/5/17
to andro...@googlegroups.com
I would have some interest in having NFC support in android-x86. However I don't see how one could integrate External NFC Reader Service app into android-x86, given that it's not a free app (it costs $49 on the play store). Only the API/client part is free, but it relies on the presence of the service app to work. Or am I missing something?

Michael.



--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86+unsubscribe@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.

D.D.

unread,
Mar 5, 2017, 2:25:06 PM3/5/17
to Android-x86
Michael Goffioul

You are right, it's a paid service. But aren't we allowed to distrubute it when we're paid for that? I think, it may be solved as Thomas asks to contact him for bulk distribution of his app. As a last resort he might provide the sources for modification, so the android developers could adapt them for the project.

D.D.

unread,
Mar 8, 2017, 3:46:15 AM3/8/17
to Android-x86
So, I got in touch with Thomas Skjølberg with the question of integrating and distributing his service as a part of Android-x86 builds. He says:

Hi,

IT would require some 'wireing' but should be possible - in other words, the Android images must be modified somewhat and the service tweaked a little.

The service is not a drop-replacement now because the NFC classes go to a native NFC service, which Android does not permit to replaced out of the box.

Best regards,
Thomas

Now to get things done is to cooperate with him and alter the codes of both Android and ext. NFC service so they could work together.

After that there's one important thing to be made - HCE support. To be able to issue (and use) virtual bank cards HCE instruments in the build must be activated. It seems that currently they are just cut out - system\etc\permissions dir doesn't contain android.hardware.nfc.hce.xml file. Even when I place such file there, the apps relying on HCE do not work properly. So some deep changes should be done on API level.

Chih-Wei Huang

unread,
Mar 8, 2017, 8:30:55 PM3/8/17
to Android-x86
2017-03-08 16:46 GMT+08:00 D.D. <max...@gmail.com>:
>
> After that there's one important thing to be made - HCE support. To be able
> to issue (and use) virtual bank cards HCE instruments in the build must be
> activated. It seems that currently they are just cut out -
> system\etc\permissions dir doesn't contain android.hardware.nfc.hce.xml
> file. Even when I place such file there, the apps relying on HCE do not work
> properly. So some deep changes should be done on API level.

You need to enable NFC service.
Currently it's removed from android-x86 codebase.

D.D.

unread,
Mar 10, 2017, 2:29:32 PM3/10/17
to Android-x86

Chih-Wei Huang


Am I right that you're talking about custom kernel build? So, the only thing related to NFC is "NFC subsystem support" under "Networking support" section.



I couldn't find "NFC service" there. Or you are talking about AOSP codebase and I should fetch its sources instead of Android-x86?..

D.D.

unread,
Mar 11, 2017, 2:33:59 AM3/11/17
to Android-x86

Mauro Rossi

unread,
Mar 11, 2017, 5:30:05 AM3/11/17
to Android-x86


Il giorno sabato 4 marzo 2017 19:45:34 UTC+1, D.D. ha scritto:
Hello!

I'd like to request the support for external NFC readers in Android-x86.

In my understanding an external/libnfc-acr or modding of the existing project may be needed. Or is it aosp libnfc-* already ok?

Why not starting from building libnfc, modded for ACR  to "talk" with the ACR kernel driver, if needed?

Android SDK API should be hardware layer independent
while I don't know if hal changes are necessary

M.

Chih-Wei Huang

unread,
Mar 12, 2017, 2:53:47 PM3/12/17
to Android-x86
2017-03-11 3:29 GMT+08:00 D.D. <max...@gmail.com>:
> Chih-Wei Huang
>
>
> Am I right that you're talking about custom kernel build? So, the only thing
> related to NFC is "NFC subsystem support" under "Networking support"
> section.
>
>
>
> I couldn't find "NFC service" there. Or you are talking about AOSP codebase
> and I should fetch its sources instead of Android-x86?..

I meant the userspace process Nfcservice.
Currently all nfc related projects are marked as
"notdefault" in android-x86 manifest.xml.
That means they will not be fetched nor be built.

I didn't mention the kernel driver.
But of course you need a driver for
your NFC reader.
I assumed you already have the driver code
and know how to enable it.

D.D.

unread,
Mar 13, 2017, 4:47:33 AM3/13/17
to Android-x86
Mauro Rossi

Well, it sounds like an option for ACR integration into Android. But I am not Android programmer so I don't have enough experience and time to modify libnfc, so I think this task could be better solved by Android-x86 developers here. I may help in alpha/beta testing if anyone is going to write such library.

Chih-Wei Huang

Ok, I'll try to build the project with this service activated. The last two days I've been trying to compile HCE-ready project by altering the kernel options. When I got working image it did not contain HCE ability. Now I understand why. So I'm going to continue my efforts.

As I know ACR readers don't require some "special" driver. Maybe I'm wrong but when I pass-through my reader (being plugged into an USB port) from the host to the guest, "ACR 1281 USB NFC Reader Utils" tool sees my device and shown its info along with tag or smartcard info. So, it seems to work on the common USB drivers, doesn't it?

D.D.

unread,
Mar 16, 2017, 12:12:48 PM3/16/17
to Android-x86
Chih-Wei Huang

I made "external/libnfc-nci", "external/libnfc-nxp" and "packages/apps/Nfc" as default things to be built (by simply removing groups option). Then I synced all the files and built the project. But I still don't see android.hardware.nfc.hce.xml file in system\etc\permissions folder. What did I miss? Maybe these three packages aren't enough to have HCE activated?..

Chih-Wei Huang

unread,
Mar 16, 2017, 9:18:36 PM3/16/17
to Android-x86
That's for Nfcservice only.
You need to add the xml to
device/generic/common/device.mk manually.
You also need to add Nfc to
PRODUCT_PACKAGES to build it into the image.

D.D.

unread,
Apr 3, 2017, 2:35:24 PM4/3/17
to Android-x86
Chih-Wei Huang

So, I added "Nfc" string to PRODUCT_PACKAGES and two NFC related xml's to be copied on building. Also I have activated all NFC stuff in the manifest and resynced android tree. Then I did rebuild and installed this new image onto VB. Now I can see that android.hardware.nfc.xml and android.hardware.nfc.hce.xml files reside in /system/etc/permissions/ folder. But no any mention of Nfcservice or something similar in the OS (settings, running apps/processes etc.). I suppose I should have /system/apps/Nfc.apk file and /data/data/com.android.nfc folder. Maybe it was not built into the image somehow... I don't know.

Will it run without physical NFC chip (as the device is virtual one)? For this build I used standard kernel. Do I need to modify it again as I did before?..

D.D.

unread,
Apr 4, 2017, 1:55:23 PM4/4/17
to Android-x86
Nothing changes with the customized kernel having all NFC entries activated. Not only Nfcservice is started on boot but also it doesn't exist anywhere in the filesystem. I'm having Nfc strings in device.mk and packages.mk but the app is not included into the build. What is missed?

D.D.

unread,
Apr 8, 2017, 11:00:07 AM4/8/17
to Android-x86
Well, finally I got the solution to NFC activation in Android-x86 (thanks to Jon West). One needs to include "NfcNci" package in device.mk (not "Nfc"). There also may be additional packets to include, e.g. "libnfc-nci", "libnfc-nxp", "libnfc_nci_jni", "Tag", "com.android.nfc_extras". So, the service is running but the OS is kinda unstable due to some reasons. I guess a real NFC hardware should be connected in order for it to run properly. Besides of that the service should be altered in some ways.

D.D.

unread,
Oct 7, 2019, 4:34:28 AM10/7/19
to Android-x86
If anyone is still interested, External NFC API, Service, Client and other components are now open source, so any developer could try him(her)self in Ax-86 adaptation: https://github.com/skjolber/external-nfc-api Personally I'm trying to accomplish this by myself, even though it's going to take a large amount of time. I think I might donate some funds for buying ACR readers, if any dev(s) want to give it a try.

воскресенье, 5 марта 2017 г., 22:47:36 UTC+5 пользователь Michael Goffioul написал:
I would have some interest in having NFC support in android-x86. However I don't see how one could integrate External NFC Reader Service app into android-x86, given that it's not a free app (it costs $49 on the play store). Only the API/client part is free, but it relies on the presence of the service app to work. Or am I missing something?

Michael.
On Sun, Mar 5, 2017 at 9:13 AM, D.D. <max...@gmail.com> wrote:
Chih-Wei Huang

Well, now I have just one such device, which I mentioned above. But I feel like I'm ready to donate some money for you to buy one such reader (if you're ready to make changes to the sources, of course). These devices are not so expensive, e.g. ACR122U is about $48 and ACR1281U is $57. Please, check your local stores/sites because the prices may vary slightly.
What about the interest... As I know there are many smartphones without NFC or with NFC not being able to read Mifare standards. Now the owner of such phone has only one way - to purchase another phone with "normal" NFC. It's kinda expensive and not always practical, I think. External NFC readers for virtual Android system might be another possibility to work with NFC tags and cards, which are common thing now.

--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to andro...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages