Thursday, April 7, 2011

USB Connection & Capture Serivce Guide for Remote Web Desktop (Windows)

This document is a simple guide for how to connect it Remote Web Desktop with USB connection and how to enable the screen shot feature on non-rooted phone.

Download ADB Tool

Please click the following download link to download the ADB tool and USB driver, and extract it to your local drive. I assume you extract it to X:\ADB_WIN/ for convenience.

ADB Tool (Windows)

Installing the USB Driver for Windows

If you already installed the USB driver for your Android phone, please ignore this steps.

More OEM USB drivers can be found here:
http://developer.android.com/sdk/oem-usb.html

Windows Vista

To install the Android USB driver on Windows Vista for the first time:
  1. Connect your Android-powered device to your computer's USB port. Windows will detect the device and launch the Found New Hardware wizard.
  2. Select "Locate and install driver software."
  3. Select "Don't search online."
  4. Select "I don't have the disk. Show me other options."
  5. Select "Browse my computer for driver software."
  6. Click "Browse..." and locate the folder where you extracted the ADB tool package (X:\ADB_WIN\usb_driver\). As long as you specified the exact location, you may leave "Include subfolders" checked or unchecked—it doesn't matter.
  7. Click "Next." Vista may prompt you to confirm the privilege elevation required for driver installation. Confirm it.
  8. When Vista asks if you'd like to install the Google ADB Interface device, click "Install" to install the driver.

Windows XP

To install the Android USB driver on Windows XP for the first time:
  1. Connect your Android-powered device to your computer's USB port. Windows will detect the device and launch the Hardware Update Wizard.
  2. Select "Install from a list or specific location" and click "Next."
  3. Select "Search for the best driver in these locations"; un-check "Search removable media"; and check "Include this location in the search."
  4. Click "Browse..." and locate the folder where you extracted the ADB tool package (X:\ADB_WIN\usb_driver\).
  5. Click "Next" to install the driver.

Turn on USB Debuggin on Phone Side

Go Menu > Setting > Appliations > Development, and turn on "USB debugging" option:


    Connect Remote Web Desktop through ADB Tool

    1. Open Remote Web Desktop on your phone side, specify a port (e.g. 8999) for it.
    2. Click 'Start Server' button to start the Web Desktop server. And it will show status text such like 'Open http://xxx.xxx.xxx.x:8999 in browser'.
    3. Connect your Android phone to your computer's USB port.
    4. On your computer, go to X:\ADB_WIN\, double click to run connect.bat, input the port you specified in Remote Web Desktop, then it will prompt you visit 'http://localhost:port/ in your browser.


    5. Open browser and type the URL show above, you will get the Web Desktop.

    Install Capture Service for Non-Rooted Phone

    1. Connect phone to computer with USB.
    2. On your computer, go to X:\ADB_WIN\, double click to run install_capture_service.bat.
    3. You will get prompt message like the follwoing shot, then you can close it and un-plug your USB line, of course, you also can keep the USB connected, I just mean it can work without it.

    4. Login Remote Web Desktop, open Screenshot window, you can take screenshot for non-rooted phone now.
    5. Please notice that you need reinstall capture service agagin if you restart your phone.

      34 comments:

      1. Hello John,

        Just one question, I hope you will find here.

        My new HTC Wildfire S comes with two connectivity options:

        It can operate as Wi-Fi Hotspot and when connecting through USB I can select Internet Pass-through.

        Is it possible to configure your application, or my computer to use these.

        This would be very useful.

        Best regards

        Dragan from Serbia.

        P.S. Thanks for great application. I am waiting for contacts functionality.

        ReplyDelete
      2. To Dragan Grujičić :

        Of course you can.

        1. Turn on WiFi hotspot on your phone
        2. Let your computer connect to above WiFi hotspot
        3. Start Remote Web Desktop, it will show a url on the status bar
        4. Type the url in your computer browser, then you will get it

        ReplyDelete
      3. Hi John

        I have a Motorola Cliq running on 2.1 and my PC runs on Windows 7.

        I want to use your application through the USB. And following are the steps that I followed:

        I selected USB debug option on the device.
        I connected my device and the PC installed a driver on its own. Couldnt select ADB.
        Then I also selected the connect by USB option on the device.
        I then started the server on the device on port 8999 without any password.
        Then I tried running connect.bat. The error message says device is offline. And am unable to connect using http://localhost:8999/ on my firefox 4.

        Please let me know, if I have to correct any of the above steps.


        Thank you.

        ReplyDelete
      4. Please refer to the section "Turn on USB Debuggin on Phone Side" in above article. Maybe you missed it.

        ReplyDelete
      5. Hello. I am using Linux and still waiting on instructions to set this up via USB. Is there a working operating procedure for this environment?

        ReplyDelete
      6. For Linux and Mac users:
        1. please refer to http://developer.android.com/sdk/index.html to download and install the SDK.

        2. Run the following command in terminal:
        adb forward tcp:8999 tcp:8999

        3. Go Menu > Setting > Appliations > Development, and turn on "USB debugging" option

        4. open browser and http://localhost:8999

        ReplyDelete
      7. Am able to connect successfully to my mobile desktop.
        Can you plz guide me how to browse url's from mobile desktop

        ReplyDelete
      8. Don't support browse url within mobile desktop now.

        ReplyDelete
      9. Hi John,

        I'm trying to install the drivers for windows 7/64, but windows comes back with failure.

        Any ideas?

        ReplyDelete
      10. Hi John,
        When I try to install the driver, windows says it is unable to

        ReplyDelete
      11. This is what I did in order:
        1. Downloaded ADB Tool
        2. Extracted ADB to my desktop
        3. Connected my HTC EVO 3D via USB. Seeing as I use my USB for charging the computer does not install anything, because it already did when my phone was brand new.
        4. I enable USB debugging. Now I get the pop-up to install the driver. When I point it to the folder on my desktop to install it says "Cannot install this hardware" "The hardware was not installed because the wizard cannot find the necessary software".
        5. I try to connect anyways. So I start Remote Web Destop
        6. I Select start server.
        7. It says open browser to: http://21.61.46.33:8999/
        8. I run connect.bat
        9. I enter 8999 for my port
        10. I get an error "device not found"
        PLEASE HELP!

        ReplyDelete
      12. To Enforcer:
        It's difficult to figure out what's the problem of your usb connection, so I think you would better try the Bridge Mode.

        ReplyDelete
      13. I got it running on my Samsung Galaxy S2!
        I'm using "SAMSUNG Android ADB Interface" USB driver (Samsung USB driver, the one you install whit Samsung Kies), as I couldn't unistall it: but it seems to work anyway.
        Usin USB is much smoother and faster than using wifi connection, all but the "Remote Control" applet: it doesn't work, and getting error "Network error: Could not connect to server: localhost:5901".

        This feature is very important to me, but I know is in beta anyway.

        Keep up with good work.

        ReplyDelete
      14. Hi John,

        I think I have the same issue as Enforcer has.

        Windows wont install the driver "The hardware was not installed because the wizard cannot find the necessary software".

        I have tried on several computers. Any ideas?

        ReplyDelete
      15. To Nike, maybe this common driver don't fit it. You need install the driver from your phone manufacturer.

        ReplyDelete
      16. same issue as gpecatore: can't get remote desktop to work over usb connection (works ok over wifi).

        error msg: "Network error: could not connect to server: localhost:5901".

        Desktop: WinXP Professional SP3
        Phone: Samsung Mesmerize SCH-i500 Froyo (rooted)

        ReplyDelete
      17. To JimMc: yes it's a bug, I will fix it.

        ReplyDelete
      18. Hello John,

        I would like to use Remote Web Desktop through USB connection. I did everything according your instructions but when I click “Start Server” button (without WiFi connection on) the application doesn’t show “Open http://xxx.xxx.xxx.x:8999 in browser' but is trying to find WiFi connection and most of the time it reports “WiFi is unavailable”. And if at this time I start connect.bat it shows “error: device not found”.

        Could you help me what I’m doing wrong?

        Best regards,

        ReplyDelete
      19. To Purko Purkov: You can ignore the error of 'WiFi is unavailable'.

        The error: device not found is because you didn't turn on debugable option on your phone. Please refer to the step "Turn on USB Debuggin on Phone Side".

        ReplyDelete
      20. Hi John,

        I have a Motorola Milestone, do you know where I can find USB drivers?

        Thanks

        ReplyDelete
      21. the USB connection works fine for me, the only thing that bother me is, i have to rerun the conenction.bat everytime to reconnect my phone, i am using window 7

        ReplyDelete
      22. I have only had a chance to use the USB connection once and I must say that it works best this way. I have not tried it on my sensation because I have had no use for it at the moment. But I am sure it will work no problem.

        For personal Reviews check out my profile and go to my Apps review blog.

        ReplyDelete
      23. Hi smartdog,

        i have a UMPC operating Windows 7. I would like to use my Android tablet (Motorola Xoom) to replicate the UMPC screen and control the UMPC by connecting both over some kind of USB cable since i cannot rely on Wifi too much where it may not be available. What can you propose please?

        ReplyDelete
      24. to Neoxax767: I think you mean remote desktop windows from Android tablet. You can search "Remote Desktop" in market, such like 2x client, RDP Client, etc.

        ReplyDelete
      25. Hi,

        the Download of "ADB Tool (Windows)" doesn't work for me.
        Is it still on the server?
        Other downloads of ADB Tools do not contain the connect.bat

        ReplyDelete
      26. Hi John, does the remote control work over USB connection? It works flawlessly for all the other features but just can't make it work for remote control. Over wi-fi works. Any ideas? thanks

        ReplyDelete
      27. To Andrew: Yes, don't work now, in to do list.

        ReplyDelete
      28. hi I try to connect using FTP with USB but dont really know how~
        I am not able to connect to the FTP using USB, but no problem on the wed desktop

        ReplyDelete
      29. The linux version of the script. Just save it, run: chmod +x , place it in the android sdk folder and run it from there. It may require sudo if you do not have permissions to run adb.

        http://pastebin.com/akB7AF13

        ReplyDelete
      30. I use motorola Atrix,
        but I can't use remote control, the others works well.
        I want to use that, please.
        Thank U :)

        ReplyDelete
      31. hi after using the remote web app on my samsung gallaxy s2 and using the web camera on the connected android desktop to take a foto my webcam opens but doesnt work

        ReplyDelete
      32. I downloaded the ap, I dont want to do it via USB. When I type the adress and port into my browser, it doesnt connect to anything, regardless of whether I specified a password or not. But my phone says the server is running.

        ReplyDelete
      33. Hi i was just wondering if this capture service will harm my pc or do anything to my samsung galaxy s like to root it or something?

        ReplyDelete