yashsingh1/xdaforums huggingface dataset:
[NFC Hacking] XlAfbk:
Are you using the official Google ROM? If so you might be lucky and someone in the thread might have posted a modded apk already (though you'll have to go to all pages after my post to look for it :().

If there's no classes.dex in the apk you'll probably have a .odex file next to the apk? If so you'll have to deodex that file first to get the classes.dex (http://www.xda-developers.com/deodex-all-the-things-with-universal-deodexer/), then afterwards delete the .odex and have only the modded apk. Remember to make backup first! :)
[NFC Hacking] jazic:
I'm on stock 5.1.1 but rooted with a handful of xposed modules. Modded but nothing crazy.

This is what I have when I extract it from the .apk using 7zip:

As for the .odex next to the NfcNci.apk, this is what I have:
[NFC Hacking] XlAfbk:
haven't had a deodexed rom in a while, check the arm folder i guess
[NFC Hacking] stephn666:
apk modified for Galaxy S6, but i don't test because i have only a tag NXP MIFARE Classic 1K - not supported (hardware or software limitation ?)

i'm a limited user, link by private message, sorry
[NFC Hacking] froopie:
Hi, I am relatively new to this, so if somebody could answer some basic questions that would be great.

I have a Moto X (2013) with Android 5.1 and not rooted.

I want to detect when the phone is removed from an NFC tag.

Is any of the .apks in this thread working for my phone?

When I download one it says that it will change an existing server on my phone. I didn't do it in order not to break something entirely. Can I revert the installation of an .apk?
[NFC Hacking] zygmalian:
Should have thought of that earlier:

Link for framework zip file from Note 2 LTE N7105: Looks as though I cannot include a link yet, so:

The usual drop box https, ending .com then /s/o16etk2kdar4onm/framework.zip

Regards
[NFC Hacking] madfish73:
I've upload the mod to post#1, try it and tell me the result
[NFC Hacking] madfish73:
done it, you can get it from post#1, try it and tell me the result.
[NFC Hacking] m3meems:
Works perfectly! I'll let you know if I have any issues. Thank you very much!
[NFC Hacking] m3meems:
I've had a couple issues where Nfc doesn't work and I have to toggle it off and on for it to work again. Is that normal?
[NFC Hacking] madfish73:
Did you have this kind of problem before you applied this nfc apk mod ?

I also did some "off screen scan" mod to the nfc apk you've downloaded, i'm not sure if it was caused by the mod or just a bug of the stock ROM.

This is a similar issue about "deep sleep" of nfc:

http://xdaforums.com/showthread.php?t=2178170
[NFC Hacking] m3meems:
I didn't have the problem before and that's exactly the same problem I've been having.
[NFC Hacking] madfish73:
if you have successfully tested any "screen off mod", please send it to me, I will do the "tag lost" mod base on that.
[NFC Hacking] klau1:
Re: Detecting NFC Tag removal hacking [add video demo & apk !!!]

I don't have the same problem. I never have to toggle my NFC switch just to get it to read the tags.

I haven't gotten a chance to get the logs yet but I think it has something to do with deep sleep slowing down the pooling rate of the NFC.

The reason is this: when I tested the phone today after a night of inactivity, by swiping the phone on a tag -ON OFF ON OFF etc, the phone would not produce the NFC sound on the first few 3 or 4 times, finally on the 5th time it worked (evidenced by the NFC sound).

I'll have to try a few more times to confirm this.
[NFC Hacking] madfish73:
maybe you should be more patient :)

I also have problem like you: sometimes when putting the phone on a tag after screen is off, I have to wait for several seconds to get the NFC sound.
[NFC Hacking] m3meems:
This one worked for 4.1.1 without any issues, but gives me Nfc force close for 4.1.2. Don't know if it will help.

http://xdaforums.com/showthread.php?t=1999569
[NFC Hacking] MohammadAG:
I've installed the Note 2 version but it doesn't seem to work.

Logcat shows a signature mismatch for shared user android.uid.nfc.

Any tips on how to make it work?

Edit: Nevermind, pulling AndroidManifest and META-INF from original apk worked, thanks.

Now to patch Llama
[NFC Hacking] madfish73:
could you upload your mod here, and your ROM version detail, your phone type detail, so I can attach it to post#1
[NFC Hacking] hollywoodfrodo:
This is a great concept. So how is the phone detecting the removal from the tag? After it initially detects a tag, does it continually poll to see if the tag is still present? Any potential negatives to that happening?

Great idea cause I have a tag on my car dock, but since the phone randomly re-detects the tag (if I hit a bump or something), I had to change it from being a toggle tag and also change what it did to only settings stuff so it wouldn't bring up an app in the middle of me google navigation or anything.
[NFC Hacking] madfish73:
Detecting tag removal is the function of original NFC module. The evidence is that you can find the "tag lost" message in logcat with stock ROM when tag removing. I just mod the Nfc module and add a little code to broadcast this message out to app level.

And, about your "bump" and "randomly re-detect", maybe you can mod your dock with something like magnet. I mod my Galaxy Nexus with TouchStone and it working very well like a car dock.
[NFC Hacking] 看你妹:
:crying::crying:我使用我的GS3-I9300 4.2.2NEDLI 下載你的NFC.APK放到SYSTEM/APP/裏面去修改成了RW-R`R然後。NFC重啟後失效了.系統設置也找不到NFC設置了。:mad::mad:View attachment Nfc.apk
[NFC Hacking] klau1:
did you delete the NFC.ODEX?
[NFC Hacking] madfish73:
版本不同不能乱用啊！把你上传的改了一下，你试一下，告诉我结果：

View attachment NfcGS3-4.2.2.NEDLI-mod.apk
[NFC Hacking] zygmalian:
Hi MadFish

Sorry for not replying sooner - this works great for Note 2 LTE - NFC tag is detected when screen off, and anytag picks up the tag lost signal.

Thanks very much for your work on this....

Zyg
[NFC Hacking] xaxoo:
HI madfish73

If it's possible to modify NFC.apk from slimrom (I9300)?

Pretty please :o

Thank You for Awesome work:)
[NFC Hacking] 看你妹:
很好 已經可以正常工作了

:good::good::good:

我竟然把NFC文件改成了大寫。放進去，竟然沒有覆蓋。扯蛋啊。。。。原來是大寫名字才生效的呵。重啟設備后我發現系統設置NFC也冒出來了。

。。我已經知道為什麼不工作了。ORZ.。。APK名字要大寫。。

我測試了一下。OK!

但是發現了一個問題。。。他沒有默認啟動的項目。當NFC標籤靠近的時候會啟動選擇操作畫面出現 而離開標籤的時候卻不需要選擇動作。啟動跟丟失的兩個標記 我都寫進了 ANYTAG NFC

鎖屏後不能喚醒設備 不能解鎖 標籤丟失無法鎖屏
[NFC Hacking] madfish73:
please try it and tell me the result, and your ROM version.

View attachment Nfc-i9300-Slim-mod-s.apk
[NFC Hacking] madfish73:
安卓的系统设计决定了当有多个Nfc应用“监听”同一动作消息时必定弹出选择框。有些应用本身可以设置是否出现在选择框中，有些则不提供该选项。你只能考虑把其中一些卸载。标签离开的动作目前只有我修改过的AnyTag可以识别，所以不存在选择的问题。锁屏唤醒之类的动作AnyTag似乎不支持吧，要结合Tasker+SecureSettings+SecureSettingsHelper来解决。

到机锋论坛有详细的中文说明：http://bbs.gfan.com/forum.php?mod=viewthread&tid=5757957&extra=
[NFC Hacking] xaxoo:
Thank You very very much

It is working on

slimrom 2.5

android version 4.2.2

gt-9300

If i could have only one question. I am writing my little own apps on android, but i did never decompiling apk's. Did You use apk tool?. to decompile it? and then recompile?:)
[NFC Hacking] madfish73:
ya, learn something about smali "language", and then you can also do APK mods with apktool.
[NFC Hacking] xaxoo:
Thanks again i'm learning:) Good Job:)
[NFC Hacking] DangKid:
Re: Detecting NFC Tag removal hacking [add video demo & apk !!!]

Thanks
[NFC Hacking] 看你妹:
因為nfc 對話框原因，以前三星原生系統沒出現過這情況， 一般跟打開一個網址一樣 是彈出對話框可以選擇應用 並且 有 記住此app，或者啟動一次 的選擇方式.現在刷了個AKOPCM10.1MOD。我用鈦備份把其他NFC凍結了，成功了不彈窗，但我要用其他NFC功能比如 NFC-WAR 手機端模擬仿真門禁ID卡 複製修改ID卡，。查公交卡。如何處理
[NFC Hacking] boar-hooligan:
(

application is not installed

samsung s3
[NFC Hacking] boar-hooligan:
Nfc-mod-combine.apk

Galaxy S3 i747 4.1.1 (thanks for klau1): Nfc-mod-combine.apk no instaled
[NFC Hacking] xaxoo:
Run ES file explrorer go to settings, root options and root permissions next mount system for writting, If it says "not installed" that means system is mounted read only. You must copy this file not install as usual.
[NFC Hacking] fruitloopy:
Continuous force close errors on GS3 on 4.1.2

Hi.

This is a fantastic mod and solves a lot of messing around but I cant get it to work on my Galaxy S3. Its running 4.1.2 and when copying over (and overwriting) nfc.apk it reboots and gives continuous NFC Service force close messages.

I also have firmware version MB5, the phone is rooted but stock ROM left installed.

Any chance you can have a look please?
[NFC Hacking] gallardo5:
Odp: Detecting NFC Tag removal hacking [add video demo & apk !!!]

Lol wut?

Well, you are probably right :p

Send from my Asus Nexus 7.

POOOLSKAAAA BIALOOOO CZEEERWONIIIII!!!!!

"Android's source is better than most liquor stores, it's opened 24/7" gallardo5 aka Daniel
[NFC Hacking] madfish73:
I've uploaded it in post#1, please try it and tell me the result.
[NFC Hacking] fruitloopy:
Almost!

Thanks Madfish73

I copied the NFC.APK file to the phone, backed up the original, renamed to nfcold.apk and renamed your modified one to nfc.apk.

Restarted the phone to recovery and wiped the Dalvik cache. Restarted phone again.

I started using Anytag to write an activity when a tag is applied but a few seconds after I removed the tag the NFC Service force close message reappeared. The good thing is it didn't keep popping up, it just restarted.

It seems it is only causing a problem when the tag is removed?

It's certainly looking better though! Thanks
[NFC Hacking] madfish73:
sorry, lost something there. Please try it again.
[NFC Hacking] fruitloopy:
That did it!

Thanks Madfish73. That works perfectly now!

You sir are a gentleman:good::good::good:
[NFC Hacking] avdim:
I have a question is it possible to make such mod for Motorola RAZR i taking in account that it is on x86 platform?
[NFC Hacking] madfish73:
try it(din't do the "lock screen nfc-on" mod):

View attachment Nfc-MotoRAZR-4.1.2-mod.apk
[NFC Hacking] Groegergrins:
Problem with N7100, running CRISKELO-ROM

First of all, great idea and work!

But I have a problem with my N7100, running on the CRISKELO-ROM (Deodexed), I read a lot but found no solution :confused:

As far as I know, to replace a system app on a deodexed ROM, you just have to replace the original app in /system/app with the new .APK, set the correct permissions and it should work, or am I wrong? But if I do this and restart, the NFC option disappears from the Settings.

I could reach the slider for NFC with the toggles in the dropdown menu of the Status Bar. But if I switch it on, and come back it's off again.

So I also tried to wipe the dalvik cache (and to install the app normally, did not work "application not installed"-error), but still the same problem :silly:

Am I doing something wrong, or do I need a special apk for deodexed ROMs? If thats the case, is that possible for you to do?

Thanks a lot

Edit:

I restored the Stock Rom, but I got the same "Application not installed"-Error. I replaced the app and got an Error again "NFC Service stopped" and the System got frozen...
[NFC Hacking] madfish73:
upload your nfc.apk here, let me check it for you, and don't forget to tell me your correct ROM version and phone type.
[NFC Hacking] Groegergrins:
That's my original Stock Nfc.apk with the Nfc.odex in the zip file (if you need them too) and the Nfc.apk of the CRISKELO-Rom V14.

Android Version is 4.1.2 with Baseband N7100UBDMB1, both, stock and custom Rom (since I flashed it the first time).

PS:

I also tried to flash it back to the original XXDLK7 Baseband and tried all steps again, but it didn't work.
[NFC Hacking] madfish73:
Well, I only need the Nfc.apk of your custom ROM . Done the mod, please try it.

Rename it to Nfc.apk and overwrite the same file of your custom ROM.

View attachment Nfc-N7100UBDMB1-CRISKELO-v14-mod.apk
[NFC Hacking] Groegergrins:
Thank you so much! I'm not sure if the modded functions work (I'll test that tomorrow) but I can finally activate NFC and have no other problems :good:

I'll donate something for your work of course ;)
[NFC Hacking] HUdasp:
Is it possible prepare NFC app? I have HOX with InsertCoin ROM.
[NFC Hacking] madfish73:
Uploaded in post#1, please try it and tell me the result!
[NFC Hacking] avdim:
Thank you, it is working.

I have problems with high battery drain and now modded AnyTag NFC is frozen. Probably that is just consequence, I will investigate it further.
[NFC Hacking] xXYoshiXx:
Could you please modify my NFC.apk? My device: Xperia ZL with Stock Jelly Bean.
[NFC Hacking] Glasswalker:
Hey, I've got the Galaxy Note2 SGH-T889V (from Wind Mobile in Canada, it's the same model that TMobile uses in the states).

Which APK should I download to use on that? (or is there even one yet) and if there is not, what can I do to help you enable this for this model? :)
[NFC Hacking] Glasswalker:
Ok sorry about that, just read through the thread.

I tried the 4.1.1 one (that's the rom version I have) and it doesn't crash or force close. But it doesn't work when sleeping/locked, and it doesn't seem to detect the removal of the tag in the modded app...

So based on previous posts, here is a dropbox: https://www.dropbox.com/sh/p9oyqk3ib3ydhjh/wm1CFDBKgI

which has the stock APK, and framework files.

If the odex file gets replaced on reboot after putting the modded apk in, then that will not be stock anymore. Any idea how to get it back to stock if that is the case? (I backed up the stock APK which is what's in the dropbox, but not the odex)

For full details, my phone is:

Model: SGH-889V

Android: 4.1.1

Baseband: T889VVLALJ4

Build: JRO03C.T889VVLALJ4

Rooted

Let me know if you need anything else.

Thanks!
[NFC Hacking] pendelv:
So I have download the Nfc.apk for my Galaxy Note2 N7100 4.1.2 from the first post.

Copy to /system/app reboot the phone and now there are no more Nfc in the settings and in the folder /system/app too.

If i replace the Nfc.apk, my phone do not reboot automatically. And after manually reboot i do not more Nfc.apk in the list.

What can I do now? Plz help

Is it a way to make a flashable .zip for cwm?

p.s here is my Nfc.apk form CustomRom that i use (AmnoSferum_9.0.1_Mescaline_Release_N7100XXDMD2)
[NFC Hacking] motodroidfreak:
Once you copied if to system app did you set permissions of the apk to rwrr?
[NFC Hacking] madfish73:
you also need to upload the nfc.odex file here
[NFC Hacking] Vanquish13:
I've got a N7100 running stock XXDMC3 and this worked perfectly for me, whereas the dedicated app from the OP completely crashed the NFC service.
[NFC Hacking] madfish73:
It's same as 4.1.2-N7100UBDMB1-CRISKELO-v14, you can download it from post#1
[NFC Hacking] XlAfbk:
niiice. Are there any plans to submit this (the nfc.apk mod) to CM?
[NFC Hacking] V6-Maniac:
@madfish73

First of all i want to say thx for this mod.

Recently bought a N4 which is unfortunately not support in my country.

But enough for offtopic writing.;)

I wanted to port this mod over to the current rom i'm using on my N4.

Since non of the provided files in the OP are compatible or work.

At the moment i use Purity v5.5

I'm not a idiot is it comes to editing smali files.

But i have problem with porting it.

Either way i have FC or the apk does work at all.

I want to ask you if your are so kind to take a look at the NfcNci.apk in the attachment and perhaps want to include the mod...

Thx in Adva

nced
[NFC Hacking] bigdome:
Wow great function to use NFC :good:

It looks really amazing thank you

Could you make it for more phones?

I've got an Xperia S with Version 4.1.2

And Attached are the NFC.apk and the NFC.odex of it.

Thank you and wish you a nice weekend
[NFC Hacking] unsolvedriddle:
can you help me out? please. Rooted note 2 LTE, GT-N7105 baseband XXDLL5
[NFC Hacking] NobbyLK:
Galaxy Note 2 Rooted Android 4.2.2

Hi,

thanks for this great mod.

Can you Help me bring it to my Phone GT-N7100 Sentinel Rom V4.70 - (Android 4.2.2)

I do not find an NFC.ODEX File but i atteched the NFC.apk.

Thanks in Advance :)

Nobby
[NFC Hacking] zild8:
Hi

Really like your work!!

Can you try on a galaxy s4 sgh i337m

I cannot find nfc .odex but that probaly because

Im on a deodex rom (omega rom from i9505)

View attachment NfcNci.apk

View attachment NfcTest.apk

Not sure if you need the last one but its there

Thanks a lot

Pm me your paypal account
[NFC Hacking] madfish73:
do need screen-off NFC?
[NFC Hacking] V6-Maniac:
Hi,

Thx for replying.

But i don't need NFC while the screen is off.
[NFC Hacking] NobbyLK:
For me Nfc-off screen would be great :):)

Gesendet von meinem GT-N7100 mit Tapatalk 2
[NFC Hacking] madfish73:
try it:

View attachment Nfc-N7100-SentinelROMv4.70-4.2.2-mod-signed.apk
[NFC Hacking] NobbyLK:
Great it works perfectly many many thanks....

Gesendet von meinem GT-N7100 mit Tapatalk 2
[NFC Hacking] zild8:
Theses ere the framework that i found.But theres one is too big for the forum (framework-res) and i dont think you need it ,i try to zip bur seem to be too big
[NFC Hacking] KulaS9:
Hi madfish73,

thank you for your great work! :good:

Could you help me with my

Galaxy Nexus 4.2.2 (manguro)

CyanogenMod 10.1.0-RC5

:fingers-crossed:

See attached my nfc.apk

Regards,

Kula
[NFC Hacking] rpg711:
[MENTION=436082]madfish[/MENTION],

can i use the Nexus 4 stock nfcnci.apk that you modded to the same effect if I'm running AOKP? I ask this because the GNex appears to have a distinction between stock and aokp.
[NFC Hacking] gfreeman86:
hi [MENTION=4318422]madfish73[/MENTION],

could you please do the NFC Mod for the new leaked stock firmware 4.2.2 for Galaxy S3 ?

I tried by miself but I can't find the lines that I have to substitute into the .smali files :crying:

I attach the framework:

http://d-h.st/bCw

NFC.apk and NFC.odex (attached to the post)

Thank you very much for your great work! :good:

Greetings

Max
[NFC Hacking] Neuer_User:
You should consider to make an Xposed mod out of this. This way this mod would work on all roms (4.1+) even on stock roms without the need to modify nfc.apk for each device.

---------- Post added at 09:31 PM ---------- Previous post was at 09:13 PM ----------

Here is a good Xposed tutorial :

https://github.com/rovo89/XposedBridge/wiki/Development-tutorial

Furthermore, there exists already a mod that provides NFC screen off for nfc.apk, so it probably should be rather simple to add your "tag lost" to it.

Would really be great, as then everybody can use this mod easily.

---------- Post added at 09:39 PM ---------- Previous post was at 09:31 PM ----------

Here is the link to the NFC screen off mod for the xposed framework :

https://github.com/qwerty12/NFCLockscreenoffEnabler/
[NFC Hacking] sgtpepperaut:
did anybody get it to work with the T-Mobile Version?
[NFC Hacking] bingobadgo:
I have been trying to get this to work on my Galaxy S3 running Jellybeer 4.2.2 and not had much luck. I have tried a variety of the attached files and either had FCs or not been able to detect tag removal. It could be that I am missing something, how exactly do I set up the tag removal action in AnyTag? In case it is my ROM I have attached my Nfc.apk so if you get time could you have a look please?

Thanks.
[NFC Hacking] w. junior:
Already has a version for the Xperia?

If not, madfish73 you could create a tutorial to make the change?

thank you

Sorry for my english
[NFC Hacking] bingobadgo:
FYI My ROM is based on CM 10.1 I think so if I can just use one of the NFC.apk which you have already posted just let me know.
[NFC Hacking] abuttino:
Did this work for your Razr?

Which do you have the HD or M?
[NFC Hacking] tofsla:
It seems that for stock 4.2.2 Nexus 4 the Mod works even when screen is off and it eats a battery a lot. Could you please make a mod that doesn't work when screen is off and works only when screen on+lock on and usual screen on+lock off?
[NFC Hacking] LoveNFC:
I've had this mod running for months. The NFC service never even shows up on battery consumption.
[NFC Hacking] tofsla:
it doesn't mean that it doesn't drain a battery. What I noticed that "sleep mode" eats lots more than usual after I installed the mod and NFC definitely works while screen off.

I don't tell that the mod is bad I just ask for a version that doesn't work when screen is off.

PS After I put back the original file battery consumption is normal again. Around 1% for 7 hours of sleep mode. Quite predictable but it kills Nexus ability to call NFC with screen lock.

Could somebody would make a version when NFC works while screen is on and locked, please? Or explain what do I need to change in apk to get what I need?

I'd Llike to run more test to see whether there is any major impact on battery life.
[NFC Hacking] CalsCats:
HI there, I'm wondering if anybody has gotten this working under CM10.1 and/or i9300?

If not, it doesn't look overly hard to do myself (thanks to the awesome instructions!), Am I correct in assuming that I only would need to mod the NFC.apk as its the one that is device dependant, the anytag.apk I'm fine to use from the first post?
[NFC Hacking] Rhuarc:
This idea I love! There are two uses I would have for something like this. I am a pilot in the Seattle area working for a small airline. We do mostly local flights, but sometimes up to 14 legs in one day. I get tired of putting my phone into airplane mode (for battery life, not because it will interfere!) and then after the flight turning off airplane mode. I would love to be able to put a tag into a phone holster in the airplane. When I slide my phone into the holster it activates airplane mode. When I pull my phone out it disables airplane mode.

I also want to use this idea for the sixaxis controller setup I have. I have a spare case attached to the controller I want to put a tag in. When I put the phone in the spare case it will launch sixaxis app and switch inputs and launch a menu with my games I can play with the controller.

View attachment 2130494

Is there any way this could be made easier and available for the T-Mobile stock Note 2 on 4.1.2? I am rooted.

Thanks all!!
[NFC Hacking] yagmursuz:
Tasker helper needs root access...:(
[NFC Hacking] Rhuarc:
I too am looking to see if any of the posted versions work with the T-Mobile Note II?

Model is SGH-T889

Thanks so much! This would be perfect (with screen off mode) for slipping into a holster and putting it into airplane mode for flights and then being able to slip it out of the holster and turn off airplane mode and send a text to someone that we have landed.

Please let me know if there are any files I can upload to help this process!

Thanks!
[NFC Hacking] Rhuarc:
I am looking at attempting this mod today using my TMobile Note 2. Can anyone confirm how difficult this is following the steps in the first post? If it doesn't work can I switch back to the regular NFC just by copying back over the original file?

Thanks!
[NFC Hacking] Rhuarc:
I am working at editing this stuff for the T-Mobile version today. I am hitting a brick wall at step 9.

9. cd d:\tools\android\apktool\apktool1.5.1\

apktool.bat b d:\temp\mod\Nfc\ d:\temp\mod\Nfc-mod.apk

I get an error when I try to run this command. Some of the locations of the files are different so I changed the paths. Any help would be greatly appreciated!
[NFC Hacking] sgtpepperaut:
Man i wish my background in this was better...i cant really help but good to see somebody working on it.

I installed the version for ATT and it actually worked with some quirks!

Bug1: tag gets redetected every 20 minutes or so which can be annoying especially since i can not turn of the sound.

Bug2: after the last google maps update during navigation detecting a tag will crash MAPS.....NO idea how that is connected. (I am also using tasker to run some task so that might be the issue here)
[NFC Hacking] Rhuarc:
Is anyone out there able to either help me get his hack completed for the T-Mobile Note II or complete it for me? This hack would be so amazing in conjunction with a holster or other slip on case. I really want to be able to use it to enable and disable car mode/airplane mode/gamaing mode without having to actually tap once to enable and tap again to disable.

Thank you in advance!!