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.
Added:
get_binary_path: Checks binary_directory for the wanted binary, if
if its not there, it will use which to find a
system one. returns the full path
install_if_needed: will install a binary only if it is not present.
Changes:
- Busybox is now deployed to non-rooted devices
- is_installed has now been removed as the new functions supersede it
- binaries will now always be installed to `binaries_directory` and
not system folders.
- updated workloads to use these new functions
- rt-app and sysbench might still need work
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.
Previously swipe_to_unlock was not used and conflicted with a method
of the same name.
- swipe_to_unlock() renamed perform_unlock_swipe()
- swipe_to_unlock parameter now takes a direction, this allows swipe unlocking on Android M devices
- ensure_screen_is_on() will now also unlock the screen if swipe_to_unlock is set
This is a fix to the previous fix
(2510329cdf938ff85e7574e9f7f3880e370a56ad) that updated get_properties
to store "dumpsys window" output relative to the working_directory. That
commit constructed the path using self.device, which is wrong, as in
this case self itself is the device.
Commit 95f17702d74d06d8f61bc710c53472d25d2f92ed redirected output of
"dumpsys window" to a file (needed for Gem5 support). However, the file
was created in $PWD, which breaks on production devices, as that
location is not writable. This moves the file under the working
directory on the device.
- Move the processing of Android properties to an internal
method. This allows the Android properties to be extracted without
extracting those of the Linux device.
- Redirect the output from 'dumpsys window' to a file and pull the
file as opposed to extracting the output from the terminal. This is
more reliable in the event that another process writes to the shell.
- standardisded on a single context argument
- removed Device.init() no longer necessary as initilize now
automatically gets propagated up the hierarchy. Renamed the existing
use of it to "initilize".
- related pylint cleanup.
uname is not available on all Android devices, and we cannot rely on
busybox for establishing the ABI, as we need to get the ABI before we
can depoly the right version of busybox.
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.
In both cases, the ABI is now obtained by executing "uname -m" on the
device and perfroming a mapping from the returned machine architecture
a known ABI. If no known ABI is found the architecture string itself is
returned.
added more paths to pull by default when device.get_properties is
invoked during run initialization. Also moved the LinuxDevice
implementation into BaseLinuxDevice, so that AndroidDevice tires to pull
the same files (on top of the Android-specific stuff).