Windows 10 reached EOS (end of support) on October 14, 2025. If you are on Windows 10, see this article.

Rechercher dans l’assistance

Évitez les escroqueries à l’assistance. Nous ne vous demanderons jamais d’appeler ou d’envoyer un SMS à un numéro de téléphone ou de partager des informations personnelles. Veuillez signaler toute activité suspecte en utilisant l’option « Signaler un abus ».

En savoir plus
Archivé

What tool to use to modify omni.jar file in Firefox 4

Ankka

What is absolutelly working sw to use for omni.jar modifications? I have tested Winrar and 7zip latest versions and those were not working anymore (were working for browser.jar file for FF3.xx) and using Winzip 15 evaluation version I got that open and modified nicely. But as WinZip is still behaving a bit diffrently after modifying file and then a bit diffrently again after modification of second file, I´m not absolutelly sure is that best tool for use, to make sure that all paths are correctly inside omni.jar after modifications, even though it seems to work.

And as I really don´t like using command line tools, have to be graphical interface... working with WIN7 installations (well, also XP still...)

What is absolutelly working sw to use for omni.jar modifications? I have tested Winrar and 7zip latest versions and those were not working anymore (were working for browser.jar file for FF3.xx) and using Winzip 15 evaluation version I got that open and modified nicely. But as WinZip is still behaving a bit diffrently after modifying file and then a bit diffrently again after modification of second file, I´m not absolutelly sure is that best tool for use, to make sure that all paths are correctly inside omni.jar after modifications, even though it seems to work. And as I really don´t like using command line tools, have to be graphical interface... working with WIN7 installations (well, also XP still...)

Toutes les réponses (9)

Are you creating an add-on? If so, you'd be better off posting your question in the add-ons forum @ https://forums.mozilla.org/addons/

No, I´m not creating any AddOns, I need to modify files inside omni.jar to our companys installation package (basically deleting all update options so that those are not even visible).

So I need tool, that will keep folder structures in order after modifying files that are inside omni.jar

OK, understood. But that's outside my field of technical expertise, so I'll leave your post to be answered by someone more qualified than myself.

It is not recommended and probably also not possible to edit files in the omni.jar archive. That file is packed in a special optimized way.

What do you want to achieve and which files are you trying to change in that archive?

For making changes to prefs see:

Apparently, you can rename the file to omni.zip and then use Windows Explorer to extract the contents. See: https://developer.mozilla.org/en/About_omni.jar

Modifié le par Xircal

I have the same problem that Ankka. I want modify prefs.js (and bookmarks.html) in omni.jar. I rename omni.jar to omni.zip, i extract omni.zip in a subfolder omni (with windows extract file). I change prefs.js or create a file aa.js in defaults/pref. I compress in new omni.zip and replace the name omni.zip with omni.jar. I applicate this method for optimize omni.jar (because omni.jar isn't a "standard" jar file)

  http://blog.mozilla.com/tglek/2010/09/14/firefox-4-jar-jar-jar/
  http://hg.mozilla.org/mozilla-central/file/f7016571b472/config/optimizejars.py (with ubuntu)

I replace the old omni.jar with my omni.jar but when i launch for the first time firefox i have a crash report. If i just compress, decompress and recompress omni.jar without making changes, firefox starts well .

Use a file mozilla.cfg to set (default) values to prefs or lock prefs entirely.
As I wrote above, the file omni.jar is packed in a special way and making changes to omni.jar is not recommended.

See:

You can use these function in mozilla.cfg

defaultPref();  // set new default value
pref(); // set pref, but allow changes
lockPref();  // lock pref, disallow changes

Create a file local-settings.js in the defaults\pref folder with this content:

pref("general.config.filename", "mozilla.cfg").

You can add this line to disable the byte-shifting.

pref("general.config.obscure_value", 0);

Thank you for this information cor-el but it seems that there is a bug in FF4

See: https://bugzilla.mozilla.org/show_bug.cgi?id=595522

https://bugzilla.mozilla.org/show_bug.cgi?id=595522 = RESOLVED FIXED
That was fixed before Firefox 4.0 was released, the fix was in 4.0b11.