BACKUP / REPAIR
Protect and save your device in case of damage.
In this section you will find useful tools and guides that will orient you between the exact partitions and the locations to save in case of problems with your KaiOS (or Android) device.
A backup can be done in several ways, depending on the boot mode we are working on (NORMAL MODE or USER SPACE, RECOVERY MODE, EDL MODE, FASTBOOT MODE...).
There are different ways to start the same device and they can vary in all phones with different key combinations, on this page you will find only the guidelines to use these modes for backup/repair purposes, starting from the one we all know best, by pressing the "power" button:
NORMAL MODE (or user space): the easier way
NORMAL MODE is the "user space", which is the one we all normally use to call, send messages and use applications. Working from the "system" partition, we could flash all the other partitions except the one we are working on (system), to see commands related to repairing partitions, consult the guide Dump all from RECOVERY MODE.
Backup / Restore of user settings and data
The advantage of working in user space is that you can use temporary root methods with apps that can be installed with ADB and WebIDE. The safest thing to do is to work on the data partition, and it only takes a few commands to backup and restore only the files that interest us. The only type of backup that will be used is precisely that of the /data/local folder, which contains all user data, applications and configurations from the first start. Learn more in the dedicated guide:
Only backup of all partitions
Another advantage of using temporary root applications is to be able to access all partitions directly, but as I have already written above, restoring or replacing partitions in user space can be risky, especially if we are flashing the system partition (see the guides related to RECOVERY, EDL and FASTBOOT for repair), without which we could not use the NORMAL MODE.
In this part of the section I will limit myself to listing the commands needed to backup using ADB as root, through the commands "adb pull" and "adb shell dd":
LIST OF ANDROID / KAIOS PARTITIONS
As we saw in the previous paragraph, backing up partitions is very simple even from the user interface, using temporary root apps. On our computer or on the sd card we will find saved several gigabytes of files with various names, for example "system", "modem", "userdata", "aboot" ... what is the meaning of all these files and which partitions do they correspond to?
A fairly detailed list was made possible with the help of the community:
RECOVERY MODE (custom), for any emergency
Recovery Mode is a way of starting a device from which it is possible to manage various operations on the system partition as well as from root. When test keys are active, the user has endless possibilities between flashing partitions, restoring and installing various parts of the system or, more safely, direct intervention on the user's data partition.
Learn more on the dedicated guide in the ROOT section:
Backup of all partitions and dumpall.zip
Once ADB and root permissions have been enabled in a Custom Recovery, we can proceed with the use of the "dd" commands previously seen in user space / normal mode, but in Recovery Mode.
We can also create custom scripts, such as dumpall.zip, to quickly do what instead of the user interface would take longer. To some of our members, Speeduploop (for Qualcomm-based phones) and Anthill (for Spreadtrum models), all the credit for these tools:
Repair everything from Recovery
An error that often occurs when you don't have a "pure" KaiOS device with clean and untouched partitions is the OTA update that returns an error in the form of a log. This is because the update package detects the integrity of the system, and often the error corresponds to a detection that does not meet expectations.
If your phone have a recovery with test keys and adb root access (or just one of these things) you're safe! Learn more on how to repair your phone from Recovery Mode: