Quick and dirty … I did the fastboot and adb stuff from the script on Windows with manually rebooting the phone between steps … and it worked.
Now how easy was that?
(Now I only need time to play around with UBports.)
Thank you so much for taking the time to figure this out. KISS principle at its best .
Extract the contents to a directory where you can find them
Open a command line and change into this directory
Make sure fastboot devices works at this stage (i.e. doesn’t just return an empty line)
Open the file flash_ubports_fp2.sh (the Linux shell script) in a text editor
Copy or write every line in the script which begins with “fastboot” into the command line and execute them For Windows change every “/” in directory paths to “\”
Reboot the phone into recovery mode (should be the UBports recovery then)
Copy or write every line in the script which begins with “adb push” into the command line and execute them For Windows change every “/” in directory paths to “\”
Dear Ingo and AnotherElk,
thank you so so so MUCH!
I only recently got my new Fairphone 2, my very first smartphone!
I knew I wanted Ubuntu Touch but it was quite a hassle to try with the installer.
Thanks to your instructions I was able to flash my FP2 with Ubuntu Touch.
It works like a charm. I am very happy
Just to point out : this file has to be changed as well if we want to adapt your script to OTA-7
Here is the content of the file I found in ~/.cache/ubports/commandfile/ubuntu_commandFP25642 :
format system
load_keyring image-master.tar.xz image-master.tar.xz.asc
load_keyring image-signing.tar.xz image-signing.tar.xz.asc
mount system
update ubports-c34db5ecd943e8c6d003bb96d8825dfb06ebabe510f9d55b4467c944019afdd6.tar.xz ubports-c34db5ecd943e8c6d003bb96d8825dfb06ebabe510f9d55b4467c944019afdd6.tar.xz.asc
update device-9bd5166032690abaefde7030ec186b79a1ad9a677d38382c6346422bd8875dc7.tar.xz device-9bd5166032690abaefde7030ec186b79a1ad9a677d38382c6346422bd8875dc7.tar.xz.asc
update keyring-4c4e7ef380ebcfa2c31084efa199138e93bfed8fc58aa3eb06bdf75a78af9b57.tar.xz keyring-4c4e7ef380ebcfa2c31084efa199138e93bfed8fc58aa3eb06bdf75a78af9b57.tar.xz.asc
update version-5.tar.xz version-5.tar.xz.asc
unmount system
If I was to guess I’d assume the Ubports Windows instructions are not really tested. They are 100% identical to the linux commands. I doubt this would work.
Yeah, this needs some work. There are also some “sudo” lines which make no sense on Windows, and they copied the “fastboot oem unlock” stuff over from other devices, which is unnecessary on the Fairphone 2.
But I’m so glad these manual instructions even exist now, those hiccups will get straightened out somehow.
When I have some time, I’ll have a look whether something can be done about this on GitHub or wherever.
If it was only that …
I just trial-and-errored my way through the sha256sum.exe for Windows and the Windows cmd … Long story short:
Example which will not work on Windows (from the current UBports manual instructions): echo "534cc2da2add4a2bd8136b01069ed7dbe432076659fd4780910b6910b916f77b recovery.img" | sha256sum -c
… would have to be changed into this to work on Windows: (echo 534cc2da2add4a2bd8136b01069ed7dbe432076659fd4780910b6910b916f77b *recovery.img && echo.) | sha256sum -c
sha256sum on Windows needs a line break following the checksum and the file to check, else sha256sum will complain about “standard input: no properly formatted SHA256 checksum lines found”.
echo. (including the dot) takes care of this.
To include the line break into what gets piped to sha256sum, the output of the two echo commands has to be joined using parentheses.
An asterisk is needed in front of the file to check, else the check will fail.