Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enable/Disable NFC with ADB command

Is there any way to disable/enable NFC via ADB shell commands?

I found one answer here.

What I tried from the above link:

# Enable NFC
service call nfc 5

# Disable NFC
service call nfc 4 

but it's not working.

Any help appreciated. Thanks.

like image 373
RuntimeException Avatar asked Oct 07 '15 13:10

RuntimeException


2 Answers

I don't know why no one has posted this already

svc nfc <enable|disable>

Works perfectly

Edit: Requires > Android 6.0

like image 184
Freshollie Avatar answered Oct 19 '22 11:10

Freshollie


# Disable NFC

service call nfc 7

Verified for Android 8.0

Cheers!

like image 37
Praveen Avatar answered Oct 19 '22 09:10

Praveen