Stay organized with collections
Save and categorize content based on your preferences.
FridaUtils
public
class
FridaUtils
extends Object
implements
AutoCloseable
java.lang.Object
|
↳ |
com.android.sts.common.FridaUtils
|
AutoCloseable that downloads and push frida and scripts to device and cleans up when done
Summary
Public methods |
void
|
close()
|
static
FridaUtils
|
withFrida(ITestDevice device, IBuildInfo buildInfo)
Find out which Frida binary we need and download it if needed.
|
ByteArrayOutputStream
|
withFridaScript(String fridaJsScriptContent, int pid)
Upload and run frida script on given process.
|
Public methods
close
public void close ()
Throws |
DeviceNotAvailableException |
|
TimeoutException |
|
withFrida
public static FridaUtils withFrida (ITestDevice device,
IBuildInfo buildInfo)
Find out which Frida binary we need and download it if needed.
Parameters |
device |
ITestDevice : device to use Frida on |
buildInfo |
IBuildInfo : test device build info (from test.getBuild()) |
Returns |
FridaUtils |
an AutoCloseable FridaUtils object that can be used to run Frida scripts with
|
Throws |
DeviceNotAvailableException |
|
UnsupportedOperationException |
|
IOException |
|
withFridaScript
public ByteArrayOutputStream withFridaScript (String fridaJsScriptContent,
int pid)
Upload and run frida script on given process.
Parameters |
fridaJsScriptContent |
String : Content of the Frida JS script. Note: this is not a file name |
pid |
int : PID of the process to attach Frida to |
Returns |
ByteArrayOutputStream |
ByteArrayOutputStream containing stdout and stderr of frida command
|
Throws |
DeviceNotAvailableException |
|
FileNotFoundException |
|
IOException |
|
TimeoutException |
|
InterruptedException |
|
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2022-11-18 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2022-11-18 UTC."}