<?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>The official website of RyeBrye. Sometimes known as Ryan Gardner. &#187; multitouch</title>
	<atom:link href="http://www.ryebrye.com/blog/tag/multitouch/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ryebrye.com/blog</link>
	<description>Android, Flex, family, and random topics</description>
	<lastBuildDate>Tue, 29 Mar 2011 04:36:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>G1 Multitouch Proof of Concept: Source code posted</title>
		<link>http://www.ryebrye.com/blog/2008/11/30/g1-multitouch-proof-of-concept-soure-code-posted/</link>
		<comments>http://www.ryebrye.com/blog/2008/11/30/g1-multitouch-proof-of-concept-soure-code-posted/#comments</comments>
		<pubDate>Sun, 30 Nov 2008 07:18:24 +0000</pubDate>
		<dc:creator>RyeBrye</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[G1 hacking]]></category>
		<category><![CDATA[G1]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[multitouch]]></category>
		<category><![CDATA[source code]]></category>

		<guid isPermaLink="false">http://www.ryebrye.com/blog/?p=649</guid>
		<description><![CDATA[The ugly, thrown-together-hack that is the G1 multi-touch proof of concept now has the source code available. The instructions for working / playing with this are: Instructions: If you want to build your own kernel with the char device for multitouch enabled: Apply the patch to the synaptics touchscreen driver file. Build a new kernel [...]]]></description>
			<content:encoded><![CDATA[<p>The ugly, thrown-together-hack that is the G1 multi-touch proof of concept <a href="http://ryebrye.com/files/multitouch_archive.zip">now has the source code available</a>.<br />
<span id="more-649"></span><br />
The instructions for working / playing with this are:</p>
<h2>Instructions:</h2>
<p>If you want to build your own kernel with the char device for multitouch enabled:</p>
<ol>
<li>Apply the patch to the synaptics touchscreen driver file.</li>
<li>Build a new kernel with that modified version in it.</li>
<li>Build a new boot.img using that kernel</li>
<li>Flash the kernel on the G1 with the new boot.img</li>
</ol>
<p>If you don&#8217;t want to build your own kernel:</p>
<ul>
<li>Just copy the boot.img over to your sdcard and then:<br />
<code>flash_image boot /sdcard/boot.img </code></li>
</ul>
<ol start="5">
<li>Reboot the phone</li>
</ol>
<p>Once the phone reboots, you need to create the device node for it to be able to read it.</p>
<p>It&#8217;s easiest to do this from your machine:<br />
<code>adb shell busybox mknod /dev/tsout c 249 0</code></p>
<p>To test if this works, <code>cat /dev/tsout </code> on the device while you are touching the screen.</p>
<p>Next, build and install the multipoc app from your eclipse build, and install it.</p>
<p>The proof-of-concept app is EXTREMELY rough. If you make significant improvements to things, let me know and I&#8217;ll update the files here.</p>
<p>The multitouch proof-of-concept java is based heavily on Google&#8217;s fingerpaint program.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ryebrye.com/blog/2008/11/30/g1-multitouch-proof-of-concept-soure-code-posted/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>G1 Multitouch Proof-of-Concept Video</title>
		<link>http://www.ryebrye.com/blog/2008/11/22/g1-multitouch-proof-of-concept-video/</link>
		<comments>http://www.ryebrye.com/blog/2008/11/22/g1-multitouch-proof-of-concept-video/#comments</comments>
		<pubDate>Sat, 22 Nov 2008 18:57:15 +0000</pubDate>
		<dc:creator>RyeBrye</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[G1 hacking]]></category>
		<category><![CDATA[G1]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[multitouch]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.ryebrye.com/blog/?p=642</guid>
		<description><![CDATA[Last night, I hacked together a quick proof-of-concept video to show those who aren&#8217;t inclined to read the debug logs the multitouch capabilities of the G1. Rather than go the proper route, where the multiple finger events would get pushed up from the touchscreen driver and into the java layer where the android applications live [...]]]></description>
			<content:encoded><![CDATA[<p>Last night, I hacked together a quick proof-of-concept video to show those who aren&#8217;t inclined to read the debug logs the multitouch capabilities of the G1.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/pSBYqmWVqeM&amp;hl=en&amp;fs=1" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/pSBYqmWVqeM&amp;hl=en&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object><br />
<span id="more-642"></span><br />
Rather than go the proper route, where the multiple finger events would get pushed up from the touchscreen driver and into the java layer where the android applications live and play &#8211; another #android member (ionstorm, who also prompted me to look into multitouch in the first place) &#8211; suggested just reading the touchscreen event data from a file in the java layer as a quick way to skip over the hard work and demonstrate the possibility to people visually.</p>
<p>I will clean up and post all the necessary source code and instructions for someone to do this on their own phone so that more people can start playing with this later. For now, the brief rundown is that I modified the Synaptics touchscreen driver to have it create a character device at /dev/tsout that it dumps the touchscreen events to. I made /dev/tsout readable by the java layer, and then modified a fingerpaint example program that Google has posted to draw the circles. I have a thread in there that constantly polls that file, and when it sees data there it fires off an update event to the UI thread which scales the x and y position from the coordinate space of the touchscreen driver into the coordinate space of the android canvas and then draws a small circle there. I have it using a different color for the two fingers to make it easier to see.</p>
<p>The performance of this kind of polling is not that great. There are a few quirks to the multitouch aspect of the G1 &#8211; but the most important thing that I see is that even though it might not be a perfect multitouch screen capable of detecting millions of discrete touches &#8211; just being able to track 2 fingers should give me the only thing I really want&#8230; which is the ability to one day pinch to zoom in on the browser and get rid of those silly magnifying glasses.</p>
<p><strong>Shameless plug</strong> Hey &#8211; if you want to hook a brother up, buy stuff from amazon and use this search box <img src='http://www.ryebrye.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<script src="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&amp;MarketPlace=US&amp;ID=V20070822/US/rye-20/8002/23d5ed52-dbcf-4cab-8309-d549d8a17fcb" type="text/javascript"><!--</p>
<p>// --></script></p>
<p><noscript>&lt;a href=&#8221;http://ws.amazon.com/widgets/q?ServiceVersion=20070822&amp;amp;MarketPlace=US&amp;amp;ID=V20070822%2FUS%2Frye-20%2F8002%2F23d5ed52-dbcf-4cab-8309-d549d8a17fcb&amp;amp;Operation=NoScript&#8221; mce_href=&#8221;http://ws.amazon.com/widgets/q?ServiceVersion=20070822&amp;amp;MarketPlace=US&amp;amp;ID=V20070822%2FUS%2Frye-20%2F8002%2F23d5ed52-dbcf-4cab-8309-d549d8a17fcb&amp;amp;Operation=NoScript&#8221;&gt;Amazon.com Widgets&lt;/a&gt;</noscript></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ryebrye.com/blog/2008/11/22/g1-multitouch-proof-of-concept-video/feed/</wfw:commentRss>
		<slash:comments>60</slash:comments>
		</item>
		<item>
		<title>Proving the G1 screen can handle multi-touch</title>
		<link>http://www.ryebrye.com/blog/2008/11/17/proving-the-g1-screen-can-handle-multi-touch/</link>
		<comments>http://www.ryebrye.com/blog/2008/11/17/proving-the-g1-screen-can-handle-multi-touch/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 07:04:53 +0000</pubDate>
		<dc:creator>RyeBrye</dc:creator>
				<category><![CDATA[G1 hacking]]></category>
		<category><![CDATA[G1]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[multitouch]]></category>

		<guid isPermaLink="false">http://www.ryebrye.com/blog/?p=609</guid>
		<description><![CDATA[Nov 22nd Update: I posted a video of a proof-of-concept implementation of multitouch on the g1 in a post today. The contents of this post are still valid &#8211; but it is easier to see proof in the implementation video for some people than it is to read log files. So there has been a [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p><strong>Nov 22nd Update:</strong> I posted a video of a proof-of-concept implementation of <a href="http://www.ryebrye.com/blog/2008/11/22/g1-multitouch-proof-of-concept-video/" target="_self">multitouch on the g1</a> in a post today. The contents of this post are still valid &#8211; but it is easier to see proof in the implementation video for some people than it is to read log files.</p></blockquote>
<p>So there has been a lot of speculation about if the G1 screen can handle multitouch or not. Most of the people claiming it can handle it have posted links to some crazy videos showing it doing some kind of thing inside of android &#8211; but that approach doesn&#8217;t hold much weight with me. If the driver doesn&#8217;t have multitouch, then obviously nothing in the OS can make use of multitouch&#8230;</p>
<p>I&#8217;d long since dismissed the possibility of the G1 having multitouch until ionstorm in #android posted some links confirming the <a href="http://www.cellfanatic.com/2008/10/02/t-mobile-g1-touchscreen-powered-by-synaptics">G1 uses a synaptics touch screen</a> and that synaptics <a href="http://www.synaptics.com/solutions/technology/gestures/egr">likes to brag about the multi-touch on their screens</a>.</p>
<p>Then unix_infidel pointed out that there was some stuff in the synaptics driver that was commented out&#8230; which &#8211; was true. (the file is located in drivers/input/touchscreen/synaptics_i2c_rmi.c of the msm kernel source &#8211; you can see <a href="http://android.git.kernel.org/?p=kernel/msm.git;a=summary">the git info for the msm kernel online</a>)</p>
<p>By uncommenting a bunch of lines in the synaptics touchscreen driver, and recompiling my kernel and replacing my boot.img &#8211; I was able to enable the debug logging of the touch input that tracks 2 fingers.</p>
<p>The following code is what is printing out the debug info that the linked log snippets show:</p>
<p><code> printk("x %4d, y %4d, z %3d, w %2d, F %d, 2nd: x %4d, y %4d, z %3d, w %2d, F %d, dx %4d, dy %4d\n",<br />
x, y, z, w, finger,<br />
x2, y2, z2, w2, finger2,<br />
dx, dy);<br />
</code></p>
<p>Here&#8217;s some of the debugging output:<br />
<a href="http://pastebin.ca/1258949">One finger swirling around</a><br />
<a href="http://pastebin.ca/1258952">One finger held constant, the other finger swirled around</a><br />
<a href="http://pastebin.ca/1258956">2 Fingers flicking left, then right</a><br />
<a href="http://pastebin.ca/1258957">2 fingers rotating counter-clockwise</a> (kind of&#8230; that motion is rather hard to do)<br />
<a href="http://pastebin.ca/1258962">2 fingers (separate hands)  &#8211; one finger moving up, while the other moves down</a><br />
<a href="http://pastebin.com/m3d671b69">2 fingers &#8211; one held constant and varying pressure &#8211; another finger tapping at various points on the screen and also varying pressure</a></p>
<p>So&#8230; Here is the conclusion:<br />
<strong>The G1 screen can definitely track 2 fingers</strong>. Why Android does not make use of this is an exercise for the reader to answer. (Patents is the most obvious answer. But I&#8217;m sure more interesting conspiracy theories can be concocted)</p>
<p><strong>UPDATE:</strong> in #android &#8211; morrildl &#8211; who works for google but probably doesn&#8217;t officially speak in any capacity for Google brought up a few interesting points with regard to this:</p>
<ul>
<li>HTC has specified that the G1 will have a single-touch screen. (This is significant, because their spec is for single touch for the G1, this means that they could in the future source touchscreens that are not multi-touch capable &#8211; so just because a certain run of G1s <em>might </em>have a multitouch capable screen, they have the liberty to swap out parts [and they may already have G1s out in the field that don't have a multi-touch capable screen])</li>
<li>The other issue is with how the driver reports the width of the touch. It appears that the &#8220;w&#8221; element is the same on both of the fingers (altough this might just be a quirk in the driver code that was commented out &#8211; since it does seem to be based on pressure and putting fingers on opposite corners and pressing lightly still shows a 1 for &#8220;w&#8221; &#8211; but placing 2 fingers close together and pressing hard will show a 15 for &#8220;w&#8221; &#8211; so I&#8217;m not entirely convinced of this)</li>
</ul>
<p>It sounds like the road to multitouch on the G1 could now be a little more complicated. I&#8217;m not sure if HTC could ever revise the specs of the G1 without changing the model name&#8230; so even if the hardware is identical they might have to have a G1m or something? (who knows).<br />
<script type="text/javascript"><!--
amazon_ad_tag = "rye-20"; amazon_ad_width = "728"; amazon_ad_height = "90";
// --></script><br />
<script src="http://www.assoc-amazon.com/s/ads.js" type="text/javascript"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ryebrye.com/blog/2008/11/17/proving-the-g1-screen-can-handle-multi-touch/feed/</wfw:commentRss>
		<slash:comments>39</slash:comments>
		</item>
	</channel>
</rss>

