android dns设置(无法解析域名问题)
16lz
2022-05-13
现象:能ping通百度ip,不能ping通 wwww.baidu.com(电话模块3G网络)
android DNS设置和标准文件系统有所不一样,需要在init.rc(androidx86-froyo/device/intel/us15/init.rc)中进行设置,
在setprop
net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680
后加上
setprop
net.dns1
192.168.2.1
setprop net.dns2 xxx.xxx.xxx.xxx来设置DNS
看起来是设置环境变量,而linux的可以设置在resolve文件里
android DNS设置和标准文件系统有所不一样,需要在init.rc(androidx86-froyo/device/intel/us15/init.rc)中进行设置,
在setprop
net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680
后加上
setprop
net.dns1
192.168.2.1
setprop net.dns2 xxx.xxx.xxx.xxx来设置DNS
看起来是设置环境变量,而linux的可以设置在resolve文件里
更多相关文章
- android:EditText属性
- ListView分隔线
- EditText的光标选择(android.text.Selection)&输入指定字符
- [Android1.6]继承BaseAdapter为GridView设置数据时设置setLayout
- android:windowSoftInputMode属性使用
- 设置TextView文字居中
- 使用android studio 来开发hello world app的时候,遇到的一些坑。
- 一个不错的启动菜单显示屏动画效果
- Android(安卓)ImageView图片自适应