特殊:Badtitle/NS100:AndroidScreenshots:修订间差异
小 创建新页面为 '{{From|https://help.ubuntu.com/community/AndroidScreenshots}} {{Languages|UbuntuHelp:AndroidScreenshots}} == Taking Android phones screenshots from Ubuntu == '''Note:''' this gu...' |
小无编辑摘要 |
||
第2行: | 第2行: | ||
{{Languages|UbuntuHelp:AndroidScreenshots}} | {{Languages|UbuntuHelp:AndroidScreenshots}} | ||
== Taking Android phones screenshots from Ubuntu == | == Taking Android phones screenshots from Ubuntu == | ||
'''Note:''' this guide has been tested with Ubuntu 9.04 | '''Note:''' this guide has been tested with Ubuntu 9.04 and 9.10. If you have information for other versions, please add it. | ||
There is no functionality to take screen captures from your Android phone as part of the default setup. You will need a separate computer running the Davik Debug Monitor (DDMS). This guide explains how to install the required software and prepare Ubuntu to take screenshots of your phone. | There is no functionality to take screen captures from your Android phone as part of the default setup. You will need a separate computer running the Davik Debug Monitor (DDMS). This guide explains how to install the required software and prepare Ubuntu to take screenshots of your phone. | ||
=== Installing the Android SDK === | === Installing the Android SDK === | ||
'''IMPORTANT''': Other guides mention installing Eclipse and Android development plugins, however this is '''not necessary''' if you only want to get screenshots from your device (as opposed to actually develop an application for it). | '''IMPORTANT''': Other guides mention installing Eclipse and Android development plugins, however this is '''not necessary''' if you only want to get screenshots from your device (as opposed to actually develop an application for it). | ||
# Download the [[http://guide.opendns.com/track/click.php?q=android+SDK&curl=http%3A%2F%2Fcode.google.com%2Fandroid%2Fdownload.html&search_grp=MAINRESULTS&search_pos=1|Android SDK]] for Linux. The current version as of this writing is ''Android 1.5 SDK, Release 2''. You should have a file named <code><nowiki>android-sdk-linux_x86-1.5_r2.zip</nowiki></code> or similar | |||
# Uncompress the file by right-clicking on the archive file and clicking <code><nowiki>Extract Here</nowiki></code>, or use <code><nowiki>unzip android-sdk-linux_x86-1.5_r2.zip</nowiki></code> from command line. | |||
=== Setting up UDEV rules to grant access to your phone. === | === Setting up UDEV rules to grant access to your phone. === | ||
# Ubuntu won't allow the DDMS access to the Android phone via USB unless the appropriate udev rule is set. This is [[https://bugs.launchpad.net/ubuntu/+source/hal/+bug/316215|Bug #316215]]. In order to provide such rule, you need to create a rule file as root. From <code><nowiki>Applications > Accessories > Terminal</nowiki></code>: | |||
<pre><nowiki> | |||
gksudo gedit /etc/udev/rules.d/90-android.rules</nowiki></pre> | gksudo gedit /etc/udev/rules.d/90-android.rules</nowiki></pre> | ||
# Once the text editor comes up, insert the following in that file: | |||
<pre><nowiki> | |||
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"</nowiki></pre> | SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"</nowiki></pre> | ||
# Save the file and run the following command: | |||
<pre><nowiki> | |||
gksudo service udev restart | |||
The above permission effectively grant access to your phone to any other users on the same system. This isn't a problem unless the system you connect your phone to has other users. See [https://bugs.launchpad.net/ubuntu/+source/hal/+bug/316215 Bug #316215] for more details. | </nowiki></pre> | ||
# Exit the terminal. | |||
If your phone is already connected, you will need to unplug it and plug it again for this to apply. | |||
The above permission effectively grant access to your phone to any other users on the same system. This isn't a problem unless the system you connect your phone to has other users. See [[https://bugs.launchpad.net/ubuntu/+source/hal/+bug/316215|Bug #316215]] for more details. | |||
=== Enabling USB debugging mode on your phone === | === Enabling USB debugging mode on your phone === | ||
# Go to the '''Settings''' application, then <code><nowiki>Applications > Development</nowiki></code>. | |||
# Mark the <code><nowiki>USB Debugging</nowiki></code> checkbox: | |||
{{https://help.ubuntu.com/community/AndroidScreenshots?action=AttachFile&do=get&target=device-usb.png%7D%7D | |||
https://help.ubuntu.com/community/AndroidScreenshots?action=AttachFile&do=get&target=device-usb.png | |||
=== Connecting the phone via USB === | === Connecting the phone via USB === | ||
# Connect your phone via USB, without mounting the SD card as mass storage. Only the original cable will work. | |||
Your notification area should look like this: | Your notification area should look like this: | ||
https://help.ubuntu.com/community/AndroidScreenshots?action=AttachFile&do=get&target=device-usb2.png | {{https://help.ubuntu.com/community/AndroidScreenshots?action=AttachFile&do=get&target=device-usb2.png%7D%7D | ||
=== Starting DDMS for the first time, taking screenshots === | === Starting DDMS for the first time, taking screenshots === | ||
# Navigate to the directory where you extracted the Android SDK, locate the <code><nowiki>tools</nowiki></code> directory | |||
# Double-click on <code><nowiki>ddms</nowiki></code>. | |||
# You'll be asked if you want to share usage information: <<BR>>{{https://help.ubuntu.com/community/AndroidScreenshots?action=AttachFile&do=get&target=Screenshot-Android SDK .png}} | |||
# After answering to the data-gathering question, DDMS should start and show your device on the left pane:<<BR>> {{https://help.ubuntu.com/community/AndroidScreenshots?action=AttachFile&do=get&target=ddms.png%7D%7D | |||
Once DDMS has been installed and your device is visible within it, you can click on it and then go to <code><nowiki>Device > Screen Capture</nowiki></code> or simply press Ctrl-S and the capture dialog will show your current phone display, allowing to <code><nowiki>Refresh</nowiki></code>, <code><nowiki>Save</nowiki></code> or quit by clicking <code><nowiki>Done</nowiki></code>: | Once DDMS has been installed and your device is visible within it, you can click on it and then go to <code><nowiki>Device > Screen Capture</nowiki></code> or simply press Ctrl-S and the capture dialog will show your current phone display, allowing to <code><nowiki>Refresh</nowiki></code>, <code><nowiki>Save</nowiki></code> or quit by clicking <code><nowiki>Done</nowiki></code>: | ||
https://help.ubuntu.com/community/AndroidScreenshots?action=AttachFile&do=get&target=ddms-screencap.png | {{https://help.ubuntu.com/community/AndroidScreenshots?action=AttachFile&do=get&target=ddms-screencap.png%7D%7D | ||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2010年5月19日 (三) 16:44的版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/AndroidScreenshots }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/af | • {{#if: UbuntuHelp:AndroidScreenshots|Afrikaans| [[::AndroidScreenshots/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/ar | • {{#if: UbuntuHelp:AndroidScreenshots|العربية| [[::AndroidScreenshots/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/az | • {{#if: UbuntuHelp:AndroidScreenshots|azərbaycanca| [[::AndroidScreenshots/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/bcc | • {{#if: UbuntuHelp:AndroidScreenshots|جهلسری بلوچی| [[::AndroidScreenshots/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/bg | • {{#if: UbuntuHelp:AndroidScreenshots|български| [[::AndroidScreenshots/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/br | • {{#if: UbuntuHelp:AndroidScreenshots|brezhoneg| [[::AndroidScreenshots/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/ca | • {{#if: UbuntuHelp:AndroidScreenshots|català| [[::AndroidScreenshots/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/cs | • {{#if: UbuntuHelp:AndroidScreenshots|čeština| [[::AndroidScreenshots/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/de | • {{#if: UbuntuHelp:AndroidScreenshots|Deutsch| [[::AndroidScreenshots/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/el | • {{#if: UbuntuHelp:AndroidScreenshots|Ελληνικά| [[::AndroidScreenshots/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/es | • {{#if: UbuntuHelp:AndroidScreenshots|español| [[::AndroidScreenshots/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/fa | • {{#if: UbuntuHelp:AndroidScreenshots|فارسی| [[::AndroidScreenshots/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/fi | • {{#if: UbuntuHelp:AndroidScreenshots|suomi| [[::AndroidScreenshots/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/fr | • {{#if: UbuntuHelp:AndroidScreenshots|français| [[::AndroidScreenshots/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/gu | • {{#if: UbuntuHelp:AndroidScreenshots|ગુજરાતી| [[::AndroidScreenshots/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/he | • {{#if: UbuntuHelp:AndroidScreenshots|עברית| [[::AndroidScreenshots/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/hu | • {{#if: UbuntuHelp:AndroidScreenshots|magyar| [[::AndroidScreenshots/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/id | • {{#if: UbuntuHelp:AndroidScreenshots|Bahasa Indonesia| [[::AndroidScreenshots/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/it | • {{#if: UbuntuHelp:AndroidScreenshots|italiano| [[::AndroidScreenshots/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/ja | • {{#if: UbuntuHelp:AndroidScreenshots|日本語| [[::AndroidScreenshots/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/ko | • {{#if: UbuntuHelp:AndroidScreenshots|한국어| [[::AndroidScreenshots/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/ksh | • {{#if: UbuntuHelp:AndroidScreenshots|Ripoarisch| [[::AndroidScreenshots/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/mr | • {{#if: UbuntuHelp:AndroidScreenshots|मराठी| [[::AndroidScreenshots/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/ms | • {{#if: UbuntuHelp:AndroidScreenshots|Bahasa Melayu| [[::AndroidScreenshots/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/nl | • {{#if: UbuntuHelp:AndroidScreenshots|Nederlands| [[::AndroidScreenshots/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/no | • {{#if: UbuntuHelp:AndroidScreenshots|norsk| [[::AndroidScreenshots/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/oc | • {{#if: UbuntuHelp:AndroidScreenshots|occitan| [[::AndroidScreenshots/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/pl | • {{#if: UbuntuHelp:AndroidScreenshots|polski| [[::AndroidScreenshots/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/pt | • {{#if: UbuntuHelp:AndroidScreenshots|português| [[::AndroidScreenshots/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/ro | • {{#if: UbuntuHelp:AndroidScreenshots|română| [[::AndroidScreenshots/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/ru | • {{#if: UbuntuHelp:AndroidScreenshots|русский| [[::AndroidScreenshots/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/si | • {{#if: UbuntuHelp:AndroidScreenshots|සිංහල| [[::AndroidScreenshots/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/sq | • {{#if: UbuntuHelp:AndroidScreenshots|shqip| [[::AndroidScreenshots/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/sr | • {{#if: UbuntuHelp:AndroidScreenshots|српски / srpski| [[::AndroidScreenshots/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/sv | • {{#if: UbuntuHelp:AndroidScreenshots|svenska| [[::AndroidScreenshots/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/th | • {{#if: UbuntuHelp:AndroidScreenshots|ไทย| [[::AndroidScreenshots/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/tr | • {{#if: UbuntuHelp:AndroidScreenshots|Türkçe| [[::AndroidScreenshots/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/vi | • {{#if: UbuntuHelp:AndroidScreenshots|Tiếng Việt| [[::AndroidScreenshots/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/yue | • {{#if: UbuntuHelp:AndroidScreenshots|粵語| [[::AndroidScreenshots/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/zh | • {{#if: UbuntuHelp:AndroidScreenshots|中文| [[::AndroidScreenshots/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/zh-hans | • {{#if: UbuntuHelp:AndroidScreenshots|中文(简体)| [[::AndroidScreenshots/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AndroidScreenshots | UbuntuHelp:AndroidScreenshots | {{#if: | :}}AndroidScreenshots}}/zh-hant | • {{#if: UbuntuHelp:AndroidScreenshots|中文(繁體)| [[::AndroidScreenshots/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:AndroidScreenshots|:AndroidScreenshots|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :AndroidScreenshots/zh | | {{#ifexist: AndroidScreenshots/zh | | {{#ifeq: {{#titleparts:AndroidScreenshots|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:AndroidScreenshots|1|-1|}} | zh | | }}
Taking Android phones screenshots from Ubuntu
Note: this guide has been tested with Ubuntu 9.04 and 9.10. If you have information for other versions, please add it. There is no functionality to take screen captures from your Android phone as part of the default setup. You will need a separate computer running the Davik Debug Monitor (DDMS). This guide explains how to install the required software and prepare Ubuntu to take screenshots of your phone.
Installing the Android SDK
IMPORTANT: Other guides mention installing Eclipse and Android development plugins, however this is not necessary if you only want to get screenshots from your device (as opposed to actually develop an application for it).
- Download the [SDK] for Linux. The current version as of this writing is Android 1.5 SDK, Release 2. You should have a file named
android-sdk-linux_x86-1.5_r2.zip
or similar - Uncompress the file by right-clicking on the archive file and clicking
Extract Here
, or useunzip android-sdk-linux_x86-1.5_r2.zip
from command line.
Setting up UDEV rules to grant access to your phone.
- Ubuntu won't allow the DDMS access to the Android phone via USB unless the appropriate udev rule is set. This is [#316215]. In order to provide such rule, you need to create a rule file as root. From
Applications > Accessories > Terminal
:
gksudo gedit /etc/udev/rules.d/90-android.rules
- Once the text editor comes up, insert the following in that file:
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
- Save the file and run the following command:
gksudo service udev restart
- Exit the terminal.
If your phone is already connected, you will need to unplug it and plug it again for this to apply. The above permission effectively grant access to your phone to any other users on the same system. This isn't a problem unless the system you connect your phone to has other users. See [#316215] for more details.
Enabling USB debugging mode on your phone
- Go to the Settings application, then
Applications > Development
. - Mark the
USB Debugging
checkbox:
Connecting the phone via USB
- Connect your phone via USB, without mounting the SD card as mass storage. Only the original cable will work.
Your notification area should look like this: {{https://help.ubuntu.com/community/AndroidScreenshots?action=AttachFile&do=get&target=device-usb2.png%7D%7D
Starting DDMS for the first time, taking screenshots
- Navigate to the directory where you extracted the Android SDK, locate the
tools
directory - Double-click on
ddms
. - You'll be asked if you want to share usage information: <
>模板:Https://help.ubuntu.com/community/AndroidScreenshots?action=AttachFile&do=get&target=Screenshot-Android SDK .png - After answering to the data-gathering question, DDMS should start and show your device on the left pane:<
> {{https://help.ubuntu.com/community/AndroidScreenshots?action=AttachFile&do=get&target=ddms.png%7D%7D
Once DDMS has been installed and your device is visible within it, you can click on it and then go to Device > Screen Capture
or simply press Ctrl-S and the capture dialog will show your current phone display, allowing to Refresh
, Save
or quit by clicking Done
:
{{https://help.ubuntu.com/community/AndroidScreenshots?action=AttachFile&do=get&target=ddms-screencap.png%7D%7D