Turning an Android phone into a travelling desktop

Installing the software in the phone

I covered this in a post a few months ago:

You can turn your phone into a miniature version of your laptop by installing a desktop Linux distribution inside your Android phone and then installing all your favourite open source software inside that.

In my case, the open source software running inside my phone includes:

This solution works quite well provided it is used sparingly (for example to make a small last minute change to a presentation). However, as one gets used to the power lurking inside the phone, one is tempted to do this more extensively, and the limitations of the phone’s tiny screen and clumsy virtual keyboard become very apparent. In this post, I talk about my attempts to overcome these limitations with the help of other gadgets and peripherals.

Turning the hotel TV into an external display

I find an external display to be a more pressing need than anything else – it is useful whether one is consuming content (for example, reading a pdf file with graphs, diagrams and equations) or creating content (for example, writing this blog post). The obvious solution to the tiny screen problem is to connect the phone to the large flat screen TV that is now present in virtually every hotel room today. But implementing this idea proved non trivial.

Many modern Android phones do not support the MHL or Slimport interfaces and so cannot provide an HDMI output from the USB port. However, almost all Android phones support casting to a TV using Google Chromecast, and so this was the solution that I adopted. Chromecast however has two serious limitations:

  • It needs an internet connection even when casting local content from the phone.
  • It does not connect to the portal based WiFi that is standard in most hotels (it does connect to standard password based WiFi networks used by home routers).

So the Chromecast needs too be supplemented by a portable WiFi router. I use the HooToo TripMate Nano which can act as a WiFi bridge that connects to one WiFi network (say the hotel WiFi) and makes that internet connection available over its own WiFi network. In a hotel room, I first power up the HooToo, connect my phone to the HooToo WiFi network, login to the HooToo admin page and ask it to connect to the hotel WiFi network. The hotel’s login portal then comes up on my phone web browser and I sign it to it. Next, I connect my Chromecast to the HDMI port of the hotel TV and power it up. My Chromecast has been permanently set up to connect to the HooToo WiFi network and so it does so automatically. Now the phone and the Chromecast are connected to the same WiFi network (the HooToo WiFi) which in turn is connected to the internet through the hotel WiFi. The Chromecast now works perfectly, and I ask my phone to mirror/cast its screen to the Chromecast. Now, my phone has a 42 inch (or bigger) display on which I can read anything that is on the phone.

Both the Chromecast and the HooToo need power and I find it convenient to supply this power from a powerbank that has two charging ports. I carry a power bank anyway as an extra power supply for my phone, and by using it I avoid carrying too many chargers/adaptors and hunting for power points (sockets) in the hotel. (When I am travelling outside the country, I carry only one adapter plug and so even if the hotel has lots of power sockets, I may have access to only one because my plugs do not fit these sockets without an adaptor). This whole set (Chromecast, HooToo and power bank) is quite light and compact, and I have gotten used to carrying the set with me whenever I travel.

External keyboard and mouse

Occasionally, I find that the external display is not enough. There are some trips during which I plan to do extensive typing on my phone, and then an external bluetooth keyboard and mouse become useful. Since they are bluetooth devices, they can be used with a wide range of phones, tablets and laptops, and not just an Android phone. They end up being used at home with one device or the other, but these are much bulkier peripherals and I carry them with me during my travel only when I anticipate heavy use. On these occasions (as in the photograph below), my mobile is effectively a desktop with a large screen, comfortable keyboard and mouse.

My phone connected to hotel TV and other peripherals


Why Intel investors should subscribe to the Linux Kernel Mailing List or at least LWN

On January 3 and 4, 2018 (Wednesday and Thursday), the Intel stock price dropped by about 5% amidst massive trading volumes after The Register revealed a major security vulnerability in Intel chips on Tuesday evening (the Meltdown and Spectre bugs were officially disclosed shortly thereafter). But a bombshell had landed on the Linux Kernel on Saturday, and a careful reader would have been able to short the stock when the market opened on Tuesday (after the extended weekend). So, -1 for semi-strong form market efficiency.

Saturday’s post on LWN was very cryptic:

Linus has merged the kernel page-table isolation patch set into the mainline just ahead of the 4.15-rc6 release. This is a fundamental change that was added quite late in the development cycle; it seems a fair guess that 4.15 will have to go to -rc8, at least, before it’s ready for release.

The reason this was a bombshell is that rc6 (release candidate 6) is very late in the release cycle where only minor bug fixes are usually made before release as version 4.15. As little as 10 days earlier, an article on LWN stated that Kernel Page-Table Isolation (KPTI) patch would be merged only into version 4.16 and even that was regarded as rushed. The article stated that many of the core kernel developers have clearly put a lot of time into this work and concluded that:

KPTI, in other words, has all the markings of a security patch being readied under pressure from a deadline.

If merging into 4.16 looked like racing against a deadline, pushing it into 4.15 clearly indicated an emergency. The public still did not know what the bug was that KPTI was guarding against, because security researchers follow a policy of responsible disclosure where public disclosure is delayed during an embargo period which gives time to the key developers (who are informed in advance) to patch their software. But, clearly the bug must be really scary for the core developers to merge the patch into the kernel in such a tearing hurry.

One more critical piece of information had landed on LWN two days before the bombshell. On December 27, a post described a small change that had been made in the KPTI patch:

AMD processors are not subject to the types of attacks that the kernel page table isolation feature protects against. The AMD microarchitecture does not allow memory references, including speculative references, that access higher privileged data when running in a lesser privileged mode when that access would result in a page fault.

Disable page table isolation by default on AMD processors by not setting the X86_BUG_CPU_INSECURE feature, which controls whether X86_FEATURE_PTI is set.

As Linus Torvalds put it a few days later: “not all CPU’s are crap.” Since it was already known that KPTI would degrade the performance of the processor by about 5%, the implication was clear: Intel chips would slow down by 5% relative to AMD after KPTI. In fact, one post on LWN on Monday evening (Note that Jan 2, 2018 0:00 UTC (Tue) would actually be late Monday evening in New York) did mention that trade idea:

Posted Jan 2, 2018 0:00 UTC (Tue) by Felix_the_Mac (guest, #32242)
In reply to: Kernel page-table isolation merged by GhePeU
Parent article: Kernel page-table isolation merged
I guess now would be a good time to buy AMD stock

The stock price chart shows that AMD did start rising on Tuesday, though the big volumes came only on Wednesday and Thursday. The interesting question is why was the smart money not reading the Linux Kernel Mailing List or at least LWN and getting ready for the short Intel, long AMD trade? Were they still recovering from the hangover of the New Year party?