• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

[Module] NFC Screen Off

Search This thread

lapwat

Senior Member
Mar 4, 2015
91
28
Quelquepart
OnePlus 2
Redmi K20 Pro
Ok, I uninstalled the module and ziped the files: https://chmura.elbud.poznan.pl/index.php/s/3j97kH8zzydwoaW

Cool, now:
- uninstall any other version of NfcScreenOff
- reboot
- install enclosed zip with Magisk
- test it and write feedback

Not sure why it is not working, may be one of those 2 reasons:
- your NfcService.smali file is a bit different from what I am used to
- disassembling with device framework, modding and reassembling has no effect over the original behaviour

Thanks

Please consider donating so I can test on a side device, those back and forth are killing me.
 

Attachments

  • NFCScreenOff-mapagm.zip
    326.1 KB · Views: 28
Last edited:

mapagm

Senior Member
Dec 22, 2013
72
2
Poznan
Cool, now:
- uninstall any other version of NfcScreenOff
- reboot
- install enclosed zip with Magisk
- test it and write feedback

Not sure why it is not working, may be one of those 2 reasons:
- your NfcService.smali file is a bit different from what I am used to
- disassembling with device framework, modding and reassembling has no effect over the original behaviour

Thanks

Please consider donating so I can test on a side device, those back and forth are killing me.

It WORKS!!!! :) Thank You very much! :)
 

lapwat

Senior Member
Mar 4, 2015
91
28
Quelquepart
OnePlus 2
Redmi K20 Pro
Any possibility to remove the NFC sound?
Would love to do it if you can find where the sound is triggered in the source: https://android.googlesource.com/pl...s/tags/android-9.0.0_r48/src/com/android/nfc/

EDIT

Found it here: https://android.googlesource.com/pl...0_r48/src/com/android/nfc/NfcService.java#758

Can make a patch if other users don't mind. I will let some time for people to see this message and if nobody is against removing the sound, I'll give it a try ;)
 
Last edited:
  • Like
Reactions: Valiante

rodken

Senior Member
Jan 11, 2010
489
102
Google Pixel XL
OnePlus 8
Would love to do it if you can find where the sound is triggered in the source: https://android.googlesource.com/pl...s/tags/android-9.0.0_r48/src/com/android/nfc/

EDIT

Found it here: https://android.googlesource.com/pl...0_r48/src/com/android/nfc/NfcService.java#758

Can make a patch if other users don't mind. I will let some time for people to see this message and if nobody is against removing the sound, I'll give it a

Would love to do it if you can find where the sound is triggered in the source: https://android.googlesource.com/pl...s/tags/android-9.0.0_r48/src/com/android/nfc/

EDIT

Found it here: https://android.googlesource.com/pl...0_r48/src/com/android/nfc/NfcService.java#758

Can make a patch if other users don't mind. I will let some time for people to see this message and if nobody is against removing the sound, I'll give it a try ;)
Is the patch currently available?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    NFC Screen Off

    Read NFC tags when screen is off.
    Disable NFC tagging sound.
    Tap to pay when screen is off.

    ALWAYS include Magisk installation logs when posting an issue.

    Useful integrations: NFC Card Emulator Pro - Tasker
    Installation metrics: Grafana dashboard

    How does it work?

    The NFC app is patched during installation into a `modded` version. This `modded` version is injected at boot time by service.sh so that the phone thinks the screen is always on and unlocked.

    This patch only applies to NFC Service so it does not impact any other functionality of the phone that involves screen state detection.

    The `modded` app was generated using this method.

    Help section

    MY NFC IS NOT DETECTED ANYMORE

    If you did not unlock your device since last boot, unlock it and wait 30 seconds for the module to be loaded.

    After that time, if NFC does not start automatically or manually, it means that the patch does not work for your device. You can uninstall the module and create an issue.

    I AM STUCK IN A BOOTLOOP

    Remove the module manually.

    1. Boot into TWRP
    1. Advanced -> File Manager
    1. Delete /adb/modules/NFCScreenOff
    1. Reboot

    THE MODULE IS NOT WORKING SINCE LAST UPDATE

    Perform a clean reinstallation.

    1. Uninstall the module
    1. Reboot
    1. Install the module
    1. Reboot

    If it does not solve your problem, you can create an issue.

    I LIKE THE MODULE

    2
    @lapwat Hi, awesome module. It is not working for me since the path (and app name) for nfc app is system/app/NxpNfcNci/NxpNfcNci.apk

    Android 10.3.0
    Oneplus 6
    Stock ROM

    Edit:attach log

    Thanks for the logs. Can you send those files to me:
    • /system/app/NxpNfcNci/NxpNfcNci.apk
    • /system/framework/framework-res.apk

    I will do a version for people with NxpNfcNci app (I guess it is OnePlus customized NfcService).
    My stock Xiaomi ROM had a NQNfcNci app.
    2
    The thing is, since this is not the default, nobody would try to do it randomly until finding somebody with this module. It's a very low chance, but still dangerous. Taiping to the fingerprint sensor or unlocking in other preferred way should be more secure, plus it's not that hard to do it. This module only has use if you excessively use NFC tags, otherwise it's just nothing but creating security gaps for nothing.

    Thanks to the dev anyways.

    ---------- Post added at 05:06 AM ---------- Previous post was at 04:56 AM ----------



    Here you go, get the build props with this code in your install.sh:

    Code:
    my_grep_prop() {
      local REGEX="s/^$1=//p"
      shift
      local [email protected]
      [ -z "$FILES" ] && FILES='/system/build.prop /vendor/build.prop /product/build.prop'
      sed -n "$REGEX" $FILES 2>/dev/null | head -n 1
    }
    
    local MANUFACTURER="$(my_grep_prop 'ro\.product\.manufacturer')"
      local        MODEL="$(my_grep_prop 'ro\.product\.model'       )"
      local       DEVICE="$(my_grep_prop 'ro\.product\.device'      )"
      [ -z "$MANUFACTURER" ] && MANUFACTURER="$(my_grep_prop 'ro\.product\.vendor\.manufacturer')"
      [ -z "$MODEL"        ] &&        MODEL="$(my_grep_prop 'ro\.product\.vendor\.model'       )"
      [ -z "$DEVICE"       ] &&       DEVICE="$(my_grep_prop 'ro\.product\.vendor\.device'      )"

    That's exactly what I need it for. I set up all sorts of NFC triggered automations and tasks back in lollipop and have missed using them dearly. I have never used gpay so security is basically irrelevant, I've never heard of anyone trying to attack phones in the wild over NFC


    Until now, the module worked great. But the lastest update (0.0.3) causes bootloops for me.

    -> Googel Pixel 3xl on android 10 (build QQ1A.200105.003)

    Could you also please provide the zip file to version 0.0.2?

    I couldn't find v2 on his github but I had a backup I've attached
    1
    @lapwat Hi, awesome module. It is not working for me since the path (and app name) for nfc app is system/app/NxpNfcNci/NxpNfcNci.apk

    Android 10.3.0
    Oneplus 6
    Stock ROM

    Edit:attach log
    1
    Yep, that worked! Thanks!