<?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; Development</title>
	<atom:link href="http://droidhacks.com/tag/development/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>Assember/Disassembler for Dalvik</title>
		<link>http://droidhacks.com/2010/07/assemberdisassembler-for-dalvik/</link>
		<comments>http://droidhacks.com/2010/07/assemberdisassembler-for-dalvik/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 17:04:49 +0000</pubDate>
		<dc:creator>Lead Hacker</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[adb]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[howto]]></category>

		<guid isPermaLink="false">http://droidhacks.com/?p=150</guid>
		<description><![CDATA[I ran across a mention of an assember/disassember pair for Dalvik in an XDA Forum posting. Just had a chance to give at least the assembler a try and make sure I could get things working before I posted. Yep, working on the emulator at least. There are a few examples you can start with,]]></description>
			<content:encoded><![CDATA[<p>I ran across a mention of an <a href="http://code.google.com/p/smali/">assember/disassember pair for Dalvik</a> in an XDA Forum posting. Just had a chance to give at least the assembler a try and make sure I could get things working before I posted. Yep, working on the emulator at least. There are a few <a href="http://code.google.com/p/smali/source/browse/trunk/examples/">examples you can start with</a>, instructions for assembling and running are in the comments. And some <a href="http://code.google.com/p/smali/w/list">pages in the wiki</a> that look like they&#8217;ll provide some great starting points.</p>
]]></content:encoded>
			<wfw:commentRss>http://droidhacks.com/2010/07/assemberdisassembler-for-dalvik/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Text to Speech Using Scripting</title>
		<link>http://droidhacks.com/2010/07/text-to-speech-using-scripting/</link>
		<comments>http://droidhacks.com/2010/07/text-to-speech-using-scripting/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 23:26:41 +0000</pubDate>
		<dc:creator>Lead Hacker</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://droidhacks.com/?p=147</guid>
		<description><![CDATA[I&#8217;ve been fooling around with Scripting Layer for Android to generate some speech notifications. Two issues I ran into, figured I would share if anyone else does. The first was that the examples still use the droid.speak() call, and it should be droid.ttsSpeak() instead. Quick fix. The second however I only saw on my CM6]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been fooling around with <a href="http://code.google.com/p/android-scripting/">Scripting Layer for Android</a> to generate some speech notifications. Two issues I ran into, figured I would share if anyone else does. The first was that the examples still use the droid.speak() call, and it should be droid.ttsSpeak() instead. Quick fix. The second however I only saw on my CM6 device, which was that no speech was coming out ever after I updated the ttsSpeak() call. logcat turned up the issue quickly enough though. I just needed to go into settings from the home screen and download the data necessary to generate speech. Once you&#8217;re in the &#8220;Voice Input and Output&#8221; area the process is obvious. It&#8217;s just knowing that you need to go into settings to get speech working that&#8217;s a bit tricky.</p>
]]></content:encoded>
			<wfw:commentRss>http://droidhacks.com/2010/07/text-to-speech-using-scripting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Commodore 64 Emulation</title>
		<link>http://droidhacks.com/2010/07/commodore-64-emulation/</link>
		<comments>http://droidhacks.com/2010/07/commodore-64-emulation/#comments</comments>
		<pubDate>Sat, 24 Jul 2010 08:43:10 +0000</pubDate>
		<dc:creator>Lead Hacker</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[howto]]></category>

		<guid isPermaLink="false">http://droidhacks.com/?p=134</guid>
		<description><![CDATA[I was happy to see there&#8217;s a Commodore 64 emulator in the Marketplace for Android, the Frodo emulator. I played around with a bit, but what I really wanted to do was hack around a bit with some old school basic. This is one of the computers I grew up with, and I get nostalgic]]></description>
			<content:encoded><![CDATA[<p>I was happy to see there&#8217;s a Commodore 64 emulator in the Marketplace for Android, the Frodo emulator. I played around with a bit, but what I really wanted to do was hack around a bit with some old school basic. This is one of the computers I grew up with, and I get nostalgic for the old days every once in a while. However, I was having a really hard time figuring out how to get the version of Frodo under Android to create a new disk for me to save stuff to. If you can&#8217;t save the stuff you&#8217;re playing with what&#8217;s the use? I could save out the whole state, but I figured there had to be a better way.</p>
<p>So I downloaded a version of <a href="http://www.viceteam.org/">VICE</a> for my desktop system. That has a much richer set of controls, one of which is creating and attaching a fresh image (it&#8217;s a &#8216;file&#8217; menu item). I figured if I was lucky the image created with VICE would work to at least get me started on Frodo on my device. And lucky me, yes it does! Actually, now I can push the d64 images back and forth, use the emulator on my desktop to do a little poking around and push the file over to my device to take with me. Very nice! Just remember, save with replace is &#8216;SAVE &#8220;@0:FILENAME&#8221;,8&#8242;. Otherwise an attempt to overwrite a file will just silently fail. Ahhh, nostalgic.</p>
]]></content:encoded>
			<wfw:commentRss>http://droidhacks.com/2010/07/commodore-64-emulation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android Scripting Environment is now SL4A</title>
		<link>http://droidhacks.com/2010/07/android-scripting-environment-is-now-sl4a/</link>
		<comments>http://droidhacks.com/2010/07/android-scripting-environment-is-now-sl4a/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 08:33:22 +0000</pubDate>
		<dc:creator>Lead Hacker</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[cyanogenmod]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[lua]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://droidhacks.com/?p=101</guid>
		<description><![CDATA[I downloaded and installed the latest Android scripting package, now called Scripting Layer for Android, or SL4A. I had some issues with it under CyanogenMod5 (probably my own, but I never debugged). Today I updated to a CM6 release and it seems to be working a whole lot better. There are links to a whole]]></description>
			<content:encoded><![CDATA[<p>I downloaded and installed the latest Android scripting package, now called <a href="http://code.google.com/p/android-scripting/">Scripting Layer for Android</a>, or SL4A. I had some issues with it under CyanogenMod5 (probably my own, but I never debugged). Today I updated to a CM6 release and it seems to be working a whole lot better. There are links to a <a href="http://code.google.com/p/android-scripting/wiki/Tutorials">whole bunch of examples on the Tutorials page</a>.</p>
<p>The application interface itself is pretty simple. When it first loads up you won&#8217;t have any interpreters besides shell. If you go into the View menu, select interpreters, and then select Add from the menu under there you can add other interpreters. The interpreters generally come with example scripts, which will show up in the main list view once they&#8217;re loaded:</p>
<p><img src="http://droidhacks.com/wp-content/uploads/2010/07/wpid-screenshot_2.png" alt="" title="wpid-screenshot_2.png" width="240" height="400" /></p>
<p>There&#8217;s a preferences screen, which covers mostly visual options:</p>
<p><img src="http://droidhacks.com/wp-content/uploads/2010/07/wpid-screenshot_3.png" alt="" title="wpid-screenshot_3.png" width="240" height="400" /></p>
<p>If you long press on a script you have an option to edit it:</p>
<p><img src="http://droidhacks.com/wp-content/uploads/2010/07/wpid-screenshot_4.png" alt="" title="wpid-screenshot_4.png" width="240" height="400" /></p>
<p>The editor that comes up is just a simple but effective textbox, so at least you can edit scripts in place on the device:</p>
<p><img src="http://droidhacks.com/wp-content/uploads/2010/07/wpid-screenshot_5.png" alt="" title="wpid-screenshot_5.png" width="240" height="400" /></p>
<p>And then you can run a script, in this place displaying a toast message over the keyboard when I run the hello world program:</p>
<p><img src="http://droidhacks.com/wp-content/uploads/2010/07/wpid-screenshot_6.png" alt="" title="wpid-screenshot_6.png" width="240" height="400" /></p>
]]></content:encoded>
			<wfw:commentRss>http://droidhacks.com/2010/07/android-scripting-environment-is-now-sl4a/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gettie Awards</title>
		<link>http://droidhacks.com/2010/05/gettie-awards/</link>
		<comments>http://droidhacks.com/2010/05/gettie-awards/#comments</comments>
		<pubDate>Sat, 29 May 2010 09:22:00 +0000</pubDate>
		<dc:creator>Lead Hacker</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[cash]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[contest]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[getjar]]></category>

		<guid isPermaLink="false">http://droidhacks.com/?p=58</guid>
		<description><![CDATA[If you&#8217;ve had a hacking waiting around for the right time to be released, this might be it. The Gettie Awards is offering $15,000 to the best Android app they find. There are categories for all the major mobile platforms, and an overall prize of $25,000! If you haven&#8217;t been coding, dust off your compiler]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve had a hacking waiting around for the right time to be released, this might be it. The <a href="http://www.gettieawards.com">Gettie Awards</a> is offering $15,000 to the best Android app they find. There are categories for all the major mobile platforms, and an overall prize of $25,000! If you haven&#8217;t been coding, dust off your compiler and get cracking.</p>
]]></content:encoded>
			<wfw:commentRss>http://droidhacks.com/2010/05/gettie-awards/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android Scripting Environment</title>
		<link>http://droidhacks.com/2009/06/android-scripting-environment/</link>
		<comments>http://droidhacks.com/2009/06/android-scripting-environment/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 02:39:39 +0000</pubDate>
		<dc:creator>Lead Hacker</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[lua]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://droidhacks.com/?p=49</guid>
		<description><![CDATA[Google has recently released a scripting environment for Android that allows you to write Python, Lua, or BeanShell scripts that interface with Android functionality. From the project page: Handle intents Start activities Make phone calls Send text messages Scan bar codes Poll location and sensor data Use text-to-speech]]></description>
			<content:encoded><![CDATA[<p>Google has recently released a <a href="http://code.google.com/p/android-scripting/">scripting environment for Android</a> that allows you to write Python, Lua, or BeanShell scripts that interface with Android functionality. From the project page:</p>
<ul>
<li>Handle intents</li>
<li>Start activities</li>
<li>Make phone calls</li>
<li>Send text messages</li>
<li>Scan <a rel="nofollow" href="http://code.google.com/p/zxing/">bar codes</a></li>
<li>Poll location and sensor data</li>
<li>Use <a rel="nofollow" href="http://code.google.com/p/eyes-free/">text-to-speech</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://droidhacks.com/2009/06/android-scripting-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting WebView To Load New Pages</title>
		<link>http://droidhacks.com/2009/06/getting-webview-to-load-new-pages/</link>
		<comments>http://droidhacks.com/2009/06/getting-webview-to-load-new-pages/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 19:31:16 +0000</pubDate>
		<dc:creator>Lead Hacker</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[sdk]]></category>
		<category><![CDATA[webview]]></category>

		<guid isPermaLink="false">http://droidhacks.com/?p=47</guid>
		<description><![CDATA[There are a bunch of examples of using WebView to display HTML content loaded from the web in an Android app, including the sample from Google for the WebView class. However the ones I found generally don&#8217;t load new pages on their own. I can load up Google, but if you click on anything in]]></description>
			<content:encoded><![CDATA[<p>There are a bunch of examples of using <a href="http://developer.android.com/reference/android/webkit/WebView.html">WebView</a> to display HTML content loaded from the web in an Android app, including the <a href="http://developer.android.com/guide/tutorials/views/hello-webview.html">sample from Google for the WebView class</a>. However the ones I found generally don&#8217;t load new pages on their own. I can load up Google, but if you click on anything in the app it launches a browser and takes the user out of the app. The answer to the problem is in the additional points on that Hello, WebView page &#8211; you need to set a new WebViewClient to handle the URL load requests. Their example is very helpful, but I prefer to do the override with an anonymous inner class:</p>
<pre>public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    WebView webview = new WebView(this);
    webview.getSettings().setJavaScriptEnabled(true);
    webview.setWebViewClient(new WebViewClient() {
        @Override public boolean shouldOverrideUrlLoading(WebView view, String url) {
            view.loadUrl(url);
    	    return true;
    	}
    });
    webview.loadUrl("http://google.com");
    setContentView(webview);
}</pre>
<p>However, if you follow a link to an image it downloads instead of opens in the view. That&#8217;s the same thing the built in browser does, but wasn&#8217;t the behavior I expected. I&#8217;ll have to figure out how to handle that a bit better.</p>
]]></content:encoded>
			<wfw:commentRss>http://droidhacks.com/2009/06/getting-webview-to-load-new-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monitoring Network Traffic Using OS X</title>
		<link>http://droidhacks.com/2009/06/monitoring-network-traffic-using-os-x/</link>
		<comments>http://droidhacks.com/2009/06/monitoring-network-traffic-using-os-x/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 23:19:31 +0000</pubDate>
		<dc:creator>Lead Hacker</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[wifi]]></category>
		<category><![CDATA[wireshark]]></category>

		<guid isPermaLink="false">http://droidhacks.com/?p=45</guid>
		<description><![CDATA[Here&#8217;s a tip for monitoring network traffic from your Android phone using OS X. The same thing works for iPhone (or any other mobile device you can configure to use a wifi connection). I frequently use it to see how some bit of client/server interaction is done. Install Wireshark Follow the instructions in the readme]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a tip for monitoring network traffic from your Android phone using OS X. The same thing works for iPhone (or any other mobile device you can configure to use a wifi connection). I frequently use it to see how some bit of client/server interaction is done.</p>
<ul>
<li>Install <a href="http://www.wireshark.org/">Wireshark</a></li>
<li>Follow the instructions in the readme to also install the ChmodBPF script</li>
<li>Under Sharing area of the OS X settings app configure your system to use an ethernet connection and share it out to wifi clients</li>
<li>Now configure your device to connect to the wifi network provided by your system, test to make sure it works</li>
<li>Startup Wireshark and set it to capture traffic (wifi is en1 on MacBook Pro systems, what I normally use)</li>
</ul>
<p>And that&#8217;s it, you should now get quite readable dumps of what applications are doing to communicate. Lots of interesting things you can learn digging into how folks structure their client/server interaction.</p>
]]></content:encoded>
			<wfw:commentRss>http://droidhacks.com/2009/06/monitoring-network-traffic-using-os-x/feed/</wfw:commentRss>
		<slash:comments>1</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>
	</channel>
</rss>
