If all you want, however, is just to install OmniSD, or any other app directly, bypassing the guide you just read, here is the solution. The procedure seems very simple at first glance, but in reality it requires a lot of attention as we will practically take the place of a direct installation, as the settings need to be precise.
- Download omnijb-4data-patch.zip;
- DB Browser for SQLite, from the official site or from the repositories https://sqlitebrowser.org ;
- Obviously your PC;
- lots of patience.
Jio Phone users can find ready-made userdata.img files on the Internet. This procedure can also be used to add other applications, other than OmniSD.
- Extract omnijb-4data-patch.zip and put the omnisd.831337.xyz folder in /data/local/webapps;
- Edit the webapps.json file and add the content of the decl.patch file, checking that the format is valid, for example using this website https://jsonlint.com ;
- 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:
As you can see there are several lines that represent the permissions of the apps themselves;
5. you have to add five lines:
- First column: "origin", we must write "app://omnisd.831337.xyz^appId=LOCALID" for all the lines. Replace "LOCALID" with the value following the previous application and do the same in webapps.json (in this example the number is 1048);
- Second column: "type", we must be sure to enter the correct parameters (for OmniSD are
power). Every name says what is the related function of the app;
- Third column: "permission", enable the permissions by adding 1;
- Fourth and Fifth columns: "expireType" and "expireTime", enter the number zero for both;
- Sixth column: "modificationTime", set an increasing time, even of few digits, as in the example.
WARNING! Make sure that "localId" in webapps.json and LOCALID in "origin" match, and also installTime and updateTime must match precisely the first and last lines. This applies to any application you are going to install manually!
6. Save the file and flash the userdata.img file, now the app is working with the right permissions...even if some updates preventing the app to work as it should.
Re-flash the data partition
Our custom data partition is ready to make the app sideload. Using EDL.PY and the loader for your device (for example your-firehose-x0000b.mbn):
- To erase the partition, supply the
python3 edl.py -loader your-firehose-x0000b.mbn -e userdata
- To flash a new partition image, supply the
-w [partname] [filename]option:
python3 edl.py -loader your-firehose-x0000b.mbn -w userdata userdata.img
Privileged Factory Reset
The "Developer" menu is still hidden, then we have to perform a Privileged Factory Reset. This guide took OmniSD as an example, but you can also install Wallace or Wallace Toolbox for this in the same way. FTPD and ADBRoot can also be useful for inserting the necessary files, such as the public key that I mentioned in the guide to enable the development tools.
From the first start we will have the "Developer" menu accessible from the settings. Now we're really ready to install any third party app thanks to permissions.