Google

Droid@Screen

Written on:January 21, 2010
Comments
Add One

Droid@Screen now has its own page. Please, click the link below or the link at the top navigation bar. The latest version of Droid@Screen is now 0.4 (30 Oct 2011). You can find the download link at the Droid@Screen page.


I have recently start to learn programming Android. It’s Java, but the environment is very, very different from ordinary server and/or desktop Java programming. Mostly because the device is limited in all sorts of resources. Therefore, the API puts some burden on the lone hacker.

Anyway, I needed a simple tool to project the screen of my HTC Hero device on my PC, for showing it to an audience. I found one such application, but wasn’t really satisfied with its functionality and because I didn’t want to step on someones toes by messing around and changing way to much of the code I went for my own solution. My primary objective was to ensure it was operational before next Sunday, when I will need it.

Here is how it looks like

It is a simple Java Swing application, delivered as an all-inclusive executable JAR file. Therefore, one can launch it simply by double-clicking on the JAR file, or run the following command

java -jar droidAtScreen-0.3.jar

The Droid@Screen JAR file can be found here (pls understand it is alpha software)

  • droidAtScreen-03.jar   (Not valid any longer. Please go to the new Droid@Screen page.)

Source Code

The source code is open source and I have put all of it to my git repo at Codaset GitHub.

The project is built using Maven. Before you can compile, you need to install two Android JAR files to your Maven repo. It is the android.jar and the ddmlib.jar files. Use the mvn install-file command. The easiest to get the mvn syntax right is to try compile it and wait for Maven to point out how to run the install-file command.

Screen-Shots

Here are some more screen-shots.

Landscape mode

Scaled image

Multiple windows

Save screenshots

Setting the path to the ADB executable

The application relies upon the Android Debug Bridge (ADB) application, which will be started unless it’s already running. So the very first thing Droid@Screen does is to prompt for that path.

—-

113 Comments add one

  1. Handyman says:

    Thanks so much for this app, it helped me a lot :)

  2. NewGalaxyOwner says:

    I can’t seem to get it to recognize my Galaxy S2.. Thoughts

  3. Depa says:

    Wonderful. Simple. Great.
    Thanks a lot
    Bye
    Depa

  4. Pingback:Collegare i9000 al portatile - Samsung Galaxy S (i9000/i9001/i9003) - Forum Android Italia - AndroidWorld.it

  5. Pingback:DigitalOutbox Episode 80 ‹ DigitalOutbox

  6. Pingback:Jens barthe | Zukies

  7. Natasja Atherton says:

    Hi
    It doesn’t pick up my A500 – Acer Tablet

  8. Adun says:

    Thanks
    [url=http://androidcontrol.blogspot.com/]Android Control[/url]

  9. Kitty says:

    Finally! A program that lets you screen capture/record that doesn’t require a root! :D You have no idea how much I’ve searched for something like this…

    Though, I have a bit of trouble with it. It loads just fine overall, but the display on my computer looks very strange and unclear. It has a weird lag too with the FPS (no matter what I set it to, it stays the same). Here’s what my screen looks like: http://img.photobucket.com/albums/v227/lostromanovprincess/DaS-screen.jpg

    If you have the time, I’ll appreciate any bit of advice that will help me. Thanks!

    HTC Evo3D
    Android 2.3.4
    Windows XP

    • jens says:

      That’s a strange look. No idea what the problem is.
      Do you have several HTC USB drivers installed?
      Perhaps it has something to do with the 3D look in Sense?
      Sorry, of not being much helpful.

      • Mery says:

        that is exactly how mine looks :( ((( I though I was doing something wrong…

        I have a Mytouch 4G Slide running Android 2.3.4 and my computer is running windows vista!

        • kuldeep says:

          according to my little knowledge

          its real output of screen without glass (3d viewing glass)

          when we see it through glass it looks natural , so it is looking like this.

  10. Pingback:Anonymous

  11. Pingback:Guida:Condivisione Schermo SmartPhone Con PC - Forum Android Italiano

  12. javaboy4 says:

    dude,
    are u serious !?

  13. mejdi says:

    Thanks a lot for this app. I added a post here to show how to record video using you app :
    http://forums.utest.com/viewtopic.php?f=17&t=2439

  14. Pingback:Droid@Screen - Sidan 2 | Swedroid

  15. Jann says:

    This is the app ive been looking for! Kudos on this! However, i seem to be encountering an orientation problem, my display is UPSIDE DOWN. Im using a ZTE Blade with Froyo 2.2.2. However, when i use my Samsung Galaxy S2, orientation is correct. Hope you can help me out. Many thanks :)

  16. The Sony Ericsson Xperia X10 mini pro has a special way of drawing the screen. The screen is 240 x 320. At the end of every line of 240 pixels it adds 16 extra black pixels.

    Because of the extra 16 black pixels at the end of every 240 at the X10 mini/mini pro screen (240×320), streaming with Droid@Screen shows a disortet image.

    Would it be possible with an extra feature to “ignore” a user-specific amount of pixels at any angle (before/after every line or a a specific number of lines at top/buttom)?

    Besides that, great program :)

  17. joel says:

    it doesn’t work. it detects the device, but shows a blank screen. my usb driver is correct, and so is ddms.

    windows vista / samsung galaxy ace.

    • @joel

      The Samsung Ace has a problem, you will get a blank screen. I have the same issue with all the Ace devices, so it isn’t problem with your device specifically.
      For your device try the latest version of Android Screen Monitor.

      @jens
      Any chance of some free time coming up this year for the screen control bit, I do check back here occasionally to see if there is any updates :)

  18. Parideis says:

    Hi,
    I use Win 7 64bit, lastest sdk installed, Samsung Galaxy 551 connected with orginal samsung cable. I can see the phone name but can’t see the screen just blank appears, but I can make screen shots with DDMS.

    • jens says:

      Not sure what the problem is. Sorry.
      Browse the comments below, to see if any might shed some light over your problem.

  19. Leo says:

    After some initial effort, it worked, and worked really well. Profound thanks for sharing this with the community. I plan on heavily using it for a variety of projects.

    The only problem I’ve encountered: can’t open any files in any app from either Files or Gallery, since my Droid X always says either “memory card is missing” or “SD card unavailable/not mounted”. Obviously, the card is there and if I disconnect the device from host PC then I can instantly open needed files, then plug USB cable back in and continue working. I thought this was already discussed here and a workaround was suggested, but couldn’t find it. Any help? Thanks!

    • jens says:

      Ensure you connect the phone using the “Charging only” option. In that case, the SD card will still be available.

      • Leo says:

        Sorry for my ignorance but how do I enable that option? I have USB debugging enabled under Settings>Applications>Development (so phone is not mounted as USB storage and ADB is working); what else am I missing?

        • jens says:

          When you connect via USB, your mobile will ask you for a set of options, like “Charging only”, “Use as ESB disk”, etc. It will also ask you if you want to choose the selection as the default, which is what happened to your mobile – as I understand it.
          To fix the problem: Drag down the notification area, choose the USB notification and change your option to “Charging only”.

          • Leo says:

            It worked precisely as you’ve explained. I was confused by mobile device displaying the “Charging only” message when connecting via USB cable when in fact it was connected as mass storage device. Wasn’t smart enough to pull down notifications and check out what’s the factual condition. Thanks for all your support, now it works just fine. Great utility! Google and/or OEMs should distribute and promote it extensively :)

  20. Would it possible to incorporate Monkeyrunner inputs to implement a screen control solution ?

    http://piglings.blogspot.com/2011/08/android-screen-control-without-root.html

    Thanks,
    Regards,
    Vikram.

  21. Sérgio says:

    Thanks!!!!!!

  22. Works great, need to check if it will just work with adb and not require the entire SDK. Would it be possible to inject events such as mouse and keyboard actions onto the device. This would be fantastic.

    Cheers,
    Vikram.

    • jens says:

      >>if it will just work with adb and not require the entire SDK
      You need the SDK and run the “update” to get adb in the first place. When you got it, it might work if you just drop the exe file somewhere else. However, I haven’t tried that.

      >>Would it be possible to inject events such as mouse and keyboard actions onto the device.
      Sorry, not to my knowledge.

  23. Michael says:

    i have tried to run it it pulls it up but it wont show the screen and yes i have installed the right drivers when i pull down the top where it shows the messages and all that will show up and the time and all but when i try and go to the home page all i see is white so what can i do to see the screen? i have a samsung galaxy prevail ????

    • jens says:

      Hard to say… Please, double check the following:

      • You can synch/connect your device via USB, i.e. have the Galaxy USB driver correctly installed and working.
      • You have the Android SDK installed and have run update
      • Try run DDMS, which is located in $ANDROID_SDK_HOME/tools/, and from the Device menu choose “Screen capture”. Behind the scenes, this is what droid@screen does.
      • Verify that you have entered the proper path to ADB, which should be located in $ANDROID_SDK_HOME/platform-tools/
  24. Marcus says:

    Thanks for this!

    Improvement suggestion:
    An option to keep all frames in memory and then write them all out as images at the press of a button (or to keep writing the images constantly to free up memory if the computer can make it without lagging the movie (probably won’t be an issue)). Will simplify making a movie with this program a lot.

  25. Pingback:Banjo Tabs

  26. Vaceq says:

    Hey,

    first of all I’d like to thank you for such an useful tool!

    Now a small question:
    Is there any way to increase the framerate? I am changing it from 15 to 30 fps but it is flickering all the time (i have some blurred background dialogs used, and some animations which looks quite bad on a big screen ;) ).

    TBH I can’t see any difference between 15 and 30fps… any clue why?

  27. Kasper says:

    Really useful application – the one build in to the Android SDK isn’t able to stream the screen live, and this was really something I need to present an app ;)

    Thanks for great application!

  28. Great thanks!
    Works on the Samsung Google Nexus S.

  29. Baha says:

    Hi,

    I have Samsung Mini 5570 I can see Samsung logo during the boot but image(Samsun logo) freezes later on, PIN entrance screen does not show up.

  30. cokeby190 says:

    Hi,

    I found this online, wanted to try and view angry birds on a large screen. haha. anw. it looks cool, and i tried it out, and this is the error i got :

    Failed to show device.java.lang.RuntimeException : Failed to capture device screenshot : java.lang.UnsupportedOperationException :RawImage.get ARGB(int) only works in 16 and 32 bit mode.

    It managed to detect my device, and my screen resolution is 32bit colour, changed to 16bit and it was the same result. :/

    im sorry im lousy and i cant find the problem. ): any help?

    • jens says:

      What device do you have?
      Do you have the proper USB driver for the device already installed, that means you can sync/connect your mobile to the pc?
      The error message complains about the device, not your screen. Can you see the device, using just your default home view(ie not angry birds)?

  31. No V 0.4? says:

    I like this proggie… alot.
    Why have you stopped developing it?

    • jens says:

      I haven’t had the time. I’m in the end-phase of completing an Android app, so perhaps I might squeeze in some time for improvements.
      What would you like to see?

  32. EsOne says:

    Please disregard my last post. Working fine now. Not sure why it started working.

    Only getting a couple FPS though. But, alas, great app! can’t wait until you polish it and allow for some things like screenshots and such.

    Bookmarked this page

  33. EsOne says:

    Not sure why it is not working, but I am having problems.

    Installed the ADB (installed in a place with no spaces), ran your .jar app, input the path (C:\Android\android-sdk\platform-tools\adb), but no devices show up.

    I am able to see my device by using the adb devices command.

    Just doesn’t show up in Droid@Screen.

    Oh, I also updated all things in the SDK as well.

    Any help or ideas would be appreciated.

    • jens says:

      Do you have correct USB driver installed, i.e. you can sync your phone?
      Check that you can connect to it using the ddms program and take a screenshot. Basically, I have built the device oriented code from the sources of that part of ddms.

  34. Robert McCarthy says:

    Gah, so frustrated. Seems like the perfect app for me. I have to demo the apps I design in front of customers and forums. I had been using the basic ddms.bat method, which requires a refresh for every screen change (not horrible for me as my apps are relatively static in nature), but I would *love* to have this instead (natch).

    MyTouch G4 on T-Mobile
    Windows XP

    As I said, I can currently run the standard screen capture, so I know the communication is there….but whenever I launch Droid@Screen, no device appears in the list. It *feels* like Droid@Screen isn’t actually launching ADB even though I am giving it the path – C:\Program Files\Android\android-sdk\platform-tools. I just never see the command window pop up the way I see it when I run ddms.bat. Should that happen?

    Any ideas? I would love to use your stuff and promote it whenever I can!

    Not a developer (anymore) just a designer, so very good chance I am doing something Rather Stupid(TM).

    Thanks!

    • jens says:

      It might be the space in “Program Files”. Java used to have problems when dealing with spaces in path. (1) try use the DOS naming or (2) reinstall Android SDK to a path without spaces.

  35. Pingback:CourseMedia Mobile for Android | Educational Technology at DU

  36. Erhan says:

    I cannot use it. :( I use Ubuntu 10.10, lastest sdk installed, Samsung Galaxy Gio connected with orginal samsung cable. I can see the phone name but can’t see the screen :( just blank appears…

    • jens says:

      Verify first you have the correct USB driver for your Samsung mobile installed, i.e. you can synch/connect to your phone. Next, verify using DDMS that you indeed can connect to your mobile and, for example, view the log stream.

  37. Pingback:CourseMedia Mobile for Android | In Flagrante Delicto!

  38. Bas says:

    Very cool!!!
    Thnx!!

  39. TParisi says:

    Okay…so it is working again….i set the phone to share the pc’s Internet connection and then switched back to charge only and that seemed to have done the trick……..
    By the way……Great App!!!!

  40. TParisi says:

    Having an issue all of a sudden…Droid@Screen worked perfectly and then all of a sudden i get the rror message that the ADB Claims the Device is Offline…..no matter what i do now i get this message. Any help here would be greatly appreciated – Win 7 64 Bit….original Droid Pro USB cable being used

    • jens says:

      Looks like a problem related to ADB. I do have similar problem when developing and testing in the emulator. After a day or so, I need to restart, because ADB lost it.
      Please, unplug the device and manually restart ADB.
      Open a command prompt at the $ANDROID_SDK_HOME/platform-tools/ directory and execute
      ./adb kill-server
      ./adb start-server

  41. Pingback:Bruce Lawson’s personal site  : Screencasting an Android phone

  42. Ryan says:

    Thanks for the app — very cool. One issue I’m having that I can’t seem to resolve, though, is I’m seeing adb.exe crashes reported by the tool quite frequently. I tried readjusting the frames per second setting but it didn’t seem to help. What’s the trick so that the apps I demo to crash out due to adb.exe failures?

    Thanks in advance!

  43. JP says:

    This works really well BUT even with the latest HTC drivers installed and the absolutely most-recent SDK, I seem to be limited to about 1-2fps at most…

    HTC Desire (so high-density display) could be part of the issue I guess???

  44. Rahul says:

    This is Awesome. It works great. Thanks for creating this application.

  45. Spon says:

    HELP how do I instal this .jar I think I have fallowed all the steps. Yet all I get is file to unzip, I have looked threw the files and found no instal or run. I watched the video on youtube, and video in the .jar and am still lost! what am I doing wrong? I have instaled Java, and ANDROID SDK.

    • jens says:
      1. Ensure you have downloaded the complete JAR, for example by right clicking on the link and then choose where to save it
      2. If you have Java (JRE) correctly installed, you can double-click on the JAR file to launch it. Otherwise, you can type java -jar droid@screen.jar at a command prompt (command window)
      3. After you have downloaded and unpacked the Android SDK, ensure you perform an update, because that will download and install the ADB executable
      4. After the application has started, set the complete path to the Android ADB executable. After update, you can find the executable in the platform-tools directory of the Android SDK.
      5. Ensure you hace the correct USB driver for your phone installed and working. N.B. the USB driver in the Android SDK is for the Google phone only, so you probably need to download and install the driver and sync package from your phone vendor
  46. AB says:

    Lovely. Works nicely on Mac os10 and Windows 7 with their respective ADB executables.

  47. Derrick says:

    Sorry please ignore my previous comment.. something went wrong suddenly with my installation of droid@screen. I re-downloaded it, re-installed it and it works fine now. Thanks!

  48. Derrick says:

    Sorry I’m not an android developer but am a consumer trainer for android devices, have been thrilled with using Droid@Screen for demos, however the program doesn’t seem to work on devices running Froyo.

    Can I check if this is a known limitation?

  49. Alex says:

    hi jens i have kind off same problem that frogola, i already put the full path of my adb file but it keeps saying me

    Exception in thread “main” java.lang.RuntimeException: ADB executable ‘~/Documents/android-sdk-linux_86/platform-tools’ is not a file
    i try platform-tools, platform-tools/, platform-tools/adb
    :( i guess im doing something wrong :(

    • jens says:

      First, ensure you have run the SDK update, because it downloads and installs the adb executable. Just launch $ANDROID_HOME/tools/android from a comman line and choose “Update All…” from the “Installed packages” pane.

      Second, the path to the ADB exe will then be $ANDROID_HOME/platform-tools/adb
      In your case it would be /home/yourUserName/Documents/android-sdk-linux_86/platform-tools/adb

  50. frogola says:

    Success! Thanks much, have fun developing today! Sehr useful dude!

  51. frogola says:

    Thanks for the quick reply Jens. That workaround worked; now I just have a ‘request rejected: insufficient permissions for device’ exception to deal with. Progress…

    • jens says:

      pls, let me know of your progress with the Ubuntu USB permission stuff. seems to be a good idea to post it here as a reply for other Ubuntu fans.

  52. frogola says:

    Ubuntu 10.04, can’t set adb path because config window exceeds screen size and data entry controls are off the visible screen. And no resizing controls in config dialog. Is there a way to pass adb path via config file or as arg to invoking .jar? Frustrating.

    • jens says:

      Sorry, for that. I just checked within Ubuntu that the JOptionPane dialog expands wildly in vertical mode.

      The short-time solution, for you, is to edit the preference file. Just tried it myself.
      First, save some preference such as ‘frame rate’, which will ensure the java prefs system will create the file..
      Next, locate the file ~/.java/.userPrefs/com/ribomation/droidAtScreen/prefs.xml
      Then, add an entry for the preference ‘adb-executable-path’ with the value of the full path to your ADB exe on Ubuntu.
      Finally, start Droid@Screen.

      The long-term solution, for me, is to investigate and fix that Ubuntu related bug. However, not today… I’m in the middle of some intensive Android development right now.

  53. Snail says:

    Hello,Jens and everybody.I’m find over net,Droid@Screen is the only.Thanks.
    Question:
    I run the emulator at first(because I don’t have a physical device),and run the .jar file,it’s not work.I can’t see the emulator in the JComboBox devices.does not Droid@Screen support emulator ?Can you help me?

  54. Congratulations! This app is fantastic! Why don’t you provide packaged executables in exe and app format? It would also be very very nice to add option to save a video ;)

  55. Sunil says:

    Hi Dude,

    its a great tool.
    But when i loaded into eclipse and tried to run..i am not getting the logs.
    How can i configure the Log4J properties file to get the logs into eclipse?

  56. Mr.Xprt says:

    hey man , Thanks Alot !!

  57. KML says:

    got it! when downloaded on a mac the .jar file is a .jar.zip file. rename it to .jar et voila.

    this is great. was searching and trying similar stuff for months!

    gr8!

  58. KML says:

    Looks easy but what if you have a mac..

    .jar is a folder. please help :(

  59. Pingback:Tweets that mention Droid@Screen : RiboComments -- Topsy.com

  60. Pingback:Confluence: RD / AndroidRPM

  61. Rupesh says:

    Thanks for this info.

    This was the application which I was searching all over the net.

    Thanks a lot

  62. QRohlf says:

    I get the message

    “Forbidden

    You don’t have permission to access /files/droidAtScreen-0.3.jar on this server.”

    while trying to download

  63. Pingback:I need an app to control my phone from my PC - Droid Forum - Verizon Droid & the Motorola Droid Forum

  64. Marc says:

    Great tool! Now if it could only accept mouse clicks from the PC to perform commands on the phone it would be perfect!

    Keep the great work!
    Marc

  65. Pingback:Droid run over by car - Droid Forum - Verizon Droid & the Motorola Droid Forum

  66. jookyone says:

    I stand corrected, it does work, please ignore the last comment.

  67. jookyone says:

    Works great, but landscape doesn’t seem to work with Froyo… it displays the image in portrait mode correctly, but kinda hard to read sideways.

    Fantastic utility, Thanks!

  68. Deema says:

    Thank u very much

    it really helped.

    ur work is perfect.

  69. Rajesh says:

    Hi Ribo,

    Its an Awesome application. really very useful. Also can you please let me know how to take screenshot only in command line. Can you please provide the utility for that?

    Thank You.

    Regards,
    Rajesh Kumar

  70. rahul says:

    Whats the minimum version of android sdk required to run this jar?

  71. Pingback:Guida: Visualizzare lo schermo degli smartphone Android su PC

  72. Excellent tool, I’ll use for getting static snapshots for the manual of my application. If it is possible to have it smoothly working with higher fps rates, so it can be used to produced screencasts, it would be fantastic.

  73. gcstang says:

    Awesome Application!!! Thank you.

  74. winnux says:

    Great job. It’s work. Waiting for the next version.

  75. Pingback:Project Real Device Screen onto Your PC « Android Software Developer

  76. Thank you for this. Much appreciated.

  77. Dave says:

    Excellent utility, just what I was looking for. Had to do a live demo yesterday, wish I had this then. Thanks!

  78. Brian says:

    Very nice, thank you! Exactly what I was looking for. I am also running at 30fps but seeing some lag when scrolling.

  79. Tab says:

    hi, can you list more details on how to use this application on pc?
    i have install the sdk and java, execute the downloaded jar and browse the path to sdk/tools/adb.exe but nothing happens still.

  80. Fabien says:

    It will be find if we can record video.
    I Increase frame rate, but it’s a bit laggy. How can it be more smooth ?

Leave a Comment

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Why ask?