YOUR CUSTOM ROM, automatically removable after an update or a reset
Would you like to customize your stock ROM without loosing OTA updates? This guide is for you!
Waiting for future improvements, we can customize our ROM by editing the "/data/local/webapps" folder and the "/data/local/permissions.sqlite" file more securely. In case of problems select "Wipe data / Factory reset" from Recovery to restore all factory settings.
In the past, to change the default configuration, we had to change the system ROM, which compromised the new updates and improvements made possible by the official software development of KaiOS. Working on the data partition allows you to make these changes temporary. Upon arrival of a new update, all our customizations will be deleted again, so it is important to know how to move in the event of future changes.
How to create your ROM on the phone
Add, edit and configure the stock apps
We can copy the pre-installed applications from the system ROM and modify them as we prefer, then reinsert them in the data partition and set the webapps.json file in order to recognize the path that we will attribute to our customized stock app. This could be compatible with many different models of KaiOS devices, regardless of the form factor and the firmware's version.
1. Get a temporary root access on your phone, then get a copy of the webapps folders of both /system and /data:
in this way the system's version will be saved as "webapps-system" and we can work on the version of the data partition without troubles.
2. Copy the system folders that you want to customize to the "webapps" one and start customizing it as you want. For example, here are listed other improvements on this section:
At the webapp level you can make any changes you want.
3. Edit the webapps.json file and change the "basePath" value of the applications that you want to modify
in this way
Use the JSONLint website to verify that the format is correct for any json file you want to modify.
4. Afther this change push the webapps folder in its place and reboot the phone:
After rebooting your changes will be applied. Them will be restored after a factory reset or after the future updates.
Manually add apps that are not installed
If you want to add other apps that were not installed on your phone to share a custom rom to your friends, you must edit the /data/local/permissions.sqlite file to add the permissions. An example is the manual installation guide of OmniSD.
The simplest method is to install the desired application directly on the phone, before sharing it. Otherwise we can proceed in this way:
Put the app folder in /data/local/webapps;
Edit the webapps.json file and add the application's settings, checking that the format is valid, for example using the JSONLint website;
Use DB Browser for SQLite to change the permissions in /data/local/permissions.sqlite, with the right permissions;
In the tab Browse Data select moz_perms and start adding the stings.
For more details, find out more here:
How to share your custom ROM
As we have already seen, all we have to patch are the webapps folder and the permissions.sqlite file contained in /data/local.
Extraction of the custom ROM
Installation of "local" on other phones
WARNING: this procedure is safe and should work on all KaiOS devices that have access to debugging and root, in case of problems it is sufficient to perform a factory reset to solve everything.
it might also interest you...