How to develop a extension for firefox mobile?
Develop a extension for firefox mobile steps
- (on Desktop) Download nodejs and install it.
- (on Desktop) Install web-ext command via
npm install --global web-ext
- (on Phone) You cannot install Firefox for Android Nightly directly from the Google Play Store. Make sure that the version of Firefox for Android Nightly is consistent with that of Desktop Firefox, otherwise you will not see the debug message. Go to apk mirror to query the corresponding Desktop firefox and firefox nightly for android version download and install.
- (on Phone) Open firefox for android nightly, open settings, and checked remote debugging via USB. Then Desktop Firefox can connect to Mobile Firefox.
- (on Phone) Enable remote debugging mode on Android phone (Google Pixel), open Settings / About phone / Click on the version number seven times, return to the previous page, click System / Developer options / Checked USB debugging.
- (on Desktop) Download adb and unzip it.
- (between Desktop and Phone) Use USB cable to connect computer and mobile phone.
- (on Desktop) Open the command prompt and change directory to the adb folder and execute the command
adb devices
to obtain the device ID. - (on Desktop) Go to the extension folder and run the command:
web-ext run -t firefox-android --adb-device <YOUR-DEVICE-ID> --firefox-apk org.mozilla.fenix
- (on Phone) It will launch Firefox for Android Nightly on your phone and install your extension.
How to install the apk downloaded by apkmirror on the mobile phone?
- Search for apkmirror in the Google Play Store.
- Find apkmirror installer (official) and install it. Browse to the apkm file you just downloaded and install it.
Problem
Problem1
web-ext run -t firefox-android –adb-device
Solusion
- Make sure the USB debugging mode is turned on on your device.
- Remove the old authorization and re-authorize.
adb kill-server
adb start-server
- Reconnect your device to your computer.
- If an authorization prompt pops up on your device, click Allow or Trust this Computer.
- Check adb devices status