[Part 1] Flashing not working - either writing userdata fails or keys don't match + [part 2] encrypting userdata on first startup does not finish

Hi people!

[Problem 1]
So I am in the process of installing Sailfish on my Xperia 10 III and, following the guide from Jolla, everything worked fine so far. But now, when the flashing is performed in step 8.5, the flashing will always fail. Using the provided data from Jolla as instructed, the error shows as follows:

Writing ‘userdata’ FAILED (remote: ‘Flashing of userdata is not allowed in snapshotted state’)
fastboot: error: Command failed
ERROR: Failed to execute ‘fastboot.exe -s HQ622R0939 flash userdata sailfish.img001’.

I found an article with a similar issue and tried to use their solution but it is giving me an error much earlier. My tried method is from here:

Trying to replace fastboot.exe with the latest version from Android SDK as described there, the error shows as follows:

MDSSUM […] of file ‘fastboot.exe’ does not match […] found from md5.lst
[End of problem 1]

So does anyone have a solution to solve these issues?

Thanks for any help!

Edit:
This post shows the solution:

  1. Find the location of fastboot.exe
  2. Find a tool to calculate the md5 hash ( not sure if windows ships one)
  3. Use that tool to calculate the md5 of fastboot.exe
  4. In the folder where the flash script lies, find the file md5.lst.
  5. Edit it using a proper text editor (not notepad), replace the line for fastboot, entering the new md5 hash. (keep a backup of the file)
  6. Try again.
2 Likes

Or just remove that line from the file.

2 Likes

I never flashed SFOS from Windows but from Linux. However, having everything in the right folder would be the first thing I would check. Also, there could be the issue that Windows (especially in version 10) deactivates USB sometimes for unknown reasons. Please check if that’s setup correctly.

What about flashing SFOS with Linux running from a bootable USB stick? So the user hasn’t to touch his Windows installation but can use Linux to flash a phone.

If I flash a phone, I have a directory named ‘FlashNow’ on my computer and I check the Jolla guide exactly step by step and then flash by terminal command, and since I do so I never had any problem. Before I started to do so, I often had some mess and therefore it didn’t work.

Thanks!
So removing said line helped to pass the key checks. But now I am back to the first error where it cannot write the userdata.
I tried to look for USB settings too but there are no settings given except “notify in case of error”.
So the issue becomes redundant. Now the question is, how can I escape the loop?
Thanks for any further help!

I don’t know but just in case…
I had some repetitive issues in the middle of the flashing process too.
Failing flashing were reported to be sometimes solved by changing the USB cable and USB port.
This solved the case for me.

1 Like

Maybe this helps. Do this at your own risk.
If it is still not working i would install android using emma and try again.

Command:

fastboot.exe snapshot-update cancel

1 Like

Thank you!
So the flash worked now with multiple suggestions combined.
The complete solution is:

[Solution of problem1]
Download the Android SDK from SDK Platform Tools release notes  |  Android Developers
Replace the original fastboot.exe from the provided Sailfish package with the same-named file from the Android SDK
Open md5.lst in Notepad++ and remove line 4
While in the folder with all the files, write the following to the address bar of the Explorer: fastboot.exe snapshot-update cancel
Then continue from guide step 8.4 again

[Problem 2]
Right now I am trying to boot the phone but it seems to be stuck at “Encrypting user data, please wait”. I hope this will eventually come to an end…

Edit:
[Solution of problem 2]
If the phone during your restart at step 8.7/8.8 is taking too long to encrypt user data, do the following:

Force-stop and restart booting (as in step 8.7)
When asked for a security code after that, use 00000 as your code

I would highly recommend to change the security code under Settings → Device lock
Note that the security code must contain at least 5 digits.

If your phone starts to behave weirdly during initial usage/introduction, repeat force-stop and restart.

3 Likes

Is it normal that this takes so long? I am still waiting for the encryption to finish…

No, please reflash again.

Good advice! I would also reflash Android via EMMA tool. This helped me also once with my Xperia 10+.

Thanks everyone for your help!
My installation is now successful. It only needed a force restart and an automised code to finish.
I am adding the concrete steps to my solution post above.

2 Likes