<commit_before>---
layout: post
date:   2014-02-14 19:05:21
title: Build and Deploy to Android Device
---

Build and Deploy to Android Device
====

When you debug on Android phones, copying over to native device and manually installing your app can be very time consuming. On the other hand the simulator is often not the way to debug and is kinda slow. 

Here is what I often do to build a ST2 app and deploy automatically:

{% highlight bash %}
sencha app build native && adb -d install -r cordova/platforms/android/bin/MYAPP-debug.apk 
{% endhighlight %}

The secret sauce comes after the `&&` part. Adb (belongs to Android Tools) will install (and replace if needed) the apk file after Sencha Cmd and Cordova build it. Of course, you will need to have your device plugged in with debugging mode on.<commit_msg>Update build_and_deploy.md<commit_after>---
layout: post
date:   2014-02-14 19:05:21
title: Build and Deploy to Android Device
---

Build and Deploy to Android Device
====

When you debug on Android phones, copying over to native device and manually installing your app can be very time consuming. On the other hand the simulator is often not the way to debug and is kinda slow. 

Here is what I often do to build a ST2 app and deploy automatically:

**Cordova 3.4+ **
{% highlight bash %}
sencha app build native && adb -d install -r cordova/platforms/android/ant-build/MYAPP-debug.apk 
{% endhighlight %}

**Cordova 3.0 - 3.3.0**
{% highlight bash %}
sencha app build native && adb -d install -r cordova/platforms/android/bin/MYAPP-debug.apk 
{% endhighlight %}

The secret sauce comes after the `&&` part. Adb (belongs to Android Tools) will install (and replace if needed) the apk file after Sencha Cmd and Cordova build it. Of course, you will need to have your device plugged in with debugging mode on.
{'fraction_non_alphanumeric': 0.07793633369923161, 'fraction_numerical': 0.02030735455543359, 'mean_word_length': 3.940379403794038, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7538259', 'n_tokens_mistral': 563, 'n_tokens_neox': 505, 'n_words': 269}