Apache Cordova development environment install on Ubuntu

Apache Cordova has very nice documentation, however as so many projects it is focused on the Windows/MacOS duopolies only. Fortunately it’s not too hard to work out the differences.

Apache Cordova Logo

Installing dependencies

Thanks to: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager

sudo apt-get install python-software-properties python g++ make ant openjdk-7-jre openjdk-7-jdk

Installing Android SDK

Please note: one of the problems I found was that I had some Android tools from the Ubuntu repos that were conflicting with the SDK install. It’s probably a good idea to remove them first. That might save you from a lot of headaches down the line (and time to troubleshoot).

sudo apt-get remove android-tools-adb android-tools-fastboot

Download as per http://developer.android.com/sdk/index.html

wget http://dl.google.com/android/android-sdk_r22.6.2-linux.tgz

Note: check for updated link version obviously

vim ~/.bashrc

Add the PATH variables to the top of the file

#AndroidDev PATH
export PATH=${PATH}:~/android-sdk-linux/tools
export PATH=${PATH}:~/android-sdk-linux/platform-tools

Reload bash variables without reboot / logout

source ~/.bashrc

Testing SDK


This command should now bring up the SDK manager.

Installing Eclipse IDE

This is obviously an optional step depending on the IDE you want to use. I have previously covered a manual Eclipse install (as opposed to the Ubuntu repositories).

Install Eclipse ADT Plugin

As per: http://developer.android.com/sdk/installing/installing-adt.html

Node.js Install

The main difficulty on Ubuntu (as with so many development tools – see Eclipse above) is that the included node.js version in the Ubuntu repositories is outdated (remove the Ubuntu version with ‘sudo apt-get remove node’).

sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install python-software-properties python g++ make nodejs

Install Cordova

sudo npm install -g cordova

Check Cordova Requirements

This will check for Android SDK installation, Ant and other dependencies – saving you going through error messages later.


Create Cordova Project

mkdir ~/projects/PROJECTNAME
cd ~/projects/PROJECTNAME
cordova -d platform add android
cordova build

Create Eclipse Project

Open Eclipse
Create New Android project from existing sources
Import ~/projects/PROJECTNAME/platforms/android
Test in emulator by right clicking the project and selecting “Run As –> Android App”

Back up Google Apps Mail using getmail4 + IMAP

Just a quick note on how to configure backups of Google Apps email to a local machine.

Install getmail

apt-get install getmail4

create config directory

Create a subdirectory in users home folder (and change permissions)

mkdir .getmail
touch .getmail

create config file

Create a file such as .getmail/username.gmail

type = SimpleIMAPSSLRetriever
server = imap.gmail.com
username = username@domain.tld
password = password
mailboxes = ("[Gmail]/All Mail",)

type = Maildir
path = /path/to/storage/directory/

# print messages about each action (verbose = 2)
# Other options:
# 0 prints only warnings and errors
# 1 prints messages about retrieving and deleting messages only
verbose = 1
message_log = ~/.getmail/gmail.log

create data directories for storage

Create 3 sub-directories in your designated data directory

mkdir cur new tmp

run getmail

getmail -r username.gmail

Whilst this is more a ‘note to self’ rather than actual documentation – maybe it’s of use to somebody.

Thanks go to Matt Cutts: http://www.mattcutts.com/blog/backup-gmail-in-linux-with-getmail/ for the start.

My mobile personal learning environment

Taking part in MobiMOOC has given me the opportunity to take stock of my own MobilePLE – the top 5 tools I find most useful as part of my ongoing learning.


  • Catch Notes (previously 3Bananas) – mobile note taking the most critical component. Whenever I get a new device – this is what has to be installed as one of the first actions. For those not familiar with this software – it’s like Evernote without the bloat.
  • TwiDroyd – mobile Twitter / Status.Net client. This could be replaced by similar Twitter clients
  • GoogleReader – RSS reader client
  • Flickr – image upload and sharing
  • FourSquare – location based sharing


These are the main applications I use pretty much constantly, however here are some other useful services I use regularily:


  • Delicious – Online Bookmarking (this is an old one, but a good one). Unfortunately there are not a great deal of mobile interfaces for Delicious as Yahoo has publicly stated that it is trying to offload the project
  • Pixelpipe – universal uploader (upload to multiple services such as Flickr, Picasa, Youtube from mobile)
  • BeyondPod – podcast client
  • GoogleGoggles – image recognition software to allow searches based on camera input
  • Zxing Barcode Scan – open source barcode scanner (QR codes as well as EAN type)
  • WordPress Client – mobile client to edit wordpress blogs
  • Sketchbook – mobile drawing application from Autodesk (you need a reaonable screen for this – tab preferred)
  • UStream Broadcaster – streaming video producer from mobile handset


One thing worth noting is that this is very much the “CURRENT Mobi-PLE”. The one sure thing with mobile tech in general is that it tends to change quickly over time and with need.

Looking forward to hearing about things I am missing – comments welcome !