<?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>Horatio Caine&#039;s Blog &#187; shell</title>
	<atom:link href="http://hxcaine.com/blog/tag/shell/feed/" rel="self" type="application/rss+xml" />
	<link>http://hxcaine.com/blog</link>
	<description>A blog of life, ideas and code</description>
	<lastBuildDate>Thu, 19 Jun 2014 00:46:16 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.0.38</generator>
	<item>
		<title>Updating files and folders to Android device with one click via adb</title>
		<link>http://hxcaine.com/blog/2010/09/11/updating-files-and-folders-with-one-click-via-adb/</link>
		<comments>http://hxcaine.com/blog/2010/09/11/updating-files-and-folders-with-one-click-via-adb/#comments</comments>
		<pubDate>Fri, 10 Sep 2010 23:46:22 +0000</pubDate>
		<dc:creator><![CDATA[Horatio Caine]]></dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[adb]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[device]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[folders]]></category>
		<category><![CDATA[phone]]></category>
		<category><![CDATA[push]]></category>
		<category><![CDATA[save]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[tablet]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://hxcaine.wordpress.com/?p=55</guid>
		<description><![CDATA[I like to keep an updated copy of certain files on my Android phone at all times, such as the latest copy of certain code so I can look at it when I&#8217;m on the train. I&#8217;ve done it in quite a few different ways: Mount SD card as a removable storage device via USB [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I like to keep an updated copy of certain files on my Android phone at all times, such as the latest copy of certain code so I can look at it when I&#8217;m on the train.</p>
<p>I&#8217;ve done it in quite a few different ways:</p>
<ul>
<li>Mount SD card as a removable storage device via USB</li>
<li>Run an FTP server on my phone and transfer files over wifi</li>
<li>Bluetooth file transfer</li>
</ul>
<p>But these are all tedious because they&#8217;re all manual and they take too long.</p>
<p>Then I realised that ADB push and ADB shell are run from the command line/terminal, which means I can run a batch script. (A batch script is a text file with commands written that all run one after another in the command line)</p>
<p>Now all I need to do is click the file on my desktop and the files get updated within a fraction of a second on my phone.</p>
<p>So here&#8217;s an example version of my batch file that automatically updates a folder on my phone:</p>
<p></p><pre class="crayon-plain-tag">adb shell rm -r /sdcard/MyUpdateFolder

adb shell mkdir /sdcard/MyUpdateFolder

adb push C:/MyUpdateFolder /sdcard/MyUpdateFolder</pre><p></p>
<p><strong>&#8216;rm -r&#8217;</strong> delete the folder and everything in it.</p>
<p><strong>&#8216;mkdir&#8217; </strong>creates a folder by that name.</p>
<p><strong>&#8216;push&#8217;</strong> copies the folder contents from the first argument to the second argument.</p>
<p><strong>Note for those running emulators on their computers: Add &#8216;-d&#8217; after the word adb on each line to send the commands to a device and not an emulator.</strong></p>
<p>All that&#8217;s left is to write it up in Notepad and save it as Filename.bat. After that, just double-click the file and the operation should run in a fraction of a second.</p>
]]></content:encoded>
			<wfw:commentRss>http://hxcaine.com/blog/2010/09/11/updating-files-and-folders-with-one-click-via-adb/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ADB &#8216;Push: Permission Denied&#8217; on Android adb shell push</title>
		<link>http://hxcaine.com/blog/2010/09/11/push-permission-denied-on-android-adb-shell-push/</link>
		<comments>http://hxcaine.com/blog/2010/09/11/push-permission-denied-on-android-adb-shell-push/#comments</comments>
		<pubDate>Fri, 10 Sep 2010 23:28:10 +0000</pubDate>
		<dc:creator><![CDATA[Horatio Caine]]></dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[adb]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[folder]]></category>
		<category><![CDATA[permission denied]]></category>
		<category><![CDATA[push]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://hxcaine.wordpress.com/?p=48</guid>
		<description><![CDATA[I just spent a little while trying to figure out why I was getting &#8216;push: permission denied&#8217; when running: [crayon-69e1435a950cc498187039/] I did some googling to no avail. Then I remembered that pushing and pulling is not done in the shell, it&#8217;s just done with adb. Thus, it should have been: [crayon-69e1435a950d1303261674/] Which succeeds. I know [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I just spent a little while trying to figure out why I was getting &#8216;push: permission denied&#8217; when running:</p>
<p></p><pre class="crayon-plain-tag">adb shell push c:/file.txt /sdcard/file.txt</pre><p></p>
<p>I did some googling to no avail.</p>
<p>Then I remembered that pushing and pulling is not done in the shell, it&#8217;s just done with adb.</p>
<p>Thus, it should have been:</p>
<p></p><pre class="crayon-plain-tag">adb push c:/file.txt /sdcard/file.txt</pre><p></p>
<p>Which succeeds. I know it&#8217;s a silly error to make, but I thought I&#8217;d share this in case anybody else uses the adb shell push instead of regular adb push and can&#8217;t figure out why permission is denied.</p>
]]></content:encoded>
			<wfw:commentRss>http://hxcaine.com/blog/2010/09/11/push-permission-denied-on-android-adb-shell-push/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
