<?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; script</title>
	<atom:link href="http://www.ryebrye.com/blog/tag/script/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ryebrye.com/blog</link>
	<description>Android, Flex, family, and random topics</description>
	<lastBuildDate>Wed, 08 Sep 2010 04:07:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</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>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"><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>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>
	</channel>
</rss>
