OSDN Git Service

Adding "attach-agent" to ActivityManagerShellCommand
authorLeonard Mosescu <mosescu@google.com>
Fri, 7 Oct 2016 00:32:05 +0000 (17:32 -0700)
committerLeonard Mosescu <mosescu@google.com>
Thu, 16 Feb 2017 21:19:41 +0000 (13:19 -0800)
commit02758a9a80ab82154aa172ef1a0138f4c1d6e9bd
treea6c6d8cf3555fe7df3b7260f82ca82bfe0fcb7bb
parent97ebc29e9c3afb65394be27c09ab42ca7d32c602
Adding "attach-agent" to ActivityManagerShellCommand

This new command is used to attach runtime agents to a running application:

attach-agent <PROCESS> <FILE>
   Attach an agent to the specified <PROCESS>,
   which may be either a process name or a PID.

Test: m test-art-host, manual testing:
    . invalid syntax, missing arguments
    . invalid syntax, extra arguments
    . invalid numeric PID
    . invalid process name
    . valid process, not debuggable
    . valid process, missing agent
    . valid process, valid agent

Bug: 31682382

Change-Id: I61cc8bf20addb1702acc8e7aae65b2f9ed7c5ca0
Merged-In: Ife88dbf23991dde7945d9208e54cd014bb7ecdc6
core/java/android/app/ActivityThread.java
core/java/android/app/ApplicationThreadNative.java
core/java/android/app/IApplicationThread.java
core/java/android/os/ShellCommand.java
services/core/java/com/android/server/am/ActivityManagerService.java
services/core/java/com/android/server/am/ActivityManagerShellCommand.java