Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for android build variants without requiring a fully qualified value in the --apk-component flag #1935

Closed
MikeM711 opened this issue Jun 20, 2020 · 5 comments · Fixed by #1941

Comments

@MikeM711
Copy link
Contributor

MikeM711 commented Jun 20, 2020

Relevant discussion: #1891 (comment) and #1918 (comment).

Is this a feature request or a bug?

Feature

What is the current behavior?

In order to run an android build variant with an apkComponent, we need to pass in a fully qualified value in the --apk-component flag.

For example, the below command will successfully install an extension on the performancetest build of Fenix using the HomeActivity component.

web-ext run -t firefox-android --android-device=<device ID here> --firefox-apk=org.mozilla.fenix.performancetest --firefox-apk-component=org.mozilla.fenix.HomeActivity

What is the expected or desired behavior?

The desired behavior would be having a successful install by requiring a shorter value in the --apk-component flag. Using the above command as an example, the below command would be its equivalent.

web-ext run -t firefox-android --android-device=<device ID here> --firefox-apk=org.mozilla.fenix.performancetest --firefox-apk-component=HomeActivity

Version information (for bug reports)

  • Firefox version: Desktop: 77.01.1 (64-bit), Android: 68.8.0
  • Your OS and version: Mac: 10.13.3, Android 10
  • Paste the output of these commands:
node --version && npm --version && web-ext --version

v12.16.3
6.14.4
master-d61d94cbcf4834ec7613e80e51fc655dce06275c

@MikeM711
Copy link
Contributor Author

@Rob--W Would you like to have a hardcoded list outside of adb.js or keep it inside the file?

Originally I was thinking right inside the src directory, in case we would need to reuse the list somewhere else in the future.

@Rob--W
Copy link
Member

Rob--W commented Jun 22, 2020

Since it's not really related to ADB, a separate file, e.g. src/firefox/package-identifiers.js sounds good to me.

@MikeM711
Copy link
Contributor Author

I have everything set up, just have a quick question:

The test.adb.js file uses geckoview_example as an android build to test with. I can get the tests and everything working by sticking the geckoview_example in the list of browsers. Is this okay to do?

The good thing is that the application stops you from using packages that aren't installed, before it touches the list to begin with.

I can post a PR if that makes the explanation easier.

@Rob--W
Copy link
Member

Rob--W commented Jun 25, 2020

I just checked, and web-ext does support geckoview_example, after enabling Remote Debugging via the app:

web-ext run -t firefox-android --android-device emulator-5554 --firefox-apk=org.mozilla.geckoview_example --firefox-apk-component=GeckoViewActivity

I'm not entirely sure what you mean without the PR, but if the added item / list is compatible with how geckoview_example actually works, then it's fine to add it.

@MikeM711
Copy link
Contributor Author

Oh wow, I thought geckoview_example was just a placeholder, whoops - I see it is an actual build.

Just made the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants