Sunday, December 12, 2010

Taking screenshots without rooting the phone

If you need to send one screenshoot of the application you are developing, you have two possible ways:

  • Root your phone and use one application from market
  • Use ddms SDK tool

Using ddms tool is very easy (you must have installed the SDK version corresponding to your phone):

  1. Plug in your phone in PC and select PC Mode (HTC Sync in my device)
  2. Exec ddms tool. You can find it in the tools directory of your Android SDK installation.
  3. In ddms tool select your phone and in "Device" menu select "Capture Screen"

Now, you should have it.

But if you are using Ubuntu as OS, perhaps you may need to grant access to the phone by adding a new UDEV rule:

  1. Open a console terminal
  2. You have to find out the Vendor ID of your device. Type sudo lsusb -v and search in the output the entry corresponding to your phone. Also, you can find it in this web:
  3. Create a file for the new UDEV rule: sudo vi /etc/udev/rules.d/90-android.rules
  4. In new file add the next line (0bb4 is my Vendor ID): SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
  5. Restart the UDEV service sudo service udev restart
  6. Unplug and plug the phone again

Enjoy it.

No comments:

Post a Comment