<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>mgBlog &#187; adb</title>
	<atom:link href="http://mgsimon.de/tag/adb/feed/" rel="self" type="application/rss+xml" />
	<link>http://mgsimon.de</link>
	<description>Esc(ape), einfach ein anderes Blog über technische Spielerei ...</description>
	<lastBuildDate>Fri, 16 Jul 2010 04:55:04 +0000</lastBuildDate>
	<language>de</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Motorola Milestone und Dalvik Debug Monitor</title>
		<link>http://mgsimon.de/2009/12/23/motorola-milestone-und-dalvik-debug-monitor/</link>
		<comments>http://mgsimon.de/2009/12/23/motorola-milestone-und-dalvik-debug-monitor/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 11:10:51 +0000</pubDate>
		<dc:creator>mg</dc:creator>
				<category><![CDATA[Linux & Unix]]></category>
		<category><![CDATA[uup]]></category>
		<category><![CDATA[adb]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[ddms]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://mgsimon.de/?p=1898</guid>
		<description><![CDATA[Das erste Beispiel oder die erste Android Anwendung ist fertig und kann einfach im virtuellem Ger&#228;t &#8220;Android Virtual Device&#8221; gestartet werden. Aber wie sieht es mit einem echten Ger&#228;t aus? Man k&#246;nnte die Anwendung als .apk (Android Application Package) exportieren und auf das Device kopieren, installieren und starten oder einfach &#252;ber die Android Debug Bridge [...]]]></description>
			<content:encoded><![CDATA[<p>Das erste Beispiel oder die erste Android Anwendung ist fertig und kann einfach im virtuellem Ger&#228;t &#8220;Android Virtual Device&#8221; gestartet werden. </p>
<p>Aber wie sieht es mit einem echten Ger&#228;t aus? </p>
<p>Man k&#246;nnte die Anwendung als .apk (Android Application Package) exportieren und auf das Device kopieren, installieren und starten oder einfach &#252;ber die Android Debug Bridge direkt aus Eclipse heraus Anwendungen nicht nur starten sondern auch gleich debuggen.</p>
<div id="attachment_1911" class="wp-caption alignnone" style="width: 452px"><img src="http://mgsimon.de/wp-content/uploads/2009/12/DalvikDebugMonitorMotorolaMilestone.png" alt="Dalvik Debug Monitor :: Motorola Milestone" title="DalvikDebugMonitorMotorolaMilestone" width="442" height="251" class="size-full wp-image-1911 stamp" /><p class="wp-caption-text">Dalvik Debug Monitor :: Motorola Milestone</p></div>
<p>Android SDK, Eclipse und ein echtes Device, das <a href="http://www.motorola.com/Consumers/DE-DE/Consumer-Products-and-Services/Mobile-Phones/ci.Motorola-MILESTONE-DE-DE.alt">Milestone von Motorola</a> &#8230;</p>
<p><span id="more-1898"></span><div style="background-color: rgb(191, 228, 255); border:1px solid rgb(128, 201, 255); color: rgb(0, 0, 0); margin:0 0 1.5em; overflow:auto; padding: 3px;">
<img src="/wp-content/plugins/MyShortCodes/info.png" alt="Hinweis" title="Hinweis" width="24" height="24" style="margin: 4px 8px 0 0; float:left;"/>Das folgende Beispiel wurde unter Ubuntu Karmic Koala 9.10 und einer Entwicklungsumgebung f&#252;r Android durchgef&#252;hrt. Die Einrichtung einer Entwicklungsumgebung f&#252;r Android unter Linux ist im Artikel <a href="http://mgsimon.de/2009/12/19/hello-world-android-unter-linux/">Hello World Android unter Linux</a> beschrieben.</div></p>
<p><strong>Motorola Milestone</strong></p>
<p>Auf dem Android Device USB-Debugging aktivieren.</p>
<ul>
<li>Unter &#8220;Einstellungen / Anwendungen / Entwicklung&#8221; USB-Debugging aktivieren.</li>
</ul>
<p><strong>Linux</strong></p>
<p>In der Shell die Ger&#228;te ID ermitteln.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ lsusb</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Bus 001 Device 004: ID 22b8:41db Motorola PCS</pre></div></div>

<p>udev-Regel f&#252;r das Ger&#228;t erstellen.</p>
<ul>
<li>Folgende Zeile in einer udev-Regel Konfiguration eintragen.</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">SUBSYSTEM==&quot;usb&quot;, SYSFS{idVendor}==&quot;22b8&quot;, MODE=&quot;0666&quot;</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> gedit <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>udev<span style="color: #000000; font-weight: bold;">/</span>rules.d<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">51</span>-android.rules</pre></div></div>

<ul>
<li>Lesende Zugriffsberechtigung auf die neue Regeldatei setzen.</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> a+r <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>udev<span style="color: #000000; font-weight: bold;">/</span>rules.d<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">51</span>-android.rules</pre></div></div>

<ul>
<li>Die Debug Bridge (adb) sollte &#252;ber folgenden Aufruf das Ger&#228;t auflisten.</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #000000; font-weight: bold;">&lt;</span>sdk<span style="color: #000000; font-weight: bold;">&gt;/</span>tools<span style="color: #000000; font-weight: bold;">/</span>adb devices</pre></div></div>

<p><strong>Dalvik Debug Monitor</strong></p>
<p>Erster Test mit dem Dalvik Debug Monitor (ddms).</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #000000; font-weight: bold;">&lt;</span>sdk<span style="color: #000000; font-weight: bold;">&gt;/</span>tools<span style="color: #000000; font-weight: bold;">/</span>ddms</pre></div></div>

<div style="background-color: rgb(191, 255, 191); border:1px solid rgb(128, 255, 128); color: rgb(0, 0, 0); margin:0 0 1.5em; overflow:auto; padding: 3px;">
<img src="/wp-content/plugins/MyShortCodes/tip.png" alt="Tipp" title="Tipp" width="24" height="24" style="margin: 4px 8px 0 0; float:left;" />Wird das Device nicht erkannt hilft ein Neustart der Android Debug Bridge. ($ &lt;sdk&gt;/adb kill-server)</div>
<p>Funktioniert die Debug Bridge k&#246;nnen Screenshots &#252;ber &#8220;Device / Screen capture&#8230;&#8221; erstellt werden.</p>
<div id="attachment_1913" class="wp-caption alignnone" style="width: 452px"><img src="http://mgsimon.de/wp-content/uploads/2009/12/MotorolaMilestoneStartBildschirm.png" alt="Motorola Milestone :: Startbildschirm" title="MotorolaMilestoneStartBildschirm" width="442" height="786" class="size-full wp-image-1913 stamp" /><p class="wp-caption-text">Motorola Milestone :: Startbildschirm</p></div>
<p>Was f&#252;r eine Aufl&#246;sung! :-)</p>
<p><strong>Eclipse</strong></p>
<p>In Eclipse die Anwendung auf dem externen Ger&#228;t zum debuggen starten.</p>
<ul>
<li>Anwendung in der Konfiguationsdatei AndroidManifest.xml unter &#8220;Application&#8221; &#8220;debugable&#8221; auf &#8220;true&#8221; setzen.</li>
<li>Kontextmen&#252; auf das Projekt und &#8220;Debug As / 1 Android Application&#8221; ausw&#228;hlen.</li>
</ul>
<div id="attachment_1921" class="wp-caption alignnone" style="width: 452px"><img src="http://mgsimon.de/wp-content/uploads/2009/12/EclipseDebugHelloWorldMotorolaMilstone.png" alt="Eclipse Debug - HelloWorld :: Motorola Milstone" title="EclipseDebugHelloWorldMotorolaMilstone" width="442" height="251" class="size-full wp-image-1921 stamp" /><p class="wp-caption-text">Eclipse Debug - HelloWorld :: Motorola Milstone</p></div>
<p><strong>Fertig</strong></p>
<p>Jetzt fehlt nur noch eine Idee f&#252;r eine sch&#246;ne Anwendung, aber vielleicht habe ich ja schon die eine oder andere &#8230; :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://mgsimon.de/2009/12/23/motorola-milestone-und-dalvik-debug-monitor/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
