<?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; terminal</title>
	<atom:link href="http://droidhacks.com/tag/terminal/feed/" rel="self" type="application/rss+xml" />
	<link>http://droidhacks.com</link>
	<description>Tips and Tricks for Android Users</description>
	<lastBuildDate>Tue, 06 Dec 2011 03:20:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Essential Android Apps for Geeks</title>
		<link>http://droidhacks.com/2010/08/essential-android-apps-for-geeks/</link>
		<comments>http://droidhacks.com/2010/08/essential-android-apps-for-geeks/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 07:57:19 +0000</pubDate>
		<dc:creator>Lead Hacker</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[market]]></category>
		<category><![CDATA[recommendation]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://droidhacks.com/?p=172</guid>
		<description><![CDATA[A few essential apps for those more technically minded Android users out there. If you know of others that should be in here let me know in the comments. Terminal This one is almost a no-brainer. Everyone who knows Android is Linux underneath (and who knows Linux) normally heads for a command line to check&#8230;]]></description>
			<content:encoded><![CDATA[<p>A few essential apps for those more technically minded Android users out there. If you know of others that should be in here let me know in the comments.</p>
<p><strong>Terminal</strong></p>
<p>This one is almost a no-brainer. Everyone who knows Android is Linux underneath (and who knows Linux) normally heads for a command line to check things out right off the bat. You can get access via ADB, but having direct access right on the device is killer. This app gives you access to the command shell built into the device.</p>
<p>Market link: <a href="market://details?id=jackpal.androidterm">Android Terminal Emulator</a></p>
<p><img src="http://chart.apis.google.com/chart?cht=qr&#038;chs=300x300&#038;chl=market%3A%2F%2Fdetails%3Fid%3Djackpal.androidterm" /></p>
<p><strong>ConnectBot</strong></p>
<p>ConnectBot is an SSH client application for your phone. It&#8217;s a fantastic application for quick access to remote systems. If you&#8217;re on a device without a physical keyboard it&#8217;s not quite as slick to use (I wouldn&#8217;t recommend trying to use vi on a remote system from a Samsung Galaxy for instance), but for quick tasks it can be fantastically convenient.</p>
<p>Market link: <a href="market://details?id=org.connectbot">ConnectBot</a></p>
<p><img src="http://chart.apis.google.com/chart?cht=qr&#038;chs=300x300&#038;chl=market%3A%2F%2Fdetails%3Fid%3Dorg.connectbot" /></p>
<p><strong>Advanced Task Killer</strong></p>
<p>This seems to be a pretty consistent tool in most advanced user&#8217;s toolboxes. Android apps can keep running in the background. Most of the ones that do give you good ways to control when they run, and the OS itself does a generally good job of managing them. But if you tend to poke around with lots of apps and try out all the different tools you hear about you&#8217;re bound to run across one or two that misbehave every once in a while. When you do, Advanced Task Killer can help you figure out what&#8217;s going on and set things right again.</p>
<p>Market link: <a href="market://details?id=com.rechild.advancedtaskkiller">Advanced Task Killer</a></p>
<p><img src="http://chart.apis.google.com/chart?cht=qr&#038;chs=300x300&#038;chl=market%3A%2F%2Fdetails%3Fid%3Dcom.rechild.advancedtaskkiller" /></p>
<p><strong>Astro File Manager</strong></p>
<p>This is the free version of a file manager application. There&#8217;s a paid version that includes a ton of additional features, but so far I&#8217;ve stuck with the free version. Nice interface for browsing around and seeing what files are on your device. Includes built in viewers that generally handle text and image files well.</p>
<p>Market link: <a href="market://details?id=com.metago.astro">Astro File Manager</a></p>
<p><img src="http://chart.apis.google.com/chart?cht=qr&#038;chs=300x300&#038;chl=market%3A%2F%2Fdetails%3Fid%3Dcom.metago.astro" /></p>
<p><strong>Dropbox</strong></p>
<p>Dropbox is a free service that lets you store files online and sync them between systems. If you don&#8217;t already have an account and want to try it out please <a href="http://www.dropbox.com/referrals/NTI4NDU4NTY5">sign up using this affiliate link</a> (I get credit for the signup and get some free space on Dropbox if you do). They have an Android application that allows viewing, downloading, or uploading. Together with an application like Astro you can upload arbitrary files from your phone to Dropbox as well. From within Dropbox use upload from the menu, and then select any file and use Astro to complete the action.</p>
<p>Market link: <a href="market://details?id=com.dropbox.android">Dropbox</a></p>
<p><img src="http://chart.apis.google.com/chart?cht=qr&#038;chs=300x300&#038;chl=market%3A%2F%2Fdetails%3Fid%3Dcom.dropbox.android" /></p>
<p><strong>Scripting Layer for Android</strong></p>
<p>An app that allows for accessing native Android functions from multiple scripting languages. Once you install SL4A you can use it to pull down interpreters. A bunch are available, like Unix shell, Python, Perl, Ruby, and others. Then you can run scripts in those languages that tie into Android specific functions. SL4A is not available in the Marketplace however, so use the info on the <a href="http://code.google.com/p/android-scripting/">Google Project page</a> to download the apk directly. If you&#8217;re on an AT&#038;T device like the Samsung Captivate and haven&#8217;t hacked it to allow direct third party installs you&#8217;ll have to load the apk files using ADB. As of right now, it seems you need to download the core SL4A app and then separate downloader shims for the different interpreters. The base sl4a seems to only have shell installed by default. But once you install something like python_for_android_r1.apk and click install within that app you&#8217;ll get Python support in sl4a. </p>
]]></content:encoded>
			<wfw:commentRss>http://droidhacks.com/2010/08/essential-android-apps-for-geeks/feed/</wfw:commentRss>
		<slash:comments>2</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&#8230;]]></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>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>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.&#8230;]]></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&#8230;]]></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>

