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

Option to only retrieve 3rd party packages and their filenames #13

Open
skhavari opened this issue Oct 6, 2014 · 2 comments
Open

Option to only retrieve 3rd party packages and their filenames #13

skhavari opened this issue Oct 6, 2014 · 2 comments

Comments

@skhavari
Copy link

skhavari commented Oct 6, 2014

currently client.getPackages is equivalent to adb shell pm list packages

need a way to get only 3rd party packages and their package filename on the given device. In other words: adb shell pm list packages -f -3

the full set of options available for list packages is

  • -f: See their associated file.
  • -d: Filter to only show disabled packages.
  • -e: Filter to only show enabled packages.
  • -s: Filter to only show system packages.
  • -3: Filter to only show third party packages.
  • -i: See the installer for the packages.
  • -u: Also include uninstalled packages.
  • --user <USER_ID>: The user space to query.

possible solution:

  • modify client.getPackages to take an options object
options = {
    retrieve_filename: [true | false*],
    filter: [disabled, enabled, system, thirdparty, null*],
    retrieve_installer: [true | false*],
    include_uninstalled_packages: [ true | false*],
    user_id: [<user_id> | null*]
}
  • then need to modify the return value(s) to include the additional filenames
@skhavari
Copy link
Author

skhavari commented Oct 6, 2014

Is there a workaround?

@sorccu
Copy link
Member

sorccu commented Oct 6, 2014

Hmm, we might add it at some point, but currently what you can do is this:

client.shell(serial, 'pm list packages -f -3')
  .then(adb.util.readAll)
  .then(function(output) {
    // Manually parse output here
  })

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

No branches or pull requests

2 participants