State of the UBports installer, or command line

So I wanted to have a look at UBports.
But honestly … how can this UBports Installer fail so much?

Using ubports-installer.0.1.21-beta.exe on Windows 10 Pro 1809.

  1. USB debugging

The required ADB drivers are installed on the computer, USB debugging is enabled on the phone, so ADB should work, that’s what USB debugging is enabled for … so UBports Installer wants to use ADB, right? Ok, I’m optimistic …

adb devices recognizes the phone, and USB debugging is thereby authorized (the authorization requester on the phone didn’t pop up for the installer itself by the way).

UBports Installer doesn’t recognize the phone … what? Why?
I assume it wants to use ADB, because else there would be no need to tell the user to enable USB debugging … and ADB works. WTF?
But ok, I can select the phone manually.

  1. Reboot into bootloader.

So, next I should reboot into bootloader … but why do I have to do that myself? If the UBports Installer wanted to use ADB anyway, why not do a simple adb reboot bootloader? WTF?
But ok, I’ll do it myself.

  1. Fastboot mode

I like Fastboot mode. It just works. And it works here at first, too, the UBports Installer recognizes it and wants to proceed, but …

… happens for every 16.04 channel … stable/rc/devel. Edit: “Ignore” amounts to nothing.
What about this error? Is this rare? …

https://github.com/ubports/ubports-installer/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+boot.img

… Ok, seems pretty common, which is not good.

And … I’m “not using the latest stable version of the UBports Installer”?
Edit: Ah, I got it now, the versions are all beta, there is no stable version yet, so the message is indeed correct.

Oh wait, it could be Windows … it should work better on Linux anyway, right? … Ok …

Tried the same thing with Linux Mint 18.1 with the Ubuntu installer … same result.
Will try the AppImage version next, even if I think something else is wrong.
Edit: As expected, the AppImage version runs into the same error.

Ok, older version back on Windows then … ubports-installer.0.1.12-beta.exe could work …
Doesn’t for me. Gets to the reboot to recovery part … which I do … and that was it, nothing happens.
Edit: ubports-installer.0.1.9-beta.exe behaves like ubports-installer.0.1.12-beta.exe.

Result for now: “Powered by ubuntu” splash screen and UBports recovery are in place, the Android I wanted to replace still boots nicely, though.

This install process needs either

  • serious work. I wonder how many more people would have tried UBports if they could install it. And on what phone could that be any easier than on the Fairphone 2, open bootloader and stuff?

or

  • the possibility to do it manually with fastboot. Give me files to install, give me a detailed guide. I’ll manage.
    At least this way I could perhaps try to work around some pitfalls myself.

or

  • the possibility to do it with the UBports recovery. How ever this was achieved (I suspect the 0.1.12 version), it’s there now, and apparently it could install stuff. Then give me stuff :slight_smile: .

(And the Fairphone 2 is supposed to be a “promoted device:slight_smile: .)

1 Like

I fully agree. I’ve managed to install most of the alternate systems but trying I failed under windows 10 with the UBPorts installer (although I think that would be a great solution if it worked reliably) and with fastboot…

Oh, so it can be done with fastboot? How?

No, sorry. “I failed with fastboot” means that I didn’t find a solution to use fastboot for installation (as UBPorts installer didn’t work for me either…). :unamused:

1 Like

Have you tried ubuntu-device-flash?
The command should be something like:

sudo ubuntu-device-flash --server=http://system-image.ubports.com touch --channel=16.04/stable --device=FP2

Or you can search ubports forum for usage/examples, or ubuntu-device-flash touch -h for help.

1 Like

No, I didn’t because apparently you could use that, “except on the Fairphone 2 where this method does not work”.

But this info seems to be over a year old now, perhaps I could give that a shot anyway.

Edit (as root, sudo was the same):

ubuntu-device-flash --server=http://system-image.ubports.com touch \ --device=FP2 --channel=ubports-touch/16.04/stable --bootstrap --wipe
2018/12/01 23:59:16 Expecting the device to be in the bootloader... waiting
2018/12/01 23:59:16 Device is |FP2|
2018/12/01 23:59:16 Flashing version 3 from ubports-touch/16.04/stable channel and server http://system-image.ubports.com to device FP2
68.99 MB / 68.99 MB [=====================================] 100.00 % 12.71 MB/s 
378.89 MB / 378.89 MB [===================================] 100.00 % 17.86 MB/s 
Can't boot recovery image

… same for the devel channel … and fastboot itself works, so what’s wrong here?
In Fastboot mode, to boot a recovery (or any) image, the image would have to be signed (how to do this is known). Since I don’t know where ubuntu-device-flash downloaded the files to, I can’t have a look.

There are images for boot, recovery and splash at Index of /devices, file date is June 30, 2018.
The recovery image there is not signed, so it can’t be booted with fastboot as is. Edit: I signed it, and fastboot can boot it … makes no difference, though.

I suspect the stuff that ubuntu-device-flash downloads is from Index of /pool, but it looks too cryptic there for me.

Indeed the ubuntu-device-flash never worked for FP2.

For install help, you can always go to telegram, they have a dedicated group for helping new people to install UT :slight_smile:

1 Like

I used the ubuntu-device-flash only for downgrade purposes. I wasn’t aware, that it doesn’t work for install. I apologize.

Maybe you should reconsider to put your findings about installer to ubports forum, or file an issue, if there is not already one filled in for your kind of troubles. Or the most badass thing would be to go for the bughunt by yourself, debug the installer and make an pull request with fixes. :slight_smile:

Have fun.

BTW, I think ubuntu-device-flash is only available on Ubuntu. I had to struggle with a couple of things as I’m on opensuse and several hints/scripts/etc. only work on Ubuntu (easily).

Trying to fix the installer is something I found not too easy. Maybe that’s because I’m basically only familiar with strongly typed languages and not JavaScript. But then I guess a lot comes down to conventions in the ecosystem that I’m just not aware of.
I would like to see and participate in some kind of installer hackathon, though.

If the installer would work like intended, I guess it would be super-convenient.
But it very obviously doesn’t work reliably yet, and so you can easily get stuck, because they don’t give you an alternative way to install (at least on the Fairphone 2, otherwise ubuntu-device-flash looks promising).

Not everybody is a developer able to patch the installer source code and build it from source, but there are experienced users out there.
They could just list the steps the installer is trying to do, and then let the users figure out manually what exactly fails why on their devices and how to prevent/ work around it … and with the feedback from this, the installer would improve in no time.
It seems either that would be technically impossible for some reason, or it’s too easy :slight_smile: .

I couldn’t install it on my Ubuntu in the Windows Subsystem for Linux, which is newer than 16.04 … so perhaps it’s even limited to older Ubuntu because Canonical themselves don’t do Ubuntu Touch anymore?

I could install and run it on Linux Mint 18.1, which is based on Ubuntu 16.04.

1 Like

There’s actually a recent topic in the UBports forum about giving the installer some love (i.e. improvements) at https://forums.ubports.com/topic/2049/send-some-ubports-installer-love-week-5

2 Likes

The ubuntu-device-flash appears to be an golang application, which can be compiled on many platforms. The compilation of an golang project should be as easy as install golang, use go get command to fetch-build-install. I tried only on ubuntu. Thus the compile process is a little tricky now.

Since they seem (to me) more concerned with making the installer look nice than getting it to actually work, I now added an automatic bug report to the collection with the same error message with a little further (Edit: and probably wrong) insight to GitHub … Fastboot: Unknown error: downloading 'boot.img'...OKAY [ 0.359s]booting...FAILED (remote: bootimage: incomplete or not signed)finished. total time: 0.361s · Issue #607 · ubports/ubports-installer · GitHub .

I think your approach is not corrected (tried it, too, BTW), because the installer works for me more than 50% of the time, using the exact same unsigned image. If not being signed was the root cause, there would be no FP2 running Ubuntu Touch, because they’ve never signed it, yet plenty of installations have succeeded.

My impression is that several people agree it is some kind of issue caused by running commands asynchronously to not block the UI. I’m not aware of having seen some detailed explanation, but by now I guess the last fastboot command (to reboot to recovery) is issued before the fastboot command to flash the boot image has finished. In that case the first part of “remote: bootimage: incomplete or not signed” would be correct.

1 Like

Yeah, I have seen that, too.
If that is indeed the cause I will instead blame them for not fixing the installer for months now, when a probable fix is known.
(Supposedly, this fork of the installer incorporates the fix, but I somehow couldn’t get it to run … GitHub - gronkern/ubports-installer: A simple tool to install Ubuntu Touch on UBports devices).

And I still think that we wouldn’t have all this trouble if they would prioritize function over eye candy, which should be a no-brainer.

You just have to compare the manual install scripts for Fairphone (Open) OS with the sources for the UBports installer … it would be funny, if it wouldn’t be so sad.

The 0.1.21-beta?
An older version of the installer was able to reboot to recovery on my phone, too … but this didn’t help to finish installing.

It seems nobody but that gronkern guy was able to get his changes to run.

To be honest, this “give $component some love” was a design only series. I tried to sneak functional fixes into it :wink:
In the telegram supergroup Florian mentioned that they might have someone to take over maintenance of the installer. I would contribute, but I find the code not-so-understandable.

I don’t think they are doing that with the installer. If you look at the last changes (Pull requests · ubports/ubports-installer · GitHub) most of them fixed some kind of errors in the installer or build setup or had functional enhancements like allowing to specify adb/fastboot when they are not in $PATH

Edit: the strange thing is, since 0.1.19 or so, the installer works for me most of the time. In contrast to other people’s experience I’m quite sure that 0.1.12 never worked for me (I always had to go back to 0.1.9).
Unfortunately there are subtle differences between linux distros. On opensuse the AppImage and deb versions for example can only work when adb/fastboot are in /usr/bin, having them in /usr/local/bin doesn’t work (that’s in $PATH for regular users but not for sudo; and it doesn’t help to run as root as the installer would still use sudo).

1 Like

I think they are doing exactly that by maintaining an Electron App monster for the nice GUI which doesn’t get the basic functionality right reliably on a “promoted” device … while not giving experienced users the manual install steps or providing a shell/ batch script which simply does the job and would be easy to troubleshoot.

1 Like

Ubuntu Touch is an community project. If anyone is to blame, than it is you for not providing an fix to the installer for months now, when a probable fix is known. The time you invest on automated bug reports and forum posts could be better invested to build and debug the installer, if it bugs you. Anyway, have a nice day. :slight_smile:

In essence you’re totally right, of course, but I’m pretty content with how I choose to spend my time.

To clarify, I didn’t create multiple bug reports, I just added one to the collection there with the same error. (I edited the wording in the post.)

I wouldn’t say much if the Fairphone 2 would not be called a “promoted device”. Either they can live up to their own promotion, or they could be more humble.
If you read a bit around here, you will find I can be very lenient and understanding when it comes to software shortcomings.
This “promoted device” thing just rubs me the wrong way when I look at the state of the installer.

Have a nice day, too :wink: .

I hope you don’t mind that I made a separate topic out of your posts. :wink:

IIRC there was (or is) some command line tool, but that’s just available on ubuntu and maybe also just for rather old versions, so that doesn’t help much.
So yeah, having some definitive steps how to do it manually would be very nice. And save lots of time for those who struggle with the installer.

But having some nice graphical user interface to install is not the worst idea, given that Ubuntu - at least in my recollection - started out to make linux easy (to install) for the average, not-so-tech-savvy user. So I can understand where the idea comes from to provide such an installer. But of course I agree that at the moment it’s by far not as helpful as intended.

2 Likes