oh yeah, I don’t have the Sony anymore, but remember that colors… man, how bad they were. With A12 or A13 that’s solved
Hello, picking up this thread on the “backup wiki” subject. I am not very fluent with linux bash but is it even possible to use dd on a “live” device? Will I not get corrupted data? Or am I missing something?
I think I answered it myself. It is not live. Sorry for the uninformed question.
[root@Xperia10III dev]# umount /dev/sda79
umount: /dev/sda79: not mounted.
Sda79 actually contains 2 partitions: root and home. Thus sda79 is not mounted but its contents are. On a live system those change during dd and corrupt the backup. The backup should be done via the recovery.
Thanks for the insight. Can you confirm it works like this:
- flash the hybris-recovery image respectively to boot_a and _b using fastboot
- reboot
- telnet to the device
- file a public key on the device
→ then proceed with dd activity via ssh?
By the way, the above command didn’t work out for me but I was able to make it work like this (ssh’d into device and as devel-su):
dd if=/dev/sda79 bs=4M | ssh myusername@
address 'cat > /mypath/dd/backup-sda79_$(date
-I).img'
As a side note, I found out that when running dd on Sailfish it seems impossible to monitor the data transfer by either calling ‘status=progress’
dd: invalid argument 'progress' to 'status'
or to view the pipe content by inserting a ‘| pv |’ as in was suggested on some forum:
dd if=/dev/sda79 bs=4M | pv | ssh potato@address
result:
bash: pv: not found
Anyway thank you very much for your help!
Try
watch -n5 'kill -USR1 $(pgrep ^dd$)'
from another telnet session to get update about dd progress every 5 seconds.
Thanks for pointing it out.
Your linked post by @wetab73 only partially matches my query as I want to dd my /dev/sda79 to a network drive as suggested by @olf and not to an sd card (it’s a size issue). I am currently using telnet and investigating netcat which appears to possibly run in recovery mode.
I only have a limited idea of what I’m doing but I find a discrepancy between the way recovery mode seems to work and the idea of dd’ing large data via scp. OTOH, ssh and with it scp seems to preclude copying an unmounted volume because it would run on the same?
If you guys think that this discussion is misplaced here please say so and I will remove it and attach it to an appropriate thread (haven’t found one so far) or open a new one.
Thank you for reminding me of this. It is helping me a lot now that I understand a little bit more about what I am trying to do.
Meanwhile I managed to send the dd stream via netcat to a local volume. For anyone interested:
Target side:
nc -l 19000 | dd bs=4M of=/pathto/volume/Sailfish.img
Source side:
dd bs=4M if=/dev/sda79 | nc 10.42.66.xx 19000
Monitored progress with suggested Android 13 and SailfishOS on xperia 10 III - #95 by wetab73 (thank you). It took ages but it looked to be a success.
Will try the publickey move you suggested for further investigations.
What does it take to have ddrescue in SFOS recovery image, anyone here done the thought exercise?
cc Full dd backup of rootfs and /home as flashable images - #23 by nephros
I can’t recall details any more, but I once dd’dthe root partition from one Jolla to another, in attempt to fix it crashing. It worked fine for a few weeks, until it started hanging and crashing again.
I went into rescue mode and used dd to copy the root partition to a file in my computer and similarily put it into the bad device. Nothing extra needed really, if dd is a familiar tool that is
Sure, of course dd works, but this question is purely about getting better UX with ddrescue, which has many conveniences as defaults. We wouldn’t have to process tens of msgs about progress monitoring, for one
I did a new install of SailfishOS 4.6.0.13 on top of Android 13, and so far most things seem to work, and it has fixed the problem with echo on calls.
The only thing that doesn’t work now is scanning QR codes in Microsoft Authenticator Android app – if I try doing this, the camera freezes and then doesn’t work in any Android app (though it still works fine in native apps); if I don’t try scanning a QR code in Authenticator, camera works fine in other Android apps. Any ideas how to fix this?
Edit: scanning QR codes also doesn’t work in my banking app, and in the healthcare app; restarting Android AppSupport makes camera work again on other apps.
That happened to me as well when I flashed newer binaries…it got back to normal after I switched to the recommended binaries.
Fun, so I get to choose between no QR code scanning in Android apps and no echo cancellation on calls…
How do you know that this has anything to do with installing SFOS on top of Android 13? Have you tried it on Android 11 and it worked in such case?
No worries, if you flash the recommended binaries on top of Android 13 base, you’ll have no issues with the echo…or the camera, for that matter.
It worked fine before I reinstalled.
Which recommended binaries?
The ones recommended by Jolla (SW_binaries_for_Xperia_Android_11_4.19_v9a_lena.zip).