Sony SmartWatch 3 NFC Support Package

Search This thread

maxexplosion

New member
Jun 21, 2016
2
0
NFC capabilities for newer builds ?

is it possible to install the NFC capabilities on a new smartwatch 3 with build MEC24H? only bought the watch to read NFC tags, to my phone, (thought it could do it already) I don't mind the risks.
 

lohtse

Senior Member
Apr 1, 2009
1,719
146
Where ever they send Me!!
personally see NO point to NFC on these watches as they are locked down, so has NON practical use... Just a shame we can't use the NFC feature on the watch so we could say scan a tag on view the information on our phones or even watch..
 

JLZba

New member
Jan 16, 2011
1
2
I hope that author (or someone else with his permission) will continue work on this tool.
This tool has been used by many diabetics to enable SSW 3 to read Libre sensors. It's more discreet way to do reading it than using phone or dedicated reader and it is one device less in (summer) pocket. Also, using NFC enabled SSW3, even some basic CGM were 'developed'.

So, thanks @ebones for his discovery/work :)
 

jrb66

New member
Jul 19, 2016
1
0
Commercial project: hacked SW3s relaying NFC tag events to web or paired device

Hi ebones and other SW3 hackers

I have a commercial project which would seek to relay NFC tag events (from hacked SW3s) to pairs user phones. (Better still would to web - for data analytics displayed via a webapp - but I assume it isn't possible to get a SW3 build with both WIFI and NFC switched on?)

Is anyone interested in a small paid project that already has got this functionality working?

Thanks

So, after a considerable amount of time I finally managed to properly start the NFC module in SW3. It can do all things a module on your phone can do, however, it causes elevated battery usage while doing so.

Warnings:
  • This package is for build LCA43 only (can be seen in Settings->About)
  • Can screw up boot if you install this on a different build and/or customized system
  • Future OTA updates can also corrupt your sytem. Restore to a stock ROM before installing them.
  • Make backups of system and boot partitions before installing
  • Uses insecure kernel (with SElinux disabled) and disables signature checks in services.jar
  • Preview/development purposes only, it disables initial tag (used for quick pairing) and causes moderate power consumption when NFC is active and screen is turned on.

Technical details:

Currently this is more of a proof-of-concept work and security was a big problem when developing. NfcService requires several permissions declared as system|signed which means it has to be signed with the same certificates used to sign the remaining system. I did not manage to do that, so I patched services.jar to ignore bad certificates.

(This paragraph is deprecated) When device boots even if NFC adapter is active, it does not get full power right away. Instead, it sets up a BroadcastReceiver to catch ACTION_SCREEN_ON and ACTION_SCREEN_OFF events to power the module only when screen is lit. However, power manager service on SmartWatch 3 never sends these broadcasts, so the module never gets a signal to turn on. I am yet to figure out why, in the meantime I patched NfcService to turn the module regardless of current screen state. It does not start consuming power until a tag is first detected, after which the battery can be drained with rate up to 50% per hour.

Features:
  • Full NFC support (tag reading, writing, HCE (card emulation) and P2P (Android Beam))
  • Configuration app to turn NFC module on and off
  • Watchface to monitor current NFC module state

The package does not include apps to read and write tags, emulate cards and use Android Beam.

Instaling:
  • If you need to omit certain components (like watchface), feel free to remove them from the package files
  • Boot into recovery (I am using TWRP found here)
  • Back up your system and boot partitions in case something goes wrong or you want to remove the package
  • Push the package using adb:
    Code:
    adb push nfc.zip /sdcard/nfc.zip
  • Tap "Install" on the screen
  • Locate nfc.zip
  • Install it
  • Boot into system

Uninstalling:
  • Restore system and boot partitions from your backup

Usage:
  • You can control your NFC module using NFC Configuration app
  • If you want to monitor NFC module state all the time, use NFC Status watchface (long tap on the screen to set up)
  • To view a tag install tag editing app via adb

Example code to check NFC:
Code:
    NfcManager nfcManager = (NfcManager)this.getBaseContext().getSystemService(Context.NFC_SERVICE);
    NfcAdapter nfcAdapter = nfcManager.getDefaultAdapter();

    boolean isAdapterEnabled = (nfcAdapter != null) && nfcAdapter.isEnabled();

Changes:
  • 08.10.2015 0.2 Fixed constant battery drain. Reduced tag polling rate.
  • 07.10.2015 First release

Thanks:
 

wrzosw

Member
May 27, 2016
6
0
How hard would it be to adapt the nfc service for a newer firmware. Has somebody tried to install it on a rom with completely disabled selinux. Has someone tried that or will it break the watch. Looking forward to the release of android wear 2 for this watch it would be fantastic to use this feature in stand alone apps.
Thank you lg Andi
 

xavi104

Member
Dec 20, 2008
7
1
I am diabetic and when I realised that was possible to use the SW3 for read my freestyle libre sensor I decided to active the NFC in my watch. Now, I running without phone and I can check my glucose, now I can use my sensor with more discretion. .. thanks a lot!!!

Enviado desde mi SM-N910F mediante Tapatalk
 

Stishan

New member
Sep 2, 2016
1
0
I am diabetic and when I realised that was possible to use the SW3 for read my freestyle libre sensor I decided to active the NFC in my watch. Now, I running without phone and I can check my glucose, now I can use my sensor with more discretion. .. thanks a lot!!!

Enviado desde mi SM-N910F mediante Tapatalk

I've been trying to get this to work too but I have a newer build number and haven't managed to downgrade to the correct one, did you have to downgrade? If so, did you use any guide and would you mind linking?
 

xavi104

Member
Dec 20, 2008
7
1
Did you get any issues with connecting via ADB?, for some reason I get an error device not found. I'm using the core Google Inc ADB drivers too.
No, I don't remember that I had any problem connecting via ADB. Sorry but it was some time ago when I update my Sw3 for NFC support.

Enviado desde mi SM-N910F mediante Tapatalk
 

vywwong

New member
Dec 3, 2016
3
0
Great work but what's next?

It works great for me so far and I can relay NDEF URI to my phone directly using a wearable+phone android app.

Question is: Is anyone working on building an NFC-supported version of Google Wear 2 beta yet?
I am not sure how the package works but willing to help create the NFC-supported version of Google Wear 2 beta if the details are given.
 

sirrelevant

Senior Member
Nov 25, 2013
119
45
It works great for me so far and I can relay NDEF URI to my phone directly using a wearable+phone android app.

Question is: Is anyone working on building an NFC-supported version of Google Wear 2 beta yet?
I am not sure how the package works but willing to help create the NFC-supported version of Google Wear 2 beta if the details are given.


2.0 preview 4 has nfc abilities enabled on the urbane 2. I'm hopeful we'll be getting 2.0 on the sw3, and that an api will be included for it.
 

ledpepper

Senior Member
Nov 16, 2010
107
22
JHB
Thinking of joining the smartwatch world. £72 for this watch at the moment and feels like a good buy. Is, or will this watch's NFC work with Android Pay?

Edit: Oops, just read that it's dependent on AW 2.0 coming to this watch, which at this point is unknown.
 
Last edited:

chowzzzz4

New member
Jan 12, 2017
1
0
i dont understand how to install it into the smartwatch. Is there a more specific instruction as i dont get where i should download the file (my computer or my phone?) or how to install it or where to get the file nfc.zip or how to do the adb thing? :(

But still thank you for your hardwork!
 

balno

Member
Dec 19, 2014
8
0
Build number M1D64T

So, after a considerable amount of time I finally managed to properly start the NFC module in SW3. It can do all things a module on your phone can do, however, it causes elevated battery usage while doing so.

Warnings:
  • This package is for build LCA43 only (can be seen in Settings->About)


  • I just got a new SWR50 for the sole purpose of using NFC (with FreeStyle Libre). When turned on for the first time watch automatically upgrades to M1D64T and I don't seem to be able to stop that and don't seem to be able to downgrade to be able to use this package. Any suggestions?

    Thanks
 

potionz

Member
Dec 11, 2015
20
9
I just got a new SWR50 for the sole purpose of using NFC (with FreeStyle Libre). When turned on for the first time watch automatically upgrades to M1D64T and I don't seem to be able to stop that and don't seem to be able to downgrade to be able to use this package. Any suggestions?

Thanks

You can try to flash this https://xdaforums.com/smartwatch-3/orig-development/rom-sony-smartwatch-3-rom-t3367728
But remember to do backup of your current system, and keep in mind that you probably loose warranty.

Or read this https://xdaforums.com/smartwatch-3/orig-development/sony-smartwatch-3-marshmallow-mec24h-t3382450 It seems to be quite new ROM and probably he adds this NFC future to this rom (i`m not 100%)
 
Last edited:

pkuzmiak

New member
May 1, 2017
1
0
I've installed everything and it works... almost. NFC configuration app says "Adapter state: off", so I click "toggle". It says "turning on" and after few seconds it's still "Adapter state: off". Does anyone know what is the problem?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 22
    So, after a considerable amount of time I finally managed to properly start the NFC module in SW3. It can do all things a module on your phone can do, however, it causes elevated battery usage while doing so.

    Warnings:
    • This package is for build LCA43 only (can be seen in Settings->About)
    • Can screw up boot if you install this on a different build and/or customized system
    • Future OTA updates can also corrupt your sytem. Restore to a stock ROM before installing them.
    • Make backups of system and boot partitions before installing
    • Uses insecure kernel (with SElinux disabled) and disables signature checks in services.jar
    • Preview/development purposes only, it disables initial tag (used for quick pairing) and causes moderate power consumption when NFC is active and screen is turned on.

    Technical details:

    Currently this is more of a proof-of-concept work and security was a big problem when developing. NfcService requires several permissions declared as system|signed which means it has to be signed with the same certificates used to sign the remaining system. I did not manage to do that, so I patched services.jar to ignore bad certificates.

    (This paragraph is deprecated) When device boots even if NFC adapter is active, it does not get full power right away. Instead, it sets up a BroadcastReceiver to catch ACTION_SCREEN_ON and ACTION_SCREEN_OFF events to power the module only when screen is lit. However, power manager service on SmartWatch 3 never sends these broadcasts, so the module never gets a signal to turn on. I am yet to figure out why, in the meantime I patched NfcService to turn the module regardless of current screen state. It does not start consuming power until a tag is first detected, after which the battery can be drained with rate up to 50% per hour.

    Features:
    • Full NFC support (tag reading, writing, HCE (card emulation) and P2P (Android Beam))
    • Configuration app to turn NFC module on and off
    • Watchface to monitor current NFC module state

    The package does not include apps to read and write tags, emulate cards and use Android Beam.

    Instaling:
    • If you need to omit certain components (like watchface), feel free to remove them from the package files
    • Boot into recovery (I am using TWRP found here)
    • Back up your system and boot partitions in case something goes wrong or you want to remove the package
    • Push the package using adb:
      Code:
      adb push nfc.zip /sdcard/nfc.zip
    • Tap "Install" on the screen
    • Locate nfc.zip
    • Install it
    • Boot into system

    Uninstalling:
    • Restore system and boot partitions from your backup

    Usage:
    • You can control your NFC module using NFC Configuration app
    • If you want to monitor NFC module state all the time, use NFC Status watchface (long tap on the screen to set up)
    • To view a tag install tag editing app via adb

    Example code to check NFC:
    Code:
        NfcManager nfcManager = (NfcManager)this.getBaseContext().getSystemService(Context.NFC_SERVICE);
        NfcAdapter nfcAdapter = nfcManager.getDefaultAdapter();
    
        boolean isAdapterEnabled = (nfcAdapter != null) && nfcAdapter.isEnabled();

    Changes:
    • 08.10.2015 0.2 Fixed constant battery drain. Reduced tag polling rate.
    • 07.10.2015 First release

    Thanks:
    4
    Good news!

    I have uploaded a new package; NFC no longer drains battery when the screen is in ambient mode (it is now normal 1-3% per hour compared to previous 50%). Thanks matejdro for pointing out required permissions!

    I have also slightly decreased tag polling rate. This causes a slight delay when reading a tag, but reduces produced heat when watch screen is on.
    2
    I hope that author (or someone else with his permission) will continue work on this tool.
    This tool has been used by many diabetics to enable SSW 3 to read Libre sensors. It's more discreet way to do reading it than using phone or dedicated reader and it is one device less in (summer) pocket. Also, using NFC enabled SSW3, even some basic CGM were 'developed'.

    So, thanks @ebones for his discovery/work :)
    1
    Question though: You said it is causes severe power consumption. I assume this is only when NFC is on all the time (even when device is in ambient mode)? Can NFC be set to run only when device is fully on?
    Yes, it does so only when the service is turned on in the settings. More specifically, when you turn it on, power consumption (and heat) raise a little bit, but not dramatically. That is until you bring a tag nearby which causes a lot of heat and battery drain. If you turn the service off, however, the watch goes back to normal (no need to reboot).

    Can NFC be set to run only when device is fully on?
    I think so. I am currently working on a solution, which will most likely be finding a way to broadcast ACTION_SCREEN_* messages.
    1
    Hey were you able to get this working? I have a tic pro and wanted to try this.
    It is fairly easy in my opinion but I'm super busy until about October. We have to build wearos with android.hardware.nfc enabled. Also for the TWP3. Also I'll continue making Nexmon for both