NFC on screenoff and lockscreen - HTC EVO 4G LTE

Search This thread

StephanSch

Senior Member
Dec 24, 2007
469
341
Berlin
I modified the Nfc.apk of different bases and ROMs to offer you the ability to use the NFC chip of your HTC EVO 4G not only while you are active but also while the screen is off and/or while the lockscreen is shown.

You have three options when to use NFC:
  • screen off
  • lock screen
  • unlocked


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


The compatibility depends on the framework/base. If your ROM has the same specifications like one existing you can use the posted.
If none of the version work (test it!) make an Feature Request


Changelog

14.02.2013 - updated APKs for CM10.1
25.01.2013 - added APKs for SuperJELLY MS1
24.01.2013 - added APKs for CM10.1
20.01.2013 - added APKs for MeanBean 2.71[/B]
02.10.2012 - "security" APK for Viper4G 2.x
02.09.2012 - new versions
  • modified APKs for CM 10 to Nightly 20120902
  • modified APKs for Flex360's 2.x

27.08.2012 - added APKs for CM 10 Nightlies

17.07.2012 - added APKs for Flex360's 1.72

14.07.2012 - added APKs for MeanROM 1.5 (probably 1.4+)

21.06.2012 - opened
  • thread opened



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








XDA:DevDB Information
NFC on screenoff and lockscreen - HTC EVO 4G LTE, a Tool/Utility for the Sprint HTC EVO 4G LTE

Contributors
StephanSch

Version Information
Status: Stable

Created 2013-09-28
Last Updated 2013-09-28
 
Last edited:

karmak

Senior Member
Dec 5, 2007
115
41
Not sure why but its working now! Thanks!

ViperROM 1.2.1

Using TecTile(not sure it matters) to change the volume and turn off wifi and bluetooth. It will scan my tag with the phone off and locked but it doesnt actually adjust any settings. It makes a few extra sounds then normal as well when it scans the tag.
 
Last edited:

StephanSch

Senior Member
Dec 24, 2007
469
341
Berlin
That's not as easy as it sounds lol, there's likely no noticeable difference.

Sent from my EVO using Tapatalk 2

Indeed it is not that easy because some ROMs (like CM) use different methods or added/deleted something, so the linenumbers are different.

But if you are able to understand what you see it is not that difficult:

Take the following file from your ROM:
  • Nfc.apk
  • all framework*.apk
Take the classes.dex out of the Nfc.apk and Baksmali it.
Therin edit the file NfcService$1.smali:

you have the state 0x3 which means you are unlocked (0x2 is in lockscreen and 0x1 screenoff) and have to make the NFCService think it is unlocked though it isn't

Smali it again to the classes.dex and put it (with 7zip) into the Nfc.apk
 

mrnamster

Senior Member
Dec 7, 2007
500
97
How's the battery life with the screen off mod?

Can someone make a flashable zip? :)

EDIT:
Tried it again and NFC is working great while locked/unlocked or screen off on Charmeleon Rom v5.0.0, TWRP 2.1.8.


Thanks!
 
Last edited:

Top Liked Posts

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