一、如何进入 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:
- Set up the server on B, listening to
10.0.2.15:<serverPort>
- On B's console, set up a redirection from
A:localhost:<localPort>
toB:10.0.2.15:<serverPort>
- 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 | Description | Comments |
---|---|---|
gprs |
GPRS | (min 150, max 550) |
edge |
EDGE/EGPRS | (min 80, max 400) |
umts |
UMTS/3G | (min 35, max 200) |
none |
No 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 | Description | Comments |
---|---|---|
gsm |
GSM/CSD | (Up: 14.4, down: 14.4) |
hscsd |
HSCSD | (Up: 14.4, down: 43.2) |
gprs |
GPRS | (Up: 40.0, down: 80.0) |
edge |
EDGE/EGPRS | (Up: 118.4, down: 236.8) |
umts |
UMTS/3G | (Up: 128.0, down: 1920.0) |
hsdpa |
HSDPA | (Up: 348.0, down: 14400.0) |
full |
no 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. |