<?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; bash</title>
	<atom:link href="http://www.ryebrye.com/blog/tag/bash/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>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>
