给Android emulator and Browser设上代理

本文介绍如何通过修改Android模拟器内部的环境变量来设置HTTP代理。步骤包括进入SDK目录、使用ADB shell连接模拟器并编辑SQLite数据库文件。此外,还提供了插入及删除代理配置的具体SQL命令。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

system environment varibles - http_proxy should also set before doing following steps.

or add option -http_proxy when starting emulator.


1. go to your android sdk directory

2. cd tools

3. adb shell

4. in the shell, type following - please note the path may change in different sdk:

sqlite3 /data/data/com.android.providers.settings/databases/settings.db

5. you will get a sqlite interactive shell, type followings to check the environment variables - please note the ending colon";" :

select * from system;

6. add http_proxy into the system table by typing following:

insert into system values(255, 'http_proxy', 'the proxy:port');

please note choose a unique id, here is 255 in my system.

7. incase you want to remove the proxy, type following:

delete from system where _id=255;

8. ctrl-D to exit

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值