Always allow agent attach on userdebug builds with kArtTiVersion
We added support for the jvmti-alike ArtTi for use by debuggers on
userdebug/eng builds of android. Extend this support to allow any
agent to be loaded on any process of a userdebug device. These agents
will need to make use of kArtTiVersion (0x70010200) envs.
Test: build
Test: ./test.py --host -j50
Test: ensure AS profiler continues to work with userdebug devices
Bug: 78195998
Change-Id: I984d1ea937eb49afb376a48bea3d67085192020e
diff --git a/adbconnection/adbconnection.cc b/adbconnection/adbconnection.cc
index ee89717..3c5f735 100644
--- a/adbconnection/adbconnection.cc
+++ b/adbconnection/adbconnection.cc
@@ -837,8 +837,7 @@
self->AssertNoPendingException();
runtime->AttachAgent(/* JNIEnv */ nullptr,
MakeAgentArg(),
- /* classloader */ nullptr,
- /*allow_non_debuggable_tooling*/ true);
+ /* classloader */ nullptr);
if (self->IsExceptionPending()) {
LOG(ERROR) << "Failed to load agent " << agent_name_;
art::ScopedObjectAccess soa(self);