Test and debug extension on Android

Hello,

I used the usb connection to transfer my extension to my Android smartphone (for testing and debugging) and install it directly using the file installation method. However, at some point - I’m not exactly sure when - this method stopped working. Now, when I try to install the extension, I receive a message stating that the extension may be corrupted.

Interestingly, if I sign the extension and install it afterward, everything works fine.

I’m using the Nightly version of Firefox and Android 14. USB debugging and all related settings are enabled. The connection between my phone and PC (Firefox Developer Edition) works as expected. On my Android device, the xpinstall.signatures.required preference is set to false.

Has anyone else experienced this issue or found a workaround? I’d like to continue testing without having to sign the extension every time I make a small change.

Thanks in advance!

I can’t tell why it wouldn’t work, but I can tell you what works for me.
I’ve followed these steps:

Although it was long ago, but it still works.

But I’m using Android Studio where I’ve created blank new project and started the virtual Android device where I have Firefox installed with USB debugging enabled.

Then in my project folder, I simply execute one of these to start Nightly/Beta/Release:

web-ext run --target=firefox-android --android-device=emulator-5554 --firefox-apk=org.mozilla.fenix --adb-remove-old-artifacts
web-ext run --target=firefox-android --android-device=emulator-5554 --firefox-apk=org.mozilla.firefox_beta --adb-remove-old-artifacts
web-ext run --target=firefox-android --android-device=emulator-5554 --firefox-apk=org.mozilla.firefox --adb-remove-old-artifacts

(although I think Firefox Nightly is currently broken)

1 Like