<?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; Android</title>
	<atom:link href="http://www.ryebrye.com/blog/tag/android/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>Script to automatically check for T-mobile G1 cupcake OTA update URL</title>
		<link>http://www.ryebrye.com/blog/2009/05/21/script-to-automatically-check-for-t-mobile-g1-cupcake-ota-update-url/</link>
		<comments>http://www.ryebrye.com/blog/2009/05/21/script-to-automatically-check-for-t-mobile-g1-cupcake-ota-update-url/#comments</comments>
		<pubDate>Fri, 22 May 2009 05:28:57 +0000</pubDate>
		<dc:creator>RyeBrye</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[G1 hacking]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[update checker]]></category>

		<guid isPermaLink="false">http://www.ryebrye.com/blog/?p=753</guid>
		<description><![CDATA[T-mobile USA is rolling out the latest update progressively. The update will &#8220;come when it comes&#8221; and on some phones that will be as late as June. This game is one we have come accustomed to playing, and one that is annoying each time we have to play it. The phones download the update from [...]]]></description>
			<content:encoded><![CDATA[<p>T-mobile USA is rolling out the latest update progressively. The update will &#8220;come when it comes&#8221; and on some phones that will be as late as June.</p>
<p>This game is one we have come accustomed to playing, and one that is annoying each time we have to play it. The phones download the update from a URL on a google server, and once we know that URL, we can download the update manually and apply it from the SD Card  - or pass it off to the modding community to build a new and better version of it.</p>
<p>There are two parameters passed into the update service that are unique to each device, the IMEI and the device serial number. With the help of a few other people (most notably, Saurik for doing the legwork last update go-round and getting the initial work done)</p>
<p>Here&#8217;s the<a href="http://ryebrye.com/files/ota-check.sh">T-mobile USA OTA update polling script</a></p>
<p>To use it, download it and run it like this:<br />
<code><br />
sh ota-check.sh -sn YOUR_SN_HERE -imei YOUR_IMEI_HERE -sleep NUMBER_OF_SECONDS_TO_SLEEP<br />
</code></p>
<p>If you already got the update, it would be particularly interesting for you to try to run this script with your SN and IMEI. In theory, you should get the URL again &#8211; although this hasn&#8217;t been the case in the past for some reason (maybe once you checkin on the new version they disable you getting the update again? who knows why and how they work their craziness)</p>
<p>You can get your IMEI from your phone:</p>
<ul>
<li>&#8220;About the Phone&#8221; in the settings menus.</li>
</ul>
<p>You can get your SN from the phone terminal:</p>
<ul>
<li><code>getprop | grep serial</code> (in the terminal emulator or from adb shell)</li>
<li><code>adb devices</code> (I think this shows the SN of the phone, please verify)</li>
</ul>
<p>If you get a URL, please post it in the comments. I&#8217;ll see to it gets passed on quickly.<br />
<script type="text/javascript"><!--
amazon_ad_tag = "rye-20"; amazon_ad_width = "600"; amazon_ad_height = "520";//--></script><br />
<script type="text/javascript" src="http://www.assoc-amazon.com/s/ads.js"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ryebrye.com/blog/2009/05/21/script-to-automatically-check-for-t-mobile-g1-cupcake-ota-update-url/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Replacing the splash screen on a T-mobile G1 / Dev phone</title>
		<link>http://www.ryebrye.com/blog/2008/12/08/replacing-the-splash-screen-on-a-t-mobile-g1-dev-phone/</link>
		<comments>http://www.ryebrye.com/blog/2008/12/08/replacing-the-splash-screen-on-a-t-mobile-g1-dev-phone/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 08:07:11 +0000</pubDate>
		<dc:creator>RyeBrye</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[G1 hacking]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[bootscreen]]></category>
		<category><![CDATA[fastboot]]></category>
		<category><![CDATA[G1]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.ryebrye.com/blog/?p=670</guid>
		<description><![CDATA[Before you can do this, you need to have a T-mobile G1 that you have obtained root access to, and you need to replace your bootloader with an unlocked G1 bootloader that has fastboot enabled. There are instructions on how to do this manually, but I wanted a script because I am lazy and I [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-8511898113229885";
/* 336x280, created 9/7/10 */
google_ad_slot = "6793012534";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
Before you can do this, you need to have a T-mobile G1 that you have obtained root access to, and you need to replace your bootloader with an <a href="http://www.gotontheinter.net/node/7">unlocked G1 bootloader that has fastboot enabled</a>. There are instructions on <a href="http://www.gotontheinter.net/node/9">how to do this manually</a>, but I wanted a script because I am lazy and I wanted to make this process as quick as possible.</p>
<p>So, once that is in place, you can flash an image like this one:</p>
<div id="attachment_671" class="wp-caption alignnone" style="width: 210px"><a href="http://images.ryebrye.com.s3.amazonaws.com/2008/12/android_boot_image_black2.png" rel="shadowbox[post-670];player=img;"><img class="size-medium wp-image-671" title="Android boot screen - black background" src="http://images.ryebrye.com.s3.amazonaws.com/2008/12/android_boot_image_black2-200x300.png" alt="Android boot screen" width="200" height="300" /></a><p class="wp-caption-text">My custom Android boot screen (click to DL)</p></div>
<p><script type="text/javascript"><!--
google_ad_client = "pub-8511898113229885";
/* 468x60, created 9/7/10 */
google_ad_slot = "7819600270";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>You can then download and use this <a href="http://ryebrye.com/files/splashimage.sh">bash script to flash your G1 boot screen</a> &#8211; which requires the following things be in your path:</p>
<ol>
<li>convert (command line for Image Magick)</li>
<li>rgb2565 tool (part of android open source build)</li>
<li>fastboot  (also part of open source build)</li>
</ol>
<p>Here is the contents of the bash script:<br />
<span id="more-670"></span><br />
<code><br />
#!/bin/bash<br />
#<br />
# Author: RyeBrye (Ryan Gardner)<br />
# http://ryebrye.com/blog/<br />
# License: Quad-license: GPL / LGPL / BSD / Apache. Pick whichever one you want! <img src='http://www.ryebrye.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /><br />
#<br />
# Special thanks to Disconnect and bgupta for their work towards this, and Google / Brian Swetland for<br />
# making such a cool tool as fastboot <img src='http://www.ryebrye.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
#<br />
# This script converts an input image into a rgb565 file that you will flash to your phone. You should<br />
# boot your phone into fastboot mode and run this. (power off phone, then hold down the back<br />
# button and the power button to load into the bootloader. on a hacked G1, you should see the<br />
# skateboarding android image and the text "FASTBOOT" on the phone)<br />
#<br />
#<br />
# Tested input files that work: PNG, or BMP (others will probably work as well)<br />
#<br />
# This script is for the T-Mobile G1 that has a fastboot bootloader flashed onto it,<br />
# or a Dev Phone.<br />
#<br />
# Requires: Image Magick to be installed and in your path (so the convert command works)<br />
# Requires: rbg2565 to be installed and in your path (built as part of the android source build)<br />
# Requires: fastboot to be installed and in your path (build at part of the android source build)<br />
#<br />
# useage: ./splashimage.sh inputimage.png<br />
# results: will flash your splash image, and reboot your phone so you can see your handiwork! <img src='http://www.ryebrye.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
#<br />
#<br />
#<br />
echo "Converting input image to rgb888 raw (saving in temp directory)"</p>
<p># perhaps some kind of dithering could be put here to make it not have gradient banding<br />
# on some images? someone with more knowledge of imagemagick will have to do this <img src='http://www.ryebrye.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
convert -depth 8 $1 rgb:/tmp/splash.raw</p>
<p>#convert image<br />
echo "Converting input image to rgb565 (saving in temp directoy)"<br />
rgb2565 < /tmp/splash.raw > /tmp/splash.raw565</p>
<p>#checking size<br />
eval $(stat -s /tmp/splash.raw565)<br />
if [ "$st_size" == "307200" ]; then<br />
	echo "Flashing splash image to phone..."<br />
	fastboot flash splash1 /tmp/splash.raw565<br />
	echo "Rebooting phone..."<br />
	fastboot reboot<br />
	echo "Cleaning up temp files..."<br />
	rm /tmp/splash.raw<br />
	rm /tmp/splash.raw565<br />
else<br />
	echo "File was not the expected size. Make sure you are using an 8-bit 320x480 PNG as the original source."<br />
fi<br />
</code></p>
<p>Suggested improvements are welcome. I&#8217;m open to hosting the script on the wiki to allow for easy changes to it by interested people. Right now it&#8217;s pretty basic, but it works.<br />
<script language="Javascript1.1" type="text/javascript"></p>
<p><!--
amazon_prw_id = "V20070822/US/rye-20/8100/a8dfeb5a-bbe3-4771-ad16-972b65b266f1"; amazon_prw_width = "468"; amazon_prw_height = "60";//--></script><br />
<iframe src="http://rcm.amazon.com/e/cm?t=rye-20&#038;o=1&#038;p=16&#038;l=st1&#038;mode=books&#038;search=android%20programming&#038;fc1=000000&#038;lt1=&#038;lc1=3366FF&#038;bg1=FFFFFF&#038;f=ifr" marginwidth="0" marginheight="0" width="468" height="336" border="0" frameborder="0" style="border:none;" scrolling="no"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ryebrye.com/blog/2008/12/08/replacing-the-splash-screen-on-a-t-mobile-g1-dev-phone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>
	</channel>
</rss>

