Emulator 工具

一、如何进入 Emulator console

telnet localhost 5554

 

二、在console下做什么工作

 

一、网络重定向,例如

redir add tcp:5000:6000

就是把对来自 localhost:5000 的TCP或UDP转向到 10.0.2.15:6000

 

redir list 列出所有重定向

redir del 删除重定向

 

Interconnecting Emulator Instances

To allow one emulator instance to communicate with another, you must set up the necessary network redirections as illustrated below.

Assume that your environment is

  • A is you development machine
  • B is your first emulator instance, running on A
  • C is your second emulator instance, running on A too

and you want to run a server on B, to which C will connect, here is how you could set it up:

  1. Set up the server on B, listening to 10.0.2.15:<serverPort>
  2. On B's console, set up a redirection from A:localhost:<localPort> to B:10.0.2.15:<serverPort>
  3. On C, have the client connect to 10.0.2.2:<localPort>

For example, if you wanted to run an HTTP server, you can select <serverPort> as 80 and <localPort> as 8080:

  • B listens on 10.0.2.15:80
  • On B's console, issue redir add tcp:8080:80
  • C connects to 10.0.2.2:8080

 

2、network status命令

3 、network delay <value> 其中 value有以下值

network delay gprs

The format of network is one of the following (numbers are milliseconds):

Value DescriptionComments
gprsGPRS(min 150, max 550)
edgeEDGE/EGPRS(min 80, max 400)
umtsUMTS/3G(min 35, max 200)
noneNo latency(min 0, max 0)
<num>Emulate an exact latency (milliseconds). 
<min>:<max>Emulate an specified latency range (min, max milliseconds).

 

network speed 14.4 80

The format of network <speed> is one of the following (numbers are kilobits/sec):

Value DescriptionComments
gsmGSM/CSD(Up: 14.4, down: 14.4)
hscsdHSCSD(Up: 14.4, down: 43.2)
gprsGPRS(Up: 40.0, down: 80.0)
edgeEDGE/EGPRS(Up: 118.4, down: 236.8)
umtsUMTS/3G(Up: 128.0, down: 1920.0)
hsdpaHSDPA(Up: 348.0, down: 14400.0)
fullno limit(Up: 0.0, down: 0.0)
<num>Set an exact rate used for both upload and download. 
<up>:<down>Set exact rates for upload and download separately.

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值