<?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>Tech Haus &#187; Hacks</title>
	<atom:link href="http://techha.us/tag/hacks/feed/" rel="self" type="application/rss+xml" />
	<link>http://techha.us</link>
	<description>House of Tech</description>
	<lastBuildDate>Tue, 28 Sep 2010 14:14:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Migrating G1 Apps to SD</title>
		<link>http://techha.us/2009/06/migrating-g1-apps-to-sd/</link>
		<comments>http://techha.us/2009/06/migrating-g1-apps-to-sd/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 15:37:55 +0000</pubDate>
		<dc:creator>pezhore</dc:creator>
				<category><![CDATA[G1]]></category>
		<category><![CDATA[Hacks]]></category>

		<guid isPermaLink="false">http://techha.us/?p=33</guid>
		<description><![CDATA[After adding yet another app to my G1 I recieved my first &#8220;Low Disk Space&#8221; warning. I decided to see what options exist for moving the apps from internal storage to the SD card and found a few how-tos out there that describe the process. I ended up following the A2SD guide, with little problem. [...]]]></description>
			<content:encoded><![CDATA[<p>After adding yet another app to my G1 I recieved my first &#8220;Low Disk Space&#8221; warning. I decided to see what options exist for moving the apps from internal storage to the SD card and found a <a href="http://forums.tmonews.com/index.php?topic=7003.0"><strong>few</strong></a> <a href="http://code.google.com/p/android-roms/wiki/A2SD"><strong>how-tos</strong></a> out there that describe the process. I ended up following the <a href="http://code.google.com/p/android-roms/wiki/A2SD">A2SD</a> guide, with little problem.</p>
<p>The first step is to repartition your microSDHC card from one large Fat32 partition into two partitions: the first remains Fat32, the second is formated ext2. Since I don&#8217;t have a Linux box at work (and I was hoping to get this done over my lunch break), I fired up a VM and ran <a href="http://gparted.sourceforge.net/">GParted</a>, an open source Linux live CD that we use at work for resizing VM partitions. Using GParted, I was able to shrink the Fat32 partition from 4GB down to 3GB, and created the necessary ext2 partition from the remaining space. I should note that I used the phone as an microSDHC reader &#8211; it was on and functioning the entire time.</p>
<p>Since the Android SDK was already installed, the next step was relatively simple to complete. I fired up the command prompt on my Windows 7 box, and ran <strong><span style="font-family: Courier;">adb shell</span></strong> (this opens the shell on the phone).</p>
<p>To make sure the partition was correctly set, I ran <span style="font-family: Courier;"><strong>busybox df -h</strong></span> and verified that the ext2 partition was showing up in the mount table.</p>
<p><img class="alignnone size-full wp-image-70" title="App2SD_VerifyPartition" src="http://techha.us/wp-content/uploads/2009/06/App2SD_VerifyPartition.png" alt="App2SD_VerifyPartition" width="676" height="342" /></p>
<p>Since I only want to move the apps (not their cache) to the microSDHC card, I only had to run one command <span style="font-family: Courier;"><strong>busybox cp -a /data/app /system/sd</strong></span>. This copies all the existing app data from the phone storage over to the microSDHC card.</p>
<p>The next step didn&#8217;t appear to work for me&#8230; but for completeness sake:</p>
<p>I then booted my phone into the JF Recovery mode by shutting down my phone, then starting it up holding the <strong>Power </strong>and<strong> Home</strong> buttons. I pressed <strong>Alt-X</strong> to get to the phone&#8217;s terminal and ran the following commands:</p>
<p><span style="font-family: Courier;"><strong>mount data</strong></span><br />
<span style="font-family: Courier;"><strong>rm -rf /data/app</strong></span><br />
<span style="font-family: Courier;"><strong>ln -s /system/sd/app /data/app<br />
reboot</strong></span></p>
<p>I&#8217;m not sure what the first command does (mounts whatever device is mapped to <strong>data</strong> in the mountd.conf file I&#8217;d assume). The second command removes all apps from the phone. The next command creates a <a href="http://en.wikipedia.org/wiki/Symbolic_link">symlink</a> from the microSDHC partition to the directory Android is expecting the apps to be located. Lastly, the phone is rebooted.</p>
<p>When I did these steps, it didn&#8217;t take &#8211; the applications were still on my phone memory (as evidenced by the free space available). As I think back, I may have forgotten to mount data (but one would assume I would have gotten some errors while trying to delete the contents of /data/app. I verified the apps were still located in phone memory by once again plugging my phone in via USB and running <strong><span style="font-family: Courier;">adb shell</span></strong>. I reran the last three commands above (from <strong>rm -rf</strong> through to <strong>reboot</strong>) and everything had successfully moved off to the microSDHC card.</p>
<p>Now I&#8217;m running over 70 apps, and the phone actually appears to be responding faster.</p>
]]></content:encoded>
			<wfw:commentRss>http://techha.us/2009/06/migrating-g1-apps-to-sd/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

