<?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; G1</title>
	<atom:link href="http://techha.us/category/g1/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>Android VPN &#8211; VPNC</title>
		<link>http://techha.us/2009/06/android-vpn-vpnc/</link>
		<comments>http://techha.us/2009/06/android-vpn-vpnc/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 16:18:29 +0000</pubDate>
		<dc:creator>pezhore</dc:creator>
				<category><![CDATA[G1]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[VPN]]></category>

		<guid isPermaLink="false">http://techha.us/?p=83</guid>
		<description><![CDATA[I work in the IT department and we&#8217;re just rolling out Cisco VPN (with dongles) to replace our older ISA VPN. Seeing as my G1 is the first &#8220;smart&#8221; phone I&#8217;ve ever owned, I thought I&#8217;d get it setup to VPN in to work (So I could use the Android App Remote RDP). Unfortuantely it [...]]]></description>
			<content:encoded><![CDATA[<p>I work in the IT department and we&#8217;re just rolling out Cisco VPN (with dongles) to replace our older ISA VPN. Seeing as my G1 is the first &#8220;smart&#8221; phone I&#8217;ve ever owned, I thought I&#8217;d get it setup to VPN in to work (So I could use the Android App <a href="http://www.cyrket.com/package/org.toremote.serversmanager">Remote RDP</a>). Unfortuantely it didn&#8217;t appear to be a simple app available to accomplish this feat. About two weeks ago, I stumbled upon <a href="http://ubergeeky.com/blog/110-connect-to-cisco-vpn-from-android">this page</a> which described how to configure vpn for Android. Using those directions (with help from the xda developer&#8217;s forum <a href="http://forum.xda-developers.com/showpost.php?p=3814574&amp;postcount=27">here</a>) I was able to get VPN&#8217;ed into work, and RDP&#8217;ed to my workstation. Here&#8217;s what I did.</p>
<h3>Requirements</h3>
<ul>
<li>A rooted G1 with the tun module available (I used <a href="http://jf.andblogs.net/2009/05/24/jfv151-images-are-out/">JF 1.51</a>)</li>
<li>JF&#8217;s Terminal Emulator (included with JF 1.51)</li>
<li>Remote RDP</li>
<li>Linux knowledge (optional)</li>
</ul>
<h3>Setup</h3>
<ol>
<li>Download the Get-a-Robot VPNC bz2 file from <a href="http://code.google.com/p/get-a-robot-vpnc/downloads/list">google code</a></li>
<li>Extract the archive (if on Linux you can use bunzip2, in Windows 7-zip works well) to a known folder. I extracted to c:\android-vpn\
<ul>
<li> Note: I did the bulk of this on Windows, but if you&#8217;re smart you can translate this to Linux</li>
</ul>
</li>
<li>Open <strong>vpnc.conf</strong> located in <strong>./data/data/org.codeandroid.vpnc/etc/vpnc/</strong></li>
<li>Edit the file with information from your Cisco .pcf file. Below is the mapping of variables for <span style="color: #993300;">vpnc.conf</span> to <strong>YourFile.pcf</strong>.
<ul>
<li><span style="color: #993300;">IPSec gateway</span> = <strong>Host</strong></li>
<li><span style="color: #993300;">IPSec ID</span> =<strong>GroupName</strong></li>
<li><span style="color: #993300;">IPSec secret</span> = <strong>GroupPwd</strong> (or if GroupPwd is blank, you&#8217;ll have to decrypt the <strong>enc_GroupPwd</strong> variable as shown below)</li>
<li><span style="color: #993300;">Xauth username</span> = Your login username</li>
<li><span style="color: #993300;">Xauth password</span><span style="color: #000000;"> </span>= Nothing. Leave this blank to have VPNC prompt you for your password every time.</li>
</ul>
<p>My vpnc.conf file (sanitized and with the wrong username):</p>
<p style="text-align: center;"><img class="alignnone size-full wp-image-87" title="vpnc_config" src="http://techha.us/wp-content/uploads/2009/06/vpnc_config.PNG" alt="vpnc_config" width="397" height="156" /></p>
</li>
<li>Edit the <strong>vpnc-script</strong> and change the first line from <span style="color: #3366ff;"><em>#!/system/bin/bash</em></span> to <span style="color: #3366ff;"><em>#!/system/bin/sh</em></span></li>
<li>Open a command prompt and push the files using <strong>adb push x:\path\to\data /</strong>, copying the edited script and config file to the root of your G1.<strong><img class="aligncenter size-full wp-image-90" title="vpnc_push" src="http://techha.us/wp-content/uploads/2009/06/vpnc_push.PNG" alt="vpnc_push" width="677" height="274" /></strong></li>
<li>Mount the microSDHC card and create a new folder in its root called vpnc.</li>
<li>Create two files: <strong>go</strong> and <strong>prep<br />
</strong>go should contain this one line:<br />
<em><span style="color: #c0c0c0;"><code>/data/data/org.codeandroid.vpnc/bin/vpnc /data/data/org.codeandroid.vpnc/etc/vpnc/vpnc.conf --script /data/data/org.codeandroid.vpnc/etc/vpnc/vpnc-script --pid-file /data/data/org.codeandroid.vpnc/etc/vpnc/vpnc-pid --no-detach --debug 1</code></span></em><strong> </strong></p>
<p><strong> </strong>prep contains a few lines:<br />
<em><span style="color: #c0c0c0;"><code>modprobe tun<br />
lsmod<br />
mkdir /dev/net<br />
ln -s /dev/tun /dev/net/tun</code></span></em></li>
<li>Unmount the microSDHC card and then fire up terminal emulator &#8211; we need to chmod a few files to make things work.<br />
<em><span style="color: #c0c0c0;"><code>chmod 777 /data/data/org.codeandroid.vpnc/bin/vpnc<br />
chmod 777 /data/data/org.codeandroid.vpnc/etc/vpnc/vpnc-script</code></span></em></li>
</ol>
<h3>Starting the VPN</h3>
<ol>
<li>In Terminal Emulator type <strong>su</strong> to get root access (Approve if it prompts you to grant permission)</li>
<li>As root (designated by the &#8220;#&#8221; prompt) run <strong>cd /sdrom/vpnc</strong></li>
<li>Run <strong>sh prep</strong> (Note: this is only required once each time you reboot your phone)</li>
<li>To start the VPN, run <strong>sh go</strong>. It will prompt your for your password, then attempt to connect:<br />

<div class="ngg-galleryoverview" id="ngg-gallery-2-83">

	<!-- Slideshow link -->
	<div class="slideshowlink">
		<a class="slideshowlink" href="http://techha.us/2009/06/android-vpn-vpnc/?show=slide">
			[Show as slideshow]		</a>
	</div>

	<!-- Piclense link -->
	<div class="piclenselink">
		<a class="piclenselink" href="javascript:PicLensLite.start({feedUrl:'http://techha.us/wp-content/plugins/nextgen-gallery/xml/media-rss.php?gid=2&amp;mode=gallery'});">
			[View with PicLens]		</a>
	</div>
	
	<!-- Thumbnails -->
		
	<div id="ngg-image-12" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://techha.us/wp-content/gallery/vpnc/vpnc_prep.png" title=" " class="shutterset_set_2" >
								<img title="vpnc_prep" alt="vpnc_prep" src="http://techha.us/wp-content/gallery/vpnc/thumbs/thumbs_vpnc_prep.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-11" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://techha.us/wp-content/gallery/vpnc/vpnc_login.png" title=" " class="shutterset_set_2" >
								<img title="vpnc_login" alt="vpnc_login" src="http://techha.us/wp-content/gallery/vpnc/thumbs/thumbs_vpnc_login.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-14" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://techha.us/wp-content/gallery/vpnc/vpnc_setup.png" title=" " class="shutterset_set_2" >
								<img title="vpnc_setup" alt="vpnc_setup" src="http://techha.us/wp-content/gallery/vpnc/thumbs/thumbs_vpnc_setup.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-10" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://techha.us/wp-content/gallery/vpnc/vpnc_connected.png" title=" " class="shutterset_set_2" >
								<img title="vpnc_connected" alt="vpnc_connected" src="http://techha.us/wp-content/gallery/vpnc/thumbs/thumbs_vpnc_connected.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>

</li>
<li>You can then click the back button to leave the vpn connection running and fire up Remote<br />
<img class="aligncenter size-full wp-image-99" title="vpnc_remote" src="http://techha.us/wp-content/uploads/2009/06/vpnc_remote.png" alt="vpnc_remote" width="480" height="320" /></li>
<li>To close the VPN, reopen Terminal Emulator, and if it&#8217;s still up and running, send the interrupt (ctrl-c) by clicking and holding the mouse ball, then pressing &#8216;c&#8217;</li>
<li>If the vpn is not still running, you can find the process ID number by running <strong>ps</strong> and looking for <strong>/data/data/org/codeandroid.vpnc/bin/vpnc</strong>.<br />
<img class="aligncenter size-full wp-image-109" title="vpnc_kill" src="http://techha.us/wp-content/uploads/2009/06/vpnc_kill1.png" alt="vpnc_kill" width="480" height="320" /></li>
<li>Kill the process by running <strong>kill -9 [pid]</strong>, (in our example <strong>kill -9 1896</strong>)</li>
</ol>
<h3>Final Thoughts</h3>
<p>Although this isn&#8217;t ideal for an extended VPN connection, if combinded with tethering (something I&#8217;m working on next), it could become quite powerful. For quick checks, this works quite well.</p>
<p>Sources:<br />
<a href="http://forum.xda-developers.com/showpost.php?p=3814574&amp;postcount=27">xda-developer&#8217;s forum</a><br />
<a href="http://ubergeeky.com/blog/110-connect-to-cisco-vpn-from-android">Uber Geeky post</a><br />
<a href="http://code.google.com/p/get-a-robot-vpnc/">Get-A-Robot-VPNC Google Code Page</a></p>
]]></content:encoded>
			<wfw:commentRss>http://techha.us/2009/06/android-vpn-vpnc/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<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>

