Secure Android Development, project preparation, a cold and a new year

It’s been a mixed start to the new year. Watching what I eat for the rest of January, damn you Christmas. Back at work after three weeks off, achieved nothing and left by eleven. My ego got the better of me and I went for a run despite having a cold, so am now suffering. Need to shift it with the first cross country league race on Wednesday. I can’t help wondering why generic medicines are so much cheaper than brand names.

Finally got around to ordering a replacement Acer V3-112P screen. Replacement was straight forward. Like most avionics technicians, I breathed a sigh of relief when the LED panel lit up proving the fault. The old girl is now sitting running a million updates courtesy of Microsoft.

While many Linux advocates eschew Microsoft, I prefer Office (Home Use Program). Like current, I take the path of least resistance and I use Word and Excel so often I know them inside out. Linux is an outstanding development platform, I’m using it for TM470.

TM470 project preparation continues, reviewing both TM353 and TM354. FutureLearn is a fantastic resource with a course on Secure Android Development. Delivered by the University of Southampton, it started last week. I haven’t decided the tool chain yet, particularly versioning. I have used SVN and Bazaar, which I prefer as it integrates well with Launch Pad. I won’t be using LP though so should investigate Mercurial and Git.

Read Original Sin too – best Marvel I’ve read in ages. Like Murder She Wrote in space. A real page turner, I read it in one sitting.

Something that didn’t grip me was the Assassin’s Creed movie. It starts off quite well, with a similar story to the games. It suffers the same problem as earlier games though – the present interrupts more interesting stories in the past. What I don’t get though is why option a game as a property then try not to appeal to that market?

What I haven’t made time for though is the Nintendo Classic Mini. I played a little Ghosts ‘n Goblins – damn I forgot how hard games were then. I always thought as a kid that I’d somehow be better at them as an adult but I guess I didn’t factor in reactions.

[Insert project title here]

An Android fitness tracker application. Feedback from the preparation forum was positive, there is enough scope to expand or contract the project as needed. Importantly, it is “substantially within the sphere of information technology”.

Taking approaches from IT Systems Planning for Success (TM353) and an Agile approach from Software Engineering (TM354) meets the requirements. There is a substantial part of the application that needs synchronise with a server, utilising another level 3 module Developing Concurrent Distributed Systems (M362).

What I haven’t decided is the title!

Install Android Studio on Ubuntu

Ubuntu

Android Studio is a great development environment and is available on Ubuntu. I’m using Ubuntu Mate 16.10 “Yakkety Yak”.
 
First install a Java Development Kit (JDK). OpenJDK is pre-installed or you can use Oracle Java 8 (there is a great guide here). I don’t wish to argue over your choice – I need to use the latter (my tutor does). Download Android Studio here. – I extracted it to /opt; ran the installer; and used my home folder for the SDK. If you are using 64 bit, you need the 32 bit GNU standard C++ library:
sudo apt install lib32stdc++6

For Arch you need to enable “multilib” repository:

<code><span class="pln">sudo pacman </span><span class="pun">-</span><span class="typ">Syu</span> <span class="pun">&amp;&amp;</span><span class="pln"> sudo pacman </span><span class="pun">-</span><span class="pln">S multilib</span><span class="pun">/</span><span class="pln">lib32</span><span class="pun">-</span><span class="pln">libstdc</span><span class="pun">++</span><span class="lit">5</span><span class="pln"> multilib</span><span class="pun">/</span><span class="pln">lib32</span><span class="pun">-</span><span class="pln">zlib</span></code>

Virtualisation support is interesting. I read two tutorial and Google’s guide. The former makes reference to command line options not in version 2.2.2. These posts suggest this is a bug, but it may now be default behaviour. First enable that virtualisation in BIOS (check if enabled using “kvm-ok”).

sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils
sudo adduser dougie kvm
sudo adduser dougie libvirtd

This results in an error.
screenshot-at-2016-11-25-21-16-19

Using the system version of libstdc++.so.6 works. Add the following to /etc/environment:

ANDROID_EMULATOR_USE_SYSTEM_LIBS=1

It seems snappy but with no feedback I’m unsure if accelerated.

So I now have a development environment set up for my project. The next hurdle is to choose a title. So far it is a: development project; distributed application; and uses Android.

Developing concurrent distributed systems (M362)

I’ve just started this Open University module. From the module description’s computing requirements:

If you have an Apple Mac or Linux computer – please note that you can only use it for this course by running Windows on it using Boot Camp or a similar dual-boot system.

I started with the OU in 2008 and it’s good to see things have changed – back then it wouldn’t have mentioned Linux at all.

Joking aside things are changing. Algorithms, data structures and computability (M269), which I’m taking concurrently, has Linux software available with instructions on how to install and configure. I can understand why M362 staff would want specific versions of NetBeans and the JDK installed – the forums are already filling up with questions about various incompatibilities and conflicts and that’s just with Windows.

Fortunately the University has a Dreamspark Premium membership – so I was able to download Windows XP and a license key to install in a VirtualBox instance.

Virtual Box running OU software

I hope we continue to see progress with regards to platform neutrality – I’d like to spend more time learning computer science and mathematics and less time worrying about my choice of operating system.

Samsung RV511 backlight and Fedora 20

Put Fedora 20 on my Samsung RV511 yesterday, everything worked out of the box except the backlight. Using the keys or the slider moved the animation but didn’t change the brightness – which was set to nuclear eye ball toasting mode.

Both the slider and the key combinations change the values in /sys/class/samsung/backlight. I know that the ACPI BIOS can provide interfaces but not always methods to control brightness, so I added acpi_backlight=vendor to the GRUB_CMDLINE_LINUX entry in /etc/default/grub and the back-light is working fine.

Don’t forget to grub2-mkconfig -o /boot/grub2/grub.cfg.

Developing a developer

Still some way to completing my degree part-time (at the end of this academic year I’m half way). I’m not soliciting my services – just looking for advice from the community and if anyone has a few minutes it’d be very much appreciated.

I enjoy mathematics and programming, my degree modules have revolved around the two, covering Java and VB.Net (its a very Windows centric place the Open University but it’s getting better). I’m in the UK and would like to go back to Edinburgh for family reasons when I leave the services in a couple of years time. Looking at the job boards, there’s a lot of Java contracts in the area.

Has anyone got a job with only open source experience? Does anyone know of any open source projects that are Java based and would be a good starting point to build on the fundamentals? Are there other qualifications or courses that you recommend? What are employers looking for? Does anyone work in a specific field that utilises both maths and programming? Is there a language that is in particular demand or do you find that good experience is more value? What’s a realistic starting salary?

Linux is not a get of jail free card

I’ve been having line problems with my ISP – British Telecom. To cut a long story short we see a 75% speed drop, phone BT, jump through umpteen hoops and they reset the profile at the exchange. The fault is with the line and it’s intermittent.

That doesn’t really bother me. The customer support agent told me to use BT’s speed diagnostic tool. Now aside from why their tool would be better, its not really an option as its a poorly written Java applet that doesn’t seem to work with Firefox or Chromium in Linux. Now I dare say I could get it to work but why spend the energy? When I mentioned it to the agent, he told me BT doesn’t officially support Linux and helpfully suggested I keep a Windows laptop handy.

Are you kidding? Keep a Windows laptop handy? There are reasons why I use Linux, there are reasons people use Macs and Windows too – they chose to. What the hell has that got to do with my ISP? I have no software from them, it’s a wireless access point they provide. Do you know what operating system it runs? Linux.

Samsung ML-1915 with Ubuntu

I picked up a cheap laser printer, a Samsung ML-1915. It isn’t automatically configured by Ubuntu 10.10 as it requires the Samsung Unified Linux Print Driver.

The page explains what to do but in synopsis, you need to add the repository and install two packages, obviously check out the site before blindly following me:

Add the repository to /etc/apt/sources.list:

deb http://www.bchemnet.com/suldr/ debian extra

Now, I know Ubuntu has the apt-add-repository command but that will add “pangolin release” instead of “debian extra” and will create a source entry too – which will give you an error:

W: Failed to fetch http://www.bchemnet.com/suldr/dists/debian/Release
Unable to find expected entry  extra/source/Sources in Meta-index file
(malformed Release file?)

If you did then you need to remove the offending deb-src http://www.bchemnet.com/suldr/ debian extra entry.

That done, add the GPG key and update the apt cache.

wget -O - http://www.bchemnet.com/suldr/suldr.gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get install samsungmfp-driver samsungmfp-data

It will then pick up and install when you plug it in. Samsung themselves provide a 30 odd Mb driver file, here. There are a whole list of the differences here but for me, I prefer Debian compliance and not installing anything I don’t need.

Oh and a big thank you to everyone who sent me suggestions of what to do in San Diego. People can be surprisingly open and friendly – especially within our community.