Skip to content

Instantly share code, notes, and snippets.

@zb3
Created August 22, 2016 08:45
Show Gist options
  • Save zb3/cfbb94e45d9318adcb63051a66a586ea to your computer and use it in GitHub Desktop.
Save zb3/cfbb94e45d9318adcb63051a66a586ea to your computer and use it in GitHub Desktop.
Crack firefox so that you can run unsigned extensions on linux, without recompiling firefox
#cracks for open source software are always cool....
#requires root privileges to replace omni.ja
#needs to be reapplied on reinstall
#you'll also need to set xpinstall.signatures.required to false
#and restart your browser
#tested on arch with FF48
OMNI_PATH=${1:-/usr/lib/firefox}
#unpack
cd $OMNI_PATH
unzip omni.ja -d omni_tmp
cd omni_tmp
#set AppConstants.MOZ_REQUIRE_SIGNING to false
sed -i -e 's/MOZ_REQUIRE_SIGNING:$/MOZ_REQUIRE_SIGNING: false \&\&/g' modules/AppConstants.jsm
#set AddonConstants.MOZ_REQUIRE_SIGNING to undefined
sed -i -e 's/this, "REQUIRE_SIGNING"/this, "REQUIRE_SINGING"/g' modules/addons/AddonConstants.jsm
#remove cache
rm jsloader/resource/gre/modules/AppConstants.jsm
rm jsloader/resource/gre/modules/addons/AddonConstants.jsm
#repack
zip -qr9XD omni.ja *
cp omni.ja ..
cd ..
rm -r omni_tmp
@naddika
Copy link

naddika commented May 25, 2023

I need to recompile FF because of other thing anyway. So how will I do "firefox_crack_linux" thing before recompilation?

@zb3
Copy link
Author

zb3 commented Jun 3, 2023

Just grep MOZ_REQUIRE_SIGNING and set it to false somewhere. This script is no longer supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment