Upload
iscrbdi
View
212
Download
0
Embed Size (px)
Citation preview
7/22/2019 Raspberry Pi Android InstallationLinux User & Developer Magazine Issue 1202012
1/100
www.linuxuser.co.uk
8 PAGESPECIALRASPBERRY PI
FOR THE GNU GENERATIONTHE MONTHLY MAGAZINE
9 77 20 41 327 002
2 0
ISSUE 120 5.99
Build a smart TV Automate your homeRun Android appsMake a car-puter
ALSO INSIDEGNOME 3.6: our verdict
Create a network of RasPisWhat happened to GNU Hurd?Improve workflow with login scripts
Master Emacsake control with the Swissrmy chainsaw of FOSS
PyCon 2012Catch up with thehottest events
20 pages of reviewsDefinitive opinion ondevices, distros and apps
AndroidRaspberry PiInstall
on your
Make GNOME extensionsAdd new features andfunctionality to GNOME 3
Ultimate office
suite revealed!The best open sourcealternatives to MS Office
$99 SupercomputerAdaptevas founderintroduces us to the
of expertadvice30+pages
7/22/2019 Raspberry Pi Android InstallationLinux User & Developer Magazine Issue 1202012
2/100
W o r l d M a g s . n e t W o r l d M a g s . n e t
W o r l d M a g s . n e t
http://worldmags.net/http://worldmags.net/http://worldmags.net/7/22/2019 Raspberry Pi Android InstallationLinux User & Developer Magazine Issue 1202012
3/100
Gareth Halfacree has been breaking, fixing,tinkering and voiding warrantieson electrical items for manyyears, without once receiving afatal electric shock. This monthGareth brings us the story of the$99 supercomputer (pages 48-51)and reviews the latest release innetwork-attached storage.
Joey Bernard is a true renaissance man,
splitting his time between buildingfurniture, helping researchers withscientific computing problemsand writing Android apps (whenthe kids let him have some time).This month Joey serves up twotutorials on server monitoring andEmacs, on pages 30-33 and 38-41.
Kunal Deo is a veteran open source developerleading multiple open sourceprojects. He is also a KDE dev andhas contributed to many projectsincluding KDE-Solaris, Belenixand Openmoko. In this issue Kunaldemonstrates how to build GNOMEShell extensions in his step-by-step tutorial on pages 52-55.
Jon Masters is a Linux kernel hacker who hasbeen working on Linux for almost17 years, since he first attendeduniversity at the age of 13. Jon livesin Massachusetts and works for alarge enterprise Linux vendor. Aswell as running kernelpodcast.orghe keeps us up to date on the Linuxkernel with his column on page 12.
Liam Fraser is the creator of theRaspberryPiTutorials YouTubeseries and is a Linux serveradministrator of the RaspberryPi Foundation. This month Liamshows us how to build a networkof Raspberry Pis with centralisedstorage. You can find his article
starting on page 56.
Rob Zwetsloot studied aerospace engineeringat university, using Python tomodel complex simulations andconfiguring Linux HTPCs. This issueRob reminds us why LibreOfficeis the greatest office suite in opensource (pages 70-74) and showsus how to install Android on theRaspberry Pi in our cover feature.
Issue 1203
Yourtea
mofLinuxex
perts
Get in touch with the team:[email protected]
Welcometo issue 120 of Linux User & Developer
Welcome to the latest edition of Linux User & Developer,the UK and Americas favourite high-end open sourceand Linux magazine.
The clocks have gone back and Christmas is fastapproaching. While weve got some special treats lined upto mark our final issue of 2012 next month, weve workedparticularly hard this issue to ensure youve got plenty of
projects to keep you out of trouble as the evenings draw in.The Raspberry Pi owners among you are in particular luck weve
got an eight-page special looking at how to get Android up andrunning, starting on page 22. While theres still plenty of work to doto get the drivers working smoothly with 3D and media applications,Android opens up a whole world of new possibilities for your $35computer and we cant wait to see what the community does with itover the coming months.
If youre feeling particularly adventurous you could join JoeyBernard over on page 38 as he uses Emacs to create to-do lists. Ifyouve never dabbled with Emacs before, youll probably want to dosome extracurricular homework first even the keyboard shortcutscan be demanding to the uninitiated.
Finally a quick mention to Parabella, a Kickstarter project thatscome to be known as the $99 supercomputer. Check out ourinterview with its creator starting on page 48 it looks like theRaspberry Pi might have some serious competition
Russell Barnes,Editor
Buy online
GetLinux User
for 4.19per issue
Page 20
Install Android on RasPiBuild GNOME extensionsMonitor your home serverOrganise yourself with Emacs
This issue
Visit us online for more news, opinion, tutorials and reviews:
www.linuxuser.co.ukW o r l d M a g s . n e t W o r l d M a g s . n e t
W o r l d M a g s . n e t
http://worldmags.net/http://worldmags.net/7/22/2019 Raspberry Pi Android InstallationLinux User & Developer Magazine Issue 1202012
4/100
Contents
Join us online for more Linux news, opinion and reviewswww.linuxuser.co.uk
www.linuxuser.co.uk4
06 News The biggest stories from the
open source world
12 OpinionsThe latest from our regularfree software columnists
94 Letters Your views on the magazine
and the open source scene
OpenSource
96Cover disc Test four of the latest distros:
On your free disc
Ubuntu 12.10, Kubuntu
Xubuntu
Lubuntu
Tutorials30 Monitor your server with tmux Remotely check your server in easy steps
34 Create and manage boot scriptsand startup applications
Automate your startup experience
38 Make an open source to-do listwith Emacs
Use Emacs to organise your workflow andtake control of your time
Developer tutorialsFeatures16 Get on board
with PythonReporting back from PyCon
22 Install Android onthe Raspberry Pi
A world of new possibilities
42 Wheres the Hurd? We investigate the true
kernel of the GNU OS
48 Supercomputing forthe massesWe talk to Andreas Olofssonabout Parallella
70 Office suite super-testFour of the best in opensource go head-to-head
86 Q & AYour problems solved!
FEATU
RE
16Get on board with PythonLinux Users Richard Smedley reports backfrom this years PyConUK event. Catch upon all the action and learn why Pythons
community is one of the best there is.
52 Build extensions for the GNOMEdesktop environmentExploring GNOME 3s best new capability
56 Create a network ofRaspberry Pis
Bring several Pis together on a network
with centralised storage and more
Reviews
Open up a world of newapps and projects in
just a few easy steps
22Install Android onthe Raspberry Pi
62 Samsung GalaxyNote 10.1
The Note migrates to the tabletform factor in fine style
64 Synology DS213airSynologys latest small andhome office NAS box
66 Archos 101XS
Archos adds keys to itslatest tablet
68 GNOME 3.6 GNOME moves further down
the path of simplification
70 Office suite group test Four of the very best open
source suites battle it out
76 CAINE 3.0 We rate the latest build of this
penetration-testing distro
78 Ubuntu 12.10 We score Canonical on Ubuntus
new (and controversial) features
80Fractal DesignDefine R4The perfect home server case?
82 GNOME Shell Remix Ubuntu with GNOME 3 Shell
Subscribetoday!
20 Save at least 30%on the shop price.US customerscan subscribe viapage 83
W o r l d M a g s . n e t W o r l d M a g s . n e t
W o r l d M a g s . n e t
http://worldmags.net/http://worldmags.net/7/22/2019 Raspberry Pi Android InstallationLinux User & Developer Magazine Issue 1202012
5/100
Get MORE with aDedicated Server
from Webfusion
This years must have tech included FREE!
Until the end of 2012, purchase any* Dedicated Server from Webfusion and you will be theproud owner of the technological marvel that is the Raspberry Pi. Our dedicated servers giveyou the control and reliability you need for your internet presence.
Core dedicated server features:
Up to 2x Intel Xeon E5640 2.66GHz CPUs
Up to 32GB RAM
Up to 4 SATA or SAS hard drives
From 119.99per month
*Limit of one Raspberry Pi per customer. Quoted prices are correct as of the date of publication. All prices are exclusive of VAT and are subject to change. Terms and conditions apply.
Raspberry Pi is a trademark of the Raspberry Pi Foundation.
CALL SALES NOW on 0808 163 4509 or visit www.webfusion.co.uk/Pi
Unmetered data transfer
FREE Plesk 11 control panel included
Managed and Self-managed options
Powered by
W o r l d M a g s . n e t W o r l d M a g s . n e t
W o r l d M a g s . n e t
http://worldmags.net/http://worldmags.net/http://worldmags.net/7/22/2019 Raspberry Pi Android InstallationLinux User & Developer Magazine Issue 1202012
6/100
06News | 12Opinion | 94Online
Samsung has announced another entry in
its Chromebook partnership with Google,
making the move away from x86-based
Intel processors with an ARM-based ultra-
compact device aimed at buyers on a budget
or, as Google itself would have it, a computer
for everyone.Based on Samsungs existing Chromebook
platform a cut-price family of low-power
laptops which use Googles Chrome OS, based
on the open source Chromium Linux cloud-
powered operating system the new Samsung
Chromebook replaces the typical lightweight
x86 Intel chip with a dual-core Exynos V ARM-
based processor, a quad-core version of which
can be found in Samsungs flagship Galaxy S III
Android smartphone.
Running at 1.7GHz, the chip includes a
quad-core ARM Mali-T604 graphics processor
which handles both the HDMI
display connector
www.linuxuser.co.uk6
is not
p r o v i d e d
to the public
under an open
source licence.
Much of the code,
however, is: ChromeOS itself is based on the open
source Chromium OS, while the embedded
Chrome browser is available as the open source
Chromium project.
For consumers, the cut-price Chromebook
could well be an entry point into Linux as a day-
to-day operating system. For those who know
their way around a shell already, the presence
of a development mode accessed by holding
Esc, Refresh and Power then pressing Ctrl+D
at the boot screen provides a way to boot from
external devices, replace the operating system
and turn the Chromebook into a low-cost ARM-
based laptop running almost any Linux-based
operating system.
Google, meanwhile, is positioning the
Samsung Chromebook as the answer to
Windows users prayers. Theres no need to
worry about security updates and maintenance
is easy; all you need to do is charge the battery,
boasted Googles Sundar Pichal, senior vice
president of the companys Chrome division at
the launch. It just works.
Without a Linux kernel at the new machines
heart, its unlikely Pichal would have been able
to make such a declaration.
The new Samsung Chromebook is available
through Google Play, Currys and PC World,
priced at 229.
Entry-level Linux-based laptop takesaim at the mass market
HARDWARE
Google &Samsung
launch ARMChromebook The Samsung-manufactured Chromebookuses an Exynos V ARM-
based processor and runs
the Linux-based Chrome OS
and the integrated 11.6-inch 1366x768 display.
Storage is handled by an eMMC 16GB solid-
state storage device helping the Chromebook
hit a headline-grabbing sub-10-second boot
time while 2GB of DDR3 memory is included
as standard.
A switch to an ARM processor morecommonly found inside smartphones provides
the Chromebook with impressive battery life,
with around six hours easily available during
web-connected usage. More importantly, the
use of web apps in Chrome OS which are
rendered through an embedded version of
Googles Chrome web browser avoids any
compatibility issues with legacy apps that
normally accompany a shift in architecture.
The specifications aside, Googles positioning
of the device as a computer for everyone is
interesting indeed. As well as selling the system
through the Google Play marketplace alongside
its Nexus 7 Android tablets, the company
has organised high-street placement for the
Chromebook in major chains throughout the
world and just in time for Christmas.
In other words, a major brand
is attempting to put Linux
on the laps of millions and
where Google leads, others
are likely to follow.
Detractors of the
Chromebook project often
point out that its not a truly
open platform: like Android,
Google develops Chrome OS
privately and often
includes code which
W o r l d M a g s . n e t W o r l d M a g s . n e t
W o r l d M a g s . n e t
http://worldmags.net/http://worldmags.net/7/22/2019 Raspberry Pi Android InstallationLinux User & Developer Magazine Issue 1202012
7/100
The latest in the Linux community
News
OPEN SOURCE
www.linuxuser.co.uk7 www.linuxuser.co.uk7
Linuxcalendar
29Nov2012
Android Magazine issue 19www.littlegreenrobot.co.ukAndroid Magazine, your best andonly print source for everythingAndroid, is coming out today. Checkout whats in store over on page 60.
CloudStackCollaboration
ConferenceThe Venetian, Las Vegas, Nevada
USA
http://collab12.cloudstack.org/The Apache-run conference willhave presentations from thedevelopers contributing to theApache CloudStack project, as welladmins who are using CloudStackto build clouds to scale.
30Nov-02Dec2012
Users testing the cutting-edge
build of Firefox for Android,
from the Aurora branch, are
now able to access Mozillas
Firefox Marketplace. Designed
as an answer to Googles Chrome
Store, the Firefox Marketplace
provides free and paid-for
web apps which are designed
specifically for the open source
Firefox browser.
While users have been able to
test the Marketplace on desktop
Firefox releases for some time,
the addition of support in the
Aurora Firefox for Android build
marks the first time it has been
available on mobile devices.
Sadly, the service is still closed
off from some: Mozillas decision
to focus exclusively on developing
for the ARM architecture means
Firefox for Android cant be
installed on devices with Intels
x86-based Atom processor, like
the Motorola Razr i smartphone.
The Aurora build of Firefox is at:
www.mozilla.org/mobile/aurora .
Canonical founder Mark Shuttleworth has
announced that selected aspects of Ubuntu
13.04, codenamed Raring Ringtail, are to
be developed in secret so as not to attract
criticism from the community.
Going against the open source ethos of
transparent development, some new featuresto be launched with Ubuntu 13.04 will be kept
under wraps at Canonicals HQ until the OS is
ready for release a move which appears to
have much to do with community backlash
over the switch to the Canonical-developed
Unity desktop environment and the numerous
glitches and bugs that followed.
Described by Shuttleworth as a few items
with high tada! value, the precise portions of
the OS which will be hidden until launch have
not been detailed. Those who are interested can
apply for access, however, with Shuttleworth
claiming that Canonical is happy to engage with
contributing community members that have
established credibility in Ubuntu.
The skunkworks approach has its
detractors, Shuttleworth admitted in astatement to the community. Weve tried it both
ways and, in the end, figured out that critics
will be critics whether you discuss an idea with
them in advance or not. Working on something
in a way that lets you refine it till it feels ready
to go has advantages: you can take time to
craft something, you can be judged when youre
ready, you get a lot more punch when you tell
your story, and you get your name in lights.
The secretive projects, which Shuttleworth
claims are all groundbreaking in free
software, cover areas such as web standards,
cryptography, and aesthetic and performance
improvements, with Canonical keeping eachunder close guard until launch and inviting only
pre-vetted members of the Ubuntu community
to help with their development. With Canonical
already under the spotlight for what is seen
as an increasingly negligent attitude to its
community of users and developers, and to the
open source community in general, this latest
announcement is likely to do little to cool the
flames gathering against the company.
OPEN SOURCE
Canonical hides Ubuntu 13.04development from the community
LISA 12 Sheraton San Diego Hotel and
Marina, San Diego, California
USA
h t t p s : / / w w w . u s e n i x . o r g / conference/lisa12In addition to the wide varietyof topics covered in the LISA 12programme, the programme
committee has created threespecific conference themes, ortracks, for those looking to focuson a key subject; these cover theareas of cloud computing, IPv6 andsysadmin skills.
09-14Dec2012
Shuttleworth blames critics for new secretive strategy
Marketplace is now
available on Android,
providing a new route
for installing web apps
ANDROID
Mozilla opens Firefox
Marketplace on Android
Mark Shuttleworth, seen here on board the
International Space Station, is hiding some
parts of Ubuntu 13.04 from the community
W o r l d M a g s . n e t W o r l d M a g s . n e t
W o r l d M a g s . n e t
http://worldmags.net/http://worldmags.net/7/22/2019 Raspberry Pi Android InstallationLinux User & Developer Magazine Issue 1202012
8/100
INDUSTRY
Your source of Linux news and viewsOpenSourceContact usRegister and post your commentswww.linuxuser.co.uk/forum/
Email us [email protected]
Windows 8 harms user freedomThe launch of Windows 8 occurred very
recently Microsofts new, one-size-fits-
all operating system for desktop, tablets,
and smartphones. Thanks to the Interface
Formerly Known As Metro, the folks at
Redmond plan to claw back their market sharein the PC space by finally cracking the portable
computing market. Or at least, thats the idea.
Microsoft is going through the same motions
that Canonical and GNOME have done in recent
years, trying to convince people that their
interfaces are fine for mouse and keyboard
even when the results seem to contradict this.
On the day of launch, Jim Zemlin, executive
director of the Linux Foundation, wrote a blog
on how Windows 8s hybrid approach is too
little too late:
A lot has changed in the three years since
the last major Windows announcement.
Netbooks were on the rise. The iPad wouldntbe introduced for another six months and
Nokia still had the lead for most smartphone
sales in the world that is no longer the case.
Googles Android OS only accounted for a
3.9% share of the smartphone market in 2009
(according to Gartner Group);
last year that rose to 64%
of the smartphone
market. In 2011,
smartphones for the
first time outsold PCs
(including tablets). With
hundreds of millions
of those smartphones
running Android, the
consumer market is
fully accustomed to Linux-
based software.
Zemlin argues that
we are living
s o m e w h a t
in a post-
desktop
wo r l d ,
or at
least
www.linuxuser.co.uk8
The recent release of Windows 8 has causedconcern for the leaders of the free software world
its basically Windows 7 with new surveillance
features and even more restrictions on users
freedom. Whether or not Microsoft wants you
to know it, its easy to switch to free software
instead of choosing a downgrade to your rights
as a computer user for example, your rights to
know what the system is doing and to change
behaviours you dont like. Were here because
we want people to know that they dont have to
buy Windows 8 this is a great time to upgrade
to free as in freedom software.
Libby Reinish says that Windows 8 cuts
down on user freedom
well into a transition period, and Linux is
helping to drive this as the base for Android and
Chrome OS.
Microsoft is stuck in the liminal space
between the desktop-driven, cost-per-
software licence world they dominated and
the era we are just now entering: a world
driven by open source software and services,
continued Zemlin, pointing out that the price of
Microsoft hardware is up to six times more than
hardware powered by Linux. He attributes this
to companies like Google not having to spend
so much on R&D, with the Linux kernel and its
estimated $10 billion (6.2 billion) worth of
development readily available, along with FOSS
such as WebKit.
The Free Software Foundation agrees with
this, and activists set out on the morning of
release to New Yorks Microsoft store to hand
out pamphlets to the people braving the cold
to attend the launch event. In it, they warned of
the dangers of proprietary software:
Microsoft has already spent almost 2 billion
dollars on slick advertisements to convince
people that Windows 8 will revolutionise the
way they use computers, said Libby Reinish,
campaigns manager at the FSF. The fact is,
The gnu is a symbolof software freedom
Jim Zemlin believes that
mobile computing is the future
CC:www.fsf.org
CC:www.fsf.org
W o r l d M a g s . n e t W o r l d M a g s . n e t
W o r l d M a g s . n e t
http://worldmags.net/http://worldmags.net/7/22/2019 Raspberry Pi Android InstallationLinux User & Developer Magazine Issue 1202012
9/100
The latest in the Linux communityNews
OPEN SOURCE
Imagine Publishings All About Space
magazine is available in print and digital
formats right now. Packed full of cosmic
content, All About Space delves into the
wonders of space exploration, astronomy
and space science every month, providing in-
depth knowledge from a team of experts on
an amazing array of topics. The magazine isunlike anything else out there and will appeal to
seasoned space fans and new explorers alike,
with a regular dose of amazing articles, exclusive
interviews and jaw-dropping images.
Inside youll find some mind-blowing articles
and features explaining the amazing universe
around us. The latest issue reveals how some of
the biggest explosions in the universe, namely
All About Space, the most excitingspace magazine ever, is out now!
PUBLISHING
supernovas, work. There are also excellent
articles on tracking hazardous asteroids, the
first moonwalk, NASAs first space station, the
groundbreaking Cassini mission and much
more. All About Space also makes astronomy
accessible to everyone with a host of stargazing
articles explaining how to buy a telescope and
what to look for in the night sky.All About Space is available online at the
Imagine eShop (www.imagineshop.co.uk)
and in all good newsagents and supermarkets
right now. You can also download the digital
version for iPhone, iPad and Android from
www.greatdigitalmagazines.com. Visit the
magazines website at www.spaceanswers.com
to get your online space fix.
Unsure what to get sysadmins, codersor FOSS advocates this Christmas? Wemight have an idea for youIts only a month until Christmas now, and while the more organised
folks may have already got gifts for all their family, friends and
secret Santas, the rest of us have probably been a bit too busy to
even figure out whos getting gifts. Well, Linux User is here to give
you a helping hand as were offering 10% off on all orders from the
ImagineShop until 24 December 2012.
This offer is valid on subscriptions to the magazine,
back issues of Linux User, bookazines such as
the Linux & Open Source Genius Guide Vol. 2,
and DVDs from Web Designer. There are
further discounts available on all of these
that you can find out about on page 75. You
should also keep an eye on our Twitter feed
we regularly tweet out links for fantastic
subscription deals that you can redeem on the
ImagineShop, such as getting the first three
magazines in a subscription for 1 each.
So if youre scrambling for a present
to give to a tech friend or colleague,
you can sit back and get them
some magazines from the
comfort of your desk chair,
and properly enjoy the
holiday season.
In case you missed it, Linux User magazine is
available to read on any digital format thanks
to the excellent digital editions super-site,
www.greatdigitalmags.com. The site
brings together Linux Users offerings
on Zinio and Newsstand, allowing you to
enjoy your favourite mag on your Mac, PC,
iPad, Android and a host of other devices.
There are some incredible subscriptionincentives up for grabs too, not just for Linux
User but for all Imagine Publishing titles.
To find these amazing deals, head over to
www.greatdigitalmags.com, where you
can find links to back issues, subscriptions
and more, across almost every platform. Its
all available in just one place, and there are
massive savings to be had!
PUBLISHINGGrab LinuxUser digitally atgreatdigitalmags.com
All About Space
shows you how to
get stargazing
All About Space
PUBLISHING
Save 10% on all Christmas
orders of Linux User
W o r l d M a g s . n e t W o r l d M a g s . n e t
W o r l d M a g s . n e t
http://worldmags.net/http://worldmags.net/7/22/2019 Raspberry Pi Android InstallationLinux User & Developer Magazine Issue 1202012
10/100
Your source of Linux news and viewsOpenSourceContact usRegister and post your commentswww.linuxuser.co.uk/forum/
Email us [email protected]
www.linuxuser.co.uk10
There have been plenty of valid concerns
regarding the future of computing with regard to
UEFI Secure Boot, mainly with how it will lock out
people wanting to install a Linux distribution.The
Linux Foundation has been following the situation
and has decided to take action by purchasing
a key from Microsoft, and signing its own smallpre-bootloader that will be available to all users of
open source. The Linux Foundation explained the
reasoning behind this move in a blog post:
The Linux Foundation is committed to giving
users freedom of choice on their platforms.
Conforming to this stance, we have already
published a variety of tools to permit users to
take control of their secure boot platforms by
replacing the Platform Key and managing (or
replacing) the installed Key Exchange Keys
however, as one of the enablers of the Linux
ecosystem, the Foundation recognises that not
everyone is willing (or able) to do this, so it was
also necessary to find a solution that would
enable people to continue to try out Linux and
other open source operating systems in spite of
the barriers UEFI Secure Boot would place in their
way and without requiring that they understandhow to take control of their platforms. Therefore,
we also formulated a technical plan, which is
implemented in this pre-bootloader, to allow
distributions to continue functioning in a secure
boot environment.
The source code for the pre-bootloader is
available at the moment without the key, and you
can get it from the Git repo as Loader.c. The Linux
Foundation admits that it will take a little time for
the key and signature to be obtained, but it will
announce when it receives one.
Foundation takes action to ensure everybody can continueusing open source operating systems
OPEN SOURCE
The Linux Foundation obtains UEFI key
Ubuntu is a free operating system, free as in
speech and as in beer, and Canonical is keen
to reinforce this Richard Stallman ethos as it
announces a new way for users to optionally
contribute to Canonical before they download
the desktop version of Ubuntu.This comes in
the form of real money donations.
Its not just a fixed donation there are
eight categories that people can selectively
give money to. This will let Canonical know
which parts of Ubuntu people want improved.
Categories include Unity, performance
optimisation, hardware support, phone and
tablet versions, support of different Ubuntu
flavours, and a general tip to Canonical. You
dont have to give to each category, though,
and donations start at $1 per category.
Obviously you dont have to make any
contributions if you dont want to although
Users can now tell Canonicalwhat parts of Ubuntu needwork, for a price
Now that Ubuntu 12.10 is out and more
people will be downloading the distro, it will be
interesting to see what contributions are made,
and what they go towards. You can see the
page by selecting Ubuntu Desktop (and then a
version) at: www.ubuntu.com/download.
A screen Ubuntu users may have to get used to
The Linux Foundations goal is to
promote and protect the Linux kernel
The future
of firmware
interfaces is closed
the donation page shows up before you can
download the ISO, and has a recommended
$2 donation to each category already filled in
by default. Theres a link at the bottom of the
page to skip it entirely and go straight to the
download page.
OPEN SOURCE
Donate to Canonicaland steer Ubuntu
W o r l d M a g s . n e t W o r l d M a g s . n e t
W o r l d M a g s . n e t
http://worldmags.net/http://worldmags.net/7/22/2019 Raspberry Pi Android InstallationLinux User & Developer Magazine Issue 1202012
11/100
www.1and1.co.ukCall0844 335 1211or buy onlineDOMAINS |E-MAIL |WEB HOSTING |eCOMMERCE |SERVERS
FULL DNS CONTROLComplete DNS and Contact Management via oureasy-to-use 1&1 Control Panel
1&1 DOMAIN APPCheck and register domains on-the-go
SUPPORT24/7 phone and e-mail support
With more than 11 million customer contracts, over 2 billion inannual turnover, 5000 employees, 18 million registered domainsand 5 high-performance data centres, we are one of the worldslargest web hosts and a leading domain registrar.
TRUST THE UKs NO. 1
Included with all 1&1 Domains:
Subdomain creation and redirectionMasked URL Forwarding
.co.uk
.com
.info
.net
.org
.co
Starting at
0.99first year*
1&1 DOMAINSSECURE YOUR DOMAIN AND SAVE!
* Offers apply to fir st year of registration. Second year and subsequent years will b e charged at the reg ular price. Visit www.1and1.co.uk for full offer details, terms and conditions. Prices exclude VAT.
W o r l d M a g s . n e t W o r l d M a g s . n e t
W o r l d M a g s . n e t
http://worldmags.net/http://worldmags.net/7/22/2019 Raspberry Pi Android InstallationLinux User & Developer Magazine Issue 1202012
12/100
www.linuxuser.co.uk12
Your source of Linux news and viewsOpenSource
Jon Masters summarises the latest goings-on inthe Linux kernel community, including a look at the
features being merged for the upcoming 3.7 release
Jon MastersTHE KERNEL COLUMN
Linus Torvalds announced the release of
the 3.6 kernel, saying that while the release
did not contain earth-shattering new
architectures or file systems, it did overall
represent solid progress. We summarised
some of the new features that landed in Linux
3.6 last issue. With the release of 3.6 came
the traditional opening of the merge window
for 3.7. This is the period of time during which
Linus is willing to pull potentially disruptive
patches (changes) into the kernel. This typically
lasts for two weeks and is followed by a period
of stabilisation, and multiple RC (release
candidate) kernels are made available for
testing. Linus gave a heads-up that he would
be travelling for much of the merge window, but
that didnt seem to pose much of a problem.
Features pulled in during the merge window
included a brand new architecture (AArch64,
also known as ARMv8 or arm64 in the kernel
community). This is the latest architecture
revision from ARM, the company that powers
about 90 per cent of all cellphones and has had
its designs shipped in billions of processors
so far this year alone. ARM has traditionally
been an embedded architecture. The billions
of ARM-powered processors in use worldwide
are typically found within gadgets, such as
this authors fitbit personal step counter, or in
washing machines and automotive control and
entertainment systems. In this context, there
are many different levels of ARM processor,
from the more deeply embedded simpler cores
without the ability to run a full OS, to higher-
end multiprocessor cores running Linux on
Android smartphones.
ARM is known for its focus on low energy, as
well as the licensed nature of the architecture.
ARM doesnt make processors it licenses its
designs for use by the many others who do makeprocessors. Linux has run on suitable 32-bit
ARM-based systems for well over a decade,
and in recent years has gained popularity
as the foundation upon which most Android
devices are built. And over the last few years,
organisations such as Linaro have helped to
drive the development of Linux support for
ARM by bringing together a wider community
of companies and ecosystem players involved.
Over the past few years, a new opportunity has
emerged to take advantage of the low-energy
DNA that drives ARM by using these processors
in server-class systems.
Servers can be 32-bit based, but many
workloads require 64-bit support. Thats where
the new AArch64 ARM architecture comes in.
It brings many new features to ARM, not least
of which is 64-bit addressing. The new support
within the Linux kernel, contained within
arch/arm64 (renamed after community debate
around the original aarch64 choice of directory)
enables the core architecture features but does
not yet have support for any real processors.
Those will come later. The initial support was
merged after several months of review on
the Linux Kernel Mailing List by upstream
maintainers such as Arnd Bergmann, who is
responsible for many of the de facto standards
required of new architecture code added to Linux.
Jon Masters is aLinux kernel hacker whohas been working onLinux for almost 17 years,since he first attendeduniversity at the age of 13.Jon lives in Cambridge,Massachusetts, and worksfor a large enterprise Linuxvendor. He publishesa daily Linux kernelmailing list summary atkernelpodcast.org
W o r l d M a g s . n e t W o r l d M a g s . n e t
W o r l d M a g s . n e t
http://worldmags.net/http://worldmags.net/7/22/2019 Raspberry Pi Android InstallationLinux User & Developer Magazine Issue 1202012
13/100
www.linuxuser.co.uk13
The kernel column Jon MastersOpinion
OPEN SOURCE
Another feature pulled into Linux 3.7 is
support for the supervisor mode access
prevention on Intel processors. This aims
to prevent kernel code from being able to
compromise the running system, even if it is
exploited by passing bad values in from user
space (such as were done by various example
NULL pointer kernel exploits several years
ago). By toggling a special bit in the CPU control
registers, the kernel can effectively instruct the
hardware to prevent the kernel from accessing
user space (regular user process) memory
except under explicit control. Therefore various
classes of exploit are removed because eventhough the kernel has the power to disable
the protection again, a simple pointer access
to user space cannot simultaneously disable
the SMAP protection, so exploit code has no
straightforward way to use such simple attacks.
One final feature of particular note in 3.7 is the
removal of udev from the critical path of loading
some system firmware. The kernels built-in
firmware loader will now always attempt to load
firmware files directly from user space (from
the file system) without invoking udev. Udev
(the user-space device management daemon)
typically handles firmware loading, as well
as device driver requests, and new hardwaredevice detection, by receiving messages from
the kernel over a special netlink socket and
reacting according to various customisable
rules. Unfortunately, recent changes to udev to
restructure its approach to parallelised loading
of drivers frustrated Linus into having the kernel
handle this itself by default. Udev can still
handle firmware loading, but the kernel will first
attempt to load files itself, from /lib/firmware.
Alignment faults in 3.6Linux supports many different architectures,
some of which behave quite differently from
the x86 Linus originally used way back in 1991.
In particular, many modern RISC architectures
embrace the notion of simple being better by
having limited support for misaligned memory
accesses. On these architectures (such as
ARM), it is not possible to directly perform an
operation on a memory location. Instead, the
architecture behaves in a load store fashion
such that all memory locations must be loaded
into a register, then manipulated, then the
result stored back.
Alignment is a natural property of all data
types. A 4-byte integer value, the default on
many systems, has a natural alignment on a
4-byte memory boundary. So, for example,
attempting to load or store such a value atan odd-numbered memory address would
be in clear violation of the natural alignment
requirement of this type. Many modern
architectures hide such alignment issues by
having the hardware perform expensive multi-
load operations behind the scenes under such
circumstances, while others will generate an
alignment fault and insist that the programmer
(or the compiler) do the right thing and fix the
underlying code. ARM is one such architecture
that started life with very strict requirements,
and has relaxed more recently.
Modern ARM systems do include (limited)
support for unaligned data access. Though they
are more expensive (in terms of performance
overhead), they are handled behind the scenes.
There are some circumstances under which this
is not possible due to specific instructions being
used. In such cases, the hardware will generate
an alignment fault, which will be handled by
the kernel. The kernel typically performs a
more expensive version of the intended load
or store transparently, optionally recording a
warning about the inefficient waste of processor
Linus said he would be travelling
for much of the merge window
resources. During this operation, it may make a
call to the kernels schedule() algorithm to give
another process time to run. Unfortunately,
there are some situations wherein the scheduler
must not be called. These include certain criticalatomic parts of the kernel itself. In the case
of Linux 3.6, it appeared as if this required was
being violated, with warnings of scheduling
while atomic being emitted.
It ultimately turned out that certain device
drivers were exposing a problem in the
alignment handler. By accessing misaligned IP
header fragments, the driver concerned was
triggering an alignment exception within an
atomic-critical section of kernel code, which
was then resulting in the scheduler being
called from within the alignment handler.
Although the driver was later fixed to improve
performance (by using only aligned data), the
problem with the alignment handler itself did
require fixing to prevent unwanted system
crashes. A patch has been successfully tested
and will be merged.
Finally this month, there has been an
ongoing discussion around ext4 file system
corruption that can occur under very specific
circumstances involving a system crash during
an update to an ext4 file system running with
journal checksums turned on. This is not the
default, and it is a rare situation, but all users are
advised to update their systems.
nLinus
Torvalds:
the 3.6 kernel
is solid
progress
CC
.GFDL
.Perm
iss
iono
fMar
tin
Stre
icher,
Editor-
in-
Chief,LINUXMAG
.com
W o r l d M a g s . n e t W o r l d M a g s . n e t
W o r l d M a g s . n e t
http://worldmags.net/http://worldmags.net/7/22/2019 Raspberry Pi Android InstallationLinux User & Developer Magazine Issue 1202012
14/100
THE OPEN SOURCE COLUMN
www.linuxuser.co.uk14
Your source of Linux news and viewsOpenSource
Apples latest product launch wasmet with disdain from many of itscustomers. But why, wonders Simon
Throwing awayan iPad
Simon Brew is a technologywriter and editor,working across theLinux, Windows andMac OS X platforms
Watching the live reactions to an Apple
announcement rarely tends to expose you to
some of the more considered thoughts on a
product launch. Yet the response to Apples
unveiling on 23 October of a pair of new iPad
products was a testament to just how warped
the technology business has become.
Appreciating its traditional to bash Apple at
every opportunity, I find myself admiring the firmin some ways. Granted, its closed gate approach
to computing is something that continually
needs fighting, but its marriage of software and
hardware remains pretty much unparalleled
over the past decade or so.
At Apples event in October, though, it sprung
a surprise. It had widely been expected that the
firm would showcase the iPad mini, and thats
exactly what it did. But then it had something
else up its sleeve: a fourth generation of the
iPad. This was just over half a year after it had
launched the third generation of the iPad to
similar fanfare. And people were not happy.
To paraphrase what, at one stage, was
appearing to be something of a consensus,
the feeling seemed to be but I only bought one
of those half a year ago, and now theyve gone
and changed.
So lets think about that for a second.
What Apple has successfully propagated is a
feeling among its customers and many in the
technology world that you absolutely have to
have the latest and greatest. Notwithstanding
the fact that the original iPad is still doing the
job that it was designed for perfectly well,
there appears to be abject horror in places at
the thought that people will have to upgrade a
product that was only new on the shelves earlier
in the year.
The mini wasnt the only new iPad launched
The Androidfightback?
But where did this craving come from? What
new feature does the fourth-generation iPad
possess that the third didnt, that people cant
possibly live without? Within minutes of the
announcement, eBay was no doubt filling up
with pretty much brand spanking new iPads,
as the disposal culture of modern technology
continues to take hold.
That in itself is a burgeoning problem. Firmslike Apple like to lock us out of upgrading
products, and even the likes of HTC is now
making phones where youre not even allowed to
change the battery yourself (when did we start
to accept this insanity as the norm, I continue
to wonder). The ramification of this, longer term,
is that more and more people will just throw
something away after a year, in order to get the
latest model. People will change their phone just
because its less hassle than sending it off to get
a new battery put in. Thats madness, isnt it?
What Apples announcement showed is that
you dont actually need to add that much for
people to instantly decide to spend another
500 or so on another piece of technology, just
to keep up with the proverbial Joneses. Wouldnt
it be refreshing, though, if a firm such as Apple,
that has so blazed the trail for persuading
people to replace their technology on an annual
basis, actually made a stand to say enough is
enough. Itll never happen, but just how long
can the world at large support a culture where
intricate technologies are so disposable?
Looking at the reaction to the aforementioned
Apple launch, its going to have to do so for a
great deal longer, sadly
In the smartphone sector, Android continuesto lead the way over Apple and its iOS-basedproducts. In tablets, its success has beenless significant, but might there now be signsthat Android-based competitors are makinginroads? Certainly products like the Nexus 7and to a lesser extent the Kindle Fire help.But theres a long way to go to topple Appleand its all-conquering (so far) iPad.
W o r l d M a g s . n e t W o r l d M a g s . n e t
W o r l d M a g s . n e t
http://worldmags.net/http://worldmags.net/http://worldmags.net/7/22/2019 Raspberry Pi Android InstallationLinux User & Developer Magazine Issue 1202012
15/100
www.linuxuser.co.uk15
The free software columnOpinion
OPEN SOURCE
THE FREE SOFTWARE COLUMN
As everybody knows by now, the Raspberry
Pi is the perfect geek toy, a credit-card-sizedcomputer that costs very little and comes with
its own operating system, Raspbian, which is
an optimised reworking of Debian GNU/Linux.
The Raspberry Pi can be plugged into a TV and
a keyboard, and will do most of the useful things
a PC can do. An SD card is used for booting and
storage of data. Raspbian defaults to an LXDE
desktop, and comes with development tools
and most of the basic applications and utilities
for working and playing on a computer. The
Raspberry Pi is also shockingly cheap $35.
But the interesting part of the Raspberry Pi
is the ambition of its caretakers that it should
become an ultra-low-cost tool for introducingschoolchildren to the lost idea that computer
programming can be fun, as it was for the kids
who grew up with the Sinclair QL, ZX Spectrum
or BBC Micro three of four decades ago. The
early home computers were cheap and cheerful,
but you could get inside and look at the source,
take them apart and learn.
Some of the kids who grew up with BBC Basic,
Dungeons & Dragons and Pac-Man became the
first generation of developers to work on Linux
and other free software. Jeremy Allison, for
instance, had a Sinclair QL, which was a 32-bit
The Raspberry Pi can be the affordable routeto teaching schoolchildren the lost idea thatcomputer programming can be fun
Raspberry Pi for schools
machine, even though it had an 8-bit bus. The
source code of the operating system, QDOS, wasincluded, perfectly legally.
The assembler source, the commented
source, you could buy and look at, and take
apart and understand, says Allison. It was
burnt into ROM, but you could modify it there
was a company that had disassembled it for me,
legally and then along came the IBM PC and
Microsoft and crushed all the creativity out of it,
just ground over it with a tank tread.
So the kids growing up these days dont know
any of that stuff. They dont know the basics of
how the thing works. Theyve got black boxes
that rattle because theyre broken, and they
cant look inside. You cant learn from that.I want anyone in the world to have the
same opportunities that I had when I was
growing up, adds Allison. The early Eighties
was a period of intense creativity in the
computer industry in Britain.
But ICT in schools went backwards in the UK
and has been locked in to a costly Microsoft-
only world, where children have been educated
as users rather than doers. Lock-in and the
upgrade cycle have resulted in the same
escalating costs that have afflicted other
sectors of the IT industry, forcing increased
expenditure for smaller and smaller returns.
For most children, ICT in schools has been
little more than a training programme for
using Windows and Microsoft Office useful
for secretaries and filing clerks, but not
helpful for getting to know how the technology
works. A common complaint has been that no
ICT course has a programming or a systems
module, instead students are taught to be
mere consumers of technology, and operators
of applications.
Programming can be fun, and the principles
are easy to learn. The Raspberry Pi can be the
affordable route to learning this lesson.
Richard Hillesley writes aboutart, music, digital rights,
Linux and free software fora variety of publications
nProgramming can be
fun and easy to learn for
schoolchildren, and the
ultra-low-cost Raspberry Piis an ideal tool for teaching
W o r l d M a g s . n e t W o r l d M a g s . n e t
W o r l d M a g s . n e t
http://worldmags.net/http://worldmags.net/7/22/2019 Raspberry Pi Android InstallationLinux User & Developer Magazine Issue 1202012
16/100
www.linuxuser.co.uk16
Despite masterpieces of medieval and 20th Century
architecture, and a fascinating industrial heritage,
Coventry isnt everyones ideal long weekend getaway. That
changed for the last four days of September, when the city
hosted PyConUK the annual gathering of the countrys
enthusiastic and growing Python community for the
second time.
Regular readers will know that, while LUD maintains
an even-handed approach to open source languages and
technologies, we find ourselves reporting a lot of cool Python
projects, and its increasingly the language of choice for
everything from education and banking to research and big
data. Many programming languages have a strong community
around their use, but Pythonistas seem to have a sense of
belonging as if theyve somehow, in finding Python, come
home that is normally reserved for Lisp programmers, and all
without the smugness occasionally seen in the latter group.
This is a confident community, and one not without a sense
of humour as you would expect from a language named in
honour of the surreal Monty Python show. Music and fun
were on offer at PyConUK, alongside some serious hacking,
very cool projects and some productive coding in worthy
causes. Lets start with the cool tech.
Last years PyConUK Blitz themereappeared as the PyCon poster
Get on board with PythonFeature
From medieval Coventry, via theclassroom, to Africa, and even
operetta and the high seas,PyConUK represents the best of
the Python community
Get on board
with Python
W o r l d M a g s . n e t W o r l d M a g s . n e t
W o r l d M a g s . n e t
http://worldmags.net/http://worldmags.net/7/22/2019 Raspberry Pi Android InstallationLinux User & Developer Magazine Issue 1202012
17/100
The PyConUK 2012 conferenceGet on board with Python
www.linuxuser.co.uk17
FEATURE
Slice of PiPython is the official programming language of the Raspberry
Pi, and Alex Bradbury the lead Linux software developer at
the Raspberry Pi Foundation gave the story so far, and the
challenges ahead. The Raspberry Pi was created as a low-
cost educational tool, but hackers have taken it to their heart,
even running breweries and data centres with it.
The community has contributed many improvements
to the core stack, such as dynamic overclock, and great
software like the 3D Penguins Puzzle game. Theres
much more to be done and Bradbury was frank about
the limitations of the current software while optimistic
about future developments, the possibilities of more edu-
specific software releases and the potential for the Pi in thedeveloping world.
Shoaib Sufi of the Software Sustainability Institute spoke
of his mission to promote better software engineering and
management for better research outcomes. As software
is everywhere, and all-pervasive in science, Sufi demands
better software [to produce] better research.
Intelligent approachBig A, little i was a well-illustrated talk by
games programmer Tendayi Mawushe, pleadingthe case for more use of AI algorithms by developers.
Software provides a better user experience when programs
display awareness of their context, and with good use of
examples like the familiar farmer/fox/goose/corn puzzle
(represented as states and transitions) and moving blocks
games, Mawushe demonstrated making a program give
answers about its own behaviour by tracing method calls.
Various heuristics were examined, giving attendees ideas of
how to bring some AI goodness to their own code.
Dealing with a more mundane annoyance, Vladimir
Keleshev introduced docopt, to build beautiful command-
line interfaces. Replacing the current opaque systems with
a mere 384 lines of code, docopt works from simple rules
to allow the program to take the POSIX standard of usagepattern and turn it into your UI.
As well as the Python reference implementation,
docopt has been implemented in Ruby, CoffeeScript/
Simply pass usage to docopt in this familiar form, and your command-line UI is built
Stephen Hawkes came up with the Victoriantheme of the publicity which also extended to a
Gilbert & Sullivan song
Coders and teachers learnt from each other in a rewarding education sprintCC: @tdobson
We get to introduce free &open source to a widercommunity of childrenand older peopleAlex Bradbury, Raspberry Pi Foundation
Python is the officialprogramming language
of the Raspberry Pi
Catch upVideos of most of the PyConUK 2012 sessions, with
synchronised slides, are up on the PyConUK website,
thanks to the dedicated filming by Birmingham LUGs
Tim Williams:
http://autoview.autotrain.org/course/view.php?id=15
Get involved with creating resources for the nextgeneration of coders at the Python Edu Google Group:
http://goo.gl/BXBLu
W o r l d M a g s . n e t W o r l d M a g s . n e t
W o r l d M a g s . n e t
http://worldmags.net/http://worldmags.net/7/22/2019 Raspberry Pi Android InstallationLinux User & Developer Magazine Issue 1202012
18/100
www.linuxuser.co.uk18
Get on board with PythonFeature
Teaching the teachersBringing the education community to the Python community
nFarmer, grain, goose, fox the AI way represented as states and transitions
Making strenuous efforts to reach the teachingcommunity, the PyCon organisers invited severalteachers to attend a special education track at theconference, led by teacher-turned-coder NicholasTollervey. It included introductory Python tuition,and coders sprinkled around the class to helpthe teachers with their questions. Hearing of thelocked-down conditions of schools IT, fixed onstone-age technology like Internet Explorer 6, wasa shocking discovery for many of the programmers.
Groups of programmers worked with teachersin a coding sprint to produce educational materialaround programming tasks including a text-basedgame and a maze solver. The event introduced
teachers to the collaboration, debate, openness,
meritocracy, sharing of resources and learningfrom the examples of others, as Tollervey put it.
Following the sprint, and a lightningtalk by Miss P (Carrie Philbin, a Google-certified teacher), theres now a mailing listfor Pythonistas who want to contribute toresources for teaching: http://t.co/M7ViLkcP.Additionally, theres an education summit atnext Marchs PyCon in California https://us.pycon.org/2013/events/edusummit/ and,according to Philburn, who was a guest atthe weekends Python Software Foundationmeeting: Happily, it looks like an educationportal will become part of the scope for the
redesign of the python.org website.nTeachers and coders found common causein the education sprint
CC:AlanODonoh
oe
JavaScript, PHP and Bash, with ports to Lua and a C
code generator on their way.
With so many competing talks on the three tracks,
were grateful to the PyConUK organisers for making many of
the talks available as online videos (see Catch up, page 17).
Those who could only make the weekend missed some
informative sessions on the opening Friday, including the
TiddlyWeb architecture originally created as an open
source, reference implementation of an HTTP API for server-
side storage of TiddlyWiki tiddlers, the revolutionary one-
page app giving a reusable nonlinear personal web notebook.
Follow the rabbit
Starting with the Alan Perlis quote, The best book aboutprogramming for the layperson is Alice in Wonderland. But
thats because the best book about anything for the layperson
is Alice in Wonderland, programmer and philosopher David
Miller entertained while drawing lessons from the book.
nMiss P: bringing Python into the classroom
Sarah Mount gave an eloquent summary of the problems of
parallelism and concurrency in Python, and the case for using
Communicating Sequential Processes (CSP). This is an area
of many competing philosophies, and it was good to hear a
knowledgeable opinion put so clearly.
Plenty of space was given for lightning talks over the
two main days, with Lightning Talk Man Harald Massas
Gesamtkunstwerk of anecdotes to fill each gap as speakers
changed laptops and PowerBook VGA dongles. In these five-
minute sessions, delegates learned about mixing dynamic
and static typing; errors and complexity in finding musical
temperaments; prescons, an effective presentation console
for Python demonstrations; using Python for digital forensics;
and easy roll-outs of your own cloud.
Ask the duckFurther highlights included typing to yourself an IRC for
one to log your thoughts with timestamps, and even put
them into version control in a talk that introduced rubber
duck debugging (if you can explain the problem to a rubber
duck, then youre on the path to understanding: try it!);
W o r l d M a g s . n e t W o r l d M a g s . n e t
W o r l d M a g s . n e t
http://worldmags.net/http://worldmags.net/7/22/2019 Raspberry Pi Android InstallationLinux User & Developer Magazine Issue 1202012
19/100
www.linuxuser.co.uk19
The PyConUK 2012 conferenceGet on board with Python
FEATURE
Evidence for DevelopmentUsing Python to deliver effective, evidence-based overseas aid
Much overseas aid is spent inappropriately
at best wasteful, at worst undermining
local markets and farmers self-sufficiency.
Evidence for Development aims to see
that aid gets to where its really needed, by
backing evidence-based decisions with an
understanding of local economics to build
capacity in organisations and institutions
in Africa, Celia Petty, the project founder,
told Linux User & Developer. The World
Bank data is problematic, so the PyConUK
Evidence for Development sprint aimed to
extract something meaningful from it.
Were using the technology to apply
household economy methodology, Petty told
us. This takes a sophisticated view of how
people can meet their food energy needs,
rather than measuring money income alone.
School attendance, lack of access to start-up
capital and many other factors are measured
to see what help people need to achieving
their own economic self-sufficiency.
nDoctor KorovicsFlying Atomic Squid
Daniel Popes Pygame
programming demo
along with a Django-based P2P food market from TransitionCambridge, SustainableSouk.com, which encourages good-
quality local food by allowing anyone to sell or swap what
they produce.
Writing Code for Fun and Profit presented the joys of the side
project, in this case luzme.comwhich offers price comparisons
for eBooks. In further pursuit of fun, Nicholas Tollervey and
Ben Croston (whose day job is Python-automated brewing!)
performed a tuba duet of the Sousa march well-known as the
theme tune toMonty Pythons Flying Circus.
The link between musicianship and coding is a well-known
one, but the opening Sunday lightning talk of an energetic
hip-hop rap, screened Pythonically, was a real surprise. More
conventional, but no less delightful, was the PyConUK song
to the G&S tune used in Tom Lehrers Elements song, with
words (Python keywords in fact) by Tollervey and Stephen
Hawkes, who came up with the Victorian theme of this years
publicity materials.
Quo vadis?Saturday had ended with the keynote Remaking the PSF: The
next ten years of Python by the Python Software Foundations
Van Lindberg, covering the challenges for the language
community and the role of the PSF. As Python has become the
glue language of the movie-making industry, is replacing Perl in
bio-informatics, is beginning to dominate the financial space,
and is finally supplanting Java in the educational world, does it
really matter that it has lost its cool or underdog edge?
Lindberg praised the uniqueness of the Python community,
combining kindness and professionalism, and outlined where
the community and the PSF could go together, with more
local and regional activity. Theres certainly a lot of UK Python
activity already, with regional groups formed at PyConUK 2007
still going strong,
The conference organisers have gone out of their way to
attract as broad a spectrum of people as possible from IT
teachers who are new to Python (see Teaching the teachers,
page 18) to core developers with 100 early-bird tickets and
a budget hotel price offering astonishing value. Combined
with this were beginner and intermediate tutorial days, and
sprints that welcomed all levels of ability. There was even a
non-Python track, touring around Coventrys heritage, for non-
coding partners and offspring.
Future-facingDespite all this, and despite the speaker list containing some
talented and interesting female programmers, a look around
the venue showed more than 90 per cent of attendees were
male a continuing problem in IT generally, but particularly
in the free software community. PyConUK, ever ambitious,
is addressing this problem at source, with direct outreach to
schools to increase the numbers going into programming, both
generally and to Python.
The teachers who attended were taken through introductory
Python programming, then paired with Python programmers
for a development sprint for educational resources. Other
education sessions included a session on Turtle, the Python
version of Logo, and some surprisingly sophisticated uses
such as Sierpinski triangles and Lissajous figures with
very few lines of code. As well as giving the best introduction
to functions that weve heard We teach the computer a
new word discussion ranged over taking Turtle into the
physical world with Lego Mindstorms, to a planned Arduino/
Raspberry Pi DIY oscilloscope.
John Pinner, Zeth and the rest of the organisational team
were a tireless, friendly and helpful presence throughout the
event. Having organised UK PyCons since 2007, and a past
EuroPython, the organisers are not resting on their laurels
next year an additional event is planned around sprints aboard
a ship from Plymouth to Santander and back. If you
want to get involved with both a great community and
a fantastic language, all we can say is get on board!
PyConUK seems tohave hit the sweet spotbetween technicaltell-how and friendlycommunityTim Golden
CC:@ntoll
W o r l d M a g s . n e t W o r l d M a g s . n e t
W o r l d M a g s . n e t
http://worldmags.net/http://worldmags.net/http://worldmags.net/http://worldmags.net/7/22/2019 Raspberry Pi Android InstallationLinux User & Developer Magazine Issue 1202012
20/100
Subscribe today and getyour first three issuesfor 5 (and save 13.00)Pay only 4.19 for every
future issue a 30% saving
on the store priceFree UK delivery to your doorNever miss an issueMoney-back guarantee
FANTASTICSUBSCRIBER
OFFER
SUBSCRIPTION VOUCHER YES I would like to subscribe to Linux User & Developer
YOUR DETAILSTitle First nameSurname
Address
Postcode Country
Telephone number
Mobile number
Email address
DIRECT DEBIT PAYMENT UK Direct Debit Payment
I will receive my first three issues for just 5, I will then pay only 25.15 every six issues thereafter. If,however, I do not love what I see, I can cancel at any time.
PAYMENT DETAILSYOUR EXCLUSIVE READER PRICE, ONE YEAR (13 ISSUES) UK: 62.40 (Save 20%) Europe: 70.00
World: 80.00
Cheque
I enclose a cheque for (made payable to Imagine Publishing Ltd)
Credit/Debit Card
Visa MasterCard Amex Maestro
Card number Expiry date
Security number (last three digits on the strip at the back of the card)
Issue number(if Maestro)
Signed
Date
Code: PGG120 Tick this box if you do not wish to receive any promotional material from Imagine Publishing LtdTick this box if you do not wish to receive promotional material from other companies. Terms & Conditions apply.We publish 13 issues a year, your subscription will start from the next available issue unless otherwise indicated.
Direct Debit guarantee details available on request. This offer expires without notice.I would like my subscription to start from issue:
Return this order form to: Linux User & Developer Subscriptions Department, 800 Guillat Avenue, Kent Science Park,Sittingbourne, ME9 8GU or email it to [email protected]
You will be able to view your subscription details online at www.imaginesubs.co.uk
Please complete your email address to receive news and special offers from us
Terms & ConditionsThis offer entitles new UK direct debit subscribers to receivetheir first three issues for 5. After these issues, subscriberswill then pay 25.15 every six issues. Subscribers can cancelthis subscription at any time. New subscriptions will start fromthe next available issue. Offer code PGG120must be quotedto receive this special subscription price. Details of the Direct
Debit guarantee are available on request. Offer expires 28February 2013. Imagine Publishing reserves the right to limit thistype of offer to one per household.Source Code PGG120Web address: www.imaginesubs.co.uk/lud. Tel: 0844 249 0282
HURRY
ORDERN
OW
Instruction to your Bank orBuilding Society to pay by Direct Debit
Signature(s)
Date
Bank/Building Society account number
Banks and Building Societies may not accept Direct Debit instructions for some types of account A6 instruction form
Instructions to your Bank or Building SocietyPlease pay Imagine Publishing Limited Direct Debits from the account detailed in thisinstruction subject to the safeguards assured by the Direct Debit guarantee. I understandthat this instruction may remain with Imagine Publishing Limited and,if so, details will bepassed on electronically to my Bank/Building Society
Branch sort code
Originators Identification Number
Name(s) of account holder(s)
To:The Manager Bank/Building Society
Address
Postcode
Reference Number
5 0 1 8 8 4
Name and full postal address of your Bank or Building Society
Please fill in the form and send it to: Linux User and Developer Subscriptions Dept,800 Guillat Avenue,Kent Science Park,Sittingbourne ME9 8GU
W o r l d M a g s . n e t W o r l d M a g s . n e t
W o r l d M a g s . n e t
http://worldmags.net/http://worldmags.net/http://worldmags.net/http://worldmags.net/http://worldmags.net/7/22/2019 Raspberry Pi Android InstallationLinux User & Developer Magazine Issue 1202012
21/100
1.Onlinewww.imaginesubs.co.uk/ludAnd enter PGG120
2.Telephone
0844 249 0282And quote PGG120
3.Post or emailPlease complete and post the form toLinux User & DeveloperSubscriptions Department800 Guillat AvenueKent Science ParkSittingbourne
ME9 8GUOr alternatively, you can scan and email the form to
THREE EASY WAYS TO SUBSCRIBE
ISSUES OFLINUX USERFOR JUST
Get your first3 issuesfor just5,thensave 30%on the shop price
Readers inthe US see
page 83 forexclusiveoffer
3 5
W o r l d M a g s . n e t W o r l d M a g s . n e t
W o r l d M a g s . n e t
http://worldmags.net/http://worldmags.net/7/22/2019 Raspberry Pi Android InstallationLinux User & Developer Magazine Issue 1202012
22/100
www.linuxuser.co.uk22
Android ports arenow available for
Raspberry Pi, openingup a whole new world ofpossibilities. Heres how
to get started
Raspberry Pi
on your
AdvisorRob Zwetslootmodels
complex systems andis a web developerproficient in Python,Django and PHP. He
loves to experimentwith computing
AndroidInstall
W o r l d M a g s . n e t W o r l d M a g s . n e t
W o r l d M a g s . n e t
http://worldmags.net/http://worldmags.net/7/22/2019 Raspberry Pi Android InstallationLinux User & Developer Magazine Issue 1202012
23/100
www.linuxuser.co.uk23
While one of the main reasons for the creation of the
Raspberry Pi was to offer a cheap way for people to get
into programming and using Linux, there are plenty of
people who see it being used as a replacement for other
forms of computing tasks. With the Pi being so small, the
concept of using it for purposes where space is a premium
is definitely not too far-fetched. Its form factor, weight and
low power requirements make it ideal for use in a number
of situations; however, the software may not always be
the best for the task. Where Linux may be lacking, though,
Android is there to cover it.
Android ports to Raspberry Pi have been in the works for
a little while now, but theyve only just been made a usable
reality thanks to the recent open-sourcing of the VideoCoreGPU driver code. This allows for full hardware acceleration
of Android, something that was previously having to be done
purely by the CPU.
Android can offer a very different experience and
interface than a standard Linux distribution, without having
to obtain custom distros so its optimised for a particular
use. This means you can experiment with the sort of
applications youd want to use Android for without carrying
around multiple SD cards in lieu of wiping them every time.
Thanks to an ever growing development community,
Google recently announced that there had been 25 billion
Android app downloads by the end of September, five
billion up from the number at the end of July, from its
675,000-strong selection. With this rate of expansion, thereare always a number of apps for pretty much anything youd
want an Android device to do. With access to this range of
possibilities on the Raspberry Pi, you can create a system
that has the advantages of using a mobile, user-friendly
OS, with the price of the Pi. And the addition of more I/O
ports from the Pi can make it fit in better than your standard
Android smartphone.
There are three types of projects were going to cover over
the next few pages: a smart TV, a home automation remote
and an in-car computer. While such distros like XBian and
OpenELEC exist for media centres and home theatre PCs
using the Raspberry Pi, the XBMC apps do not have the
same kind of range as Android. With apps going outside the
concept of plain media watching, and even the inclusion
of Android games, theres a lot more you can do with an
Android-run smart TV.
For home automation, there are very mature X10 and
Z-Wave remote control apps available on Android that are
optimised for the kind of interface youd want to use for a
remote control, unlike the mainly mouse-focused tweaking
tools used on Linux distros. Finally, with in-car computers,the touch-screen optimisations and grid array for apps
allow for easy navigation to music, podcast and other
media apps, as well as plenty of fantastic GPS and satellite
navigation applications native to Android.
All you needis a RaspberryPi set up andready to go!
Projects for smart TV, home automation and an in-car computer
Install Android on your Raspberry Pi
Meet RazdroidThe team makes the first project to
get Android on your Pi
Before the release of the VideoCore
drivers, some community members
decided they wanted to have a go
at porting Android to Raspberry Pi,
creating Razdroid. Based mainly onCyanogenMod, the project got far enough to have a couple
of working ports, only limited by the lack of hardware
acceleration. Since then, the Raspberry Pi Foundation
has created its own ports, and eventually released the
VideoCore driver to make ports of Android and other
software a lot smoother.
FEATURE
W o r l d M a g s . n e t W o r l d M a g s . n e t
W o r l d M a g s . n e t
http://worldmags.net/http://worldmags.net/7/22/2019 Raspberry Pi Android InstallationLinux User & Developer Magazine Issue 1202012
24/100
www.linuxuser.co.uk24
Install Android on your Raspberry PiFeature
You can put Android on your Raspberry Pi
right now by visiting the Razdroid site at
www.razdroid.net. There are currently a couple
of images, based around both CyanogenMod 7.2
and 9, with different performance capabilities
and app compatibility. The images can be put on
an SD card using the same method as you would
a Linux distro image, and will run from bootwithout any extra setup needed.
If youre feeling a little more adventurous, you
can compile the images from source instead.
Youll be able to make changes, updates and
additions as well, if you want to improve the
build. The steps on this page will guide you
through a basic build of CyanogenMod 7.2,
based on Android 2.3, for the Raspberry Pi, using
the same files as the Razdroid image to getit working.
Using a standard dd operation, you can get your Raspberry Pi running Android
01 Install librariesYoull need to get the necessarylibraries for the build to work:
$ sudo apt-get install git-core
gnupg flex bison gperf build-
essential zip curl libc6-dev
libncurses5-dev:i386 x11proto-core-
dev libx11-dev:i386 libreadline6-
dev:i386 libgl1-mesa-glx:i386
libgl1-mesa-dev g++-multilib mingw32
openjdk-6-jdk tofrodos python-
markdown libxml2-utils xsltproc
zlib1g-dev:i386
$ sudo ln -s /usr/lib/i386-linux-
gnu/mesa/libGL.so.1 /usr/lib/i386-
linux-gnu/libGL.so
CC:JimK
illock
Its easy to install Android
When the Raspberry Pi was first created, there were some
very specific goals in mind for the finished product. Thanks
to the way it met these goals, it has blown up as the darling
of hobbyists and other tech enthusiasts for all manner of
projects. To further understand the relationship between
the original goals and this new concept of putting Android
on the Raspberry Pi, we spoke to the co-creator of the
Raspberry Pi himself, Eben Upton.
Upton told us that there had never really been any plans
originally for Android to be supported by the Raspberry
Pi. However, developments in recent times had changed
the view of the Foundation: A significant minority of our
customers want to see it, so that makes it important to us.
When the Foundation originally announced it was
working on Android compatibility, it already had a working
prototype. This implementation uses a different kernel
and VideoCore binary image from the one available on
GitHub, explained Upton, which is why weve been
keeping quiet about it so far. This was in late July, and it
took the Foundation a further three months to finally get
the VideoCore drivers open-sourced. Upton told us shortly
before its release why it had been delayed so long: The
issue around releasing the Broadcom Android version is
that wed need a separate microcode image for the GPU,
and we really dont want to fork the community.
Eben Uptonspeaks
Follow our step-by-step guide to get up and running
Without Eben Upton, the Raspberry Pi
would not have been possible. Coming
from a background of computing and
teaching, Upton is currently a technical
director at Broadcom and is responsible
for the overall software and hardware
architecture on the Raspberry Pi.
The co-founder of theRaspberry Pi Foundation
W o r l d M a g s . n e t W o r l d M a g s . n e t
W o r l d M a g s . n e t
http://worldmags.net/http://worldmags.net/7/22/2019 Raspberry Pi Android InstallationLinux User & Developer Magazine Issue 1202012
25/100
www.linuxuser.co.uk25
Projects for smart TV, home automation and an in-car computer
Install Android on your Raspberry Pi
FEATURE
The Play Store willinitially be missingfrom any ports
03Build environmentNow well make a directory for thebuild environment and initialise it for the repo
sync. First:
$ mkdir ~/android_pi
Then move to it and initialise:
$ cd ~/android_pi
$ repo init -u git://github.
com/CyanogenMod/android.git -b
gingerbreadAnd finally sync:
$ repo sync -j16
04 Device treeAfter the sync has finished, create anew directory and download the device tree for
your build:
$ mkdir -p ~/android_pi/device/rpi
$ cd ~/android_pi/device/rpi/
$ git clone https://github.com/
Mathijsz/device_rpi.git
$ mv device_rpi rpi
06 The buildWere now ready to build our Razdroidimage. Make sure to do following to start
the build:
$ source build/envsetup.sh
$ lunch
$ make -j4
Be aware that this may take a while.
02 Working directoryWe need to download the source toa folder that we can make executable. First
create the directory:
$ mkdir ~/bin
Then add it to your path:
$ PATH=~/bin:$PATH
And finally, download and chmod:
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/
repo
$ chmod a+x ~/bin/repo
05 Initial setupBefore we do the actual build, we needto run a little script to properly prepare the
source code:
$ cd ~/gingerbread_pi/device/rpi/rpi
$ ./initial_setup.sh
$ cd ~/gingerbread_pi
This will automatically make the changes.
Now the source code has been released, via the ARM
Userland on GitHub, and marks the first time a full ARM-
based, multimedia SoC has received vendor-provided open-
sourced drivers, and Broadcom is the first company to open
up its mobile GPU drivers in this way. With it, people can get
down to finishing Android ports and starting new ones.
Android is well known as being used on touch-screen
interfaces, but earlier devices included keyboards
and trackballs. While this has gone out of vogue for
smartphones and other handheld devices, for testing out
your Android-powered Pi it would be useful to have this
option. Is it available now, though?
Im not aware of any significant challenges in this area.
Upton told us when we asked about traditional inputs. We
expect most people would use Android with a mouse and
keyboard, and this seems to be a well-supported option
from ICS (Android 4.0) onward.
So with this native mouse and keyboard support,
youre going to be able to find a lot more applications for a
Raspberry Pi running Android than you could do with even
an Android smartphone. On top of that, you will likely get
the same kind of performance as a Linux distro according
to Upton: I would expect them to be very close in terms
of performance. There may be more UI acceleration in
Android, though, which we hope to bring into Linux.
Finally, one of the main reasons to use Android would be
to access the huge array of apps. We asked Upton about the
issue with Google Play those into the Android scene
might know that CyanogenMod had to remove this
from the standard build for legal reasons. Upton
told us there were currently no plans to obtain
a licence for the store; however, Android
allows you install the APK files
without the store, and these are
usually very easy to obtain.
The conceptof the Raspberry
Pi is a spiritualsuccessor to the
BBC Micro
W o r l d M a g s . n e t W o r l d M a g s . n e t
W o r l d M a g s . n e t
http://worldmags.net/http://worldmags.net/7/22/2019 Raspberry Pi Android InstallationLinux User & Developer Magazine Issue 1202012
26/100
www.linuxuser.co.uk26
Smart TV
Install Android on your Raspberry PiFeature
Use your Raspberry Pi tomake any TV smart
The RaspberrySAFE VESA
Mount add-onattaches the
Pi to mostflat-screen TVs
Game on!Why not turn your smart TV into agames console?
The MOGAcan also
cradle Androidphones, hence
the square
shape
If the buzz around the Ouya is anything to go by, a lot of
people are interested in how to turn Android into a games
console. With a Raspberry Pi running Android, youre
already part way there. While you could use a mouse and
keyboard for some games, others will probably work better
with a joypad, and this is where the MOGA controller comes
in. It connects via Bluetooth to Android and is able to
control a number of Android games.
Get OnLiveIf Android games dont really do it for you, how about full-
blown PC games? The OnLive streaming service allows you
Smart TV is a very recent and popular buzzword
for a more advanced media PC running inside
your TV, which add a whole host of different apps
as well as being able to stream your content
from around a network. Android itself does not
need any specific apps or skinning to turn it into
a functional smart TV the display is already
configured for easy access to all the installed
software, and using home replacement apps
such as Launcher Pro will allow you to increase
the number of on-screen apps if the stock
launcher displays too few for you.
This usage for Android has not gone
unnoticed by other people, with a few
companies already on board. Recently, a high-
profile Kickstarter project was successfully
funded, called Pocket TV by Infinitec, which
while definitely not the first Android-powered
smart TV device, is notable for running off a USB
stick. Like the Pocket TV, the Raspberry Pi is
capable of running 1080p video without an issue.The benefits of Android even go beyond the TV,
as Ahmad Zahran, founder of Infinitec, explains:
[You] get access to all your information,
games, TV streaming channels, work
documents and your entire digital life. Youll
have all the benefits that you get from carrying
your smartphone but with the ability to display
it on a much bigger screen. Imagine walking
into a meeting and doing a presentation
without a laptop.
As well as having access to simple
information apps such as the Weather and
Stocks, you can also use Android widgets to
add a news feed or social network streams, andyou can even connect to streaming websites
like Netflix or the BBC iPlayer, as well as
browsing the web.
Once youve got your Raspberry Pi set up as an
Android smart TV, you may be wondering where
to put it. Well luckily, there are a few cases out
there that support VESA mounts, the standard
used to attach flat-screen TVs to brackets and
walls. The Raspberry SAFE case by Solarbotics
is just the tool to tuck it out the way.
to buy and rent games and play them anywhere, thanks to
all the legwork being done in the cloud. Using the OnLive
Android app, you can access these games from your
Android-powered Raspberry Pi and play them directly
on your television without the need for a bulky PC in your
living room. And it also works out much cheaper than the
official OnLive console.
W o r l d M a