[APP] Nfc.apk active while Screen locked

shaftenberg

Senior Member
Jul 31, 2010
690
738
0
Cologne
I've modded the policy of Nfc.apk, so that the Nfc service is active even when screen is locked. Now you don't have to unlock anymore if you press the phone against a tag.

Screen must be "on" for sure, as Nfc is never active when phone is in standby - it would never enter deep sleep then.

Flash in CWM, odexed or deodexed Jelly Bean, enjoy!
If you encounter problems, I attached the original Nfc.apk too, so you can roll back whenever you want.

Update: added a fixed version, some had problems with the other. It works on odexed and deodexed systems.
 

Attachments

Last edited:

Daniel 9999

Senior Member
Apr 1, 2007
178
8
0
I've modded the policy of Nfc.apk, so that the Nfc service is active even when screen is locked. Now you don't have to unlock anymore if you press the phone against a tag.

Screen must be "on" for sure, as Nfc is never active when phone is in standby - it would never enter deep sleep then.

Flash in CWM, odexed or deodexed Jelly Bean, enjoy!
If you encounter problems, I attached the original Nfc.apk too, so you can roll back whenever you want.
Hai shaftenberg, Sorry to ask you here, how should i create a cmw zip to enable init.d for my Omar 1.8 kernel in my stock JB GB rom ?
Thank in advance.
 

arman68

Senior Member
Sep 22, 2006
286
230
0
I've modded the policy of Nfc.apk, so that the Nfc service is active even when screen is locked. Now you don't have to unlock anymore if you press the phone against a tag.
Nice.

I use NFC every day, and unlocking the screen does not bother me, but I remember thinking at the beginning it would be more useful if I did not have to unlock first. I am going to try it.
 

shaftenberg

Senior Member
Jul 31, 2010
690
738
0
Cologne
It did not work for me. The NFC option disappeared altogether :(
Do you mean the "option" in "Settings"?
I see no reason for that in my mod, as I changed 2 variables in smali only. Strange... Might it be that it depends on your ROM?
I am on Stock 4.1.2 and I know from others that it worked for them very well.
 

arman68

Senior Member
Sep 22, 2006
286
230
0
Do you mean the "option" in "Settings"?
I see no reason for that in my mod, as I changed 2 variables in smali only. Strange... Might it be that it depends on your ROM?
I am on Stock 4.1.2 and I know from others that it worked for them very well.
I will try again, and if it still does not work, I will redo the mod and compile it myself. It could be something to do with the framework.
 

fuxi222

Senior Member
Jan 30, 2010
59
11
0
Chemnitz
Seems only to be working on deodexed ROMs.
Shaftenberg are you sure, that this is also working on non-deodexed ROMs?
Tried with Omars ROM: works like a charm.
Tried on modified Stock-ROM: NFC option dissapears. :crying:
 

shaftenberg

Senior Member
Jul 31, 2010
690
738
0
Cologne
same not work
Which ROM?? What exactly does not work? Can't believe this...
I've changed two files:

-> smali/com/android/nfc/NfcService.smali
after line 2470 add: const/4 v0, 0x0

-> smali/com/android/nfc/NfcService$2.smali
after line 164 add: const/4 v10, 0x0

That's it...

Shaftenberg are you sure, that this is also working on non-deodexed ROMs?
Yes, absolutely. Odex or Deodex, both work.
Maybe it's a signing problem, I'll try something and will tell you in a few hours, please stay tuned.
 
Last edited:

shaftenberg

Senior Member
Jul 31, 2010
690
738
0
Cologne
i'm using omar's rom and so far it doesn't work for me. if i install it nfc settings get removed. anny idea?
Did you install my "fixed"-Version or the old one, which isn't online anymore?

If so, install the fixed one. If you did that already, please ask Omar, because Nfc.apk is stock out of the box, nothing changed but only two variables. On stock ROM it works flawlessly.
 

mercurio.

Senior Member
Mar 31, 2011
119
43
0
Did you install my "fixed"-Version or the old one, which isn't online anymore?

If so, install the fixed one. If you did that already, please ask Omar, because Nfc.apk is stock out of the box, nothing changed but only two variables. On stock ROM it works flawlessly.
thanks for the reply. i installed the fixed version but it doesn't work. i'll ask omar.
 

Le_Poilu

Senior Member
Dec 9, 2010
238
66
0
le-poilu.whykywa.com
Damn it doesn't work for me neither :(

I use an EU JB homemade fastboot from here:
http://forum.xda-developers.com/showthread.php?t=1936512

No kernel mod, only a boot mod for SDcard swap
As the other, NFC disappear from settings if I install the modded NFC app.

I tried to copy the nfc.apk on systme\app\

But as soon as I try to enable NFC it Force close, an the phone became totally unusable
 
Last edited:

mercurio.

Senior Member
Mar 31, 2011
119
43
0
Damn it doesn't work for me neither :(

I use an EU JB homemade fastboot from here:
http://forum.xda-developers.com/showthread.php?t=1936512

No kernel mod, only a boot mod for SDcard swap
As the other, NFC disappear from settings if I install the modded NFC app.

I tried to copy the nfc.apk on systme\app\

But as soon as I try to enable NFC it Force close, an the phone became totally unusable
re- and deinstalled it some more times and somehow it started working. no idea why, but it works now.
 

Le_Poilu

Senior Member
Dec 9, 2010
238
66
0
le-poilu.whykywa.com
I'll give it a new shot but I already re- and deinstalled the app few times ... strange


EDIT: this is silly.. I retry today and now it work ! ... sometimes android is a kind of magic :p
 
Last edited: