当前位置: 首页 > news >正文

android 蓝牙开关设置

frameworks/base/packages/SettingsProvider/res/values/defaults.xml

<bool name="def_bluetooth_on">false</bool>

将 def_bluetooth_on 的值设为false(系统默认开启值)

adb动态设置
关闭:adb shell settings put global bluetooth_on 0
打开:adb shell settings put global bluetooth_on 1
查询:adb shell settings get global bluetooth_on
打开蓝牙
am start -a android.bluetooth.adapter.action.REQUEST_ENABLE
查看蓝牙状态
service list | grep bluetooth
dumpsys package com.android.bluetooth | grep “version”
dumpsys bluetooth_manager
logcat -s BluetoothManager

http://www.lryc.cn/news/257996.html

相关文章:

  • C++ extern “C“ 用法
  • HTML面试题---专题四
  • stm32项目(11)——基于stm32的俄罗斯方块游戏机
  • 【计算机网络基础2】IP地址和子网掩码
  • ES6-import后是否有{}的区别
  • rv1126-rv1109-以太网功能-eth-(原理篇)
  • 【IDEA】反向撤销操作快捷键 ctrl+shift+z 和搜狗热键冲突的解决办法
  • 数据结构之----逻辑结构、物理结构
  • pip 通过git安装库
  • C语言——从终端输入 3 个数 a、b、c,按从大到小的顺序输出。
  • 【JVM从入门到实战】(二)字节码文件的组成
  • OPC UA常见故障信息代码
  • 第20关 快速掌握K8S下的有状态服务StatefulSet
  • ​如何使用https://www.krea.ai/来实现文生图,图生图,
  • 点滴生活记录2
  • 【带头学C++】----- 九、类和对象 ---- 9.12 C++之友元函数(9.12.1---12.4)
  • 设计模式的定义
  • 【Kubernetes】存储类StorageClass
  • 【LLM】大模型之RLHF和替代方法(DPO、RAILF、ReST等)
  • Spring Boot监听redis过期的key
  • day01、什么是数据库系统?
  • 2023年医疗器械行业分析(京东医疗器械运营数据分析):10月销额增长53%
  • MISRA C++ 2008 标准解析
  • Linux16 ftp文件服务区、vsftpd文件系统服务安装、lftp客户端安装、NFS远程共享存储
  • [排序篇] 冒泡排序
  • CGAL的四面体网格重构
  • 排序-选择排序与堆排序
  • d2l绘图不显示的问题
  • 智能优化算法应用:基于人工蜂群算法3D无线传感器网络(WSN)覆盖优化 - 附代码
  • 云原生的 CI/CD 框架tekton - Trigger(二)