Sunday, December 15, 2013

How to remote debug android emulator for windows


For Remote Machin run with SDK and Android Emulator
1. Install freeSSHd on remote machin
    2.1 start freeSSHd. don't run freeSSHd more than one time, It will
        make the second freeSSHd instance show SSH Server start faile.
    2.2 in the windows taskbar bottom right corner find out freeSSHd
        icon and click setting menu item.
    2.3 in the Server status tab make sure SSH server is running
    2.4 In Users tab add new user for ssh login
    2.5 In Tunneling tab checked 'Allow local port forwarding'
2. Install android SDK and run emulator in remote machin.


For Development Machin run with Eclipse and SDK
3. Setup putty SSH client
    3.1 open putty go to 'Connection -> SSH -> Tunnel' add forward port as follow:
        option: Local, Auto
        L5554  Localhost:5554
        L5555  Localhost:5555
        5554 is the first running emulator in remote machin, if you wanna connect more emulators
        you have to add addtional pairs of port as above.
    3.2 go to 'Session' add remote machin IP with SSH 22 port, Then save it to session name, the tunnel
        setting you do above will save into this session name.
4. connect to remote machin, type login name and password to login.
   and just keept putty running here as a SSH tunnle connector.
5. stop adb server in develop machin, and restart it again or let step 6. do it automatically.
    adb kill-server
6. relocate devices, remote emulator should be show.
   adb devices