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

adb: Explicitly match package name in pm list package output #135

Merged
merged 1 commit into from
Oct 10, 2023

Commits on Sep 9, 2023

  1. adb: Explicitly match package name in pm list package output

    The positional `FILTER` argument to `pm list package` works as a
    substring match: if you have a package named `foo.bar.baz` and
    `foo.bar.baz_debug` for example, and try to run `foo.bar.baz`, both
    packages will be returned, the `_debug`-suffixed one likely first,
    and the wrong UID ends up being used as `logcat` filter.
    
    To counter that we could use the very slow and extremely verbose
    (thousands of lines) `pm dump PACKAGE`, _or_ look for the right explicit
    text match in the line-based `package:foo.bar.baz uid:1234` output from
    `pm list package`: the latter approach is chosen here.
    MarijnS95 committed Sep 9, 2023
    Configuration menu
    Copy the full SHA
    01da154 View commit details
    Browse the repository at this point in the history