Only backup / restore of data, multimedia, apps and configurations

User data are saved in the /data /local folder, and more precisely are divided as follows:

  1. installed applications (webapps folder) and related permissions (permissions.sqlite file);

  2. system configurations (config folder);

  3. personal data, i.e. contacts, text messages, media saved on the internal memory (storage folder and related subfolders).

It is important to know exactly the location of our data, so that we don't have to download several gigabytes of data that would only take up memory on the SD card or on the computer, and getting root access through our applications is enough to get the necessary permissions on our data partition.

How to get a complete backup of all data and configurations using just a command...

Just activate debugging, start a temporary root access and copy/paste this command:

mkdir local && cd ./local && adb pull /data/local/webapps && adb pull /data/local/permissions.sqlite && adb pull /data/local/storage && adb pull /data/local/config && cd

Everything will be saved in a folder called "local", the length of the process will depend on the size of the content we are downloading:

This is the /data/local folder
The content of /data/local/config ...
... /data/local/storage ...
...and /data/local/storage/default

...and how to restore everything in the right place

To restore everything, just use a temporary root access that allows you to push everything on the data partition using the command:

adb push local /data/

adb reboot

after the reboot all your old apps, data and configurations will be restored to the right place.

Using this method it was also possible to create many safe guides on the customizations of our device, in particular those relating to custom ROMs. If you are interested in the topic, explore the section dedicated to customizations: