diff --git a/doc/SETUP.md b/doc/SETUP.md index ba658284ad..ca6f6618d1 100644 --- a/doc/SETUP.md +++ b/doc/SETUP.md @@ -42,6 +42,10 @@ To connect to a remote development LND node you can use a [test account](https://github.com/bumi/lightning-browser-extension/wiki/Test-setup) +## Install and debug extension for Firefox Android + +[Refer to SETUP_ANDROID.md for info regarding how to setup and debug Alby on firefox android](./SETUP_ANDROID.md) + ### Multiple Extensions It is not recommended to have multiple versions of the extension (development + official) running in the same browser. You will have instances of the extension with the same icon which is confusing, and also leads to a poor webln experience as both extensions will launch a popup. There may also be unexpected bugs due to conflict with the two extensions running at the same time. diff --git a/doc/SETUP_ANDROID.md b/doc/SETUP_ANDROID.md new file mode 100644 index 0000000000..6f66a0e951 --- /dev/null +++ b/doc/SETUP_ANDROID.md @@ -0,0 +1,22 @@ +# Install and debug extension for Firefox Android + +a. **Prerequisite** + +1. Install or update [web-ext](https://github.com/mozilla/web-ext) to version 4.1.0 or later. +2. Install the [Android Platform Tools](https://developer.android.com/tools/releases/platform-tools) (you can use Android studio's [sdk manager](https://developer.android.com/studio/intro/update.html#sdk-manager) or [sdk manager](https://developer.android.com/tools/sdkmanager) command line tools to install android platform tools) +3. Make sure you have adb installed and in your PATH. + +b. **Setup Android Device** + +1. Install [Firefox for Android Nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) on Android +2. Enable [Android USB debugging](https://developer.android.com/studio/debug/dev-options) on the device. +3. Attach your device to the development computer using a USB cable. When prompted, allow USB debugging for the connection. +4. In the settings view for Firefox for Android Nightly, enable "Remote debugging via USB." +5. Run `$ adb devices` in the command shell to get the device ID + +c. **Install and run extension** + +1. Remove native messaging permission from extensions manifest (web-ext currently doesn't ignore unsupported permissions. temporarily we need to do this unless we find proper solution) +2. Run extension's local development environment via `$ ALBY_API_URL="https://api.getalby.com" yarn run dev:firefox` +3. Go to extension's dist directory: `dist/development/firefox` +4. In the unzipped dist directory of the extension run `$ web-ext run -t firefox-android --adb-device --firefox-apk org.mozilla.fenix`