Remove All Ads from XDA

[Q] Hooking to nfc tranceive methods doesn't work

162 posts
Thanks Meter: 103
 
By Thenetstriker, Senior Member on 13th June 2015, 03:11 AM
Post Reply Email Thread
I'am trying to create an Xposed module which hooks into the tranceive methods of nfc to find out what is transfered. But sadly the hook doesn't seam to work. I've created a sample app which sends data over the tranceive method but the logs are not written. Here is my code:
Code:
if (!lpparam.packageName.equals("android"))
    return;

findAndHookMethod("android.nfc.tech.BasicTagTechnology", lpparam.classLoader, "transceive", "byte[]", "boolean", new XC_MethodHook() {
    @Override
    protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
        XposedBridge.log("before");
    }
    @Override
    protected void afterHookedMethod(MethodHookParam param) throws Throwable {
        XposedBridge.log("after");
    }
});
I've also tried to hook into the service, but no logs either:
Code:
if (!lpparam.packageName.equals("com.android.nfc"))
    return;

findAndHookMethod("com.android.nfc.NfcService", lpparam.classLoader, "doTransceiveNoLock", "int", "byte[]", new XC_MethodHook() {
.....
Am I doing something wrong or is it simply not possible to hook into these methods?
 
 
15th June 2015, 08:28 PM |#2  
OP Senior Member
Thanks Meter: 103
 
More
I found a solution for my problem. I have to hook the transceive method of com.android.nfc.NfcService$TagService to get access to every tag transmission.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes