<?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/"
	xmlns:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>a4apphack &#187; batch</title>
	<atom:link href="http://a4apphack.com/index.php/tag/batch/feed" rel="self" type="application/rss+xml" />
	<link>http://a4apphack.com</link>
	<description>Get more out of the Apps!</description>
	<lastBuildDate>Thu, 26 Apr 2012 15:44:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
<image>
<link>http://a4apphack.com</link>
<url>http://a4apphack.com/blog/wp-content/themes/primus/favicon.ico</url>
<title>a4apphack</title>
</image>
		<item>
		<title>Batch File Decompiles Android apk to Java Source With a Single Command</title>
		<link>http://a4apphack.com/featured/batch-file-decompiles-android-apk-to-java-source-with-a-single-command</link>
		<comments>http://a4apphack.com/featured/batch-file-decompiles-android-apk-to-java-source-with-a-single-command#comments</comments>
		<pubDate>Thu, 21 Jul 2011 21:59:11 +0000</pubDate>
		<dc:creator>rajivvishwa</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://a4apphack.com/?p=2190</guid>
		<description><![CDATA[This batch file decompiles an apk to its corresponding java sources. People who are looking forward to do a code review on an android app who&#8217;s source code is not readily available can utilize this bat. This batch runs various free tools available on the internet in a sequence to obtain the java source files. [...]]]></description>
			<content:encoded><![CDATA[<p>This batch file decompiles an apk to its corresponding java sources. People who are looking forward to do a code review on an android app who&#8217;s source code is not readily available can utilize this bat. This batch runs various free tools available on the internet in a sequence to obtain the java source files.</p>
<p>This is not made to encourage piracy/plagiarism in any case.</p>
<h3>How To</h3>
<p>1. Extract batch file and lib folder to <span style="font-family: courier new,courier;">C:\apk2java\</span> (or any folder that <strong>doesnt have space in its path</strong>)</p>
<p>2. Backup the target app&#8217;s apk from phone to PC via ASTRO Browser (check <a title="this post" href="http://a4apphack.com/security/sec-code/extract-android-apk-from-market-and-decompile-it-to-java-source">this post</a> for details)</p>
<p>3. Keep the target apk in the root folder where batch file is present</p>
<p><a href="http://img.a4apphack.com/apk2java-copytargetapk.jpg" rel="lightbox[2190]" title="Copy target apk to exec folder"><img title="Copy target apk to exec folder" src="http://img.a4apphack.com/apk2java-copytargetapk.jpg" alt="Copy target apk to exec folder" width="600" height="368" /></a></p>
<p>4. Run &#8216;apk2java.bat target.apk&#8217; in cmd</p>
<p><code>c:\apk2java&gt;apk2java.bat target.apk</code></p>
<p><a href="http://img.a4apphack.com/apk2java-executebatch.jpg" rel="lightbox[2190]" title="Execute Command"><img class="alignnone" title="Execute Command" src="http://img.a4apphack.com/apk2java-executebatch.jpg" alt="Execute Command" width="600" height="227" /></a></p>
<p><a href="http://img.a4apphack.com/apk2java-processcomplete.jpg" rel="lightbox[2190]" title="Process Complete"><img title="Process Complete" src="http://img.a4apphack.com/apk2java-processcomplete.jpg" alt="Process Complete" width="600" height="393" /></a></p>
<p><span id="more-2190"></span>5. Result : java and resource files available in &#8216;src&#8217;</p>
<p><a href="http://img.a4apphack.com/apk2java-outputsrc.jpg" rel="lightbox[2190]" title="src folder containing decompiled files"><img class="alignnone" title="src folder containing decompiled files" src="http://img.a4apphack.com/apk2java-outputsrc.jpg" alt="src folder containing decompiled files" width="600" height="367" /></a></p>
<p><strong>Note</strong>: This batch just automates the sequence in which various tools are initiated and does not handle any error events. You will have to go through the cmd verbose to figure out the problem.</p>
<p><strong>Note 2:</strong> &#8216;lib&#8217; folder contains apk-tool files (apk-tool.jar, aapt.exe), jad.exe, 7zip (7za.exe), dex2jar files (all other jars).  If required, update each of those tools by replacing it with latest copy from links mentioned below.</p>
<h3>Requirements</h3>
<ul>
<li>Windows (but can be ported to *NIX)</li>
<li>JRE 1.6 (Java Runtime Environment)</li>
</ul>
<h3>Tools in lib</h3>
<ul>
<li>Dex2jar &#8211; Converts Android dex format to jar (<a title="Dex2jar" href="http://code.google.com/p/dex2jar/">link</a>)</li>
<li>JAD &#8211; Java Decompiler CLI (<a title="JAD" href="http://www.varaneckas.com/jad">link</a>)</li>
<li>7Zip &#8211; Unarchival  (<a title="7Zip" href="http://www.7-zip.org/download.html">link</a>)</li>
<li>apk-tool &#8211; Extracts resources from apk (<a title="apk-tool" href="http://code.google.com/p/android-apktool/">link</a>)</li>
<li>aapt &#8211; Android Asset Packaging Tool <a title="Android Dev Guid" href="http://developer.android.com/guide/developing/building/index.html">(link)</a></li>
<li>aapt commands (<a title="aapt commands" href="http://elinux.org/Android_aapt">link)</a></li>
</ul>
<script type='text/javascript' src='http://snipt.net/embed/00aea84a3ffd7b7b8150241c20727adf'></script>
<table id="cft">
  <thead>
  <tr>
    <th colspan="2">apk2java Info</th>
  </tr>
  </thead>
  <tbody>
    <tr>
      <td  width="40%">App Name</td>
      <td>apk2java</td>
    </tr>
    <tr>
      <td>License</td>
      <td>free</td>
    </tr>
    <tr>
      <td>Type</td>
      <td>code</td>
    </tr>
    <tr>
      <td>App URL</td>
      <td>
      <a target="_blank" href="http://img.a4apphack.com/dl/apk2java.zip"><img
 style="" alt="Download"
 src="http://img.a4apphack.com/site/a4apphack-download.png"
 title="Download" witdh="30" height="30"></a></td>
    </tr>
    <tr>
      <td>More Info</td>
      <td> <a href="">link</a></td>
    </tr>
  </tbody>
</table>

<img src="http://a4apphack.com/blog/?ak_action=api_record_view&id=2190&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://a4apphack.com/featured/batch-file-decompiles-android-apk-to-java-source-with-a-single-command/feed</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Quickly Create and Compile Batch Files With Portable BatchRun</title>
		<link>http://a4apphack.com/softwares/system-tools/quickly-create-compile-batch-files-with-portable-batchrun</link>
		<comments>http://a4apphack.com/softwares/system-tools/quickly-create-compile-batch-files-with-portable-batchrun#comments</comments>
		<pubDate>Sun, 26 Apr 2009 08:19:54 +0000</pubDate>
		<dc:creator>rajivvishwa</dc:creator>
				<category><![CDATA[Portable]]></category>
		<category><![CDATA[System Tools]]></category>
		<category><![CDATA[automate]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[command]]></category>

		<guid isPermaLink="false">http://a4apphack.com/blog/?p=1157</guid>
		<description><![CDATA[Windows Batch files can be used to automate or to run a sequence of operations. This includes starting multiple applications when windows starts up, clearing temp folder when a shortcut key is clicked, Ending certain unwanted processes etc You can even do more than starting programs with the built-in file management functions like Copy, Rename, [...]]]></description>
			<content:encoded><![CDATA[<p>Windows <a title="Batch Files" href="http://en.wikipedia.org/wiki/Batch_file">Batch files</a> can be used to automate or to run a sequence of operations. This includes starting multiple applications when windows starts up, clearing temp folder when a shortcut key is clicked, Ending certain unwanted processes etc</p>
<p><a href="http://a4apphack.com/blog/wp-content/uploads/2009/04/batchrunmain.jpg" rel="lightbox[1157]" title="Batch Run"><img class="alignnone size-full wp-image-1166" title="Batch Run" src="http://a4apphack.com/blog/wp-content/uploads/2009/04/batchrunmain.jpg" alt="Batch Run" width="530" height="265" /></a></p>
<p><span id="more-1157"></span>You can even do more than starting programs with the built-in file management functions like Copy, Rename, Makedir, Delete, End Process, Kill Process and Text to Clipboard. Batchrun batch files can be launched from Explorer or placed in StartUp folder or on the Desktop.</p>
<p>Check how to <a title="Enable or Disable USB drive with batch file" href="http://a4apphack.com/softwares/system-tools/quickly-create-compile-batch-files-with-portable-batchrun">enable and disable USB devices with batch programming</a></p>
<h3><span style="color: #000000;"><strong> Features</strong></span></h3>
<p><strong> </strong></p>
<ul>
<li>Launch files of any filetype and dialup connections</li>
<li>Internal commands: Run, Copy, Rename, Makedir, Delete, DelTree, End Process, Kill Process, Text to Clipboard</li>
<li>Wildcard support for Copy, Delete and DelTree</li>
<li>Makedir nested folder creation</li>
<li>Drag and Drop between Explorer and Batchrun</li>
<li>Support for date and time tags</li>
<li>Command line parameters can be passed to Batchrun script files</li>
<li>Save batch files directly to Startup and Desktop</li>
</ul>
<p><strong>Note: </strong>If you are using the portable version of BatchRun make sure that you associate &#8216;<strong>*.brs</strong>&#8216; files with this application.</p>
<p><a href="http://a4apphack.com/blog/wp-content/uploads/2009/04/openwith.jpg" rel="lightbox[1157]" title="Open brs files With"><img class="alignnone size-full wp-image-1168" title="Open brs files With" src="http://a4apphack.com/blog/wp-content/uploads/2009/04/openwith.jpg" alt="Open brs files With" width="406" height="327" /></a></p>
<p><strong>Download BatchRun :</strong> <a target="_blank" href="http://download.outertech.com/batchrun_portable.zip"><img style="vertical-align: middle;" height="30" width="30" alt="Download" src="http://img.a4apphack.com/site/a4apphack-download.png" title="Download"/></a></p>
<p>More Info at <a title="BatchRun Homepage" href="http://batchrun.outertech.com/">BatchRun HomePage</a></p>
<img src="http://a4apphack.com/blog/?ak_action=api_record_view&id=1157&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://a4apphack.com/softwares/system-tools/quickly-create-compile-batch-files-with-portable-batchrun/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable-Disable Usb Drives With a Batch file in a Click</title>
		<link>http://a4apphack.com/security/enable-disable-usb-with-a-batch-file</link>
		<comments>http://a4apphack.com/security/enable-disable-usb-with-a-batch-file#comments</comments>
		<pubDate>Mon, 15 Dec 2008 16:39:13 +0000</pubDate>
		<dc:creator>rajivvishwa</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[automate]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[usb]]></category>

		<guid isPermaLink="false">http://a4apphack.com/blog/?p=108</guid>
		<description><![CDATA[With the help of batch programming we can enable or disable USB device in a single click.ACL permissions are also set during the process. The script will enable the security permissions which will help us to modify certain registry keys, then modifies the required keys and reverts back the permissions. First create four files as [...]]]></description>
			<content:encoded><![CDATA[<p>With the help of batch programming we can enable or disable USB device in a single click.ACL permissions are also set during the process.</p>
<p>The script will enable the security permissions which will help us to modify certain registry keys, then modifies the required keys and reverts back the permissions.</p>
<p><span id="more-108"></span>First create four files as mentioned below.</p>
<h3>0.reg</h3>

<div class="wp_syntax"><div class="code"><pre class="winbatch" style="font-family:monospace;">Windows Registry Editor <span style="color: #0000FF;">Version</span> <span style="color: #cc66cc;">5.00</span>
<span style="color: #66cc66;">&#91;</span>HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesUSBSTOR<span style="color: #66cc66;">&#93;</span>
<span style="color: #ff0000;">&quot;Start&quot;</span>=dword<span style="color: #FF1010; font-weight: bold;">:00000004</span></pre></div></div>

<h3>1.reg</h3>

<div class="wp_syntax"><div class="code"><pre class="winbatch" style="font-family:monospace;">Windows Registry Editor <span style="color: #0000FF;">Version</span> <span style="color: #cc66cc;">5.00</span>
<span style="color: #66cc66;">&#91;</span>HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesUSBSTOR<span style="color: #66cc66;">&#93;</span>
<span style="color: #ff0000;">&quot;Start&quot;</span>=dword<span style="color: #FF1010; font-weight: bold;">:00000003</span></pre></div></div>

<h3><a title="SubInACL Download" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=E8BA3E56-D8FE-4A91-93CF-ED6985E3927B">SubInACL</a></h3>
<p>Before proceeding further you need to download <a title="SubInACL Download" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=E8BA3E56-D8FE-4A91-93CF-ED6985E3927B" target="_blank">SubInACL</a> (Incase if the link doesn&#8217;t work, google for &#8216;SubInACL&#8217; to get the MS download link). This tool helps you to set ACL permissions for the registry keys through command line parameters.</p>

<div class="wp_syntax"><div class="code"><pre class="winbatch" style="font-family:monospace;"><span style="color: #66cc66;">@</span>echo <span style="color: #0080FF; font-weight: bold;">off</span>
cls
regedit <span style="color: #66cc66;">/</span>s <span style="color: #cc66cc;">0</span>.reg
subinacl.exe <span style="color: #66cc66;">/</span>keyreg systemcurrentcontrolsetservicesusbstor <span style="color: #66cc66;">/</span>deny=system
subinacl.exe <span style="color: #66cc66;">/</span>keyreg systemcurrentcontrolsetservicesusbstor <span style="color: #66cc66;">/</span>deny=users
subinacl.exe <span style="color: #66cc66;">/</span>keyreg systemcurrentcontrolsetservicesusbstor <span style="color: #66cc66;">/</span>deny=administrators
echo.
echo <span style="color: #66cc66;">**</span>Disabled<span style="color: #66cc66;">**</span>
echo.
<span style="color: #66cc66;">//</span><span style="color: #0000FF;">pause</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="winbatch" style="font-family:monospace;"><span style="color: #66cc66;">@</span>echo <span style="color: #0080FF; font-weight: bold;">off</span>
cls
subinacl.exe <span style="color: #66cc66;">/</span>keyreg systemcurrentcontrolsetservicesusbstor <span style="color: #66cc66;">/</span>grant=system
subinacl.exe <span style="color: #66cc66;">/</span>keyreg systemcurrentcontrolsetservicesusbstor <span style="color: #66cc66;">/</span>grant=users
subinacl.exe <span style="color: #66cc66;">/</span>keyreg systemcurrentcontrolsetservicesusbstor <span style="color: #66cc66;">/</span>grant=administrators
regedit <span style="color: #66cc66;">/</span>s <span style="color: #cc66cc;">1</span>.reg
echo.
echo <span style="color: #66cc66;">**</span>Enabled<span style="color: #66cc66;">**</span>
echo.
<span style="color: #66cc66;">//</span><span style="color: #0000FF;">pause</span></pre></div></div>

<p>After creating all the above mentioned files, put those in a directory. Make sure you have all the five files in the same directory (i.e 0.reg, 1.reg, enable.bat*, disable.bat* and subinacl.exe).</p>
<p>Now double click the batch file* to see it in action.</p>
<p><em>Note</em>*:</p>
<ul>
<em>Uncomment pause command to see the execution status in the command prompt.</em>
</ul>
<img src="http://a4apphack.com/blog/?ak_action=api_record_view&id=108&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://a4apphack.com/security/enable-disable-usb-with-a-batch-file/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (Requested URI is rejected)
Object Caching 751/760 objects using disk: basic

Served from: a4apphack.com @ 2012-05-22 09:06:07 -->
