title: Phonegap run from CLI with --release and self-signed app requires me to patch cordova.js
body: <p>I suppose I'm doing something wrong but I had to patch <a href="https://github.com/phonegap/phonegap/blob/master/lib/android/bin/templates/cordova/lib/cordova.js#L313">https://github.com/phonegap/phonegap/blob/master/lib/android/bin/templates/cordova/lib/cordova.js#L313</a>
  this way (add "unaligned" token matching):</p>
  
  <pre><code>if (fso.GetExtensionName(path) == 'apk' &amp;&amp; !path.match(/unaligned/) &amp;&amp; !path.match(/unsigned/)) {
        path_to_apk = out_files.item();
        break;
  }
  </code></pre>
  
  <p>otherwise the "unsigned" apk is first found and installed, and it will fail not being signed.
  I'm using the CLI to build and run my apk.
  In debug mode it's ok, obviously, because the signing takes a different path.</p>
  
  <p>Giovanni</p>