Add a length check now, I’ve also uploaded the script running on my server to gist as well: https://gist.github.com/z3ntu/9c09120bb44c6dd9fe163931a1478ea9
Just plain and simple: @_tmp, lots of THANKS!
(works perfectly fine here as well)
Apparently Fairphone published their own How-To for unlocking the bootloader
there are some concerns regarding the data which is transmitted to Fairphone: keep in mind that fairphone may save your device informations (IMEI & SN) and thus Fairphone knows wheter you unlocked your device or not (could be important in warranty claims!)
Alternatively, you can use this method
These are the facts:
- When FP3 was released, there was no need to enter any code to allow the bootloader to be unlocked
- In a successive update, this new screen was introduced by FP, and some reverse engineering was required to unlock the bootloader (the above cited guide was then posted by the community)
- Now, FP makes available its own tool to circumvent an annoying dialog box that they introduced themselves, instead of simply removing that dialog box in a successive update
I have not checked whether the IMEI and serial numbers are actually sent to FP servers when you use their tool or whether the decoding is done client side, it would be interesting to see. (Edit: it has been checked in a later post by justlurking that this data is indeed processed by a remote server) But I let you draw your conclusions.
If I brick my phone, I will consider myself the only responsible for it, and will not open a warranty case with FP. But if there is a hardware failure, I wish FP to respond for it, independently of whether I have at some point intended or not to unlock my bootloader.
Moreover, it is not FP’s business to know whether or not I have the intention to unlock my bootloader. Well, I really don’t know (yet) what the FP tool for getting the code for unlocking the bootloader actually does, but in order to keep on the safe side, I prefer the strategy suggested on the above cited links.
Edit: it seems that there are actually quite a few guarantee-unrelated good reasons for which FP might want to collect, or even might have to collect this data. But using an alternative method to get the unlocking code still does not hurt .
It was me who retagged the solution to the official Fairphone solution.
My rationale being … it is the official Fairphone solution to the topic at hand.
But I have no emotional attachment to this detail here.
I have added the official code generator link to ✏ FP3: unlock the bootloader, so anybody with the permission please feel free to retag the solution if you so choose.
I agree, that it is not FP’s business, if you want to unlock your bootloader.
They - obviously - might save a list of those phones, that they sebt unlock-codes for. (I bet, they do.)
On the other hand:
When reading the source-code of this FP homepage, line 23 reads:
- data-error-disabled=“Unlocking the bootloader is disabled for this device. Sorry about that.”
So, it seems, there are phones, that can not be unlocked. Possibly those, they sold to companies as business-phones?
I have no idea, if the solution by @z3ntu enables unlocking for those phones as well? But you might be in trouble (with your company), if you unlock such a phone.
Well, alternatively, HolosericaCaligo could edit his/her post by adding a reminder to the links to the alternative way, so that anybody redirected directly to the solution could make his/her own choice.
@BertG: you are right, that could be the reason for FP to proceed in that way. I am not fully convinced FP necessarily keeps track of the devices that have potentially been unlocked, but since the whole process is not completely transparent but there is a transparent solution proposed instead, well, it looks fair that this solution should also appear here well visible.
It does send the IMEI and serial to fairphone; there is a POST call to
where “qwerty” is the IMEI and “asdf” is the serial.
Not sure what Fairphone is doing with this information; hopefully they’re using it to track interest in alternative OSes and to see if it’s worth investing resources.
Agreed. But on the other hand: if somebody is new to the community and just searching for the info how to unlock his FP3, would they rather enter the data to fairphone.com or to a totally unknown z3ntu.xyz? One needs to follow the community a while to find that z3ntu seems to be well-accepted member, whom the community trusts. So, from a security point of view it might be preferable to enter that data to a “official” site. Therefore, if that code is needed, I think it makes sense, that Fairphone offers a way to get it. But of course that doesn’t answer the question why the code is needed and what Fairphone does with the numbers.
Maybe they included the “input verify code” box due to legal reasons. As already posted in other topics they have to pay a fee for every device with an unlocked bootloader. Instead of paying this fee for all devices they could have implemented this verify code to pay for unlocked devices only. As each (official) unlock attempt requires entering the serial number and imei at their unlock website, they are able to track the state (locked/unlocked) of the bootloader.
Here it is …
Of course we would have less speculation with more official info, like we often would have .
you’re totally right, I’d just edited my post.
Good we have a community here. I’ve done that for you.
It was not such a nice thing, because in JS you often miss some features, like even a simple MD5 implementation, (so good you did not try @z3ntu ) but now it works. I even added/had to add some unit tests and compared the results with the Perl version. (The tests are always run in your browser console as “self-tests” at the start.)
Also if you have some other test strings (IMEI, serial number and resulting expected code) I can use for testing, feel free to provide that.
To be sure, I’ve deployed it at three different places, so you can decide which code/website to trust . (The best would be to just download the HTML file, verify that it does not do anything malicious locally and then open/use it.)
So here we are: In-Browser version of code generator (click on live version to use it directly in your browser)
(some background information)
Here is how I “had to” debug (I actually did not have to, but you only know that afterwards) the script:
Anyway… I hope it works.
Well this then means it would be good if people would not use FP website to unlock the bootloader, so FP does not have to pay useless fees…