As I have already explained, OmniSD is an application for KaiOS written in javascript, CSS and HTML that allows other apps to be installed on the device. I will never tire of repeating that installing third-party apps belongs to the nature and open source philosophy of Firefox OS, so installing your own apps working on the data partition is the safest method.There are secure methods to install OmniSD safely, using WebIDE and make-kaios-install. These methods do not affect the system partition or any other partition other than the data partition, to keep official updates. In fact, working on the data partition is safe, and in the event of malfunctions, just reset to factory settings and everything is resolved.

With this introduction, I wanted to highlight the security and docility of OmniSD.

The reason why I published this guide

This method of installation was the first "dirty" jailbreak method for Nokia 8110 4G, which then spread to Jio Phone in India and became very popular for people who did not have a PC.With this guide I want to illustrate the script contained in the installation package for educational purposes, in order to understand how an update in zip format works inside a device.

Use this method at your own risk!

In this section I will better explain the EXTREME jailbreak method, which I do not recommend to use, even if it is widely used in India and is also advertised by the major information channels such as:

"Install OmniSD without the PC!"


This method which I myself object to is actually called SMITH!Smith.zip today takes the name of omnijb-final.zip. This package is an update to be performed in Recovery Mode, if this mode is enabled to flash updates from an SD card.

How to install OmniSD without PC

All you need is a Recovery Mode with test keys. If your stock recovery is unable to flash zips you can always replace it with a custom one.
Download omnijb-final.zip and put it on the sd card and select the update from Recovery Mode. A data wipe is recommended for proper operation, as it should allow the Developer menu to appear in Settings.

How it acts on the system partition

Many manufacturers issue updates using a script that removes the test keys from the Recovery Mode to prevent the most unwise users from using this EXTREME jailbreak method, or worse, from installing malicious packages on their device.OmniSD, installed via omnijb-final.zip, is introduced not on the data partition, but on the system partition!We can see here the script omnirun.sh, contained in the main folder of the zip:
#!/tmp/busybox sh
# OmniJB package# SMITH-omnirun by Luxferre
SETTINGSFILE='/system/b2g/defaults/settings.json'PREFFILE='/system/b2g/defaults/pref/user.js'OMNIJA='/system/b2g/omni.ja'WEBAPPS='/system/b2g/webapps/webapps.json'
# mount /system and /sdcard/tmp/busybox mount -t ext4 -o rw /dev/block/bootdevice/by-name/system /system/tmp/busybox mount -t vfat -o rw /dev/block/mmcblk1p1 /sdcard
# create backup files on memory cardTIMESTAMP=`date +%s`/tmp/busybox cp $SETTINGSFILE /sdcard/b2g-settings-backup.${TIMESTAMP}.json/tmp/busybox cp $PREFFILE /sdcard/b2g-pref-backup.${TIMESTAMP}.json/tmp/busybox cp $OMNIJA /sdcard/b2g-omni.${TIMESTAMP}.ja/tmp/busybox cp $WEBAPPS /sdcard/b2g-webapps-backup.${TIMESTAMP}.json
# unmount /sdcard after creating the backup/tmp/busybox umount /sdcard
# replace the developer menu setting entries/tmp/busybox sed -i 's/"developer.menu.enabled":false/"developer.menu.enabled":true/g' $SETTINGSFILE/tmp/busybox sed -i 's/"debug.console.enabled":false/"debug.console.enabled":true/g' $SETTINGSFILEecho "pref('developer.menu.enabled', true);" >> $PREFFILEecho "pref('debug.console.enabled', true);" >> $PREFFILE
# try to unpack current omni.ja version
/tmp/busybox mkdir /tmp/omnipatch/tmp/busybox cp /system/b2g/omni.ja /tmp/omnipatchcd /tmp/omnipatch/tmp/unzip -q omni.ja/tmp/busybox rm omni.ja
# patch the ImportExport module
/tmp/busybox sed -i 's/_openPackage(appFile,meta,false);/_openPackage(appFile,meta,true);isSigned=true;devMode=true;/g' modules/ImportExport.jsm
# try to repack omni.ja file
/tmp/zip -qr9XD omni.ja * > /sdcard/zip_logs.txt
# replace omni.ja with the jailbreak-patched version
/tmp/busybox cp omni.ja $OMNIJA
# place OmniSD package into system installation
/tmp/busybox cp -r /tmp/omnisd.831337.xyz /system/b2g/webapps/omnisd.831337.xyz
# patch webapps.json registry
MANCONT=$(/tmp/busybox cat $WEBAPPS)echo -n ${MANCONT%?} > /tmp/webapps.json/tmp/busybox cat /tmp/webapps.json /tmp/decl.patch > $WEBAPPS
# unmount /system/tmp/busybox umount /systemecho "Changes applied"

Conclusions

Now that you know how extreme jailbreak works you should also be able to defend yourself from it, for example by carefully reading the contents of omnijb-final.zip and seeing exactly what this package has installed on your system.Once you have manually removed all the tracks you should be able to get the updates again by replacing the files one by one.
The best method to remove all traces of Smith is to replace your system ROM with a clean one.
Once the system ROM has been replaced without "wipe data" OmniSD will still be there, as if it had been installed with the secure method. On the other hand it is always advisable to perform a factory reset to get everything working correctly.
However, I invite you to adopt safer methods for the jailbreak, in order to avoid going crazy in the future.