Made privapp_permissions.py more dynamic.

This was done largely so automation can make use of
privapp-permissions.xml generation.

Privapp_permissions.py no longer requires the build environment
to be setup. Instead, system files can be pulled from a connected
device, and aapt & adb can be set via the commandline. Otherwise,
they will default to the environment's default aapt/adb.

Priv-apps and the permission lists can be queried from the device
using command flags as well, removing the need for an Android
image to be built locally.

Bug: None
Test: Diff between previous privapp_permissions output and the
      output for these changes was empty for the following runs:

      ./old_privapp_permissions.py
      vs
      ./new_privapp_permissions.py [-d && -s SERIAL]
      ./new_privapp_permissions.py --aapt /path/to/aapt

      ./old_privapp_permissions.py /path/to.apk
      vs
      ./new_privapp_permissions.py /path/to.apk
      ./new_privapp_permissions.py device:/path/to/apk

Change-Id: Ifaf35607d38c1d74111fd2f05628c0192fc791cb
2 files changed