- Check the APK's versionName property against the workload's
expected version if specified
- If workload specifies check_abi param, try to get APK from
ABI-specific path on the host
- Add variant_name param to APK resource-getter for backwards
compatibility of dex2oat and peacekeeper
Issue: For certain installation errors, it is possible for WA to
incorrectly report that an APK was reinstalled while it actually
wasn't, leading to bugs later on in the run.
Fix:
- Add the '-r' flag to adb install when reinstalling, to make sure
APK is replaced.
- Add '-g' flag for API 23 and higher, to grant all permissions that
would otherwise be requested at runtime (similar to pre-API 23)
Previously the WA device name was used when searching for revent files.
Since most were `generic_android` this made it difficult to keep revent
files for multiple android devices. Now it the device model is used instead.
If a file with the device model is not found it will fall back to the WA
device name.
Some characters would be interpreted by the shell thus breaking the
command. Adding quotes around the parameters solved this.
N.B Space still needs to be replaced.
If uninstall fails, "pm clear" should be called to make sure that the
next time the app is launched it starts from a known state (which would
normally be ensured by the uninstall).
It's possible that there is already a version of an app on target that
differs form the version of the apk on the host. In such cases, WA will
usually try to uninstall the target version and install the host
version.
It's possible that the uninstall may fail. If that happens, it will be
reported as a warning but workload exectuion will proceed with the
target version. In this case, apk_version would have already been set to
that of the host apk. This change ensures that the APK version is
correctly set to the target version (the one that actually ran).
- android/workload: emoved an extra bank line between methods
- trace_cmd: define member attribute inside __init__
- adb_shell: ignore pylint warning about too many branches in this case
Added two commands to WA to record and replay input events using revent.
As part of this also added the ability to get a device model from
android and linux device. This may need to be improved in the future.
As of Android 6.0, apps can request permissions at runtime. If the
target device is running Android 6.0+ these permissions are now automatically
granted.
Added -p option to the list command. This alows filtering results by
supported platforms, e.g.
wa list workloads -p linux
Also adding missing supported_platforms attribute to various extensions.
If an extension does not have this attribute, the assumption is that it
is supported by all available platforms.