jakev / dtfmods-core

Core content for Android device testing
Apache License 2.0
6 stars 2 forks source link

Add 'diff' and 'dump' features to sysappdb #13

Closed jakev closed 9 years ago

jakev commented 9 years ago

Affected Module(s): sysappdb Affected Library(s): AppDb

Currently, sysapdb can be used to reveal exposed components. It currently lacks: diffing and dumping capabilities. Here are some examples.

Print all and tags for Phone app dtf sysappdb dump --filter uses-permissions,permissions com.android.phone

Print all added content providers to Contacts dtf sysappdb diff --filter providers com.android.contacts

jakev commented 9 years ago

It turns out that 'exposed' only gives exposure of non-AOSP applications, a relic of when there were two separate modules. This means that dtf is potentially missing a large chuck of changed content. Bumping up the severity.

The solution to this issue (plus the discovered bug) will add a new flag to 'exposed' sub-command: --only-new

When used, all applications will processed, but only non-AOSP components will shown. Without the flag, it will function as I thought it current was.

There will also be a 'diff' sub-command, which seems redundant, but it's the only way I can think of to handle the "uses-permissions" and "permissions" filter options.

jakev commented 9 years ago

added, and fixed: https://github.com/jakev/dtfmods-core/commit/5a87a5fd88b2188d410d03c19412621ed71bc4c0