Different versions of Android might have different ways of getting the
GLES runtime version, so factor this out to a function, so that the
mechanism can be changed in a centralized way.
Also rename MESA_RUNTIME_VERSION to GLES_RUNTIME_VERSION because this is
really what is being retrieved, in the future we might have a similar
check for the vulkan Mesa driver.
While at it remove mentions of SurfaceFlinger in some comments since the
mechanism to retrieve the versions is irrelevant for the purposes of the
checks.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
The intel vulkan driver is always built by the `debian-android` job,
since it may be needed for some future job, push it unconditionally, it
does not hurt to have it in the Android system.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
Since ANGLE is always built for Android, always push it even if it is
not going to be tested directly.
Besides simplifying the script, this is also because ANGLE is going to
be mandatory anyway starting from Android 15+ and not having it in the
Android system might cause unexpected failures.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
Remove old mesa and ANGLE libraries before pushing new ones, and do this
using a trailing wildcard, because some versions of Android might have
versioned libraries like /vendor/lib64/egl/libEGL_mesa.so.1 which should
also be removed to avoid any confusion when loading the freshly pushed
ones.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>
Some of the commands in cuttlefish-runner.sh, like updating mesa and
ANGLE, are not specific to cuttlefish, in general they can be executed
on any Android device under test.
So split those commands out of cuttlefish-runner.sh and put them into an
android-runner.sh script.
For example, when testing a physical Android device instead of a virtual
device, a mesa-ci job will call android-runner.sh directly instead of
cuttlefish-runner.sh
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34111>