• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

Making Transactions with Android Pay on Lineage OS 14.1 (Fixed!)

Search This thread

Link_of_Hyrule

Senior Member
Oct 12, 2010
2,060
769
Ogden, Utah
www.ubermicrostudios.com
As of June 16th, 2017 the fix which can be found here has been merged so it will be in the June 18th, 2017 build and forward. The fix below will no longer be needed after that point.

Android Pay should now work if you use the Magisk module I created using the file with changes made by Shantur! To use my module you need to install Magisk follow instructions HERE. Alternatively, you can manually replace /system/lib/libnfc_nci_jni.so with the one in this post. Of course you must be able to pass SafetyNet to use Android Pay to if it's giving you errors make sure you're passing it!
Note: This should also work for any device that has the NfcNci chip.

So let me specify a few things first of all Android Pay didn't work because of a defect with the NFC drivers not because of SafetyNet. You can actually use Android Pay on Lineage OS 14.1 stock (not using the su add-on) on devices with working NFC drivers such as the OnePlus 3 or Nexus 7 2013.

To fix the problem all you have to do is replace the file using any method. This fix should work on any device with the same NFC Chip as the OnePlus One. You can actually install it on an unlocked phone WITHOUT root using the TWRP recovery. I have not tested but I don't think this will break SafetyNet. I personally suggest the Magisk Module because it will survive updates unlike doing it manually or with a non-add.d flashable zip. This is of course an unofficial mod not supported by the Lineage OS developers you can view the code changes in this thread. The Lineage OS developers are working on an Official fix for the issue now that we have determined the cause of it.

Special thanks to shantur and the other people in this thread that worked hard on this!

The official fix is being worked on progress can be found HERE.

You can find a flashable zip here: https://forum.xda-developers.com/showpost.php?p=71025490&postcount=295

Old Post:
This thread is about getting Android Pay to work to make actual transactions not about passing SafetyNet or CTS which we can already do through the methods described below!

What works:
*Passing SafetyNet/CTS (having an unlocked bootloader doesn't matter).
*Adding a Credit Card to Android Pay.

What doesn't work:
*Making an actual transaction with Android Pay.


So as most of you know Android Pay and other apps don't work unless you pass SafetyNet aka CTS. I've gone found these if you unroot or you use phh super user and magisk you can easily pass CTS and add your cards to Android Pay and use other apps such as Pokemon GO.

However, I've discovered that something else is causing Android Pay not to work and would like for it to be fixed. Android Pay works in CM13 and COS13 as long as your device passes CTS but when you tap a terminal using a Lineage OS 14.1 device nothing happens the Android Pay app never launches at all and didn't show any kind of errors or crashes it just never appears.

*Please note although you may have heard unlocked bootloaders cause SafetyNet to fail this is only true if the kernel reports the status of the bootloader which Lineage OS 14.1 does not please see this commit here https://review.lineageos.org/#/c/152044/


I don't know enough about this to diagnosis or fix the problem but I'm willing to gather logs and try and help resolve the problem. I live by an NFC vending machine so it's easier to get logs than going to an actual store.

If you have Lineage OS 14.1 and have successfully used Android Pay on your OnePlus one please post here. If you're on a Lineage OS 14.1 based ROM but not official nightly and it works for you tell us maybe we can have patches pushed to official cm to fix the issues.

When I say it works for you I mean you've made actually successful payments with it not just added cards to the app which is already working on Lineage OS 14.1 if you pass CTS.

Note: To pass CTS simply install Lineage OS directly followed by magisk 10.2 and enable Magisk hide and reboot. If you have issues use magisk install, wipe your system, dalvic, and cache in TWRP and repeat the previous steps.
 

Attachments

  • Android_Pay_Fix_for_Bacon-1.1.zip
    221 KB · Views: 3,793
Last edited:

royeiror

Senior Member
Nov 15, 2013
128
23
Hi. Care to share how to managed to pass SafetyNet? I tried using the official 14.1 as well as TuggaPower N7. Both with SuperSU 2.78SR4 and magisk and phh root. HBO GO is nagging me about root and I'd like to use it.
 

jhedfors

Senior Member
Oct 16, 2009
1,454
734
St Paul, AZ
Moto G6
OnePlus 6T
Hi. Care to share how to managed to pass SafetyNet? I tried using the official 14.1 as well as TuggaPower N7. Both with SuperSU 2.78SR4 and magisk and phh root. HBO GO is nagging me about root and I'd like to use it.

I can pass SafetyNet by completely removing the system installed root. You can do this by installing SuperSU from the Play Store, then immediately in settings (ignoring the prompts to update SuperSU) select Full Unroot. Alternatively, you can flash a zip file in recovery that pretty much does the same thing. Check out this link for the zip:
http://forum.xda-developers.com/showpost.php?p=63615067

If you need root, you can additionally install Magisk and PHH Superuser. In Magisk Manager settings, enable Magisk Hide, BusyBox, and systemless hosts. Magisk Manager will now have a Magisk Hide section where you will check any app that you are wanting to hide root from. I have successfully done this with Android Pay.
 

royeiror

Senior Member
Nov 15, 2013
128
23
I can pass SafetyNet by completely removing the system installed root. You can do this by installing SuperSU from the Play Store, then immediately in settings (ignoring the prompts to update SuperSU) select Full Unroot. Alternatively, you can flash a zip file in recovery that pretty much does the same thing. Check out this link for the zip:
http://forum.xda-developers.com/showpost.php?p=63615067

If you need root, you can additionally install Magisk and PHH Superuser. In Magisk Manager settings, enable Magisk Hide, BusyBox, and systemless hosts. Magisk Manager will now have a Magisk Hide section where you will check any app that you are wanting to hide root from. I have successfully done this with Android Pay.
Thanks. I'll check it out.
 

69gm

Senior Member
Jun 27, 2011
1,384
574
Honolulu, Hawaii
I can pass SafetyNet by completely removing the system installed root. You can do this by installing SuperSU from the Play Store, then immediately in settings (ignoring the prompts to update SuperSU) select Full Unroot. Alternatively, you can flash a zip file in recovery that pretty much does the same thing. Check out this link for the zip:
http://forum.xda-developers.com/showpost.php?p=63615067

If you need root, you can additionally install Magisk and PHH Superuser. In Magisk Manager settings, enable Magisk Hide, BusyBox, and systemless hosts. Magisk Manager will now have a Magisk Hide section where you will check any app that you are wanting to hide root from. I have successfully done this with Android Pay.

Will you need to do this every time you flash an update? Thinking about trying this on the nightly...
 
  • Like
Reactions: Knoblauchs

69gm

Senior Member
Jun 27, 2011
1,384
574
Honolulu, Hawaii
You will need to do it each time.

Thank you! Sorry, OT but I'm having trouble flashing the Magisk Manager. I flash the zip but get an error. Any ideas what I'm doing wrong?

Thanks!

EDIT: Nvm. I found out that for some reason, my browser was downloading as zip instead of apk. Changed browser and now all good. Thanks

---------- Post added at 04:30 PM ---------- Previous post was at 04:18 PM ----------

I can pass SafetyNet by completely removing the system installed root. You can do this by installing SuperSU from the Play Store, then immediately in settings (ignoring the prompts to update SuperSU) select Full Unroot. Alternatively, you can flash a zip file in recovery that pretty much does the same thing. Check out this link for the zip:
http://forum.xda-developers.com/showpost.php?p=63615067

If you need root, you can additionally install Magisk and PHH Superuser. In Magisk Manager settings, enable Magisk Hide, BusyBox, and systemless hosts. Magisk Manager will now have a Magisk Hide section where you will check any app that you are wanting to hide root from. I have successfully done this with Android Pay.

Do you simply go into Magisk Manager, enable Hide, go to list and check Android Pay and it should work? I tried those steps and Android Pay says it's not compatible. Did I miss a step? Sorry for the questions!
 
Last edited:
  • Like
Reactions: Daft_peter

jhedfors

Senior Member
Oct 16, 2009
1,454
734
St Paul, AZ
Moto G6
OnePlus 6T
Thank you! Sorry, OT but I'm having trouble flashing the Magisk Manager. I flash the zip but get an error. Any ideas what I'm doing wrong?

Thanks!

EDIT: Nvm. I found out that for some reason, my browser was downloading as zip instead of apk. Changed browser and now all good. Thanks

---------- Post added at 04:30 PM ---------- Previous post was at 04:18 PM ----------



Do you simply go into Magisk Manager, enable Hide, go to list and check Android Pay and it should work? I tried those steps and Android Pay says it's not compatible. Did I miss a step? Sorry for the questions!
You may have to reboot between steps for it to stick. Make sure in magisk hide Android Pay remains checked after reboot. It should work.
 

69gm

Senior Member
Jun 27, 2011
1,384
574
Honolulu, Hawaii
You may have to reboot between steps for it to stick. Make sure in magisk hide Android Pay remains checked after reboot. It should work.
Mod Edit: Put Hide tags on large images.
2016-11-23%2002.58.08.png

2016-11-23%2002.58.28.png


What am I doing wrong?

---------- Post added at 04:46 AM ---------- Previous post was at 04:03 AM ----------

Could it be because of the most recent Android Security Patch? I heard the November one stops this kind of stuff...
 
Last edited by a moderator:

Link_of_Hyrule

Senior Member
Oct 12, 2010
2,060
769
Ogden, Utah
www.ubermicrostudios.com
You must fully unroot with either a script or the supersu app and then install magisk and phh superuser. If this doesn't work force wipe your system and reinstall it and then do it. I'm on the latest build it works fine.
 
Last edited:

samuk190

Senior Member
Jun 9, 2013
486
180
santo andré
So as most of you know Android Pay and other apps don't work unless you pass SafetyNet aka CTS. I've gone found these if you unroot or you use phh super user and magisk you can easily pass CTS and add your cards to Android Pay and use other apps such as Pokemon GO. However, I've discovered that something else is causing Android Pay not to work and would like for it to be fixed. Android Pay works in CM13 and COS13 as long as your device passes CTS but when you tap a terminal using a CM14.1 device nothing happens the Android Pay app never launches at all and didn't show any kind of errors or crashes it just never appears. I was able to log what happens when you tap a terminal and it seems that the nfc app is having issues with something. As far as I can tell this happens with the aosp and Google version of nfc tags however this log is from the open gapps Google version.

I don't know enough about this too diagnosis or fix the problem but I'm willing to gather more logs and try and help resolve the problem. I love by an NFC vending machine so it's easier to get logs than going to av actual store.

If you have cm14.1 and have successfully used Android Pay on your OnePlus one please post here. If you're on a cm14.1 based ROM but not official nightly and it works for you tell us maybe we can have patches pushed to official cm to fix the issues.

When I say it works for you I mean you've made actually successful payments with it not just added cards to the app which is already working on cm14.1 if you pass CTS.

Code:
 build.board: MSM8974
build.bootloader: unknown
build.brand: oneplus
build.cpu_abi: armeabi-v7a
build.cpu_abi2: armeabi
build.device: A0001
build.display: bacon-userdebug 7.1 NDE63X 6d3440ee01 test-keys
build.fingerprint: oneplus/bacon/A0001:6.0.1/MHC19Q/ZNH2KAS1KN:user/release-keys
build.hardware: bacon
build.host: cyanogenmod
build.id: NDE63X
build.manufacturer: Google
build.model: Pixel XL
build.product: bacon
build.radio: unknown
build.serial: 5e0a4f3e
build.tags: test-keys
build.time: 1479516079000
build.type: user
build.user: jenkins
version.codename: REL
version.incremental: 6d3440ee01
version.release: 7.1
version.sdk_int: 25

11-21 17:51:20.810 W/GoogleTagManager(7016): Failed to extract the container from the resource file. Resource is a UTF-8 encoded string but doesn't contain a JSON container
11-21 17:51:20.893 E/GoogleTagManager(7016): Invalid macro: _gtm.loadEventEnabled
11-21 17:51:21.034 W/GoogleTagManager(7016): Error when loading resources from url: https://www.googletagmanager.com/r?id=GTM-56DCBX&v=a65833898&pv=Mzc$0 Connection refused
11-21 17:51:21.034 W/GoogleTagManager(7016): java.net.ConnectException: Connection refused
11-21 17:51:21.034 W/GoogleTagManager(7016): at java.net.PlainSocketImpl.socketConnect(Native Method)
11-21 17:51:21.034 W/GoogleTagManager(7016): at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:334)
11-21 17:51:21.034 W/GoogleTagManager(7016): at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:196)
11-21 17:51:21.034 W/GoogleTagManager(7016): at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178)
11-21 17:51:21.034 W/GoogleTagManager(7016): at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:356)
11-21 17:51:21.034 W/GoogleTagManager(7016): at java.net.Socket.connect(Socket.java:586)
11-21 17:51:21.034 W/GoogleTagManager(7016): at com.android.okhttp.internal.Platform.connectSocket(Platform.java:113)
11-21 17:51:21.034 W/GoogleTagManager(7016): at com.android.okhttp.Connection.connectSocket(Connection.java:196)
11-21 17:51:21.034 W/GoogleTagManager(7016): at com.android.okhttp.Connection.connect(Connection.java:172)
11-21 17:51:21.034 W/GoogleTagManager(7016): at com.android.okhttp.Connection.connectAndSetOwner(Connection.java:367)
11-21 17:51:21.034 W/GoogleTagManager(7016): at com.android.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:130)
11-21 17:51:21.034 W/GoogleTagManager(7016): at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:330)
11-21 17:51:21.034 W/GoogleTagManager(7016): at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:247)
11-21 17:51:21.034 W/GoogleTagManager(7016): at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:457)
11-21 17:51:21.034 W/GoogleTagManager(7016): at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:405)
11-21 17:51:21.034 W/GoogleTagManager(7016): at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:521)
11-21 17:51:21.034 W/GoogleTagManager(7016): at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105)
11-21 17:51:21.034 W/GoogleTagManager(7016): at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java)
11-21 17:51:21.034 W/GoogleTagManager(7016): at com.google.android.gms.tagmanager.resources.network.zzb.zzvx(Unknown Source)
11-21 17:51:21.034 W/GoogleTagManager(7016): at com.google.android.gms.tagmanager.zzch.run(Unknown Source)
11-21 17:51:21.034 W/GoogleTagManager(7016): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
11-21 17:51:21.034 W/GoogleTagManager(7016): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
11-21 17:51:21.034 W/GoogleTagManager(7016): at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272)
11-21 17:51:21.034 W/GoogleTagManager(7016): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
11-21 17:51:21.034 W/GoogleTagManager(7016): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
11-21 17:51:21.034 W/GoogleTagManager(7016): at java.lang.Thread.run(Thread.java:761)
11-21 17:51:21.076 E/GoogleTagManager(7016): Invalid macro: _gtm.loadEventEnabled
11-21 17:51:21.250 E/GoogleTagManager(7016): Unsupported Value Escaping: 3
11-21 17:51:21.339 E/GoogleTagManager(7016): Unsupported Value Escaping: 3
11-21 17:51:21.398 W/GoogleTagManager(7016): Exception sending hit: ConnectException
11-21 17:51:21.398 W/GoogleTagManager(7016): Connection refused
11-21 17:51:21.401 W/GoogleTagManager(7016): Exception sending hit: ConnectException
11-21 17:51:21.401 W/GoogleTagManager(7016): Connection refused
11-21 17:51:21.405 W/GoogleTagManager(7016): Exception sending hit: ConnectException
11-21 17:51:21.405 W/GoogleTagManager(7016): Connection refused
11-21 17:51:21.408 W/GoogleTagManager(7016): Exception sending hit: ConnectException
11-21 17:51:21.408 W/GoogleTagManager(7016): Connection refused
11-21 17:51:21.420 W/GoogleTagManager(7016): Exception sending hit: ConnectException
11-21 17:51:21.420 W/GoogleTagManager(7016): Connection refused
11-21 17:51:21.432 W/GoogleTagManager(7016): Exception sending hit: ConnectException
11-21 17:51:21.432 W/GoogleTagManager(7016): Connection refused
11-21 17:51:21.450 W/GoogleTagManager(7016): Exception sending hit: ConnectException
11-21 17:51:21.450 W/GoogleTagManager(7016): Connection refused
11-21 17:51:34.389 W/GoogleTagManager(7016): Exception sending hit: ConnectException
11-21 17:51:34.389 W/GoogleTagManager(7016): Connection refused
11-21 17:51:34.400 W/GoogleTagManager(7016): Exception sending hit: ConnectException
11-21 17:51:34.400 W/GoogleTagManager(7016): Connection refused
11-21 17:51:34.407 W/GoogleTagManager(7016): Exception sending hit: ConnectException
11-21 17:51:34.407 W/GoogleTagManager(7016): Connection refused
11-21 17:51:34.415 W/GoogleTagManager(7016): Exception sending hit: ConnectException
11-21 17:51:34.415 W/GoogleTagManager(7016): Connection refused
11-21 17:51:34.419 W/GoogleTagManager(7016): Exception sending hit: ConnectException
11-21 17:51:34.419 W/GoogleTagManager(7016): Connection refused
11-21 17:51:34.428 W/GoogleTagManager(7016): Exception sending hit: ConnectException
11-21 17:51:34.428 W/GoogleTagManager(7016): Connection refused
11-21 17:51:34.435 W/GoogleTagManager(7016): Exception sending hit: ConnectException
11-21 17:51:34.435 W/GoogleTagManager(7016): Connection refused
11-21 17:51:34.441 W/GoogleTagManager(7016): Exception sending hit: ConnectException
11-21 17:51:34.441 W/GoogleTagManager(7016): Connection refused
11-21 17:51:34.465 W/GoogleTagManager(7016): Exception sending hit: ConnectException
11-21 17:51:34.465 W/GoogleTagManager(7016): Connection refused
11-21 17:51:34.482 W/GoogleTagManager(7016): Exception sending hit: ConnectException
11-21 17:51:34.482 W/GoogleTagManager(7016): Connection refused
11-21 17:51:34.498 W/GoogleTagManager(7016): Exception sending hit: ConnectException
11-21 17:51:34.498 W/GoogleTagManager(7016): Connection refused
11-21 17:51:34.520 W/GoogleTagManager(7016): Exception sending hit: ConnectException
11-21 17:51:34.520 W/GoogleTagManager(7016): Connection refused
11-21 17:52:10.111 W/GoogleTagManager(9276): Failed to extract the container from the resource file. Resource is a UTF-8 encoded string but doesn't contain a JSON container
11-21 17:52:10.120 E/GoogleTagManager(9276): Invalid macro: _gtm.loadEventEnabled
11-21 17:52:10.213 W/GoogleTagManager(9276): Error when loading resources from url: https://www.googletagmanager.com/r?id=GTM-THZGX6&v=a65833898&pv=MTc$0 Connection refused
11-21 17:52:10.213 W/GoogleTagManager(9276): java.net.ConnectException: Connection refused
11-21 17:52:10.213 W/GoogleTagManager(9276): at java.net.PlainSocketImpl.socketConnect(Native Method)
11-21 17:52:10.213 W/GoogleTagManager(9276): at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:334)
11-21 17:52:10.213 W/GoogleTagManager(9276): at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:196)
11-21 17:52:10.213 W/GoogleTagManager(9276): at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178)
11-21 17:52:10.213 W/GoogleTagManager(9276): at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:356)
11-21 17:52:10.213 W/GoogleTagManager(9276): at java.net.Socket.connect(Socket.java:586)
11-21 17:52:10.213 W/GoogleTagManager(9276): at com.android.okhttp.internal.Platform.connectSocket(Platform.java:113)
11-21 17:52:10.213 W/GoogleTagManager(9276): at com.android.okhttp.Connection.connectSocket(Connection.java:196)
11-21 17:52:10.213 W/GoogleTagManager(9276): at com.android.okhttp.Connection.connect(Connection.java:172)
11-21 17:52:10.213 W/GoogleTagManager(9276): at com.android.okhttp.Connection.connectAndSetOwner(Connection.java:367)
11-21 17:52:10.213 W/GoogleTagManager(9276): at com.android.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:130)
11-21 17:52:10.213 W/GoogleTagManager(9276): at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:330)
11-21 17:52:10.213 W/GoogleTagManager(9276): at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:247)
11-21 17:52:10.213 W/GoogleTagManager(9276): at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:457)
11-21 17:52:10.213 W/GoogleTagManager(9276): at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:405)
11-21 17:52:10.213 W/GoogleTagManager(9276): at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:521)
11-21 17:52:10.213 W/GoogleTagManager(9276): at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105)
11-21 17:52:10.213 W/GoogleTagManager(9276): at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java)
11-21 17:52:10.213 W/GoogleTagManager(9276): at gbe.a(Unknown Source)
11-21 17:52:10.213 W/GoogleTagManager(9276): at hjo.run(Unknown Source)
11-21 17:52:10.213 W/GoogleTagManager(9276): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
11-21 17:52:10.213 W/GoogleTagManager(9276): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
11-21 17:52:10.213 W/GoogleTagManager(9276): at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272)
11-21 17:52:10.213 W/GoogleTagManager(9276): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
11-21 17:52:10.213 W/GoogleTagManager(9276): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
11-21 17:52:10.213 W/GoogleTagManager(9276): at java.lang.Thread.run(Thread.java:761)
11-21 17:52:10.346 E/GoogleTagManager(9276): Invalid macro: _gtm.loadEventEnabled
11-21 17:52:10.780 E/GoogleTagManager(9276): Unsupported Value Escaping: 3
11-21 17:52:10.796 E/GoogleTagManager(9276): Unsupported Value Escaping: 3
11-21 17:52:10.816 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:10.816 W/GoogleTagManager(9276): Connection refused
11-21 17:52:10.820 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:10.820 W/GoogleTagManager(9276): Connection refused
11-21 17:52:10.825 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:10.825 W/GoogleTagManager(9276): Connection refused
11-21 17:52:10.828 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:10.828 W/GoogleTagManager(9276): Connection refused
11-21 17:52:10.830 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:10.830 W/GoogleTagManager(9276): Connection refused
11-21 17:52:10.834 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:10.835 W/GoogleTagManager(9276): Connection refused
11-21 17:52:10.837 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:10.838 W/GoogleTagManager(9276): Connection refused
11-21 17:52:10.847 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:10.847 W/GoogleTagManager(9276): Connection refused
11-21 17:52:10.852 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:10.852 W/GoogleTagManager(9276): Connection refused
11-21 17:52:10.857 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:10.857 W/GoogleTagManager(9276): Connection refused
11-21 17:52:10.860 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:10.860 W/GoogleTagManager(9276): Connection refused
11-21 17:52:10.864 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:10.864 W/GoogleTagManager(9276): Connection refused
11-21 17:52:10.870 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:10.870 W/GoogleTagManager(9276): Connection refused
11-21 17:52:10.873 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:10.873 W/GoogleTagManager(9276): Connection refused
11-21 17:52:10.876 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:10.876 W/GoogleTagManager(9276): Connection refused
11-21 17:52:10.879 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:10.879 W/GoogleTagManager(9276): Connection refused
11-21 17:52:10.882 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:10.882 W/GoogleTagManager(9276): Connection refused
11-21 17:52:10.884 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:10.884 W/GoogleTagManager(9276): Connection refused
11-21 17:52:10.887 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:10.887 W/GoogleTagManager(9276): Connection refused
11-21 17:52:13.957 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:13.957 W/GoogleTagManager(9276): Connection refused
11-21 17:52:13.963 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:13.963 W/GoogleTagManager(9276): Connection refused
11-21 17:52:13.968 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:13.968 W/GoogleTagManager(9276): Connection refused
11-21 17:52:13.972 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:13.972 W/GoogleTagManager(9276): Connection refused
11-21 17:52:13.975 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:13.975 W/GoogleTagManager(9276): Connection refused
11-21 17:52:13.978 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:13.978 W/GoogleTagManager(9276): Connection refused
11-21 17:52:13.983 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:13.983 W/GoogleTagManager(9276): Connection refused
11-21 17:52:13.988 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:13.988 W/GoogleTagManager(9276): Connection refused
11-21 17:52:13.992 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:13.992 W/GoogleTagManager(9276): Connection refused
11-21 17:52:13.997 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:13.997 W/GoogleTagManager(9276): Connection refused
11-21 17:52:14.000 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:14.000 W/GoogleTagManager(9276): Connection refused
11-21 17:52:14.003 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:14.003 W/GoogleTagManager(9276): Connection refused
11-21 17:52:14.006 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:14.006 W/GoogleTagManager(9276): Connection refused
11-21 17:52:14.009 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:14.009 W/GoogleTagManager(9276): Connection refused
11-21 17:52:14.012 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:14.012 W/GoogleTagManager(9276): Connection refused
11-21 17:52:14.015 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:14.015 W/GoogleTagManager(9276): Connection refused
11-21 17:52:14.018 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:14.018 W/GoogleTagManager(9276): Connection refused
11-21 17:52:14.021 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:14.021 W/GoogleTagManager(9276): Connection refused
11-21 17:52:14.023 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:14.023 W/GoogleTagManager(9276): Connection refused
11-21 17:52:14.026 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:14.026 W/GoogleTagManager(9276): Connection refused
11-21 17:52:14.041 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:52:14.041 W/GoogleTagManager(9276): Connection refused
11-21 17:53:49.485 E/GoogleTagManager(9276): Unsupported Value Escaping: 3
11-21 17:53:49.492 E/GoogleTagManager(9276): Unsupported Value Escaping: 3
11-21 17:53:58.925 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:53:58.925 W/GoogleTagManager(9276): Connection refused
11-21 17:53:58.931 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:53:58.931 W/GoogleTagManager(9276): Connection refused
11-21 17:53:58.938 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:53:58.938 W/GoogleTagManager(9276): Connection refused
11-21 17:53:58.943 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:53:58.943 W/GoogleTagManager(9276): Connection refused
11-21 17:53:58.946 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:53:58.946 W/GoogleTagManager(9276): Connection refused
11-21 17:53:58.961 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:53:58.962 W/GoogleTagManager(9276): Connection refused
11-21 17:53:58.967 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:53:58.967 W/GoogleTagManager(9276): Connection refused
11-21 17:53:58.969 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:53:58.969 W/GoogleTagManager(9276): Connection refused
11-21 17:53:58.980 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:53:58.980 W/GoogleTagManager(9276): Connection refused
11-21 17:53:58.996 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:53:58.996 W/GoogleTagManager(9276): Connection refused
11-21 17:53:59.009 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:53:59.009 W/GoogleTagManager(9276): Connection refused
11-21 17:53:59.013 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:53:59.013 W/GoogleTagManager(9276): Connection refused
11-21 17:53:59.020 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:53:59.020 W/GoogleTagManager(9276): Connection refused
11-21 17:53:59.025 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:53:59.025 W/GoogleTagManager(9276): Connection refused
11-21 17:53:59.030 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:53:59.031 W/GoogleTagManager(9276): Connection refused
11-21 17:53:59.044 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:53:59.044 W/GoogleTagManager(9276): Connection refused
11-21 17:53:59.059 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:53:59.059 W/GoogleTagManager(9276): Connection refused
11-21 17:53:59.065 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:53:59.065 W/GoogleTagManager(9276): Connection refused
11-21 17:53:59.070 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:53:59.070 W/GoogleTagManager(9276): Connection refused
11-21 17:53:59.074 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:53:59.074 W/GoogleTagManager(9276): Connection refused
11-21 17:53:59.078 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:53:59.078 W/GoogleTagManager(9276): Connection refused
11-21 17:53:59.087 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:53:59.087 W/GoogleTagManager(9276): Connection refused
11-21 17:53:59.105 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:53:59.105 W/GoogleTagManager(9276): Connection refused
11-21 17:53:59.124 W/GoogleTagManager(9276): Exception sending hit: ConnectException
11-21 17:53:59.124 W/GoogleTagManager(9276): Connection refused
Download TWRP multirom.
Install aosp without root in secondary rom.
Profit .
 

EP2008

Senior Member
Jan 2, 2008
2,946
580
Toronto, Ontario, Canada
FYI OP, I discovered the same googletagmanager issues on my OnePlus 3 running CM14.1. I don't use android pay or NFC, but I did find that it can be triggered by scrolling through tracks in Google Play Music and there seems to be other apps that trigger it to.

googletagmanger isn't related to NFC tags, but it's part of Google Analytics - most adblockers will block requests and if you set your device to airplane mode the issue goes away (because it stops trying to connect to googletagmanager servers.

Started several days ago but it's killing my battery and heats my phone!

My post on this from a few days ago: http://forum.xda-developers.com/showpost.php?p=69719479&postcount=989
 

Link_of_Hyrule

Senior Member
Oct 12, 2010
2,060
769
Ogden, Utah
www.ubermicrostudios.com
FYI OP, I discovered the same googletagmanager issues on my OnePlus 3 running CM14.1. I don't use android pay or NFC, but I did find that it can be triggered by scrolling through tracks in Google Play Music and there seems to be other apps that trigger it to.

googletagmanger isn't related to NFC tags, but it's part of Google Analytics - most adblockers will block requests and if you set your device to airplane mode the issue goes away (because it stops trying to connect to googletagmanager servers.

Started several days ago but it's killing my battery and heats my phone!

My post on this from a few days ago: http://forum.xda-developers.com/showpost.php?p=69719479&postcount=989
Weird because I see that error when I try to use Android Pay. Maybe I'll turn off ad-blocker but I doubt that's the issue. The actual Google Tags app is for reading NFC tags as far as I'm aware. But you could be right about the log. I'll have to look through the logs better Monday when I get back to my dorms.

Edit: opening Android Pay itself seems to trigger that error though so could do be related but let me turn off ad blocker.

Edit 2: turning off ad blocker makes it have a lot less errors so I'll test it again with that turned off but I doubt that'll fix the problem.
 
Last edited:

Maryushi3

Senior Member
Apr 16, 2011
215
25
Szczecin
Hi! Using yesterday's (23.11.2016) official nightly build of CM14.1 I also can't pay using app my bank provides. NFC itself works fine (as in "can scan tags"), and the bank's app shows up under Payment default option in Tap&pay settings, but "tapping" the terminal does nothing. This wasn't an issue on official CM13 nightlies or sultanxda's CAF CM13. Seems like something may be wrong with a thing called "host card emulation" if I recall correctly... I'd love to give some more input on the matter but I don't know how to reliably test the issue.
 
  • Like
Reactions: Link_of_Hyrule

Top Liked Posts

  • There are no posts matching your filters.
  • 15
    For easier patching i have attached a flashable zip to replace libnfc_nci_jni.so with patched one.
    BEWARE : I removed the device check so that it can be flashed on all devices for testing.
    13
    As of June 16th, 2017 the fix which can be found here has been merged so it will be in the June 18th, 2017 build and forward. The fix below will no longer be needed after that point.

    Android Pay should now work if you use the Magisk module I created using the file with changes made by Shantur! To use my module you need to install Magisk follow instructions HERE. Alternatively, you can manually replace /system/lib/libnfc_nci_jni.so with the one in this post. Of course you must be able to pass SafetyNet to use Android Pay to if it's giving you errors make sure you're passing it!
    Note: This should also work for any device that has the NfcNci chip.

    So let me specify a few things first of all Android Pay didn't work because of a defect with the NFC drivers not because of SafetyNet. You can actually use Android Pay on Lineage OS 14.1 stock (not using the su add-on) on devices with working NFC drivers such as the OnePlus 3 or Nexus 7 2013.

    To fix the problem all you have to do is replace the file using any method. This fix should work on any device with the same NFC Chip as the OnePlus One. You can actually install it on an unlocked phone WITHOUT root using the TWRP recovery. I have not tested but I don't think this will break SafetyNet. I personally suggest the Magisk Module because it will survive updates unlike doing it manually or with a non-add.d flashable zip. This is of course an unofficial mod not supported by the Lineage OS developers you can view the code changes in this thread. The Lineage OS developers are working on an Official fix for the issue now that we have determined the cause of it.

    Special thanks to shantur and the other people in this thread that worked hard on this!

    The official fix is being worked on progress can be found HERE.

    You can find a flashable zip here: https://forum.xda-developers.com/showpost.php?p=71025490&postcount=295

    Old Post:
    This thread is about getting Android Pay to work to make actual transactions not about passing SafetyNet or CTS which we can already do through the methods described below!

    What works:
    *Passing SafetyNet/CTS (having an unlocked bootloader doesn't matter).
    *Adding a Credit Card to Android Pay.

    What doesn't work:
    *Making an actual transaction with Android Pay.


    So as most of you know Android Pay and other apps don't work unless you pass SafetyNet aka CTS. I've gone found these if you unroot or you use phh super user and magisk you can easily pass CTS and add your cards to Android Pay and use other apps such as Pokemon GO.

    However, I've discovered that something else is causing Android Pay not to work and would like for it to be fixed. Android Pay works in CM13 and COS13 as long as your device passes CTS but when you tap a terminal using a Lineage OS 14.1 device nothing happens the Android Pay app never launches at all and didn't show any kind of errors or crashes it just never appears.

    *Please note although you may have heard unlocked bootloaders cause SafetyNet to fail this is only true if the kernel reports the status of the bootloader which Lineage OS 14.1 does not please see this commit here https://review.lineageos.org/#/c/152044/


    I don't know enough about this to diagnosis or fix the problem but I'm willing to gather logs and try and help resolve the problem. I live by an NFC vending machine so it's easier to get logs than going to an actual store.

    If you have Lineage OS 14.1 and have successfully used Android Pay on your OnePlus one please post here. If you're on a Lineage OS 14.1 based ROM but not official nightly and it works for you tell us maybe we can have patches pushed to official cm to fix the issues.

    When I say it works for you I mean you've made actually successful payments with it not just added cards to the app which is already working on Lineage OS 14.1 if you pass CTS.

    Note: To pass CTS simply install Lineage OS directly followed by magisk 10.2 and enable Magisk hide and reboot. If you have issues use magisk install, wipe your system, dalvic, and cache in TWRP and repeat the previous steps.
    7
    Partial Success.
    I managed to compile Nfc apk and library from CM-13.0 with a bit of changes and now HCE is working. Although I havn't tried Android Pay but CardEmulation apk works fine now.

    To use the fix you NEED TO BE on an UNOFFICIAL build. You can replace /system/app/NfcNci/NfcNci.apk and /system/lib/libnfc_nci_jni.so with the ones attached and it should start working.

    Next step would be to find exact problem but its going to take long long time. Till then use the attached versions.
    6
    Anyone running any version of LOS-14.1 ( signed / unsigned ) can make Android Pay working by just replacing the attached file in /system/lib/libnfc_nci_jni.so
    4
    Can someone post the fixed LOS 14.1 version of libnfc_nci_jni.so that works with Android Pay?

    EDIT: Very special thanks to everyone that worked on this. I was able to create a Magisk Module with the file in the above post. I am able to use the card emulation app and I am going to test it on a vending machine tomorrow but I think it should work! So happy about this!

    EDIT 2: I updated the OP!