Commit Graph
172 Commits
Author SHA1 Message Date
baldurk 2288237723 Early detect and error when launching reserved filenames for capture
* This is a safety measure to ensure we never add hooks to system processes, so
  we should detect this case earlier and error for the user.
2025-05-05 10:49:42 +01:00
Cam MannettandBaldur Karlsson b031e69597 Warn user if layer config application failed before JDWP failure 2025-04-07 10:17:05 +01:00
baldurk 2322e165de Update copyright years to 2025 2025-03-14 18:54:37 +00:00
Elliot SabaandBaldur Karlsson e6b4de8138 Android: Automaticaly add MANAGE_EXTERNAL_STORAGE permission to apps
This prevents the user from needing to click through a permission
granting screen on their device before the agent is able to run on the
device, but only does so if the API level is >= 30 (where this
permission has effect at all [0]) and if a particular property is set on
the device (`debug.renderdoc.autograntpermissions`) so as to avoid
potential pitfalls on unusual Android devices.

[0] https://developer.android.com/reference/android/Manifest.permission#MANAGE_EXTERNAL_STORAGE
2025-01-07 20:28:26 +00:00
baldurk e6d0d57f80 Wait for initial remote probe before connecting to server. Closes #3445 2024-10-21 14:30:37 +01:00
Cam MannettandBaldur Karlsson 323bc7007a Improve AArch64-only device Android handling
On Pixel 8 phones we were seeing 'INSTALL_FAILED_NO_MATCHING_ABIS' on stdout but it was being checked on stderr only.

The lack of 32bit support is detected again from CheckAndroidServerVersion(..) but it only prints to the log, no logic changes occur.  This then caused the 'force queryable' checking to be performed on a not-installed APK which returned ResultCode::AndroidAPKVerifyFailed back to the runner.

The change is to check for INSTALL_FAILED_NO_MATCHING_ABIS on stdout too, and if that check still fails then the later check will bypass verfiication keeping the existing Succeeded result.
2024-03-19 10:37:11 +00:00
baldurk 9f4f0e6aa1 Update copyright years to 2024 2024-02-12 11:04:52 +00:00
Tristan RitchieandBaldur Karlsson d8a0b1c6d3 Add sperate retry for permission checks
Change-Id: Ibbce02fa14a003f80a2de10ebe5e4e756168c2d5
2024-01-10 17:13:36 +00:00
Tristan RitchieandBaldur Karlsson 7a22f9579d parse adb command output on host
Change-Id: I6b1a0c7612d5ecb0edc0a48ae91b1557b7d6c8e1
2024-01-10 17:13:36 +00:00
Tristan RitchieandBaldur Karlsson 4effbfaca1 clarify logic around retry to avoid unecessary adb traffic
Change-Id: I8e2a4d4255e9959579a06f839301434e1e104c2f
2024-01-10 17:13:36 +00:00
Tristan RitchieandBaldur Karlsson a7cb486708 [#3183] Fix Android RD capture layer discovery
* Installing the Android server on certain devices will not grant
  'force-queryable' permissions, necessary for capture layer
  discovery for API>=30. Reinstalling a second time fixes this
  issue. With this change, the 'force-queryable' attribute is
  checked post-install. If the check fails, it prompts a second
  installtion attempt.
* Solution tested on:
  - OPPO find X6, Android 13 (affected device)
  - Google Pixel 6 and 7, Android 13
  - SM-G930F, Android 8
2024-01-10 17:13:36 +00:00
shaltupssenandBaldur Karlsson 21972fa5b4 Fix abi name for android x86 2023-11-17 10:21:43 +00:00
baldurk 845a2e5718 Handle limited 64-bit only Android devices that don't support 32-bit
* When we detect a new version of Android and a 64-bit device where the 32-bit
  version of RenderDoc fails to install completely, ignore this and don't warn
  the user about it.
2023-11-02 13:48:41 +00:00
baldurk 9d39b8e1a8 Reformat code for clang-format 15 2023-09-05 11:02:08 +01:00
Serdar KocdemirandBaldur Karlsson 0a20c686fd Remove unimplemented function declarations 2023-07-31 17:41:01 +01:00
baldurk 26c673675e Add extra pings to reduce problems with unreasonably slow adb commands 2023-07-31 17:08:57 +01:00
baldurk 1f4e83986e Potential fix for Android thread race condition
* Synchronous commands are on the stack, so incrementing the done flag should be
  the last thing we do to interact with them. That includes checking for self-
  deletion afterwards
2023-05-08 14:23:03 +01:00
baldurk d891a31c90 Make android timeouts even more ludicrously generous 2023-05-05 12:28:35 +01:00
baldurk d20fa1c17d Increase server timeout to 5s because Android is terrible. Closes #2843 2023-02-03 11:05:53 +00:00
baldurk d47e79ae07 Update copyright years to 2023 2023-02-01 12:23:32 +00:00
Roman-SkabinandBaldur Karlsson bb80255925 Replaced checking android version with ckecking SDK version.
Also some code refactoring based on review remarks. (+3 squashed commit)

Squashed commit:

[6aad908e4] Review refactoring

[19e4ef6b9] Formatting fix.

[49c852081] Android 13 fix
2023-01-26 19:08:47 +00:00
baldurk 9a22b2cf46 Remove old android prototyping code 2022-10-14 12:00:54 +01:00
baldurk 8aa0390948 Add string messages to returned result codes to display to user
* Most of the main entry points that can fail with relevant reasons now has a
  way of specifying a message to return with it. This message can be displayed
  to the user to give more information or context about an error.
2022-04-26 16:21:54 +01:00
baldurk fcdea67879 Update copyright years to 2022 2022-02-17 17:38:32 +00:00
thisisjimmyfbandBaldur Karlsson dc9fd45fc2 Make Oculus' on device Vulkan Validation Layer avaiable for load
Without this Renderdoc won't be able to load the on device VVL
2021-10-04 23:27:23 +01:00
baldurk 46ffa9de79 Ignore com.android activity that sometimes shows up in other packages 2021-09-15 11:31:54 +01:00
baldurk 17cc3002cc Fix config push to android for new android versions
* The config folder changed in some android version, so we need to use the right
  one.
2021-06-08 14:23:56 +01:00
Jinesi YelizatiandBaldur Karlsson c729397761 Fix typos in comments 2021-04-20 09:45:31 +01:00
Jinesi YelizatiandBaldur Karlsson cf487e242b Fix typo in JDWP TypeTag enums
Even though TypeTag is not actually used.
2021-04-16 09:20:54 +01:00
Jinesi YelizatiandBaldur Karlsson 98685bbcb5 Fix misleading log entry 2021-04-15 11:40:17 +01:00
baldurk cf2b0abaf8 Filter out spammy libc messages on android 2021-01-27 00:29:46 +00:00
baldurk 026da176bb Update copyright years to 2021 2021-01-13 13:56:10 +00:00
Omar El SheikhandBaldur Karlsson d9915388c7 Add check for Android Version
We need to check the android version running on the device to know
whether or not we need to make the adb install command use the
--force-queryable flag

Devices running Android R/11/SDK 30 are ones which support this flag
2020-12-22 19:57:59 +00:00
Omar El SheikhandBaldur Karlsson 050e9e1bba Update ADB Command to Install RenderDoc on Android
Added the --force-queryable flag to the adb install command for
renderdoc Android on devices running Android R/11/SDK 30

A feature being introduced in Android R requires all explicit
interactions between
apps to be declared ahead of time (either via manifest or during adb
install)

The --force-queryable flag during adb install does this, and is what
allows for the
shared objects from renderdoc (in this case the layers) to be
discoverable by
other apps targeting SDK 30+
2020-12-22 19:57:59 +00:00
baldurk e5f4ca7bb8 Remove use of const char * in public API and OS specific where possible
* This prevents unnecessary conversions back and forth between rdcstr and const
  char * when going through interfaces. In the OS specific layer this is rarely
  an issue because most of the implementations don't convert to rdcstr, but it
  is convenient to be able to pass in an rdcstr directly. The few cases where
  there's an unecessary construction of an rdcstr is acceptable.
* A couple of places in the public API need to return a string from a global
  function, so can't return an rdcstr due to C ABI, so they still return a const
  char *.
* Similarly const char * is kept for logging, to avoid a dependency on rdcstr
  and because that's one place where unnecessary conversions/constructions may
  be impactful.
2020-12-07 17:44:50 +00:00
baldurk 8f6359059b Make more config flags non-debug.
* Only performance-sensitive flags should be debug only. Otherwise there's no
  strong reason to limit these to non-official builds.
2020-10-01 17:48:35 +01:00
baldurk 809b8f9f29 Add fallback on android if gpu debug layers are broken or inaccessible 2020-09-10 16:41:35 +01:00
baldurk 78f1f8f3d1 Remove volatile from Atomic parameter declarations
* This was leaky from windows' InterlockedIncrement etc declarations, and is not
  necessary.
2020-09-09 16:40:04 +01:00
baldurk 75f2dc119c Fix missing free() calls for miniz allocations 2020-08-28 19:06:06 +01:00
Omar El SheikhandBaldur Karlsson c15078b900 Added Scoped Storage Support for Android
Updated permissions for the renderdoccmd app based on which version of
android the app is running on
**WRITE_EXTERNAL_STORAGE for <R
**MANAGE_EXTERNAL_STORAGE for >=R

Updated the Java portion of renderdoccmd to check/request the correct
permission based on android version

Changed the file path for renderdoc files on Android based on the
version of Android the connected device is running
**/sdcard/Android/data/$PACKAGE_NAME for <R
**/sdcard/Android/media/$PACKAGE_NAME for >=R
2020-07-09 14:29:41 +01:00
baldurk 4c8c16d95f Fall back to device preferred ABI if package has none. Closes #1944 2020-06-18 17:22:02 +01:00
baldurk f85f74b0f2 Only process non-data actions on android. Closes #1943 2020-06-16 15:27:40 +01:00
tabi.katalinandBaldur Karlsson f1bd727dff Add support for ARM counters
Adding support for ARM counters via a third-party lib.
The main target platform is Android.
2020-05-20 20:19:17 +01:00
baldurk 8230ad5242 Fix push of settings file on android
* It seems the `files` folder isn't there by default, so we don't want to write
  a file there instead.
2020-05-19 18:44:41 +01:00
baldurk 08cf66abce Fix racing busy signals when connecting to remote servers 2020-05-15 19:03:26 +01:00
baldurk 6b657965b1 Fix settings not being properly re-evaluated on access 2020-05-14 19:28:09 +01:00
baldurk 9ed418f90c Install settings file when running remote server 2020-05-13 20:13:18 +01:00
baldurk e034defb0e Add debug option to log verbosely on android process launch 2020-04-22 14:24:21 +01:00
cperthuisocandBaldur Karlsson 0df63aa8d0 Added system packages as hidden folders in the Executable Path dialog
android-only change
2020-04-16 18:18:52 +01:00
baldurk 8d6615697b Push settings file to android devices
* This allows settings to be used to control debug logging on android as well.
2020-04-03 15:19:28 +01:00