Installing Ubuntu as a second system on Mac Mini

Today my task was to install Ubuntu as second system on my Mac Mini.

I tried several USB Image creation tools [list]. At the end I’m going to use
YUMI which I found in the official Ubuntu manual.

nointremap solution: https://forums.opensuse.org/showthread.php/479576-problem-in-MAC-OS/page2

Select Linux Distributions and press tab to edit boot options

Other open tabs:

_https://forums.opensuse.org/showthread.php/479576-problem-in-MAC-OS/page2?s=2dfb19d13bc17e66654ffbb5f95cf134

https://bugzilla.redhat.com/show_bug.cgi?id=948262

_https://help.ubuntu.com/community/Installation/FromUSBStick

_http://www.pendrivelinux.com/yumi-multiboot-usb-creator/

_http://www.hecticgeek.com/2012/10/how-to-setup-encrypted-ubuntu-installation/

 

 

Installing Robot Framework on [x]Ubuntu 15.04 + PyCharm plugin

Installing Robot Framework

Install Selenium for Python and selenium2library for Robot Framework:

pip install selenium robotframework-selenium2library

Installing Ride GUI for Robot

Official guide: https://github.com/robotframework/RIDE/wiki/Installation-Instructions#installing-from-source

Step by step

Installing wxPython required by Ride (thanks to this SO answer):

sudo apt-get install python-wxgtk2.8 python-wxtools wx2.8-doc wx2.8-examples wx2.8-headers wx2.8-i18n

Installing plugins

Now I’m going to install Robot Framework plugin for PyCharm.

Normally you may find a correct version by navigating to File->Settings->Plugins->Browse repositories

Download Robot Framework plugin for PyCharm here: plugins.jetbrains.com/plugin/7415
I’m still using PyCharm version 3.4, so I had to download an archive with 0.10.2 version supported by my PyCharm.
After download completed, in PyCharm open File->Settings->Plugins

Building a PhoneGap project with plugins in Ubuntu

Okay, ladies and gentlemen, today I’m working on the proof of concept (PoC) of a mobile application that has to work with Bluetooth.

For this purpose I’ve chosen a PhoneGap framework which lets us build mobile application for all mobile platforms (Android, iOS, Windows Phone and some others). Strong side of PhoneGap is plugins – modules of native code for all mobile platforms which can be accessed from PhoneGap Javascript.

Normally for a simple project I’d choose Adobe Build to build the project for me. It can automatically build packages for all mobile platforms for you and even do more like publishing your project in corresponding app markets.

Unfortunately, I had issues building the project using Adobe Builder – it seems not to include plugins to the project. As right now I need only a package for Android, I decided not to strugle with Adobe and to build the .apk locally. For that go to the project directory and run the following:

$ phonegap build android

Build starting… and failing:

[phonegap] executing 'cordova platform add --save android'...
[phonegap] completed 'cordova platform add --save android'
[phonegap] executing 'cordova build android'...
Running command: /var/www/phonegap-bluetooth-poc/platforms/android/cordova/build

[Error: Failed to find 'ANDROID_HOME' environment variable. Try setting setting it manually.
Failed to find 'android' command in your 'PATH'. Try update your 'PATH' to include path to valid SDK directory.]

ERROR building one of the platforms: Error: /var/www/phonegap-bluetooth-poc/platforms/android/cordova/build: Command failed with exit code 2
You may not have the required environment or OS to build this project

So, failed to find ‘android’ command in your ‘PATH’. To fix that we need an Android SDK; we’ll get it from Android website.

After installing Android SDK, let’s update environment variables. Add the following lines to the end of ~/.bashrc file (replace /home/minras/Android/Sdk/  with your path):

export ANDROID_HOME=/home/minras/Android/Sdk/
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

And finally run source ~/.bashrc to initialize those variables.

Now the build should succeed:

$ phonegap build android

Android development, VirtualBox and KVM

Few times already in the past couple years I tried doing some development for Android, but most of the time I decided to postpone that for another piece of undefined time.

The reason was that I always had issues with setting up the virtual device for debugging. And without debugging there is no development.

So, what was the problem? I always used a VirtualBox machine for development, having Windows as host and Ubuntu as guest. But to run AVD (Android Virtual Device), Linux uses KVM infrastructure; and according to StackOverflow, KVM can’t be run together with VirtualBox.

Although, KVM can be emulated, but then AVD is extremely slow (which I observed on the previous computer).

helloworldrealdevice

Solution? I pulled from the shelf one of my old Android phones (not to kill the tablet accidentally) and configured it to be a debugging device instead of AVD. Bingo 🙂