@Flohack
I get symlink errors with pull user-data, but I found this solution and it works:
Consider this my "log" how I've transferred data from phone to phone (worked between two nexus 5 devices) without SD card
I hope it will be helpful for somebody - but I've basically used combination of two methods described before plus some man pages
NOTE: both devices have ubports image installed and are prepared for adb access ()
SOURCE DEVICE
After connecting source device on PC commands in terminal as follows:
Reboot phone into recovery: adb reboot recovery
Acquire root: adb root
Activate shell: adb shell (command prompt will change to # sign)
Backup system-data (this will also create log files, that can be examined for possible errors) :
tar -czpv -f /system-data.tgz /data/system-data/ >/system-data.out 2>/system-data.err
NOTE: I've just put these files into root directory and it went just fine π and pulled just one file into connected computer since adb has much better chance to transfer one big file without errors than many small ones
logout from shell to your terminal (Ctrl+D)
NOTE: I am assuming computer is linux with root access etc.
this sub-step can be done before step 3
5.1 go to directory where backup data are to be stored in PC (using cd and mkdir commands)
transfer data from phone to PC adb pull /system-data.tgz
6.1 it is good idea to have logs copied too adb pull /system-data.out and adb pull /system-data.err but it is not necessary
steps 3. to 6. repeat but with user-data instead of system-data excluding .cache folder
(so commands will look like tar -czpv -f /user-data.tgz /data/user-data/ --exclude='data/user-data/phablet/.cache' >/user-data.out 2>/user-data.err, adb pull /user-data.tgzetc.)
NOTE: data which can be transferred by MTP should be moved that way since process of packing can take quite long for user data and may even stop/fail (e.g. not stopping process, just waiting and overheating battery, because all outputs are transferred to log files) if there is not enough space for package
DESTINATION DEVICE
Reboot phone into recovery: adb reboot recovery
Acquire root: adb root
Push archived data from PC to phone (root folder) adb push ./system-data.tgz / and adb push ./user-data.tgz /
NOTE: in case of failure pushing both files and then unpacking both in adb shell it is possible to work the process "per partes" so following steps 4. and 5. will be done after each push and removing archive from phone (rm ./system-data.tgz in adb shell and then returning by Ctrl+D to PC shell)
Activate shell: adb shell (command prompt will change to # sign)
Extract archives tar -xzv -f /system-data.tgz and tar -xzv -f /user-data.tgz
Restart phone, unplug, recharge (battery will be probably rather low π
) check data and switch SIM card π
PS:
After finishing and documenting the process, I'we found out that WiFi settings has not been transferred to destination device π those must be somewhere in .cache folder then (I don't really mind, messages, apps, contacts and other settings are quite enough for me).
It's form this thread:
https://forums.ubports.com/topic/1683/migrate-data-from-device-to-device/21?_=1595872454998