Full dd backup of rootfs and /home as flashable images

Pretty sure the long write times are because of dd’s defaults for the bs parameter (as @thigg mentioned above).
Specifying something like bs=1M or so should speed up things.

I seem to remember one should use a size depending on some property of the underlying flash storage to save writes but can’t remember which.

5 Likes

Great idea, thank you! It reduced the time from 100 minutes to merely 39 minutes (write speed jumped from ~ 17 MB/s to ~45 MB/s). I got a perfectly restored system once again, including Android App Support. I only had to re-enter Jolla account credentials.

Prior to this last restore I reflashed my 10 III with Sony’s stock Android 13 (62.2.A.0.525), which gave me a much newer baseband. Everything works perfectly fine, and some things seem to actually work much better than on Android 11 (62.0.A.3.109) - that including the fingerprint sensor and display, which doesn’t seem to have the green/yellow tint issue even after I disabled the “BrightnessFix” service. Also, so far none of the people I called and asked about the echo issue confirmed hearing any echo…

So those things seem to be resulting from the Android OS present on the phone PRIOR TO reflashing to SFOS, and not from the Sony binaries flashed along with SFOS.

5 Likes

If you need compression to fit the 128GB partition to your SDCard, maybe using pigz instead of gzip could also speed up things a little.

@wetab73

Thanks for trying this out, i needed to do this, because i broke my 10iii. Did the backup of the old Xperias sda79 partition and wrote it back after installing SFOS on the new one. The phone needs to boot into SFOS afterinstallation before writing the filesystem back.

Everything seems to work, except that i had to reenter my wifi password.

1 Like

Fortunately, the partition turns out to be actually 104 GB so it fits nicely on a 128 GB card (which also isn’t full 128 GB but around 117 GB :wink: ). Specifically for this task I bought some cheap Samsung Pro Plus 128 GB card with (allegedly) 180 MB/s read / 130 MB/s write speeds. As advised by @nephros, next time I’ll use bs=1M also for writing the backup to the card, so I’ll see how fast that card really is.

I just wish the recovery mode could be used like on the XA2 Ultra, i.e. without having to flash hybris-recovery.img to the boot partitions (and then reflashing to hybris-boot.img) each time one needs to use the recovery mode. On the XA2 it is enough to issue fastboot boot hybris-recovery.img to boot into recovery, without having to physically flash it (so I guess it goes to RAMdisk).

In my case WiFi password remained intact. Instead, I had to reenter Jolla account name and password :slight_smile:

1 Like

Sadly not everything works. I found 2 issues, i am not able to add fingerprints in settings, the okd ones still work.

I can only charge at a maximum of 450mah. If i shutdown the phone connect the charger, wait till the charge animation starts and then boot into the OS it is charging faster. But only until i remove the USB cable.

I’m going to do the whole process again and switch to Android 13 prior insralling SFOS.

1 Like

I do not have any problems with charging. I’ve just connected the XA2 Ultra charger and BatteryBuddy reports 1500 mAh charging.

Indeed, old fingerprints work but it’s not possible to add new ones. Maybe removing all fingerprints would make it possible to add new ones?

I’ll test if removing fingerprints works before i reflash. I will report back.

If fingerprints are blocked, you can reset them with, as devel-su:

systemctl stop sailfish-fpd
/usr/libexec/sailfish-fpd/fpslave --remove-all
/usr/libexec/sailfish-fpd/fpslave --flush-cache
systemctl start sailfish-fpd
2 Likes

@ric9k
Thank you!

@wetab73

The slow charging issue seems to be related to a bad usb port on the phone. The phone doesn’t connect to a computer, it is always in charging only mode. Fastboot does not work anymore. Boot mode also doesn’t work…

I’ve successfully used fastboot and developer mode connection. No problems of any kind. I’ve even downgraded to Android 11 (just to check some things) and then reflashed Android 13 again. So, indeed, it must have something to do with your phone’s USB port… Maybe cleaning it would help?

P.S. Does @ric9k’s suggestion fix the fingerprint problem? I can’t check it right now myself…

I’ll test this when i changed the USB board of the phone. If this does not work i’ll loose my remaining fingerprints…

Maybe try to clean the USB port first. It’s possible that one of the data pins is dirty, and that’s why it only works in charging mode. My wife had a similar problem with the Lightning port (or whatever they call it) on her iPhone and using a drop of isopropyl alcohol made it work again like new.

That worked, thank you!

1 Like

That’s great! So it means that there are actually no other known side effects of flashing SFOS on top of Android 13, whereas the lack of echo and color banding / yellow tint issues is a huge benefit of doing so.

Since it never was a problem to install SailfishOS on top of Android13, at least for me, i don’t see any problems using this method if you want to upgrade the pre install Android version.

Also it is a very good solution to migrate your data from a broken phone, which can still be accesed via USB.

Thank you @wetab73 for finding the right partitions, that helped me alot :hugs:

Well, before I tried it myself, I actually couldn’t find any explicit confirmation on the forum that using SFOS on top of Android 13 on the 10 III fixes those nasty echo and color banding issues while not causing any noticeable side effects. If such information was available, I would have flashed Android 13 much sooner. Now, after trying it myself, I can recommend it to everyone else, and it would be great if also Jolla could test it and (if they don’t find any problems) possibly officially recommend using it. I guess that it would make a lot of 10 III users happy if they learned that they can get rid of echo and color banding that’s been badly affecting otherwise really superb 10 III experience.

Now, another story is Android 13-based AOSP binaries (SW_binaries_for_Xperia_Android_13_4.19_v2_lena.img) which seems to be the first release since Jolla-recommended Android 11 based SW_binaries_for_Xperia_Android_11_4.19_v9a_lena.img, that doesn’t get stuck during boot (after asking for the security code) and generally seems to work perfectly fine, except than that I could not get mobile data to work with them. But it might be my specific case caused by some other things (especially that I tried it on an old system restored via dd) and after discovering a problem with mobile data I didn’t really give it any further attention and just switched back to A11 binaries, so maybe it should also be further tested, and such combination (underlying Android 13 + Android 13 AOSP binaries) might turn out to provide some further benefits…

Anyway, thank you very much for confirming that @ric9k’s method to unlock fingerprint capture works with the underlying Android 13. I will make a new SFOS dd backup later today and also test it myself.

I also tried the Android13 binary myself, but mobile data and wifi weren’t working. After flashing the Android 11 binaries the phone was stuck at the home screen and i had to reflash.

I think tge problem that i had to reenter my wifi password after restoring the backup is because i flashed it to another phone with a different MAC.

PS: After changing the charging port board on the phone, everything USB related is working again.

1 Like

During my tests it happened a few times that flashing the oem_a partition with AOSP binaries wasn’t successful. Fastboot was reporting correctly sending the file to the device (and showing that it took some time to do so) but then writing (even though reported as successful) was indicated as having taken 0.0 seconds, and in such cases then there were either problems with booting the device, or previously flashed binaries were still present as if nothing was written.

So now if I see fastboot reporting that writing took 0.0 seconds, I instantly repeat the command to flash it again.

I actually don’t remember if wifi wasn’t working with Android 13 binaries on my 10 III. I’m not even sure if I tested it after I discovered that mobile data wasn’t working (it was shown in settings as “Limited connectivity” or so). I will give those A13 binaries another try today or tomorrow after I make a new backup. I will experiment if maybe reconfiguring my wireless network from scratch, or switching between IPv4 / IPv6 or some other settings in mobile data configuration could make it work.

As for the fingerprints, does @ric9k’s method remove them all, and then they can be normally added anew?

1 Like

It was very late last night and i didn’t check the flash time from the fastboot command for the binaries. Thanks for the hint.

Yes all fingerprints are removed, with @ric9k commands.

The part about the wifi password was about my previous posting after restoring my first dd backup and not about Android 13 binary images :wink:

Maybe it is a missing kernel module or something else why wifi didn’t work wit the Android13 binaries. If i have some time maybe i’ll look into this again too.

Yes, something in this order, I don’t remember exactly but it is not always easy to recover wifi connections.
However, afaik, wifi data are stored in /home/defaultuser/.local/share/system/privileged/connman/. Each directory there corresponds to a connection and contains a settings file where the access point name and password, SSID, etc can be found.
One can devel-su cat this settings file in terminal to retrieve the passwords.