如何讓Android模擬器的Browser可以浏覽Internet

Windows下,配置好Adroid环境变量后(如将d:\android-sdk-windows-1.0_r1\tools加入系统变量PATH),在命令行窗口输入:

emulator

启动Android 模拟器后, 输入:

adb shell

进入adb shell模式:

将网络连接代理设置写入配置数据库,假如你的上网代理IP是10.193.xx.xx:

sqlite3 /data/data/com.android.providers.settings/databases/settings.db "INSERT INTO system VALUES(99,'http_proxy','10.193.xx.xx:1080')"

查询一下是否成功更改了系统设置:

sqlite3 /data/data/com.android.providers.settings/databases/settings.db "SELECT * FROM system"

结果中应有:99|http_proxy|10.193.xx.xx:1080

重启模拟器,应该可以使用Browser上Internet了.

删除刚刚写入的配置信息方法:

sqlite3 /data/data/com.android.providers.settings/databases/settings.db "DELETE FROM system WHERE _id=99"

Database error: [Table 'ac_search_cache' is marked as crashed and should be repaired]

SELECT * FROM ac_search_cache WHERE hash = '156f623192568aaaa2e6b4eefcc831a79d8fb440' LIMIT 1;