yashsingh1/xdaforums huggingface dataset:
[Xposed Framework Modules] lapwat:
Here is my try for Android Pie:

https://github.com/lapwat/NfcScreenOffPie/commit/42df7a757535490f6219ded761f42e0120031033

See README for instructions: https://github.com/lapwat/NfcScreenOffPie

I am stuck in a Nfc boot loop (Nfc toggling itself on and off quickly). Happy to have suggestions.

I am happy to say that it is finally working! I may release a Magisk Module if some of you are interested.
[Xposed Framework Modules] petro_aymoon:
Hello lapwat

I have read your reply

Here is my try for Android Pie:

I could not do the instructions, it is difficult as I am not a developer

So please could you post a video or to give simple instruction like modules

Thanks in advance
[Xposed Framework Modules] lapwat:
I have created the Magisk Module, please download and install this release with Magisk:

https://github.com/lapwat/NFCScreenOff8/releases/tag/v0.0.1

If it does not work, just remove the Magisk Module and you'll be back and running :)

Please give me your feedback because I have only tested it on a Xiaomi Redmi K20 Pro, Havoc 2.8

Enjoy
[Xposed Framework Modules] jvandenbroek:
After repacking the zip (move all files to root), I was able to install it with Magisk. NFC is now working when screen is locked / off! Thanks a lot! Moto G5S Plus Lineage 16 (Android Pie)
[Xposed Framework Modules] lapwat:
Thank you for the feedback. I am pleased it works on a different phone than mine :)
[Xposed Framework Modules] diabolyk34:
jvandenbroek, how have you made that please ?

Can you explain exactly how to do it ? What does it mean repacking the zip ?!?
[Xposed Framework Modules] inge74:
Please, could you send link with repacked Zip? Thanks.
[Xposed Framework Modules] Gunnlaugg:
Hi, this Modul don't work on my Pixel 3 (Android 11, current Version). Probably because this module is to old. Can we have an update?
[Xposed Framework Modules] XlAfbk:
You need to mod the apk yourself: https://xdaforums.com/t/mod-xposed-...reenoff-enabler.2478163/page-25#post-59941326
[Xposed Framework Modules] gringocol:
with regards to the new tag collected . . . if its what i think your on about . . . basically what i did was just add a task to your nfc tag using nfc tasker taking it straight to desktop and i havnt seen it since . . . try it . . . :)
[Xposed Framework Modules] Mikegrmn:
I found that Wanam has NFC-Settings also, so I disabled Wanam to see if I get different results on my N3. Funny enough, it didn't make a difference. I then uninstalled NFCLockscreenOff and when I touched my NFC tag, I got into the dialog that lets you set up a tag. But the keyboard didn't come up and no pop up screens appeared. I would really want this functionallity. Could it be it's not working with Samsung tags?
[Xposed Framework Modules] gadgetsnpepsi:
Geez, why didn't I think of that?! :silly: Hahahaha thanks dude! :good:
[Xposed Framework Modules] gringocol:
your welcome mate ;)
[Xposed Framework Modules] gt573:
I have the sgh-t889 (T-mobile Note II). Is the fixed version suppose to be 1.9? I wasn't able to get 1.9.1 to work. I was able to get it to authorize ntag203 tags if they already had something written to them (no luck with topaz), but that's all I could get it to do. It wouldn't unlock my phone with nfc (the phone will read the tag, but NFCLockscreenOff does nothing). With this fixed version I can't even get that far with it. When I try to authorize a tag it crashes.
[Xposed Framework Modules] subzero2000:
Verizon Samsung Galaxy Note II (SCH-I605) running TouchWiz 4.1.2 not detecting Samsung TecTiles in order to authorize them. The TecTiles work just fine on this phone using NFC Task Launcher, so it's not the phone or the tags themselves. How can I help debug this? Thanks.
[Xposed Framework Modules] subzero2000:
Request to update github repo

Would it be possible to push the changes that addressed the crashing of the dialog UI on API less than 17 to your github repo?

It would appear that the latest SHA1 is f01d8ba9d9de456263f301278219e3f4db119dee, which appears to correspond to version 6 (1.9), and not version 7 (1.9.1). I'd like to build this (which I've been able to do), but it crashes on me when attempting to view the Authorized NFC Tags, which is what 1.9.1 was supposed to address, but it doesn't seem to be possible to build 1.9.1 from your github repo currently.

Thanks!
[Xposed Framework Modules] MohammadAG:
It could be that the "tech" is not supported. Check mTechListsArray in NfcTags.java

Done, sorry about that. It's at 1.9.2 with experimental LG G2 support.
[Xposed Framework Modules] subzero2000:
Samsung TecTiles and GitHub Repository suggestion

MohammedAG,

Thanks, I was able to pull an update and see the updated changes. Using NFC TagInfo from the Play Store, it appears that the Samsung TecTiles are using the android.nfc.tech.IsoDep class, so I'm testing that against 1.9.1 to see if that addresses the issue with them.

If I may offer a suggestion, it might not be a bad idea to consider tagging releases using "git tag" in your GitHub so it is possible to build a specific revision without having to guess what the version was based on the contents of the AndroidManifest.xml file at a specific SHA1 commit revision. The latest version looks to be building 1.9.3, and I was having some issues with errors in Eclipse/ADT that made it easier for me to consider going back to 1.9.1 and trying that instead, as I know it at least runs without crashing on my phone.

I'll let you know how I get on with the Samsung TecTiles, and will probably fork your repo and send a pull request if I get it working.

Thanks!
[Xposed Framework Modules] MohammadAG:
Second time I've had a suggestion to use git tag. I'll look into it, I'm more of a git basics person so I've never used that.

Good luck in getting it working, I don't have TecTiles so I can't test this :)

Sent from my Sony Xperia Z1 (C6903) using Taptalk 4
[Xposed Framework Modules] onyxogen:
Bug

Since 1.9.3 adding tags to unlock the device force closes. I reversed to 1.9.1 and it worked again. It's absolutely reproducible.
[Xposed Framework Modules] MohammadAG:
Can you get me a logcat of it crashing?

Sent from my Sony Xperia Z1 (C6903) using Taptalk 4
[Xposed Framework Modules] subzero2000:
1.9.3 crashes when adding authorized tags

Behavior as described is confirmed. Attached is the logcat I was able to get through Eclipse. Let me know if you need more.
[Xposed Framework Modules] MohammadAG:
Fixed in 1.9.4.

There's also a tag for that on Github :)
[Xposed Framework Modules] subzero2000:
Samsung TecTiles progress

Ok, I've built 1.9.4 from my AddIsoDepNfcTagSupport branch after rebasing your master on it, and my Verizon SCH-I605 Samsung Galaxy Note II is now able to detect new tags from the Authorized NFC Tags, and clicking OK no longer causes the app to crash, so the fix in 1.9.4 appears to have addressed that.

However, under 1.9.1, I was able to add tags and see them in the list. Under 1.9.4, the authorized tags no longer show up in the list (the list is empty). It's as if it goes through the motions, and then forgets to add the tag to the list. Enable NFC when screen is off (regardless of lock state) is set.

Any thoughts?
[Xposed Framework Modules] subzero2000:
Tags being authorized, but phone not unlocking.

Ok, for whatever reason, authorizing tags now seems to be working (maybe the phone needed to be rebooted; I have no idea what caused it). However, NFC does not seem to be unlocking my Verizon Samsung Galaxy Note II (SCH-I605). With the setting set to allow when screen off, tapping the phone to an authorized NFC tag does not appear to have any affect (the phone does not react to the NFC tag at all.

I'm going to try and debug it further and see where I can get with it, thougn I'd love any hints / suggestions on where to go from here.
[Xposed Framework Modules] MohammadAG:
You don't have to reboot if you're only modifying the activity, only the module itself :)

I'll guide you through how unlocking works, I realize looking at the source code might be a bit hard.

4.1:

KeyguardScreenCallback is a class for OEMs to use, stock Android also uses it of course. This class allows custom lockscreens to report that the passcode was successfully entered, and that the lockscreen can be dismissed. This is done by calling the method reportSuccessfulUnlockAttempt() on an instance of that class.

The instance is obtained here: https://github.com/MohammadAG/NFCLo...noffenabler/NFCLockScreenOffEnabler.java#L506

As you can see, the class was moved and renamed in 4.2, but I accounted for that. Of course, I don't have any 4.1 devices to test this on, so I may or may not have messed up :)

After that, we call keyguardDone() on the lockscreen view mediator, and that dismisses the lockscreen.

(In early development, I recall using dismiss() at some point, though if the lockscreen wasn't showing that would cause a system_server crash).

However, you mentioned that the device wasn't responding to the tag at all, this would be that NFC while screen off isn't working for you. Try restarting the device and/or toggling NFC in settings.
[Xposed Framework Modules] dylauthi:
Hello,

I have installed this mod on my Galaxy S3, but I can't make it work.

Here is the logcat dump (filtered with nfc string):

Whatever if I user "phone locked ..." or "screen off ....", nothing append when I try to use my nfc tag
[Xposed Framework Modules] subzero2000:
"java.lang.NoClassDefFoundError: android.os.UserHandle" error

In reference to the above mentioned logcat dump, of which I am seeing the same error after reboot in my Xposed debug.log, it appears to be a legitimate error that is keeping NfcLockscreenoffEnabler from loading.

The issue appears to be that you must have Android API 17 (Jelly Bean 4.2) or greater to be able to use android.os.UserHandle. The Samsung Galaxy Note II and the Samsung Galaxy S3 are likely on Android API 16 (Jelly Bean 4.1), and therefore are not able to provide this class, which I'm willing to bet is the source of the crash and probably why I am not able to trigger an unlock with the screen off, since it is likely not successfully hooking the methods necessary to achieve this.

I wonder what functionality is provided by this class, and if it would be possible to compile it without support for it if it is not critical to the operation of this mod. Sigh, more debugging.

Links for reference:

android.os.UserHandle reference - http://developer.android.com/reference/android/os/UserHandle.html

API Level to Platform Version cross-reference - http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels
[Xposed Framework Modules] MohammadAG:
It's a very easy fix, in fact, I already have a comment about it, but I only catch one of the two exceptions.

The class is needed for sendBroadcastAsUser(). If a system process calls sendBroadcast() without it a warning will show up in your logcat, which causes some spam in the log.

Sent from my Sony Xperia Z1 (C6903) using Taptalk 4
[Xposed Framework Modules] nonameduck:
This is working great for me on my HTC One running the latest CyanogenMod 10.2 nightly.
[Xposed Framework Modules] dylauthi:
Thank you for the update.

Hope you can solve this problem !!!

Regards
[Xposed Framework Modules] MohammadAG:
I was aiming to have a permission that has a permission level of signature, since any app can technically request the NFC permission and it can unlock your phone without the passcode.

In any case, I had another security measure that works fine and is implemented since the first version, we can safely take out the permission, only com.android.nfc can use the unlock intent.

I'll merge the pull reuqest when I get to my PC :)

Sent from my Sony Xperia Z1 (C6903) using Taptalk 4
[Xposed Framework Modules] wss2:
Does not work on Xperia P.

Seems reconize the nfc tag but don't unlock in both ways, with screening on and off.

Stock JB Rom with Nemesis kernel
[Xposed Framework Modules] vrthe1:
I was trying to fix it for HTC One...hooking to KeyguardHostView not working.. i tried writing a log when the method is called, but i dont see any effect. I checked printing all the exception but nothing found. As KeyguardHostView hook is not called it is not registering the receivers.
[Xposed Framework Modules] MohammadAG:
When I looked into it a while back I saw HTC has an HtcKetguardHostView, that should give you an idea of why it doesn't work. I'm also not sure if it's used all the time or only when there's a widget on the lockscreen.

It should work in the next version.

Sent from my Sony Xperia Z1 (C6903) using Taptalk 4
[Xposed Framework Modules] vrthe1:
I tried HtcKeyguardHostView and the widget.. both its the same result...
[Xposed Framework Modules] MohammadAG:
I'm assuming you checked if field names changed? Or if there's any other class handling the lockscreen?

Sent from my Sony Xperia Z1 (C6903) using Taptalk 4
[Xposed Framework Modules] vrthe1:
I tried to call log in the starting of afterHookedMethod.

Im not sure how to find which other class handles the lockscreen

---------- Post added at 10:35 AM ---------- Previous post was at 10:06 AM ----------

@MohammadAG

found the work around.. i will commit in the GitHub
[Xposed Framework Modules] MohammadAG:
1.9.5 out!

HTC One support by [MENTION=2554585]vrthe1[/MENTION].

Chinese translation by [MENTION=4756497]liveasx[/MENTION].

Tasker/Llama support.

Samsung TecTile support and Android 4.1 fixes by [MENTION=2856934]subzero2000[/MENTION].
[Xposed Framework Modules] klau1:
Tasker
[Xposed Framework Modules] cokeman0:
Hi

can someone post an example of how to use the new feature in tasker. (a screenshoot of how to create the intent setup) ?
[Xposed Framework Modules] klau1:
Have you read the instructions on the OP?

It's in the last paragraph

It's really easy
[Xposed Framework Modules] subzero2000:
MohammedAG,

Just wanted to thank you for incorporating my proposed changes in 1.9.5, everything seems to be working as advertised on my Verizon Samsung Galaxy Note II (SCH-I605) running stock TouchWiz (Android 4.1.2), and works well with Samsung TecTiles (IsoDep NFC tags).
[Xposed Framework Modules] cokeman0:
Hi yes, I did, just dont know where to put alle th data, thats why i asked is anyone has a screenshot...
[Xposed Framework Modules] Mikegrmn:
I just installed the latest version and like with all other versions before, the screen where you're supposed to enter / name your tag pops up and then that's it. Does any one have an idea what could prevent my phone to pop up an enter dialog / keyboard?

I'd really like to use this feature and setting it up in tasker is somewhat tedious. As it works on other phones you all use and my phone recognizing the tag and entering the appropriate screen, there must be something wrong on my phone.
[Xposed Framework Modules] subzero2000:
Just to be sure we are understanding where your part of the process appears to be falling down, here's what happens when I register a new tag:

1) Open "NFC LockScreenOff Enabler"

2) Select "Authorized NFC Tags"

3) Scan tag I desire to authorize to be able to unlock my phone.

4) Dialog box comes up when tag is recognized.

5) Select dialog box input box, keyboard comes up. (Note: This is NOT the "New NFC Tag detected" dialog that pops up if you don't have any applications registered to handle an NFC tag; that dialog should not show at this point).

6) Type in name for tag.

7) Click "OK" button.

8) NFC tag is now listed in list of Authorized NFC tags.

Could you compare your process to that and advise where exactly it fails to work as advertised? That would be helpful in the process of diagnosing your problem.
[Xposed Framework Modules] Mikegrmn:
I don't open the module. It just jumps right into that screen where you are supposed to name your tag. I once did the steps like you describe and I got to the same page/view.

I have formatted my tag after that popup came up which asks you which app you want to use. The problem is, that no dialog pops up whatsoever I do. I disabled wanam, uninstalled and reinstalled the nfc unlock module...

I don't know what else I could try despite completely wiping my phone. Well I don't plan on that, because everything else works fine.
[Xposed Framework Modules] MohammadAG:
You're looking at a completely different app if you're not opening the module.

Sent from my Sony Xperia Z1 (C6903) using Taptalk 4
[Xposed Framework Modules] subzero2000:
NFC LockScreenOff Enabler screencast

Below is a link to a quick screencast using NFC LockScreenOff Enabler to authorize an NFC tag.

http://www.youtube.com/watch?v=5ix-5utZwAY

If you're not seeing this when you scan a tag when NFC LockScreenOff Enabler is open, then it's likely not detecting your NFC tag.

If this is the case, please download NFC TagInfo from the Play Store - https://play.google.com/store/apps/details?id=at.mroland.android.apps.nfctaginfo

Scan your tag using this app, click the "Tag Information...", and post back here what classes are listed under the "Target technology classes (Android)" section near the bottom of the screen. Use the 3rd screenshot posted on the Google Play page for this app as an example.

Feel free to uninstall this app afterwards, as it is only for gathering information about your NFC tags, and is not necessary for normal operation of NFC tags with your device.
[Xposed Framework Modules] Mikegrmn:
Thanks, this was probably the best hint ever. Although, the dialog that pops up looks exactly the same as the one that was used a few versions ago (the versions where no icon was used in the upper left).

It's working now.

What's funny is, that this strange view I had some versions ago still popps up. I got it now using trigger to create a non empty nfc chip. But except for trigger (formerly nfc task launcher, or so) I don't have amother app installed that uses nfc chips. And even when I froze trigger, that weird dialog still popped up.

Well whatever. Thanks again for the hint. It's working now and I'm happy:D
[Xposed Framework Modules] klau1:
Example of Usage in Tasker.

Profile: NFC Intents (33)

Event: Intent Received [ Action:android.nfc.action.TAG_CHANGED Cat:None Cat:None Scheme:* Mime Type:* ]

Enter: NFC State (26)

A1: If [ %tag_uuid ~ 00000000000002 ]

A2: If [ %tag_present ~ true ]

A3: [X] Flash [ Text:Tag go true Long:eek:ff ]

A4: Variable Set [ Name:%taG_2 To:true Do Maths:eek:ff Append:eek:ff ]

A5: Else

A6: [X] Flash [ Text:Tag go false Long:eek:ff ]

A7: Variable Set [ Name:%taG_2 To:false Do Maths:eek:ff Append:eek:ff ]

A8: End If

A9: End If

A10: If [ %tag_uuid ~ 00000000000001 ]

A11: If [ %tag_present ~ true ]

A12: Variable Set [ Name:%taG_1 To:true Do Maths:eek:ff Append:eek:ff ]

A13: Else

A14: Variable Set [ Name:%taG_1 To:false Do Maths:eek:ff Append:eek:ff ]

A15: End If

A16: End If

This is the logic for 2 tags. Of course you have to replace the tag id with your tag id.

Any suggestions and improvements welcome.
[Xposed Framework Modules] hobbypunk90:
Hello,

[MENTION=2011359]MohammadAG[/MENTION]

This is the first time i can use your app on stock sony 4.1 :) nealy everything works, only it didn't unlock my device :(

Gesendet von meinem C1905 mit Tapatalk
[Xposed Framework Modules] stealthdave:
Just installed this new module, and it works great! I had previously gotten NFC Unlock working through a rather complex process involving NFC Lockscreen Enabler, NFC Task Launcher and Tasker (over at this thread, for those who are interested), but this is much simpler! Thanks!

I did find one minor UI issue when I installed 1.9.5, and I do mean minor. You can only authorize new tags to unlock when Enable NFC when is set to screen is off (regardless of lock state). I had initially set mine to phone is locked, but the screen is on for better battery life. Unlock does work with the phone is locked, but the screen is on setting, but you can't authorize new tags. The work around is just to switch on NFC when screen is off and switch it back when you're done, but it would be nice to be able to authorize tags regardless of the current NFC setting.

- Dave
[Xposed Framework Modules] Mikegrmn:
I've been using it now for 2 days and it works great. Only thing I don't like is the either on or off sound for NFC events. Instead of sound, I used vibration on my razr HD when I had setup the same functionality via tasker. This way, I knew when my phone was unlocked without looking and without annoying surrounding people. I made a fake skip clip using magnets, some felt and a NFC tag, pretty much the same what Motorola is selling. I clip it to my pants pocket so when I slide out my N3, I can immediately tap the NFC chip.

If any one is interested, I can post some pics. I was thimking about putting up an instructable but haven't done so far because describing the tasker setup would have been tedious. With this xposed module, I'm reconsidering writing one.
[Xposed Framework Modules] MohammadAG:
Stock 4.1? Can you post a screenshot of the lockscreen along with a deodexed copy of android.policy.jar?

This shouldn't be happening, the UI is using standard android APIs. Technically it should work even if the mod isn't even enabled. That's very weird.

Please do, I use my wallet, but my muscle memory always makes me put the wallet in my back pockets so I can't scan it. A clip would be much better, but I can't justify spending $20 bucks on one when a tag is $1.

Sent from my Sony Xperia Z1 (C6903) using Taptalk 4
[Xposed Framework Modules] Mikegrmn:
So, here are some pictures I took while making my fake skip clip. Cost is about $1 for the NFC tag, $2 for the felt pieces (you should get about 5 skip clips out of them). The magnets were lying around. I bought a computer mouse some time ago, and the packaging had a neat little cardbox flap that was held in place with the magnets. Any magnets that are strong enough to hold the skip clip together through the felt and some clothing (like the pockets of your trousers) should do.

These are all parts you need. The round shiny thingies are the magnets. I used only one of them for the part that sits outside my pants pockets, and two on the inside. This provides more adhesion when clipped together. Depends on what kind of magnet you have.

These are the pre cut felt clips. If your magnets aren't round, just cut the felt accordingly. Don't forget to let some leeway around the magnet as you need some space where you can put the stitches to hold everything together.

This is how the pieces come together. I stickied the NFC chip on the black felt cut out right above the magnet that is sitting on the green felt. Make sure that the position of the NFC chip is so that it sits completely on the outer side of your pocket and only has one layer on felt on top. I don't know how much layers NFC could take to still work.

This shows the first stitch and how the pieces come together again.

To make sure the magnet doesn't move around too much, I also stitched above the magnet through the whole width of the felt stripe to create a kind of pocket for the magnet. You maybe could also just glue the magnet on, but gluing felt usually makes the felt stiff.

The final "product" stretched out. You can feel where the tag is. This is important so you don't clip the thing on with the tag inside your pocket. Like I said before, I don't know how many of layers of felt/pocket NFC still works through. Maybe I'll put a mark with some stitches on the correct side some time in the future.

The final "product" again, this time clipped together.

Just clip it on your trousers pocket, or jacket, or ...

Have fun.

Please press thanks if you like it.

Once I make a complete instructable out of it, I may also include how to set up everything with xposed and such. I'll put a link to instructables should I post it as instructable.
[Xposed Framework Modules] MohammadAG:
Thanks! I'm impressed, it looks quite similar to the Moto Skip.

I imagine I can't do this with my current tags, they're 4cm in diameter, I guess I'll have to get smaller ones.
[Xposed Framework Modules] Mikegrmn:
Yep, I guess upsizing it to 4 cm may look a bit awkward when clipped on :p

I was lucky (or unlucky) that only the samsung ones were available at a store close by. I just don't like ordering via internet, so I sometimes take what I can get.