<?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>Droid Hacks &#187; root</title>
	<atom:link href="http://droidhacks.com/tag/root/feed/" rel="self" type="application/rss+xml" />
	<link>http://droidhacks.com</link>
	<description>Tips and Tricks for Android Users</description>
	<lastBuildDate>Fri, 27 Aug 2010 18:44:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>On Device Packet Capture</title>
		<link>http://droidhacks.com/2010/08/on-device-packet-capture/</link>
		<comments>http://droidhacks.com/2010/08/on-device-packet-capture/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 15:36:55 +0000</pubDate>
		<dc:creator>Lead Hacker</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[wireshark]]></category>

		<guid isPermaLink="false">http://droidhacks.com/?p=153</guid>
		<description><![CDATA[When I need to capture network traffic from my device I normally capture traffic at a router to see what&#8217;s going on. I had seen some mentions of running tcpdump on device and pulling off the pcap file to a desktop to inspect, but Androshark was what people mentioned the most. And it didn&#8217;t seem]]></description>
			<content:encoded><![CDATA[<p>When I need to capture network traffic from my device I normally <a href="http://droidhacks.com/2009/06/monitoring-network-traffic-using-os-x/">capture traffic at a router</a> to see what&#8217;s going on. I had seen some mentions of running tcpdump on device and pulling off the pcap file to a desktop to inspect, but Androshark was what people mentioned the most. And it didn&#8217;t seem to be actively developed any more. I ran across <a href="http://forum.xda-developers.com/showthread.php?t=725692">Shark for Root and Sharkreader</a> recently however. It&#8217;s an app for packet capture and a simple packet capture viewer directly on the device. Works out pretty well. Requires root access, and it seems to be working quite well on my Nexus One with CM6. Screenshots below.</p>
<p>Start/stop capture, writes to the sdcard by default:</p>
<p><img style="display:block;margin-right:auto;margin-left:auto;" alt="image" src="http://droidhacks.com/wp-content/uploads/2010/08/wpid-screenshot_12.png" width="240" height="400"/></p>
<p>View packet dump stream:</p>
<p><img style="display:block;margin-right:auto;margin-left:auto;" alt="image" src="http://droidhacks.com/wp-content/uploads/2010/08/wpid-screenshot_14.png" width="240" height="400"/></p>
<p>View contents of an individual packet:</p>
<p><img style="display:block;margin-right:auto;margin-left:auto;" alt="image" src="http://droidhacks.com/wp-content/uploads/2010/08/wpid-screenshot_15.png" width="240" height="400"/></p>
]]></content:encoded>
			<wfw:commentRss>http://droidhacks.com/2010/08/on-device-packet-capture/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Screenshot on a Rooted Device</title>
		<link>http://droidhacks.com/2010/07/screenshot-on-a-rooted-device/</link>
		<comments>http://droidhacks.com/2010/07/screenshot-on-a-rooted-device/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 17:34:40 +0000</pubDate>
		<dc:creator>Lead Hacker</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[screenshot]]></category>

		<guid isPermaLink="false">http://droidhacks.com/?p=86</guid>
		<description><![CDATA[In addition to capturing a screenshot with a computer using the Android SDK there&#8217;s also a screenshot application (available on the market, called simple &#8216;screenshot&#8217;, I&#8217;m not sure how to find out the package name to create a market link for it. It only works on rooted devices, but all of mine are. One nice]]></description>
			<content:encoded><![CDATA[<p>In addition to <a href="http://www.mobilecrunch.com/2008/10/31/how-to-capture-the-screen-of-an-android-device/">capturing a screenshot with a computer using the Android SDK</a> there&#8217;s also a screenshot application (available on the market, called simple &#8216;screenshot&#8217;, I&#8217;m not sure how to find out the package name to create a market link for it</a>. It only works on rooted devices, but all of mine are. One nice feature is the &#8220;shake to capture a screenshot&#8221; option. So that instead of having to keep hopping into the screenshot app to setup a shot, back to the app, wait, hop back to setup another time delayed shot, back to the app, etc. Just setup screenshot to capture when you shake and go through whatever set of screens you want.<a href="http://droidhacks.com/2010/07/screenshot-on-a-rooted-device/screenshot/" rel="attachment wp-att-88"><img src="http://droidhacks.com/wp-content/uploads/2010/07/screenshot.png" alt="" title="Screenshot App" width="240" height="400" class="aligncenter size-full wp-image-88" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://droidhacks.com/2010/07/screenshot-on-a-rooted-device/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Unlock and Root a Nexus One</title>
		<link>http://droidhacks.com/2010/07/how-to-unlock-and-root-a-nexus-one/</link>
		<comments>http://droidhacks.com/2010/07/how-to-unlock-and-root-a-nexus-one/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 07:44:17 +0000</pubDate>
		<dc:creator>Lead Hacker</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[adb]]></category>
		<category><![CDATA[cyanogenmod]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[root]]></category>

		<guid isPermaLink="false">http://droidhacks.com/?p=64</guid>
		<description><![CDATA[I have a Nexus One that I&#8217;ve been fooling around with. It normally doesn&#8217;t have a SIM in it, I&#8217;m just using it to fool around with. So I&#8217;ve muddled my way through installing Froyo on it manually and taking it through a few updates. Generally I&#8217;ve been brute forcing my way through the processes]]></description>
			<content:encoded><![CDATA[<p>I have a Nexus One that I&#8217;ve been fooling around with. It normally doesn&#8217;t have a SIM in it, I&#8217;m just using it to fool around with. So I&#8217;ve muddled my way through installing Froyo on it manually and taking it through a few updates. Generally I&#8217;ve been brute forcing my way through the processes based on following forum posting after forum posting.</p>
<p>Finally tonight I took some time to actually search around some and try to find &#8220;the right info&#8221; to get a rooted version of a custom firmware onto the device. The <a href="http://wiki.cyanogenmod.com/index.php/Main_Page">wiki area of the Cyanogenmod site</a> is definitely the right place to go. They have some &#8220;Full Update Guides&#8221; linked from the front page which walk through step by step the different processes you need to go through, including a <a href+'http://wiki.cyanogenmod.com/index.php/Full_Update_Guide_-_Nexus_One_Firmware_to_CyanogenMod">process for installing a Cyanogenmod firmware starting from a stock Nexus One</a>. Exactly what I was looking for. It walks you through all the complementary processes too, like unlocking the bootloader and installing a recovery image.</p>
<p>I went with the stable Cyanogenmod release, so I&#8217;m slightly downgraded in terms of the Google release this bases off of. But there&#8217;s a bunch of capabilities in the new recovery image as well as root access to weigh that against&#8230; and right now root access is definitely winning.</p>
]]></content:encoded>
			<wfw:commentRss>http://droidhacks.com/2010/07/how-to-unlock-and-root-a-nexus-one/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compiling C Code for Android Using OS X</title>
		<link>http://droidhacks.com/2009/05/compiling-c-code-for-android-using-os-x/</link>
		<comments>http://droidhacks.com/2009/05/compiling-c-code-for-android-using-os-x/#comments</comments>
		<pubDate>Wed, 27 May 2009 17:40:09 +0000</pubDate>
		<dc:creator>Lead Hacker</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[adb]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[native]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://droidhacks.com/?p=24</guid>
		<description><![CDATA[I wanted to try out compiling some native C code for use on my device, but I wanted to do it using my OS X machine. I found this post about using the prebuilt toolchain over at Android Tricks, but figured I would write up some additional details for those who might also be looking.]]></description>
			<content:encoded><![CDATA[<p>I wanted to try out compiling some native C code for use on my device, but I wanted to do it using my OS X machine. I found <a href="http://android-tricks.blogspot.com/2009/02/hello-world-c-program-on-using-android.html">this post about using the prebuilt toolchain over at Android Tricks</a>, but figured I would write up some additional details for those who might also be looking.</p>
<ol>
<li>Follow the <a href="http://source.android.com/download">instructions to download and build Android from source</a>. Follow the whole thing (I had to create a case-sensitive disk image and all), including the actual build step. Otherwise you won&#8217;t have the libraries necessary and agcc will error out when you try to run it.</li>
<li>Add the prebuilt/darwin-x86/toolchain/arm-eabi-4.2.1/bin subdirectory of where ever you built the source to your PATH, add it to your .bash_profile if you want.</li>
<li>Download the <a href="http://plausible.org/andy/agcc">agcc wrapper script</a>, put it somewhere in your path, and make it executable.</li>
</ol>
<p>Now you should be ready to compile a program and download it to your phone. This was my test app:</p>
<pre>#include &lt;stdio.h&gt;

int main( int argc, char **argv ) {
  printf("Hello from Droid Hacks!\n");
  return 0;
}</pre>
<p>And you should be able to compile it with &#8220;agcc hello.c -o hello&#8221; and end up with a hello executable:</p>
<pre>~ &gt; agcc hello.c -o hello
~ &gt; file hello
hello: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
~ &gt;</pre>
<p>And you can move the file across to the phone and run it. You&#8217;ll have to make a directory to push it into. The sdcard is marked as noexec, so you can&#8217;t run stuff from there. And the data directory has more restrictive permissions. So you&#8217;ll have to su and create a directory on the data partition, and relax the perms on that directory:</p>
<pre>~ &gt; adb shell
$ su
# mkdir /data/droidtest
# chmod 777 /data/droidtest
# exit
$ exit
~ &gt; adb push hello /data/droidtest
418 KB/s (6747 bytes in 0.015s)
~ &gt; adb shell
$ cd /data/droidtest
$ ls -l
-rwxrwxrwx shell    shell        6747 2009-05-27 08:56 hello
$ ./hello
Hello from Droid Hacks!
$</pre>
<p>And of course you can run the same thing from the terminal on your device as well:<img class="aligncenter size-full wp-image-26" title="terminal_c_app_rotated" src="http://droidhacks.com/wp-content/uploads/2009/05/terminal_c_app_rotated.png" alt="terminal_c_app_rotated" width="480" height="320" /></p>
]]></content:encoded>
			<wfw:commentRss>http://droidhacks.com/2009/05/compiling-c-code-for-android-using-os-x/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Root Access Terminal Under Cupcake</title>
		<link>http://droidhacks.com/2009/05/root-access-terminal-under-cupcake/</link>
		<comments>http://droidhacks.com/2009/05/root-access-terminal-under-cupcake/#comments</comments>
		<pubDate>Tue, 26 May 2009 20:03:03 +0000</pubDate>
		<dc:creator>Lead Hacker</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[adb]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://droidhacks.com/?p=18</guid>
		<description><![CDATA[I imaged my development phone with the Android 1.5 images from HTC. I was able to su to root when I connected to the phone using &#8220;adb shell&#8221;, but wasn&#8217;t able to get root when using the terminal app on the phone itself. There&#8217;s nothing that keeps you from setting up a mechanism to get]]></description>
			<content:encoded><![CDATA[<p>I imaged my development phone with the <a href="http://www.htc.com/www/support/android/adp.html">Android 1.5 images from HTC</a>. I was able to su to root when I connected to the phone using &#8220;adb shell&#8221;, but wasn&#8217;t able to get root when using the terminal app on the phone itself. There&#8217;s nothing that keeps you from setting up a mechanism to get root from the handset though. Just do this from an adb shell session after you su to root:</p>
<ul>
<li>mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system</li>
<li>cd /system/bin</li>
<li>cat sh &gt; usu</li>
<li>chmod 4755 usu</li>
</ul>
<p>Some of the instructions I found online suggested just calling the new binary su, but I was concerned about that overriding the default su depending on what path is getting used. So I just created a whole name &#8220;user su&#8221; which won&#8217;t reject the handset user when I try to change to root:</p>
<p style="text-align: center;"><img class="size-full wp-image-20 aligncenter" title="terminal_root_rotated" src="http://droidhacks.com/wp-content/uploads/2009/05/terminal_root_rotated.png" alt="terminal_root_rotated" width="480" height="320" /></p>
]]></content:encoded>
			<wfw:commentRss>http://droidhacks.com/2009/05/root-access-terminal-under-cupcake/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
