Fairphone 2 support for B2G-Installer, landed!

Hi Juan
I uploaded the buildlogs to the bugzilla thread.
https://bugzilla.mozilla.org/show_bug.cgi?id=1248718

I don’t whant to stress you, just be sure you have noticed…
Thanks, Novski

Il just add this link to the Topic in the Fairphone Forum… Novski
https://forum.fairphone.com/t/pencil2-b2g-beta-formerly-firefox-os/12443/140?u=novski

1 Like

Cool thanks :slightly_smiling:
This forum post highlight some issues with the documentation, that is no clear enough.
I will note that in the doc’ thread.

(I reply to myself, schizophrenic mode :smile:)
I edited it a bit, I hope it’s clear now.

1 Like

assumed i have no skills.
what wold you sugest to do to get fastforward on debuging on my B2G on Fairphone2?

Any Links? Topics to read or Tags to google?

:grin: just assuming… :sunglasses:

Hi, im back with good news. I built a new blobfree version of B2G and tested it on all available versions of Offical Fairphone OS. It works. So now i wold like to make it availabe to others. But I have some quetions to the process of making it available throug the B2G-installer. I read this:
B2G_installer_add-on#Adding_new_device_support

Is this correctly done?

  1. I have forked it: novski/b2g-installer-builds
  2. I have filed a bug: id=1285793
  3. The builds.json is already augumented with the Device and Product name from @jgomez

Questions:
1 . Wich file do i have to upload to a “url” given in builds.json? Is it this:

  • B2G/out/target/product/FP2/FP2.blobfree-dist.zip?

2 . i do not understand the meaning of this following line:
ro.build.display.id”: [“r4275.1_FP2_gms43_1.2.8” ]?
-it seams to be the Build-Number i see in the settings of Android. But does that mean it will only install if this Build-Number matches the one on the Device to flash? There are several ones since it is heavely developed in the past 4 Months. I wold like to make it available to all those verions. I have also tested it on all Versions. But maybe it also doesn’t make sense, then please correct me…

3 . what does “PR” mean?

Send a PR on Github, attach it to the bug you created and ask for review :gerard-majax.

Thanks, Novski

Yes, it is this file! We can even host it on our b2g-installer repo if you give it to me :slight_smile:

So this field in the JSON file lists all the upstream Android releases we can get blobs from. So you are right, you should list ALL the Android releases from Fairphone that works.

It means that you need to ensure all the builds listed here works. We are reusing the blobs (non free/non redistribuable components), and it might be possible there are incompatibilities. I would recommend that you test only the latest update available, and we can always point people to upgrae their phone before flashing.

If you have a device with a build that is not listed, and you plug it in the addon, it will not be listed/detected.

PR means you do the needed changes to builds.json, and push it to a branch, then open a pull request on Github. Please refer to Github’s doc for this.

Also, please test your PR by changing the builds.json URL pref: this is handled at https://github.com/mozilla-b2g/b2g-installer/blob/master/about.js#L41 so you just have to open |about:config| in your firefox , create a new string pref named extensions.b2g-installer@mozilla.org.builds and set the value to your PR’s json file (the file, and not a link to the github page, otherwise it will fail).

Once your have changed that pref and restarted your firefox, plugging your Fairphone2 with a supported Android build you should be offered to flash B2G with your ROM :slight_smile:

FP2.blobfree-dist.zip

I have done that part but it doesn’t recognize the phone.
my phone has Build-Number: r4275.1_FP2_gms56_1.4.2
This is the link i have as string Value: https://raw.githubusercontent.com/novski/b2g-installer-builds/a1aa2208540033bf4427894b6354fbdbea51f800/builds.json
of Preference Name: extensions.b2g-installer@mozilla.org.builds

I have separated the different Build-Versions by coma as i have seen in other .id lines like that: “ro.build.display.id”: [ “r4275.1_FP2_gms43_1.2.8”, “r4275.1_FP2_gms56_1.4.2”, “r4275.1_FP2_gms59_1.5.1” ]

Is that wrong?

No, that looks correct. Can you check JS Console? It’s available from CTRL+Shift+J

I reversed my Build-Number to the 1.2.8 that version was accepted by the previous Builds.json version from juan. And then I reset the value. Like that it recognizes it and brings up the select step in b2g-installer. But setting the value back zu my builds.json it doesn’t recognize the phone again. So it has to be my builds.json but i can’t say whats wrong…
This is from Build-Number 1.4.2 where it doesn’t recognize


And this is from 1.2.8 where i have reset the value to test.

And then again with my builds.json and Version 1.2.8:

i have just seen the bugzilla reply.
I will have a look and solve it this evening…

Yes, the error in your console is consistent with the broken builds.json because of the missing comma :slight_smile:

I now tested the full workflow of flashing a blobfree build to the FP2 and have to say it doen’t work yet.
The device doesn’t start up. It stucks in the boot proces. So i even get a window saying that the device got successfuly flashed. I can click ok. and then get back to the normal view of b2g-installer. But the device reboots and stucks in the bootloader screen. I tried 3 different versions of Fairphone OS.
So it seams to me that the extraction of the blobs doesn’t work for FP2.
Howcome the ./flash.sh works in the console but not in b2g-installer? Does it follow a different workflow?

Yes, the workflow is different. Please read the docs about it.

There are images kept in /tmp/b2g-installer/DEVICE/images/, you should try to fastboot flash them. If it works, then the images are good and there is only a problem at flash time. We need logs to make sure.

I don’t have a Fairphone 2 so I cannot help. Your description would point to either a wrong boot partition (can happen is there is missing dt.img that is required), or incomplete flash: it has been reported issues with some USB ports in some cases.

Thanks for the Reply.

I don’t now where to find this. Whats befor ___/tmp/b2g-installer/DEVICE/images/?

I tryed the nightly version from juan gomez and that works. Its FXOS 2.6.0.0

How can i log in b2g-installer?
i didn’t find any help on this site B2G_installer_add-on#Adding_new_device_support
is there more information elseware?

Nothing before, it’s in your temp dir. Logs from JS console ?

I think you are guiding for Linux as tmp sounds like that. Im on OS X.
Search of a b2g folder in OS X doesn’t find any… (my builds are made in a Linux VM…)
And the JS console doesn’t allow me to copy the output.

Any idea how to get hold of the logs?

No. I don’t know osx.

<
https://ci5.googleusercontent.com/proxy/kY0yCMmDzLJk1E96ido5ikNAHe5zh52D3YphR1X2xsrOEU-akWaRVcb05gCxw4tWSLqENnwem5Tm-NtFWoV2NCt4Wc-JGW_Dh5C7jzgcntlxIgUGOQWTDe7tfUEQonn_B38KBuLWG02k6YjYTd1RxOikuyZQHm2_UG72p17U=s0-d-e1-ft#https://discourse.mozilla-community.org/user_avatar/discourse.mozilla-community.org/novski/45/4829_1.png>
Novski Ivan Hörler
July 15
<
https://ci3.googleusercontent.com/proxy/a6EMeT_h5MyWLSl50LcVcJUcuUEikIXcNOGXGJp-rrXv_7kQn0Wq-HQyymFXmI0doJHrcmzOsl7o4aRl636hcMyALwftzCNk9QPOpt9NxLIADNXTj0GcC0i1vgWFaHC0yIhNPOj5vscsw7s=s0-d-e1-ft#https://discourse.mozilla-community.org/letter_avatar_proxy/v2/letter/l/ecb155/40.png
lissyx:

/tmp/b2g-installer/DEVICE/images/

<
https://ci3.googleusercontent.com/proxy/a6EMeT_h5MyWLSl50LcVcJUcuUEikIXcNOGXGJp-rrXv_7kQn0Wq-HQyymFXmI0doJHrcmzOsl7o4aRl636hcMyALwftzCNk9QPOpt9NxLIADNXTj0GcC0i1vgWFaHC0yIhNPOj5vscsw7s=s0-d-e1-ft#https://discourse.mozilla-community.org/letter_avatar_proxy/v2/letter/l/ecb155/40.png
lissyx:

Nothing before, it’s in your temp dir.

I think you are guiding for Linux as tmp sounds like that. Im on OS X.
Search of a b2g folder doesn’t find any… (my builds are made in a Linux
VM…)
And the JS console doesn’t allow me to copy the output.

Any idea how to get hold of the logs?


Visit Topic or reply to this email to respond.


In Reply To

<
https://ci5.googleusercontent.com/proxy/awzTLeZSQ4NoIfBlGZA3lo26kZQVVC_BjmANCNdQ4J3ntLbC3OZJIeAQFM53I2NXMRdNwx5dc_wrzQauIPOWKNBxCWTk2WOuGwsP5-7iO_OBAvvokOOWFV5k6nWiczuxCcFLpgrVlO3SS2U=s0-d-e1-ft#https://discourse.mozilla-community.org/letter_avatar_proxy/v2/letter/l/ecb155/45.png>
lissyx

Ok. I asked that in the Firefox developing topic of discourse.mizilla-community.org and have to wait until i get an answer there.
I also recognized that at some point i can click on the second image (first is “B2G Nightly user build for Fairphone 2” and second “B2G OS Transision” but it installs the first image.
It then boots with FXOS 2.6.0.0. instead of B2G where it still doesn’t boot.