You may know that Ubuntu 13.10 is now available, since October 17. With this release comes Ubuntu Touch, a version of Ubuntu designed for two smartphones: Samsung Galaxy Nexus and LG Nexus 4. And I own a white 16Gb Galaxy Nexus phone...
I flashed my phone to test Ubuntu Touch on it, and shared this test with Bonitasoft colleagues. Having a Linux distro on a smartphone instantly presented a challenge: install Open JDK 7 and test to see if Bonita BPM Platform (Portal + Engine) would run on a smartphone. And yes, we did it, it runs! We're eager to share that with you, so below is a How-to.
Install Ubuntu Touch
First you need a Samsung Galaxy Nexus or a LG Nexus 4. And of course, you need to be sure that the owner agrees to install Ubuntu Touch: it means erasing Android and all its data from the phone! Once the test is done, of course, you can flash Android back to your phone.
Canonical provides a very good How-to about flashing the phone with Ubuntu Touch: Installing Ubuntu on a phone. So, you can do this first step with their documentation.
Once that is done, find the terminal application in the list of all applications. (You may have to expand the list of all installed applications.)
When the terminal is started, you are ready for the next step: set up the phone, but from your PC.
Set the environment
By default, the image of Ubuntu Touch on the memory is set to read-only. You need to set it to write-able and then reboot the phone.
sudo touch /userdata/.writable_image sudo reboot
The default password for "phablet" user is "phablet".
After reboot, start the terminal again. As it is far easier and faster to do everything from a terminal on your PC, use SSH. Don't forget to connect the smartphone to your Wifi network.
On the phone, start SSH and use ifconfig to find your IP adress:
sudo start ssh ifconfig
Set an automatic start of SSH with Ubuntu Touch:
sudo update-rc.d ssh defaults [sudo] password for phablet: update-rc.d: warning: default stop runlevel arguments (0 1 6) do not match ssh Default-Stop values (none) Adding system startup for /etc/init.d/ssh ... /etc/rc0.d/K20ssh -> ../init.d/ssh /etc/rc1.d/K20ssh -> ../init.d/ssh /etc/rc6.d/K20ssh -> ../init.d/ssh /etc/rc2.d/S20ssh -> ../init.d/ssh /etc/rc3.d/S20ssh -> ../init.d/ssh /etc/rc4.d/S20ssh -> ../init.d/ssh /etc/rc5.d/S20ssh -> ../init.d/ssh
On your PC, start a terminal and do:
ssh phablet@ipadressofthephone .
Of course, you can also use ADB to do this with a USB cable. But it is more fun to use SSH, like we would do with any other server, no? Now, you can install Java and the Bonita BPM Bundle.
Install Java, download and unzip the Bonita BPM bundle
Start with refreshing apt-get cache.
sudo apt-get update .
Then, install Opend JDK 7 JRE, using the headless version for servers. You will also need Unzip to extract the files from the downloaded archive of the bundle.
sudo apt-get install openjdk-7-jre-headless unzip .
Check that Java is well installed: [cc]java -version [/cc] Download Bonita BPM Tomcat bundle. The link below is for the 6.0.4 version.
wget http://download.forge.objectweb.org/bonita/BonitaBPMCommunity-6.0.4-Tomcat-6.0.35.zip nzip BonitaBPMCommunity-6.0.4-Tomcat-6.0.35.zip
Start the Bonita BPM Platform
Start the bundle like on any other server:
Wait a moment, for the phone is not as powerful as your latest multicore 64bit CPU. Check the startup with a Tail on that file:
tail -F BonitaBPMCommunity-6.0.4-Tomcat-6.0.35/logs/catalina.out .
If everything is ok you should get something like this:
... Oct 21, 2013 9:16:08 AM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/106 config=null Oct 21, 2013 9:16:08 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 137252 ms
Then, connect to the Bonita BPM Portal with your web browser on http://phoneipsadresss:8080/bonita and use "install" as login and "install" as password, to log in as a technical user, create your first users, and install some processes.
To test, we created a small Bonita process to display system information, using the Script Connector. Below is a screenshot of the process and the terminal (SSH).
And a picture of Jeremy, the Galaxy Nexus smartphone, and me.
As usual, we will put the "Display system information" process on Community GitHub soon. If we make it possible to run Bonita BPM Studio on the phone, we will let you know ;-)
Many thanks to Jeremy Jacquier-Roux, our sysadmin expert, who helped make this How-to possible.
Thanks to Canonical, for the operating system. It wouldn't have been possible to do this without the great work of their developers and community.
And thanks a lot to Ogra from #ubuntu-touch IRC channel on Freenode for his support.