フリーダユーティリティ
public class FridaUtils
extends Object
implements AutoCloseable
java.lang.Object |
↳ | com.android.sts.common.FridaUtils |
frida とスクリプトをダウンロードしてデバイスにプッシュし、完了したらクリーンアップする AutoCloseable
概要
公開メソッド |
---|
void | close () |
static FridaUtils | withFrida (ITestDevice device, IBuildInfo buildInfo) 必要な Frida バイナリを見つけて、必要に応じてダウンロードします。 |
ByteArrayOutputStream | withFridaScript (String fridaJsScriptContent, int pid) 指定されたプロセスで frida スクリプトをアップロードして実行します。 |
公開メソッド
近い
public void close ()
スロー |
---|
DeviceNotAvailableException | |
TimeoutException | |
フリーダと
public static FridaUtils withFrida (ITestDevice device,
IBuildInfo buildInfo)
必要な Frida バイナリを見つけて、必要に応じてダウンロードします。
パラメーター |
---|
device | ITestDevice : Frida を使用するデバイス |
buildInfo | IBuildInfo : テスト デバイスのビルド情報 (test.getBuild() から) |
戻り値 |
---|
FridaUtils | Frida スクリプトを実行するために使用できる AutoCloseable FridaUtils オブジェクト |
スロー |
---|
DeviceNotAvailableException | |
UnsupportedOperationException | |
IOException | |
withFridaScript
public ByteArrayOutputStream withFridaScript (String fridaJsScriptContent,
int pid)
指定されたプロセスで frida スクリプトをアップロードして実行します。
パラメーター |
---|
fridaJsScriptContent | String : Frida JS スクリプトのコンテンツ。注: これはファイル名ではありません |
pid | int : Frida をアタッチするプロセスの PID |
戻り値 |
---|
ByteArrayOutputStream | frida コマンドの stdout と stderr を含む ByteArrayOutputStream |
スロー |
---|
DeviceNotAvailableException | |
FileNotFoundException | |
IOException | |
TimeoutException | |
InterruptedException | |