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 (usingcd
andmkdir
commands) - transfer data from phone to PC
adb pull /system-data.tgz
6.1 it is good idea to have logs copied tooadb pull /system-data.out
andadb pull /system-data.err
but it is not necessary - steps 3. to 6. repeat but with
user-data
instead ofsystem-data
excluding.cache
folder
(so commands will look liketar -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.tgz
etc.)
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 /
andadb 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 byCtrl+D
to PC shell) - Activate shell:
adb shell
(command prompt will change to#
sign) - Extract archives
tar -xzv -f /system-data.tgz
andtar -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)