Android : connecting to AVD using TELNET

TELNET is a A terminal emulation program for TCP/IP networks such as the Internet. Telnet               provided access to a command-line interface on a remote host. Most network equipment and operating systems with a TCP/IP stack support a Telnet service for remote configuration. The Telnet program runs on your computer and connects your PC to a server on the network. You can then entercommands through the Telnet program and they will be executed as if you were entering them directly on the server console. This enables you to control the server and communicate with other servers on the network.

So we can use telnet to connect to the Android Virtual Device (AVD) or the android emulator and perform certain operations that deal with certain environmental values and settings. Here the AVD is running as a localhost. So before connecting, note down the port at which it is running. Generally the top of the AVD gives the port number. Eg. my AVD runs on 5554.

to connect to the  in the terminal use the command:

telnet localhost 5554

if connected successfully  an OK message should be displayed.he various operations that can be performed are-

1. To toggle between the speed of the Internet connection use:
                 network speed edge
    the result is that the network connection is now slow and can be seen on the avd with e marked     with the data pack symbol.
To get the full connection speed type
                network speed full

2.Sending SMS message . you can send to the avd messages :
the syntax is
“sms send <sender’s phone number> <message>”
Eg.   sms send 1234000000  this is good.
This will cause a message to appear in the avd from the phone 123400000 with the message “this     is good”.

3.The charging indicator can be changed to show the amount of charging done including  o for          full. All the input taken is in terms of percentages.

Eg.   power 50  will make the charging to 50%
power 73  will make the charging to 73%

4.  the   help  command will provide a list of  all the operations that can be performed along with        their  option if any. The others include operations like fixing the location(GPS COORDINATE) of        the AVD by using the  geo fix  command, or kill   command to terminate the instance of the            emulator

Here is a summary of the commands and its use:

 help|h|?         print a list of commands
    event            simulate hardware events
    geo              Geo-location commands
    gsm              GSM related commands
    kill             kill the emulator instance
    network          manage network settings
    power            power related commands
    quit|exit        quit control session
    redir            manage port redirections
    sms              SMS related commands
    avd              manager virtual device state
    window           manage emulator window



SOURCE : Webopedia , coursera

Interesting commands on Linux :SET 1

Here are some fun commands you can try on your Linux system probably when you are bored or want to try something new and something different. I really liked these commands and hope that you will enjoy using it too.

  1. cowsay
    you can make an image of cow appear on the terminal and  show any text that you want , as if the cow was saying it –
    So install cowsay using one of the following command :
    sudo apt-get install cowsay                     (for Debian based OS)
    yum install cowsay                                   (for Red Hat based OS)
    here is how the uoyput will look:
    cowsay1If you want to have a coloured cow to show any text install xcowsay .  Install it same way as cowsay but replace cowsay with xcowsay.
    Run it and ul get a coloured cow some where on your screen.
  2. Steam Locomotive (sl)
    this command “sl” runs a train across your terminal. Its really cool!!
    So install it using one of the commands:
    sudo apt-get install sl                            (In Debian like OS)
    yum -y install sl                                    (In Red Hat like OS)
    run the command  “sl” in he terminal, you should see something like this:
  3. toilet
    This command itself is funny.. but what it does is takes a text string and builds the text in some different forms like using symbols some colours,etc
    To install use one of the command:
    sudo apt-get install toilet
    yum install

    run the commands as :
    toilet seeTheSource
    toilet3or run the command: toilet -f mono12 -F metal seeTheSource
  4. telnet
    telnet is a network protocol and it causes stories to be run like some kind of animations. Nothing has to be installed here, all you need is a working internet condition.use the command:
  5. cmatrix
    this command is used to create the matrix effect on a terminal.install it using the suitable command:

    sudo apt-get install cmatrix
    yum install cmatrix
  6. espeak
    this command is used for text to speech. So you can configure it to be a welcome sound when your OS loads. Or use it to read text just like that.
    install espeak using one of:

     sudo apt-get install espeak 
     yum install espeakthen run it as: espeak "this is see the source" 
     or any other text you want. And have fun.

So all these commands are really fun to use, there are lots more available.. I will post about more useful commands in the coming posts!!