android: Improve workflow on devices with root

During initial scan of application, detect if root access is available
and track it.  If user later selects "Click here for ways to fix this".
display a new dialogue that offers to push the layer directly.

If pushing fails, fall back to production dialogue.

Also add a new persistent setting to enable automatic layer pushing.
This commit is contained in:
Cody Northrop
2017-08-07 14:41:36 -06:00
committed by Baldur Karlsson
parent 6c40e4e651
commit fb8eef23d0
8 changed files with 149 additions and 11 deletions
@@ -188,6 +188,9 @@ void PersistantConfig::AddAndroidHosts()
SetConfigSetting(lit("MaxConnectTimeout"), QString::number(Android_MaxConnectTimeout));
SetConfigSetting(lit("Android_AutoPushLayerToApp"),
Android_AutoPushLayerToApp ? lit("1") : lit("0"));
rdctype::str androidHosts;
RENDERDOC_EnumerateAndroidDevices(&androidHosts);
for(const QString &hostName : ToQStr(androidHosts).split(QLatin1Char(','), QString::SkipEmptyParts))
@@ -109,6 +109,8 @@ DECLARE_REFLECTION_STRUCT(SPIRVDisassembler);
\
CONFIG_SETTING_VAL(public, int, int, Android_MaxConnectTimeout, 30) \
\
CONFIG_SETTING_VAL(public, bool, bool, Android_AutoPushLayerToApp, false) \
\
CONFIG_SETTING_VAL(public, bool, bool, CheckUpdate_AllowChecks, true) \
\
CONFIG_SETTING_VAL(public, bool, bool, CheckUpdate_UpdateAvailable, false) \
@@ -347,6 +349,12 @@ For more information about some of these settings that are user-facing see
Defaults to ``30``.
.. data:: Android_AutoPushLayerToApp
Whether to automatically push the RenderDoc layer to the application's lib directory when running
on a device with root access. This can enable debugging of Vulkan applications that didn't already
package the layer in the APK.
.. data:: CheckUpdate_AllowChecks
``True`` if when colouring marker regions in the :class:`EventBrowser`, the whole row should be