Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.7k views
in Technique[技术] by (71.8m points)

android - 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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

svc nfc <enable|disable>

Works perfectly

Edit: Requires > Android 6.0


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...