Adroid virtual cannot access the Internet solution

Source: Internet
Author: User

This is generally the result of admod reference in Android based on the correct code on the Internet. The main reason is that the Internet is not accessible.

The specific method is

Start Android virtual

Open the CMD of the system and enter the ADB shell to enter the Linux Simulation.

Open CMD and enter ipconfig/all. In the input result, the DNS of the IP address on which you access the Internet is displayed ***.***.***.***

 

In Linux, enter 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. icationication_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. debugadh]: [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]: [24 m]
[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]

Press enter to run the command, and then enter getprop to check whether the DNS in the command is changed,

Then you can access the Internet.

Because I think others have explained that there are several DNS, and I only have one, so the above is only for

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.