[MOD] NFC on screenoff and lockscreen - HTC One X ICS & JB

Search This thread

StephanSch

Senior Member
Dec 24, 2007
469
341
Berlin
With this mod you can enable NFC at screenoff and on keyguard on the HOX in an easy way.

You have the choice of three apk for the state to use NFC (unlocked is always the original version):
  • screen off
  • lock screen
  • unlocked


USAGE
  1. Rename the Attachment to Nfc.apk
  2. Backup your /system/app/Nfc.apk
  3. Replace the original in /system/app - to keep permission use adb:
    • adb remount
    • adb push Nfc.apk /system/app
  4. Reboot phone (adb reboot)
  5. Disable NFC
  6. Enable NFC


On ROMs with additional/other framework than posted recompiling needed. If so the NFC options are simply gone.


Changelog

10.08.2014 - CM11 M9 added
19.08.2013 - ARHD 31 added
17.02.2013 - ARHD updated with 18.2
19.01.2013 - ARHD18 added
16.10.2012 - CM10 Nightly updated
14.10.2012 - first JB release: ARHD11
22.09.2012 - CM10 Nightly updated
12.08.2012 - ARHD9 added
09.08.2012 - CM10 added
06.08.2012 - ARHD8 added
18.06.2012 - ARHD7
  • APK for ARHD7 added
  • compatibility list added in second post
17.06.2012 - working
  • POLLING_MODE is generally not working
  • so simply made NFCServe$1.class think screen is unlocked though in keyguard
  • and made think screen os on though off
16.06.2012 - first try
  • Used POLLING_MODE to define when to enable NFC


Download
Please don't forget to thank if it works, if not we will make it work.
 
Last edited:

mayhemer

Senior Member
Jan 23, 2007
89
176
The great work was first done by Geniusdog254 for the Galaxy Nexus. I just ported it to work on the Samsung Galaxy S3 ;)

[tapatalk]Vom S3 mit Tapatalk[/tapatalk]
 
  • Like
Reactions: StephanSch

zvieratko

Senior Member
Dec 9, 2007
421
110
Prague
Doesn't work for me, NFC settings are gone after restart. Even restoring the original APK doesn't bring it back, only a restore.

this is on MIUI 2.6.15
 

StephanSch

Senior Member
Dec 24, 2007
469
341
Berlin
Doesn't work for me, NFC settings are gone after restart. Even restoring the original APK doesn't bring it back, only a restore.

this is on MIUI 2.6.15

Did you restart after restoring original apk? Did so about 10 times without problems

MIUI is sense-less ;) I think, so need some minutes to check
 
Last edited:

zvieratko

Senior Member
Dec 9, 2007
421
110
Prague
Did you restart after restoring original apk? Did so about 10 times without problems

Yes I did. but I just noticed the version I used is not even supposed to work (scrrenoff). I'll try the lockscreen version but anything but screenoff is close to useless :(

---------- Post added at 01:39 PM ---------- Previous post was at 01:34 PM ----------

Lockscreen version doesn't work either. I guess MIUI is just incompatible.
 

StephanSch

Senior Member
Dec 24, 2007
469
341
Berlin
Thanks but still gone after reboot. I'll try to take a look at logs...

---------- Post added at 02:01 PM ---------- Previous post was at 01:54 PM ----------

Stupid stupid stupid me... Permissions! it was -w-rw-r-- and owner was system... doh!
it works great now, thank you!

Great. Are the original also working?
 

zvieratko

Senior Member
Dec 9, 2007
421
110
Prague
Hmmm, it worked with screen off for a while and then just stopped... now it only works after unlock. no change after reboot/cache wipe, NFC disable/enable.

---------- Post added at 03:03 PM ---------- Previous post was at 02:55 PM ----------

Great. Are the original also working?

Nope, doesn't work at all. only the modified version.

---------- Post added at 03:08 PM ---------- Previous post was at 03:03 PM ----------

Looked in logcat - when screen goes off it turns off NFC intentionally, no idea why it worked at first :/
 

zvieratko

Senior Member
Dec 9, 2007
421
110
Prague
Also tried wipe dalvik?
How is it if you put apk again on phone and reboot?

Sent from my HTC One X using xda premium

Yes, that did it. aby idea why it stopped working? I'm gonna reboot a few times to see when it stops working again...

---------- Post added at 03:35 PM ---------- Previous post was at 03:34 PM ----------

Doh. I just sent the previous post, let it sit for a few seconds and it stopped working already...

---------- Post added at 04:15 PM ---------- Previous post was at 03:35 PM ----------

So, as far as I can tell, it only works for about ~30 secs after dalvik cache is wiped and the device is rebooted. If I let it is for a while, it just stops working (still works unlocked). As soon as it boots up, I turn off the screen and tap a tag - it will read it many times without a problem, and then just stops reacting until unlocked. The only way to make it work again is to wipe cache and reboot...

I'll take a look in logcat if there's something interesting...

---------- Post added at 04:22 PM ---------- Previous post was at 04:15 PM ----------

I think the mystery is solved, it doesn't work at all, but for some reason it takes a long time for the NFC service to receive the SCREEN OFF intent on reboot - that's the reason why it stops working all of sudden.
 

Top Liked Posts