(Nearly) Successful Voice Calls on PinePhone with UBPorts

Update (3 July): Calls now work 100% of the time.

So, this tweet turned out to be a teensy bit premature:

I can get the PinePhone to ring other phones – which is still a new accomplishment – but no voice comes through. Alas.

But, since this remains a new development, here’s how it came about:

1. Flash the latest available Pinephone System Image

Go to https://ci.ubports.com/job/rootfs/job/rootfs-pinephone-systemimage/ and download the latest image. (NB: this is a new URL. Any builds from the old site won’t work since they lack the code to self-update.)

Use BalenaEtcher (or dd if you’re grizzled) to flash the image to your SD card.

2. Switch to the Dev channel

This is where it gets new. Gone are the days of flashing each day’s image and losing your stuff. Now, UBPorts can auto-update (w00t).

Navigate to Settings | Updates | Update Settings (the last being cleverly hidden at the bottom of the screen) and change your channel to Development.

Give the phone some time to think, and it should load the latest Ubuntu image (at the time of writing, the latest is version 54).

Nota Bene: These version numbers are not updated daily, and as such have no correspondence to the build numbers on the CI page.

3. Reboot and Update

Once the update has been downloaded you will need to reboot so that it can load. When you reboot, make sure that you’re still on the dev channel since sometimes it reverts.

4. Place a call (prayer never hurt)

If you’re like me, you’ll now have a 1:5 (up from 0:5) chance of being able to successfully dial out.

(The title to this post said “nearly” for a reason.)

5. Stay Tuned

At this rate an actual, working voice call can’t be far off, right?

Posted by Adam Labay, 0 comments

Successful Phone Calls on the PinePhone

I’m hardly the first to get this to work, but it’s still been a long time coming so I’m celebrating, dammit.

So far, the only configuration that I’ve used that can pull off both¬†incoming and outgoing calls is PostmarketOS.¬† The steps – what relatively few there are – follow.

Install per the wiki

My preferred interface is Phosh, and I prefer to include the firefox and midori packages since the built-in browser never connects, no matter how many hints I follow.

Even though most work on the device is via ssh, it can also be helpful to install xterm.

I’ve also started including the postmarketos-anbox and android-tools packages in an attempt to get Android apps running, but that’s another story entirely.

Configure sound

Once the phone is up and running, the only additional step needed is to enter Sound configuration and set both configurations to Place a Phone Call.  This accomplishes all the mappings that we were previously trying to pull off using pactl.

‘Tis Better to Receive than to Give

I don’t know why, but for some reason I can’t place calls until I’ve received one first.¬† So make sure that your first test is a call¬†to your PinePhone.

Celebrate your cleverness

Receive a call. Place a call.¬† Revel in the new ability to say “hello” from your left hand and hear it with your right hand.

Posted by Adam Labay, 0 comments

Taking Screenshots on the PinePhone… sort of

We all know that, when playing around with a new device, the most important thing you can do is record the experience so that others can behold your techno-wizard glory.  Pics or it didn’t happen, no?  Which makes it that much more frustrating that the PinePhone currently can’t take screenshots in seemingly any of the OSes that are compiled for it.

Attempt 1: The Built-In Option

I’ve been using Ubuntu Touch, since at the moment it has the most features and the least suck of the available OSes.  (Technically the build is from UBPorts, but I’m going to use the terms interchangeably because I’m lazy.)  Allegedly, UBPorts lets you take a screenshot by simultaneously pressing Volume Up and Volume Down, but that doesn’t work on the PinePhone – best I can gather, that only works on Android ports of Ubuntu Touch.

Attempt 2: The Command Line Option

Other posts suggest that you can use phablet-screenshot from the phablet tools package, but that too leads to disappointment, with the program freezing.  Running debug mode (-d) shows that it’s trying to pull the screenshot from adb:

+ adb start-server
+ check_devices
+ set +e
+ adb wait-for-device

Since the PinePhone isn’t running Android, adb isn’t really a thing, and you’ll end up waiting forever.

Attempt 3: The Raw Option

Looks like we’re going to have to create this from scratch.  All of the above-mentioned techniques essentially do the same thing: they dump the framebuffer /dev/fb0 to a file and then convert that file to PNG, JPEG, or whatnot.  How hard can that possibly be?

Dump the Framebuffer

The first step is easy enough: cat /dev/fb0 > img.raw.  This dumps the framebuffer (i.e. what’s on screen) to a raw file.

Figure Out Your Screen Size

The raw image file is just that: a raw stream of pixels, with no dimensions built in.  As such, you next need to figure out how big your screen is.  For the PinePhone, this is 720×1440 pixels.  If you want to discover this yourself, you can just type fbset (sudo apt install fbset if necessary).

Get the Script

This helpful chap cooked up a lovely little Perl script that will then convert the raw image to png.  Download the script, chmod + xto mark as executable, and invoke with ./iraw2png 1440 720 img.raw img.png.

NB: I swapped the dimensions.  You’ll see why.

Inspect the Results

Here’s the result, which doesn’t exactly look like the Desktop:


It definitely captured a thing.


It captured some manner of console, perhaps the TTY output? I don’t know. Evidently there are other framebuffers to be found. If you know how to find them, please do send a comment since I’m up a creek on this one.

Posted by Adam Labay, 5 comments

Mistakes to Avoid With the PinePhone

As mentioned before by me and many, many others, the PinePhone Brave Heart edition is very much¬†not road ready.¬† That’s fine, but it does mean you’ll probably find yourself reflashing your device’s image a few times.¬† What follows are the various mistakes that have led me to re-flash my phone.

Decreasing the Brightness

As soon as you move that slider, your brightness will go to nil. As in no image at all.¬† If you have SSH enabled, you can probably set that brightness back, but there’s a good chance that you’ll make the move¬†prior to having SSH set up.¬† Whoopsie.

Applies To

  • Sailfish OS
  • Ubuntu Touch (only if you decrease it fully)
  • PostMarketOS (only if you decrease it fully)

Turning off WiFi

Under Ubuntu Touch, turning off WiFi somehow borks the radio, requiring you to toggle it off and back on.  Not a huge nuisance, but not nothing either.

Applies To

  • Ubuntu Touch

Following that modem.txt document

A lot of folk, myself included, have tried to enable voice calls by following this file.

Don’t. do. it.

The file relies on a custom kernel, and if you set your QDAI settings per this file, you will end up unable to make phone calls until you reset it to factory defaults – which you have to do manually.

Posted by Adam Labay, 1 comment

Ubuntu – The Most Stable PinePhone OS So Far

Of the four operating systems I’ve tried so far on the PinePhone, Ubuntu Touch (aka UBPorts) is the most stable, getting me nearest to actually placing a successful call.


The process starts by downloading the latest image, either from the Pine64 wiki or from the UBPorts Jenkins site. Flash the image onto a microSD card using Balena Etcher or your favorite flashing tool.

First Use

Initial startup works like a charm. You’ll want to attach to WiFi since the SIM won’t initially be read. Once you’re in, hop on the Interwebs and have some fun. Just nothing that requires audio, since that’s the next step.

Enable Mobile Data

Ironically, your fancy new phone won’t be able to use any mobile functions. You need to enable the modem, this time and every time you boot. There’s probably a way to turn the process into a startup script; I’ll report back if so.

At any rate, open the Terminal app and enter these commands (taken from this post):

sudo /usr/share/ofono/scripts/enable-modem
sudo /usr/share/ofono/scripts/online-modem

The sudo password is phablet

Once you’ve entered the first command, the second one is a piece of cake thanks to Ubuntu Touch’s nifty keyboard. Swiping up on the keyboard reveals the cursor, which is moved by swiping around. Nice touch, UBPorts.

Enable Audio

Much like enabling mobile data, you’ll have to do this every time you start the device.

Open the Terminal app and enter the following:

sudo modprobe snd_soc_simple_amplifier
sudo modprobe snd_soc_simple_card_utils
amixer -c 0 set 'AIF1 Slot 0 Digital DAC' unmute
amixer -c 0 set 'Line Out' unmute

Optionally, add the line amixer sset 'Line Out' 100% to max out the volume (best I can tell, you’re setting the volume that 100% on the volume rocker corresponds to; i.e. if you leave this at 55% (the default), the loudest you can make your phone is 55% of its true potential).

Don’t Disable Wifi

If you do, it won’t come back. Rather, it will appear enabled, but no access points will appear and even saved APs won’t connect. To remedy, open Terminal and enter the following:

sudo nmcli radio wifi off
sudo nmcli radio wifi on

What Works

So far, I have successfully

  • Played YouTube videos
  • Surfed the web on mobile data
  • Rebooted the phone a bunch of times

What May Yet Work

It turns out that my cheapo FreedomPop SIM requires some proprietary app to do text and calls, so I can’t test that at present. But if the Reddits and the forums are any indication, I’ll be a lucky son of a gun if I manage to successfully place a call. Texts shouldn’t be a problem.

What Doesn’t Work

Taking a friggin screenshot. Maybe there’s another app required?

Updates to follow.

Posted by Adam Labay, 0 comments

PinePhone First Impressions

My PinePhone BraveHeart edition arrived yesterday, and the past few hours have been spent playing around with it and trying to place a basic call.  Findings so far:

For Developers and Maniacs Only

The folks at Pine64 make very clear that this phone is not a daily driver, but it bears repeating: this is not so much a phone as a fun Linux project with a SIM slot.  You have to install your own operating system, and none of the choices on offer claim to be even remotely road-ready.  In particular, the four I’ve installed so far have had one or more of these symptoms:

  • Unusably slow
  • Can’t find the SIM
  • Require a light to be shined on them to display anything
  • Lock you out without a password

Further, even the folks online who have managed to get past the above nuisances still generally can’t get the silly thing to successfully place calls – you know, the one thing a phone is supposed to do.  So again, not a daily driver.

But All Kinds of Fun to Play With

With all those caveats out of the way, the thing’s a hoot to mess with. If something goes pear-shaped, just pull out the microSD card and re-flash it. And at $150, the price point is great for a project.

What Lies Ahead

I’ll do my best to make the silly thing work, and will report back with whatever tips and tricks I come across.

Posted by Adam Labay, 0 comments

Adventures with XYO – The Thrilling Conclusion

Back in November I decided to try out mining XYO using the Coin app on an old Nexus 5X that I reappropriated for the purpose.

Now it's February, and I think I'm about done with the whole thing.

To be candid, the main reason is that my sentinel went through the wash, and while it looked like a fresh battery would fix it back up, the new batteries don't seem to last more than a couple weeks. As such, I'm out $12.95 for the sentinel and $7 for a set of replacement batteries. In the same amount of time, I've earned about 8,000 COIN, which, if I could convert them to XYO (that option doesn't start until 10,000), would be worth...

31 cents.

I'll probably throw a few other posts about the various aspects of the COIN app and geomining, but for now here are my main takeaways:

Great for Truckers

Perusing the Reddits, the one group of people who seem to get a decent-ish return from geomining are truckers, who spend literally all their time cruising from tile to tile.  I'd wager that Uber drivers fit this description as well, though truckers have the advantage that they can geoclaim gobs of regions every cycle.  Truckers, who pass from cell to cell quickly and thus need a rapid recharge cycle, are probably the only group who benefit from Pro accounts as well.

And Nobody Else

As an ordinary schlub who works in an office and either drives to work or takes a train, there's simply no return to be had.  Five miles of walking net about 100 COIN, which isn't a whole lot greater than just sitting around refreshing the tile periodically while I work from my desk.  Geoclaiming isn't an option either, since the two regions I can claim (work and home) are both chronically oversubscribed, making the a losing proposition for everyone involved.

It's a shame, really.  The premise of geomining, as outlined on an XYO Medium post, ain't bad.  Using a fleet of smartphone-armed passers-by to determine whether packages arrived is clever, and I really do hope they figure out a way to make it work.  For now, though, it's just another GPS device attached to yet another freight truck.

Posted by Adam Labay, 0 comments

The Futility of Geoclaiming

As described by the folks at the COIN App:


When you Geoclaim a tile, you are becoming an owner of the tile for the remainder of the campaign(Currently UTC Monday to UTC Sunday). Anyone that Geomines using the COIN app in your area will give you a chance, based on your Ownership percentage, to collect 10% of rewards.

An Owner with 100% ownership of a Geoclaimed Area will receive the 10% of rewards every time. 

An Owner with 50% ownership of a Geoclaimed Area will receive the 10% of rewards half of the time. 

An Owner with 25% ownership will receive the 10% of a miners reward a quarter of the time.

In theory, this is a way of earning that sweet, sweet COIN without having to actually, you know, go places.

In practice, it’s a lovely exercise in overestimation and accidentally returning COIN to the system.

But it doesn’t have to be, and my current goal is to figure out means of optimizing geoclaims.

The Basics

The amount you get out – your return – is proportional to your stake – i.e. the amount of the area that you control, or what the COIN folks call your ownership.

I’m using stake because in this context, ownership is a misleading term. Take a look at this screenshot:

Paid: 1905. Ownership: 13%

Throughout this week, my ownership has never dropped below 10%, and has usually hovered in the 13-14% range.  Yet, my returns are well less than even 10% of the total 10,940 COIN held by this region.

That’s because you don’t own a fraction of the COIN held; you get a fraction of the COIN earned, as it gets mined.  And remember that geomines are random numbers, further dependent on whether that user happens to have a sentinel at the time.  It seems that my RNG luck this week was pretty crap, since the users I was earning from tended to have lower mines than average.  That, or a lot of users in my area have premium accounts, which prevents their mines from entering the pool.  Probably both.

The Point of No Return(s)

Say it with me: your earning potential is not unlimited.  It’s determined by your stake, and by the available earnings.  If we make the simplifying assumption that your stake is actually an ownership, then

the amount you pay into the geoclaim – your investmentmust be less than your stake multiplied by the total COIN in the region.

Seems obvious, but you would be amazed how many people on Reddit get hyped about how much they dumped into their latest geoclaim without realizing this basic fact.  And, as discussed earlier, your expected return is actually significantly less.  (How much less? I’m working on a heuristic, but that’s another post.)

Consider the screenshot above: That 13% stake cost me 1905 COIN.  Even if I earned a full 13% of the available ~11k COIN, I’m still not going to recoup my investment.  (In this case, I saw that coming, but dumped the all the COIN in for other reasons.)

Good Money After Bad

But what if I just increased my stake until the math worked out?  There’s a possibility that would work, but it depends on two things:

First, the distribution of investments.  If it were linear, then doubling my investment would double my return.  But it’s not linear, it’s a Pareto distribution (more on that in a future post).  TL;DR: it’s like the American economy, where most of the stakes are taken up by a very small fraction of users.

It turns out that doubling your investment does indeed double your return.  The only thing that matters is how much has been invested total, below.

Second, there is a point of no return.  If the total investments ever exceed the available COINage, then nobody gets a positive return, no matter how much they put in.

The math is easy enough:  Again, pretending that your stake is an ownership – which, emphatically, it ain’t – we can say that your return is defined by

\(R = s \times A\)

where R is your return, s is your stake, and A is the total available COIN.  Your stake, meanwhile, is defined by the ratio of your investment to the total investment:


So, we end up with

\(R=\frac{i}{I} \times A\)

If we want a positive return, then

\(\frac{R}{i} > 1\)



or, the total available COIN must exceed the total investment.  If everybody tries to pump up their stake, then there comes a point where everybody loses.  Whoops.

So can Geoclaiming work?

It depends.  Specifically, it depends on the distribution of stakes, and a few other factors.  I’ll get back to you.

Posted by Adam Labay, 3 comments

Adventures with XYO


For the unfamiliar, XYO is yet another cryptocurrency venture.  The basic premise is that users mine their coin (also called XYO) using the Coin app, which uses proof of location as the mining function (as opposed to proof of work for Bitcoin, or say proof of storage for Burst or Filecoin).

You wander about the world, which is divided into squares about 25 feet on a side.¬† Each square you enter is worth a random amount between 0.02 and 0.1 XYO, which gets “geomined” when your phone enters that region.¬† If you pay them $12.99, you can get a Sentinel – a bluetooth doodad that, as a reward for foolishly dropping 13 bucks on their technology, multiplies each geomine by a factor of 12.

XYO Sentinel Doodad

This method of mining, however, is crap.  As an average person who walks around casually (about 6 miles a day, much of it around the office), a daily haul is ~200 Coin (not 200 XYO; read on.).  At that rate, it would take about 2 months before I could convert the minimum 10,000 Coin into 10,000 XYO, which as of this writing is worth about $2.95.

As in any good cock-and-bull crypto scheme, there are other ways to increase your rewards.¬† One is a Premium subscription, starting at $24.99 a month, which multiplies all of your mining by various factors.¬† Another is to hijack the mining of others by staking a Geoclaim – i.e. paying into a 25×25 mile region in exchange for a percentage of the coin mined therein.¬† This comes with its own risks and rewards.

For funsies, I’ve decided to spend the next two months answering the question,¬†Is it possible to actually generate any manner of money using XYO?¬† I’ll wander about, rapidly draining the battery on the old Nexus 5X I’ve dedicated to the endeavor, do the math, and report back.

Posted by Adam Labay, 0 comments

I got hacked

The title says it all.  No idea how, since I use 2FA on Dreamhost, but here we are.  Time now to rebuild.

Posted by Adam Labay, 0 comments