Technical

Installing Gentoo on Android with chroot

Note: recently edited 8th Nov 2014

Installing Gentoo in a chroot alongside Android is easy, so if you already use Gentoo and have an Android phone, there’s really no reason why you shouldn’t do it. With a ginormous phablet like the Samsung Galaxy Note 2 and a bluetooth keyboard, you can get a super-mobile full Linux workstation everywhere you go.

Before we begin, let’s see the pretty pictures. Here’s Larry saying hello :) (Installing a talking cow should be the top priority once the base system is up and running)

Larry saying hello on Android

… and of course a shot of emerging stuff …

Gentoo on Android compiling stuff

… and finally we’re running Enlightenment 17 with the Webkit-based Midori browser with X, accessed via (Tight)VNC …

E17 on Android with Gentoo Linux

Installing Gentoo on Android

Prerequisites first: you’ll need a rooted device. You’ll also need a terminal with busybox. I recommend Android Terminal Emulator and busybox by stericson. I would also recommend installing Hacker’s Keyboard, which gives you a full keylayout.

Installing is rather straightforward: modern Android phones usually run on ARMv7 so just follow the appropriate handbook. If you are installing it onto your internal storage (not on an external SD), you can skip to chapter 5 :)

You will need to be root to install, so su - in your terminal emulator of choice. Similarly, remount Android into read-write so that you can create the necessary files for Gentoo with mount -o remount,rw /. Finally, remember to install in /data/gentoo instead of /mnt/gentoo so to not conflict with Android’s mounting preferences.

Since we’re only installing a chroot and not booting alongside android, you can safely skip configuring the kernel, configuring fstab, configuring networking, and setting up the bootloader.

When mounting, you will need to do so as root user, and use the busybox implementation for --rbind support, as so:

$ su -
[ ... superuser access granted ... ]
$ cd /
$ mount -t proc proc /data/gentoo/proc
$ busybox mount --rbind /dev /data/gentoo/dev
$ busybox mount --rbind /sys /data/gentoo/sys
$ chroot /data/gentoo /bin/bash
[ ... now in the chroot ... ]
$ source /etc/profile

This is assuming you’ve put Gentoo in /data/gentoo

Android quirks

There doesn’t seem to be a /dev/fd on Android, so let’s fix that:

[ ... in Gentoo chroot ... ]
$ cd /dev
$ ln -s /proc/self/fd`

Portage won’t be able to download files as it doesn’t download as root, but instead as another user by default. No problem:

[ ... in /etc/portage/make.conf ... ]
FEATURES="-userfetch"`

Sometimes I’ve noticed that on bad reboots the /etc/resolv.conf can get reset. This will cause host resolving issues. Resolving is as easy as:

[ ... in /etc/resolv.conf ... ]
nameserver 8.8.4.4
nameserver 8.8.8.8`

It will be a good idea to set your main user to the same UID as the Android normal user. Also, running id -a in android will show you that your user is part of various reserved Android groups. To fix issues such as your Gentoo user’s (in)ability to go online or use bluetooth, just create these groups in your Gentoo install with matching GIDs, and add your user to these groups. Here’s a list of Android UIDS and GIDS. For example, I needed to add my Gentoo user to groups with GIDs 3003 and 3004 before it could successfully go online.

If you want an X server, VNC will do the trick. I recommend android-vnc-viewer 24-bit colour seems to work, and perhaps change the input method to touchpad rather than touchscreen so it’s relatively usable.

Finally, with no fan and big heatsink on a mobile phone, you might find yourself running hot. So even though monsters like the Galaxy Note 2 have 4 cores, I recommend sticking it to MAKEOPT="-j2"

Life & much, much more

The browser wars: side with Opera.

I have used many browsers. Firefox. Safari. Chrome. Rekonq. Arora. Konqueror. Epiphany. Dillo. Right down to Lynx and friends. All of their pros and cons, and some are more suited to specific purposes. However I did find a mostly unloved and underpresented browser underneath the big three (Firefox, Safari, Chrome) – and that browser is Opera. Soon Opera became my browser of choice and (suprisingly) haven’t been able to find fault with it until now. I wanted to quickly share exactly what makes Opera special, and why you should consider switching to it in this post. I hope it’s informative for those interested in what’s up with browser alternatives.

Opera is fast.

Blazing fast. Speed is a touchy topic as different benchmarks give different results, and at the end of the day most users (but of course, most reading this are going to be power users, so it most definitely will include you!) are going to find minimal impact with their browsing – but all the same there is a clear point to be made: Opera is fast. You might’ve heard that Chrome is fast, Opera is just as fast, if not faster. If you’re on Firefox and feeling its age, this is something that might lighten your day. Opera even has a “Turbo” mode on slow connections which compresses your pages on the fly to make them load faster.

Opera is innovative and cutting edge.

Despite being closed source, Opera is suprisingly cutting edge. Countless times have they been ahead of the others in producing new innovations (tabbed browsing? Even Firefox’s new design and tab groups were first created by Opera) only to have other browsers copy it and remarket it a while later. You can feel free to use the latest alpha quality and chat with their very open community about bleeding edge updates and changes. A few examples off the top of my head are the integrated tab previews, reopen closed windows, inbuilt cloud tools which I will cover in a bit, and a very nifty UI, including a “fast forward” button which detects the “next” page on what you’re currently browsing.

Opera is feature-complete.

Although Opera also has Widgets (the equivalent of Firefox Addons), Opera is amazingly stuffed and crammed to the top with features already included. Don’t shout bloat yet, as these features are actually useful. Things like being able to completely reorganise your interface, built-in session control, note-taking, private tabs, address bar keywords, account manager, content-blocking, speed dial, tab/window undelete, mouse gestures (love it!), RSS reader, and even an email and IRC client are all builtin. Despite all of this, Opera still manages to load incredibly quickly and handle many tabs constantly (I use 30+ regularly) without slowdown. An even better “feature” is that if you don’t want to use all of this “bloat”, it hides itself away from you and you really won’t notice it’s there.

Opera embraces the cloud.

… and they do it the right way. Other than the previously mentioned Turbo mode which routes your traffic to other servers to compress them, Opera also comes with two very nifty cloud tools – Opera Link and Opera Unite. The former allows you to synchronise all your opera settings, speed dials, notes, history and bookmarks to an online service, and then retrieve it anywhere, or even on another Opera browser elsewhere. The latter, Unite, is an umbrella creation – a set of webapps (which you can add and remove even more available from their repo) which allow you to run your own cloud services and share files from your home computer. Things like web proxies (such as dyndns), web servers (just set a directory and you’re on your way!), photo sharing, and even music sharing where you can access your home music from anywhere through Opera. There is even a messaging service, as well as filesharing (and receiving) services to allow people to immediately upload and download from your home computer. These are dead simple to set up and use, have privacy options, and I must say … they are elegant.

Opera loves developers.

Not only does this closed source company have a very transparent community and listen to bug reports, they also love web developers. Opera comes built in with Opera Dragonfly – similar to Firefox’s Firebug. It allows you to inspect page elements, loading time graphs, mess around with the DOM, and tweaking your Javascript and CSS. Opera is also extremely W3C compliant and implements CSS3. Simply put – Opera is a modern browser.

Finally, Opera is cross-platform.

Opera runs on pretty much everything. Windows, Mac and Linux are covered. Mobile devices have two options – Opera Mini and Opera Mobile, where Mini is a simple smartphone browser and Mobile is a more advanced browser. Windows Mobile is covered. Android – sure, Opera Mobile is getting released for it tomorrow, no problem. iPhone’s have got Opera Mini, and most other phones are covered with Opera Mini. They don’t hold out on their mobile releases either – they’re every bit as faster than the competition as their desktop counterpart is, and still stuffed with features – speed dial and their implementation of tabs are truly amazing.

Well, I hope that short article enlightened you to that in-the-corner browser Opera. If you haven’t tried it out or are feeling the creaks on your current browser, check out their latest beta today – you won’t regret it.

Uncategorized

The state of vendor lock-in on handheld services?

In this day and age it seems as though the word smartphone has replaced (or at least become synonymous with) the traditional phones we grew up with. These devices try to tackle the usual on-the-go services: PIM, messaging, casual browsing, multimedia and social networking. However with this is also an attempt to lock users into proprietary services, say for example, Flickr. I’ve been wondering for quite some time which mobile OS actually fares better on this, with the choices being the iPhone, Blackberry, Windows Mobile, Symbian, and WebOS (that’s Palm Pre).

This is best explained through example, so let’s take Mr Hip and Trendy who are well versed in navigating Facebook for their friends, Flickr or Picasa for their latest photo albums, Last.FM for the music, iTunes for their personal collection, YouTube for cats doing funny things and Twitter for trying to up their cool. Now let’s take away the Hip and Trendy part of all that and leave us with somebody who wants to do things their own way.

We have a neatly categorised library of music and video files on our home computer, and a few re-encoded video files on a remote server specifically made for mobile viewing. None of this iTunes schrwap. We run a shoutcast service for streaming, easily accessible through dyndns. Our latest photo albums, ebook library, and latest LaTeX-compiled (to pdf) essays are neatly stored on our home computer, all tagged as necessary for Nepomuk, and mirrored to the remote server. We have a similarly synchronised set of .ical files for calendars and appointments, and vcards for contact information, and of course mail is on our very own setup on our server. As for social networking, an own-hosted modded WordPress install is used for (micro)blogging. We don’t mind a little Facebook here and there, but would also love to be kept connected on IRC. Of course it’s a-given that our remote server(s) are all equipped with (S)FTP, SSH, and Webdav support.

I don’t know much about the current state of smartphones but perhaps for those that do – can I bend it to use what I use and still feel a decent sense of integration? With this I mean drag-and-drop transfers for files and multimedia, seamless switching between local and remote locations (with support for above protocols), directory synchronisation (rsync?), PIM synchronisation as necessary for ical/vcard/mail/rss with a custom and remote location (or at least importing), and perhaps clients available (terminal emulation, anyone?) for SSH, IRC, and streaming.

Can I actually use my services the way I want them on a smartphone in this day and age?

I know I’ve had somewhat limited success on my own aging Windows Mobile phone, with third-party apps accomplishing iCal sync, SSH (putty), IRC, mail and RSS, and luckily it isn’t tied to nonsense like iTunes when I want to transfer music over. However the rest of the long-dead OS shove these few glimmers of freedom away in a dark and dusty corner of the market. I quite honestly wonder how the rest is doing – so I ask again:

Is it possible?

Uncategorized

Top 10 Windows Mobile Applications

If you followed my previous post about making the most of the Windows Mobile experience, your Windows Mobile phone should already have a slicker interface, seem faster, have new features, be touch friendly as well as feel much more intuitive all around. Needless to say that was the vital first step to getting your money’s worth out of your phone. You might have a setup like this now:

Nifty, no? Well, it’s a good start, but the next stage is getting the applications that allow you to use it To The Max ™. Let’s see what we can recommend.

A good browser. No, a Great browser.

We’re talkin’ powerful, fast, slick web browsin’ here. That nonsense that calls itself Internet Explorer doesn’t deserve a place on your device. Whether or not you’re often surfing the interwebs, ensuring that your web experience is a smooth one will make the difference whether you decide to whip out your phone and wiki something up, or simply say it’s a lost cause. You want a proper browser, one with kinetic scrolling, tabs, and a good rendering engine.

Enter Opera Mobile and Skyfire. Both, as you might’ve guessed by now, are Windows Mobile web browsers. They are also the two best of them all. Opera Mobile is in general more well known and boasts an impressive list of features – tabs, kinetic scrolling, download manager, accelerated page caching (turbo), data synchronisation and cloud computing setups, and even widgets. This does put it on the heavier side of the browser market, with it’s installation file itself a hefty 10MB. On older phones it might take some time to start up and can run out of memory pretty quick. However if your hardware meets the specs, you’ve got yourself a very powerful tool.

The other is a lesser known product – Skyfire. This is definitely slimmer feature-wise but loads pages quick and doesn’t eat up your phone. It’s got the zoom, the drag-scrolling … but most importantly this one displays pages identical to a desktop view whereas Opera tends to wrap text (handy in some cases, not so in others). It also deals with embeddable content very well, allowing you to enjoy flash video without lag pretty easily. It also comes with a nifty start-page which is basically a feed reader – giving you snapshots of the latest news which you can tweak to your interests.

Apps for music and videos

Windows Mobile comes bundled with Windows Media Player, which can play some common files but chokes on anything else you might want.

Here we have a few nominees, including the must-have Core Media Player. The Core Media Player began as freeware but now is available as a paid application. There’s no problem with getting the older free version, it’s still extremely good and will handle almost any codec you throw at it.

Those enjoying the iPhone feel might look towards S2P, a music player that copies the iPhone music player almost completely, not to mention integrates rather nicely with S2U, an application which locks your phone like the iPhone does. It’s also well supported on several home screen media player control applications.

If you’re a multi tasker, it’s normally a huge convenience if you have a way to pause/play, next and previous songs right from the homescreen. In Windows 6.5.1 this is possible with the Titanium layout which integrates with the default Windows Media Player, allowing you to scroll between songs. If not using WMP or not on 6.5.1 this functionality is also available with several shells, including SPB Mobile Shell 3.

The ultimate penknife of utilities

If you’re going to actually use your phone, you need a way to keep it ship shape and mess around when you feel like it. Without delaying further I’m going to introduce you to Total Commander, a file manager (and registry editor, if you’re into that sort of thing) that should exist on every device.

Another would undoubtedly be cleanRAM by htcAddicts.com. It does exactly what it name says – it cleans up lost RAM and can make your device speed up a tad bit after a few days of use – say goodbye to having to soft reset or restart your device whenever it gets too laggy!

Advanced Config (pictured above) makes it easy to tweak your OS to your liking. From which softkeys do what, the layout of your dialer and comm manager, what effects are enabled… it’s all there and you’ll find perhaps one of those little things that don’t look like much but mean much.

A way to read those RSS feeds

People on the go should really take advantage of RSS feeds. Most computer users still remain ignorant of this wonder and it’s time for that to stop. For the uninitiated RSS feeds take the news away from the website and thus allow you to keep track of many news sources at your leisure – be it following the BBC, your favourite blogs, or even the latest Garfield comic. It’s your own personal newspaper that’s updated realtime and only contains articles you’re interested in.

It’s both D-Pad and touch friendly, supports importing opml files and scheduled updates. Yep, it’s pRSS Reader. I’ve tried a good deal and this is the only one that works both reliably and well.

Your own personal library

If you’re still unacquainted with ebook readers that’s OK – perhaps reading from a screen just isn’t for you. If it is, however, you’ll need an ebook reader on your phone. I’d like to recommend Haali Reader. It’s an excellent and small application – it remembers your position in all and any file even after closing (a lifesaver), has customisable fonts, sizes and colours, supports autoscrolling, assigned buttons, fullscreen, UTF, and of course supports a good deal of popular ebook formats. It shows a lovely timeline at the bottom with divisions for chapters (if recognised) and bookmarking support.

That’s enough for part 1, in part 2 we’ll cover another 5 awesome (but less awesome than the first 5) applications that you should dump on your device.

Sponsored link: BestWindowsMobileApps – an unbiased and verbose review site for windows mobile applications.

Uncategorized

Making the most out of the Windows Mobile Experience

If you so happen to own a Windows Mobile phone or played with one before, there are likely to be many things that you find rather terrible about it. What with the iPhone, Android and Palm, it’s no surprise that Windows Mobile deserves to be shunned to a shameful corner in the market. However what most people don’t know is that the Windows Mobile team seems to be getting their gear together and is doing some major upgrades for the next iteration of their platform – Windows Mobile 7. Though it still lacks in many ways, it’s definitely a move forward.

Many people on the Windows Mobile platform are not making the most of it – they aren’t using a smartphone as a smartphone. Through this article I hope to touch up on some of the ways your phone could be used.

Improve the overall experience

Before you start trying to use your phone for tasks, you might want to make your phone more usable first. Windows Mobile was designed for a stylus and envisioned as a minature desktop – something that really makes it a terrible OS to use. Windows seems to have made touch-friendliness its main target for improvement and these upgrades are available for all users, without having to buy a whole new phone. However you’d have to search quite a bit, (I recommend the XDA community) to find something that really clicks – meanwhile this introductory article should help.

Flash a newer ROM

This is the equivalent of upgrading your operating system. I wrote a review of it here but development has already progressed much further than those screenshots display. Windows Mobile seems to aim to challenge the likes of the iPhone with its WM7 version coming apparently in Q4 of 2010. With this aim and the rapid ongoing development it’s hard not to expect greater things in the future. Even though it’s not out yet learning how to flash a ROM will grant you access to the ongoing development – and of course making your experience a lot, lot better. I would go so far to say that even 6.5 on my aging Dopod’s hardware (popular name HTC Hermes) is fast, and really makes the device a joy to use (yes, quite shockingly the newer ones are less resource hungry!).

Get started and learn about flashing ROMs in the XDA-Forums. Highly recommended.

Theme it properly

Whether you have flashed a recent ROM or preferred to keep your old one (I recommend flashing), a theme will do wonders. There are already themes for WM6.5 and can really sharpen up the phone in no time. A good wallpaper, colourscheme and not to forget icons too can spice things up. If you are using shells or widgets then finding matching skins for those will help give your system an integrated feel.

Themes can be found on the XDA-Forums as linked above, as well as on FreewarePocketPC.

Use a Shell/Widget/Plugin for the Today screen

For those already with WM6.5, it comes with Titanium and that is a huge improvement from the today screen, giving you quick access to pretty much all of the phones functions outside individual applications right on the front screen. However many other interfaces are available (most are crap) and some are really quite something, such as SPB Mobile Shell (pictured), TouchFlo/Manilla (2D or 3D), Home2, and various today plugins (available on FreewarePocketPC).

Ensure the basics exist

Make sure that you’ve got the basic set of applications – Windows (Live) Messenger, Windows Media Player, Office Mobile (including OneNote?), and … wait for it … Windows Marketplace and Microsoft MyPhone. This basic set of application should come with every phone and if you didn’t get it, you should hunt it down. Windows Marketplace is Microsoft’s attempt at the iPhone’s App store and Google’s Android Market. It was quite recently released (and even more recently cracked and available for free on XDA) and though I’ve only seen very few applications available on it (and even fewer free ones) it’s been a joy to browse and no doubt has a lot of potential once more developers add their stuff. Microsoft MyPhone is a new service to bridge mobile and web synchronisation. It’s quite nifty allowing two-way synchronising for SMSes, contacts, calendars and todos – all accessible through a web interface. It also allows synchronisation with social networks (though Microsoft’s Facebook application is very good) as well as synchronisation between several devices. Some of it’s “pro account” features involve phone tracking and remote phone lockdowns,

In my next post on this topic I will start going through specific uses and my recommended applications for that use. But taking those first easy steps can really make a difference.