感谢支持
我们一直在努力

Adroid virtual 不能上网解决方案

这个一般是对于Android中的admod引用时,根据网上的正确代码却得出结果,主要原因就是不能上网


具体方法是


启动 android virtual


打开系统的cmd   ,输入adb shell 进入linux模拟下


在打开一个cmd,输入ipconfig /all ,看到输入结果中,自己上网的那个ip的dns ***.***.***.***


再在Linux下面的那个,输入setprop net.dns1 ***.***.***.***,


setprop net.dns1 202.106.46.151
# getprop
getprop
[ro.secure]: [0]
[ro.allow.mock.location]: [1]
[ro.debuggable]: [1]
[persist.service.adb.enable]: [1]
[ro.kernel.qemu.gles]: [0]
[ro.kernel.qemu]: [1]
[ro.kernel.console]: [ttyS0]
[ro.kernel.android.qemud]: [ttyS1]
[ro.kernel.android.checkjni]: [1]
[ro.kernel.ndns]: [3]
[ro.factorytest]: [0]
[ro.serialno]: []
[ro.bootmode]: [unknown]
[ro.baseband]: [unknown]
[ro.carrier]: [unknown]
[ro.bootloader]: [unknown]
[ro.hardware]: [goldfish]
[ro.revision]: [0]
[ro.build.id]: [FRF91]
[ro.build.display.id]: [sdk-eng 2.
[ro.build.version.incremental]: [4
[ro.build.version.sdk]: [8]
[ro.build.version.codename]: [REL]
[ro.build.version.release]: [2.2]
[ro.build.date]: [Wed Jun 30 13:58
[ro.build.date.utc]: [1277931480]
[ro.build.type]: [eng]
[ro.build.user]: [android-build]
[ro.build.host]: [android-test-25.
[ro.build.tags]: [test-keys]
[ro.product.model]: [sdk]
[ro.product.brand]: [generic]
[ro.product.name]: [sdk]
[ro.product.device]: [generic]
[ro.product.board]: []
[ro.product.cpu.abi]: [armeabi]
[ro.product.manufacturer]: [unknow
[ro.product.locale.language]: [ldp
[ro.product.locale.region]: []
[ro.wifi.channels]: []
[ro.board.platform]: []
[ro.build.product]: [generic]
[ro.build.description]: [sdk-eng 2
[ro.build.fingerprint]: [generic/s
[rild.libpath]: [/system/lib/libre
[rild.libargs]: [-d /dev/ttyS0]
[ro.config.notification_sound]: [O
[ro.config.alarm_alert]: [Alarm_Cl
[media.stagefright.enable-player]:
[media.stagefright.enable-meta]: [
[media.stagefright.enable-scan]: [
[media.stagefright.enable-http]: [
[ro.setupwizard.mode]: [OPTIONAL]
[xmpp.auto-presence]: [true]
[ro.config.nocheckin]: [yes]
[net.bt.name]: [Android]
[net.change]: [net.dns1]
[dalvik.vm.stack-trace-file]: [/da
[persist.sys.timezone]: [GMT]
[persist.sys.language]: [zh]
[persist.sys.country]: [CN]
[persist.sys.localevar]: []
[ro.FOREGROUND_APP_ADJ]: [0]
[ro.VISIBLE_APP_ADJ]: [1]
[ro.SECONDARY_SERVER_ADJ]: [2]
[ro.BACKUP_APP_ADJ]: [2]
[ro.HOME_APP_ADJ]: [4]
[ro.HIDDEN_APP_MIN_ADJ]: [7]
[ro.CONTENT_PROVIDER_ADJ]: [14]
[ro.EMPTY_APP_ADJ]: [15]
[ro.FOREGROUND_APP_MEM]: [1536]
[ro.VISIBLE_APP_MEM]: [2048]
[ro.SECONDARY_SERVER_MEM]: [4096]
[ro.BACKUP_APP_MEM]: [4096]
[ro.HOME_APP_MEM]: [4096]
[ro.HIDDEN_APP_MEM]: [5120]
[ro.CONTENT_PROVIDER_MEM]: [5632]
[ro.EMPTY_APP_MEM]: [6144]
[net.tcp.buffersize.default]: [409
[net.tcp.buffersize.wifi]: [4095,8
[net.tcp.buffersize.umts]: [4094,8
[net.tcp.buffersize.edge]: [4093,2
[net.tcp.buffersize.gprs]: [4092,8
[init.svc.console]: [running]
[init.svc.servicemanager]: [runnin
[init.svc.vold]: [running]
[init.svc.netd]: [running]
[init.svc.debuggerd]: [running]
[init.svc.ril-daemon]: [running]
[init.svc.zygote]: [running]
[init.svc.media]: [running]
[init.svc.installd]: [running]
[init.svc.keystore]: [running]
[init.svc.goldfish-setup]: [runnin
[init.svc.qemud]: [running]
[init.svc.goldfish-logcat]: [stopp
[ARGH]: [ARGH]
[net.eth0.dns1]: [10.0.2.3]
[net.gprs.local-ip]: [10.0.2.15]
[ro.radio.use-ppp]: [no]
[status.battery.state]: [Slow]
[status.battery.level]: [5]
[status.battery.level_raw]: [50]
[status.battery.level_scale]: [9]
[ro.com.google.locationfeatures]:
[init.svc.adbd]: [running]
[dalvik.vm.heapsize]: [24m]
[qemu.sf.lcd_density]: [240]
[qemu.hw.mainkeys]: [1]
[qemu.sf.fake_camera]: [back]
[adb.connected]: [1]
[init.svc.bootanim]: [stopped]
[hw.keyboards.65536.devname]: [qwe
[net.hostname]: [android_9774d56d6
[dev.bootcomplete]: [1]
[gsm.version.ril-impl]: [android r
[gsm.sim.operator.numeric]: [31026
[gsm.sim.operator.alpha]: [Android
[gsm.sim.operator.iso-country]: [u
[gsm.sim.state]: [READY]
[gsm.current.phone-type]: [1]
[gsm.nitz.time]: [1328358741577]
[gsm.network.type]: [UMTS]
[gsm.operator.alpha]: [Android]
[gsm.operator.numeric]: [310260]
[gsm.operator.iso-country]: [us]
[gsm.operator.isroaming]: [false]
[sys.settings_secure_version]: [2]
[net.gprs.http-proxy]: []
[gsm.defaultpdpcontext.active]: [t
[ro.runtime.firstboot]: [132835875
[net.dns1]: [202.106.46.151]
[net.dnschange]: [1]


回车执行后,再输入getprop 查看里面的dns是否改过来,


然后就可以上网了


因为本人看别人说明上面有的是好几个dns,而我的只有一个,所以上面仅针对一个dns所设置的

赞(0) 打赏
转载请注明出处:服务器评测 » Adroid virtual 不能上网解决方案
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏