NXP Controller HCE for Google Wallet

abuttino

Senior Member
Sep 12, 2006
2,222
411
0
Decompile the NFC applications and libraries to gain control of the NFC HCE controller and enable true Tap and Pay abilities for AOSP based ROMs.

All files NFC related are here: http://www.tinozplace.com/NFCProject/

Within this zip: http://www.tinozplace.com/NFCProject/NFC_HTC1.zip are the files from the Google Play Edition's Stock rom. This one of the phone's that the NXP stack works properly. But ONLY in the "Stock" rom from Google.

Currently we need to reverse engineer/decompile the JNI CPP files to get them inserted in AOSP based ROMs like CM.

If you'd like to become a developer in this project please let me know via PM.



XDA:DevDB Information
NXP Controller HCE for Google Wallet, a App for the No Device

Contributors
abuttino

Version Information
Status: Testing

Created 2013-12-17
Last Updated 2013-12-17
 

androcheck

Senior Member
Dec 7, 2009
235
413
63
john.zweng.at
Hi!

I just have a Nexus 4 which has the Broadcom chipset inside, so please excuse if I am completly wrong here. On the Nexus 4 I can use HCE perfectly with cyanogenmod 11 (as the Broadcom drivers are all there in the source tree).

But I had the impression that the NXP drivers also are there:

Here the jni sources for NXP for the "com.android.nfc" package (which should end up as "Nfc.apk" on the device)
https://android.googlesource.com/platform/packages/apps/Nfc/+/android-4.4.2_r1/nxp/jni/

And here the lowlevel libnfc for NXP (the broadcom one is named "libnfc-nci"):
https://android.googlesource.com/platform/external/libnfc-nxp/+/android-4.4.2_r1/src/

Isn't that what you are looking for am I completly wrong here?

Kind regards,
john :)
 
  • Like
Reactions: Hisham alshaeer

azreark1

Senior Member
Apr 15, 2013
106
6
0
Tony, i'd totally be willing to help out if i knew what i was looking for :/ I really want this to get figured out and wish i knew more about programming. Let me know if there's anything a guy with 'basic' knowledge can help out with :)
 

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,095
25,085
0
Owego, NY
Hi!

I just have a Nexus 4 which has the Broadcom chipset inside, so please excuse if I am completly wrong here. On the Nexus 4 I can use HCE perfectly with cyanogenmod 11 (as the Broadcom drivers are all there in the source tree).

But I had the impression that the NXP drivers also are there:

Here the jni sources for NXP for the "com.android.nfc" package (which should end up as "Nfc.apk" on the device)
https://android.googlesource.com/platform/packages/apps/Nfc/+/android-4.4.2_r1/nxp/jni/

And here the lowlevel libnfc for NXP (the broadcom one is named "libnfc-nci"):
https://android.googlesource.com/platform/external/libnfc-nxp/+/android-4.4.2_r1/src/

Isn't that what you are looking for am I completly wrong here?

Kind regards,
john :)
Those have always been there and have been for years. The problem is that when HCE was added to AOSP - it was only added for Broadcom (NCI) chipsets. On the NXP side of things, only stubs were added.

Actually, libnfc-nxp appears to have at least SOME HCE capability (and has for quite some time) - but packages/apps/Nfc is completely missing HCE as anything but "do nothing" stubs.

There are closed-source implementations of NXP HCE on the Google Play Edition HTC One and Xperia Z Ultra, but no open source implementations for non-GPe devices.
 

androcheck

Senior Member
Dec 7, 2009
235
413
63
john.zweng.at
Thank you for clarification! :good:
I wasn't aware of this fact. It's a sad decision of Google not to to release the source for both chipsets then.


Just for my personal interest: how did this work for phones like Nexus S back in days of cyanogenmod 9?
I remember the guys behind NFCproxy and SimplyTapp recommending phones like the Nexus S because the SimplyTapp HCE patches for cyanogenmod 9 only work with NXP chipsets (so I regretted to have a broadcom chipset at this time).

So how did this happen that we now have full HCE support on broadcom but not on NXP? :confused: (I understand that the 2011 nxp patches were just a hack, and may be of no use for today's situation)
How the things change...


edit: @Entropy512: Ah ok, I just read your Google wallet related posts on Google+ (which I should have done before) now I understand the situation better..
 
Last edited:

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,095
25,085
0
Owego, NY
Thank you for clarification! :good:
I wasn't aware of this fact. It's a sad decision of Google not to to release the source for both chipsets then.


Just for my personal interest: how did this work for phones like Nexus S back in days of cyanogenmod 9?
I remember the guys behind NFCproxy and SimplyTapp recommending phones like the Nexus S because the SimplyTapp HCE patches for cyanogenmod 9 only work with NXP chipsets (so I regretted to have a broadcom chipset at this time).

So how did this happen that we now have full HCE support on broadcom but not on NXP? :confused: (I understand that the 2011 nxp patches were just a hack, and may be of no use for today's situation)
How the things change...


edit: @Entropy512: Ah ok, I just read your Google wallet related posts on Google+ (which I should have done before) now I understand the situation better..
That's the thing that REALLY mystifies me - The Tapp guys claim they worked with Google on HCE.

However, there isn't a single commit in the history for Google HCE that comes from anyone at Tapp, the architecture of the solutions is VERY different, and last (but not least) - the Tapp guys exclusively supported NXP NFC chipsets (Up until the Nexus 4, almost nothing had a Broadcom/NCI chipset and the Tapp patches were written before that), and Google is completely missing NXP HCE support...
 

abuttino

Senior Member
Sep 12, 2006
2,222
411
0
Tony, i'd totally be willing to help out if i knew what i was looking for :/ I really want this to get figured out and wish i knew more about programming. Let me know if there's anything a guy with 'basic' knowledge can help out with :)
We really can't do anything until the code is decompiled. If you know people that can help, that is always a good start :)



Sent from my Nexus 7 using Tapatalk
 

abuttino

Senior Member
Sep 12, 2006
2,222
411
0
That's the thing that REALLY mystifies me - The Tapp guys claim they worked with Google on HCE.

However, there isn't a single commit in the history for Google HCE that comes from anyone at Tapp, the architecture of the solutions is VERY different, and last (but not least) - the Tapp guys exclusively supported NXP NFC chipsets (Up until the Nexus 4, almost nothing had a Broadcom/NCI chipset and the Tapp patches were written before that), and Google is completely missing NXP HCE support...
Yager, right?

Sent from my Nexus 7 using Tapatalk
 

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,095
25,085
0
Owego, NY
Weird. If I take the NFC APK from the Sony GPe and resign it with platform testkeys (so it'll work on a self-built AOSP firmware), along with the Sony GPe's libnfc and libpn544_fw - Wallet STILL does not respond to payment terminals on my Oppo N1.

Won't be able to look at the logcat from my last attempt until tomorrow.
 

abuttino

Senior Member
Sep 12, 2006
2,222
411
0
The oppo has NXP? That is kind of odd, I would figure that they'd put it together with a working wallet

Sent from my Nexus 7 using Tapatalk
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone