Android4.2.2开启USB和Bluetooth Tether功能

 时间:2024-10-11 19:40:56

1、产品研发告一段落,对比着自己做的东西和SAMSUNG的S3,觉得缺了点什么,发现缺了Tether相关的一些功能,只有WIFI,而少了USB和BT的,故而查找了相关资料,发现在frameworks/base/core/res/res/values/config.xml相关的配置还没有添加上。

2、直接查看Android源码里的device/samsung/tuna/overlay/frameworks/base/core/res/res/values/config.xml文件,做了相应对比后,修改该文件,添加了如下内容:在<string-array translatable="false" name="networkAttributes">中添加:<item>"bluetooth,7,7,1,60000,true"</item>在<string-array translatable="false" name="radioAttributes">中添加:<item>"7,1"</item>在<string-array translatable="false" name="config_tether_usb_regexs">中添加:<item>rndis\\d</item>在<string-array translatable="false" name="config_tether_bluetooth_regexs">中添加:<item>"bt-pan"</item>其中第1和2两项为添加相应的属性,而第3为USB Tether对应的设备接口,第4为BT Tether对应的设备接口。

3、上面配置好Android的framework后,编译烧录,发现在Settings/More.../Tethering & portabe hotspot/下多了如下两项:USB tetheringBluetooth tethering

4、除了上层的洧粽袄淖配置后,Kernel还需要注意如下配置:1.USBCONFIG_USB_USBNET=yCONFIG_USB_NET_CDCETHER=yCONFIG_USB_NET_CDC_N潮贾篡绐CM=yCONFIG_USB_NET_CDC_SUBSET=yCONFIG_USB_ARMLINUX=y2.BluetoothCONFIG_BT_BNEP=yCONFIG_BT_BNEP_MC_FILTER=yCONFIG_BT_BNEP_PROTO_FILTER=yCONFIG_TUN=y

5、还有在相应的init.xxx.rc里添加如下服务:service dhcpcd_bt-pan /system/bin/dhcpcd -BKLGdisabledoneshotservice iprenew_bt-pan /system/bin/dhcpcd -ndisabledoneshot

  • xp 如何安装SQL server2000
  • Windows Server 2012测试DNS服务器的简单查询
  • Windows 下文件名过长如何删除?
  • synology office怎么导入nas上的文件
  • 热门搜索
    美庐奶粉怎么样 怎么预防近视 欧拉怎么样 工作自我评价怎么写 龙井茶怎么泡 神经衰弱怎么治疗 身上痒一挠就起疙瘩是怎么回事 我的世界怎么做地图 丝塔芙洗面奶怎么样 铁棍山药怎么去皮