-
-
Notifications
You must be signed in to change notification settings - Fork 372
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
Added option to run ADB in no-streaming mode #1922
base: main
Are you sure you want to change the base?
Conversation
ADB can install an app either directly from the host ("streamed install"), or by copying the APK to the device and then running the installation process. The former is the current default, but the latter is still needed for some devices. Added an option allowing streamed install to be disabled. Signed-off-by: Helio Perroni Filho <[email protected]>
In my experience ADB always chooses the mode automatically based on the version of the device. Why would you need to override that? |
That's not always the case. For example, it's an ongoing issue in LineageOS. That's actually what motivated me to write this patch. |
Signed-off-by: Helio Perroni Filho <[email protected]>
Signed-off-by: Helio Perroni Filho <[email protected]>
OK, but since this is a rare issue, I don't think it justifies adding a specific Briefcase argument. Instead, we could create an |
I agree. This seems like a very specific niche workaround for a specific Linux distro, not something that needs a generic capability added to Briefcase. However, |
Replaced the --no-streaming option with the more general --Xadb-install, which allows passing arbitrary options to adb install. Signed-off-by: Helio Perroni Filho <[email protected]>
I replaced the |
Signed-off-by: Helio Perroni Filho <[email protected]>
OK, I seem to have figured a way to placate the code coverage system, though to be honest I'm still not sure what was wrong with the previous version of the code. |
FWIW: The coverage gap was reported as If you just have line coverage, calling the method with This isn't picked up when you convert the line into an inline ternary statement, due to a bug/missing feature in how coverage works - but it should ideally still have a test case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
One suggestion about the release note; and there's a need for documentation of the new option in docs/reference/platforms/android/gradle.rst
. You can use the documentation for --Xemulator
as a template for this.
Also, as noted in my note about coverage, there's one more test needed around invoking install_apk
with extra_args=None
. That's probably a good opportunity to revert to the older if extra_args is None
syntax - to me, it's a little clearer than the "all in one line, but avoids the coverage problem" approach.
@@ -0,0 +1 @@ | |||
Added to ``briefcase run android`` a ``--Xadb-install`` option for passing extra arguments to ``adb install``. This makes it possible to handle various corner cases, for example, setting the ``--no-streaming`` option to make installation work for devices running recent versions of LineageOS. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These notes should be written as a description of the "exciting new feature in the release", not a rehash of the commit message.
Added to ``briefcase run android`` a ``--Xadb-install`` option for passing extra arguments to ``adb install``. This makes it possible to handle various corner cases, for example, setting the ``--no-streaming`` option to make installation work for devices running recent versions of LineageOS. | |
The ``--Xadb-install`` option can now be used to pass arguments to ``adb install`` when running apps on Android. |
ADB can install an app either directly from the host ("streamed install"), or by copying the APK to the device and then running the installation process. The former is the current default, but the latter is still needed for some devices. Added an option allowing streamed install to be disabled.
PR Checklist: