diff --git a/config.toml b/config.toml index 28bb997..61beb3d 100644 --- a/config.toml +++ b/config.toml @@ -6,7 +6,6 @@ languageForGenre = "en_US" host = "127.0.0.1" port = 58526 agentPort = 10020 -fridaPath = "/system/bin/frida-server" suMethod = "su -c" [download] diff --git a/src/adb.py b/src/adb.py index 17f88a5..6a9cfa8 100644 --- a/src/adb.py +++ b/src/adb.py @@ -9,7 +9,7 @@ from loguru import logger from ppadb.client import Client as AdbClient from ppadb.device import Device as AdbDevice -from src.exceptions import FridaNotExistException, ADBConnectException, FailedGetAuthParamException, \ +from src.exceptions import ADBConnectException, FailedGetAuthParamException, \ FridaNotRunningException from src.types import AuthParams @@ -18,7 +18,6 @@ class Device: host: str client: AdbClient device: AdbDevice - fridaPath: str fridaPort: int fridaDevice: frida.core.Device = None fridaSession: frida.core.Session = None @@ -27,10 +26,8 @@ class Device: suMethod: str decryptLock: asyncio.Lock - def __init__(self, host="127.0.0.1", port=5037, - frida_path="/data/local/tmp/frida-server-16.2.1-android-x86_64", su_method: str = "su -c"): + def __init__(self, host="127.0.0.1", port=5037, su_method: str = "su -c"): self.client = AdbClient(host, port) - self.fridaPath = frida_path self.suMethod = su_method self.host = host self.decryptLock = asyncio.Lock() @@ -68,18 +65,6 @@ class Device: return False return True - def _start_remote_frida(self): - logger.debug("starting remote frida") - output = self._execute_command(f"(ls {self.fridaPath} && echo True) || echo False") - if not output or "True" not in output: - raise FridaNotExistException - permission = self._execute_command(f"ls -l {self.fridaPath}") - if not permission or "x" not in permission[:10]: - self._execute_command(f"chmod +x {self.fridaPath}", True) - self._execute_command(f"{self.fridaPath} &", su=True) - if not self._if_frida_running(): - logger.error("Failed to start remote frida") - def _start_forward(self, local_port: int, remote_port: int): self.device.forward(f"tcp:{local_port}", f"tcp:{remote_port}") diff --git a/src/cmd.py b/src/cmd.py index b22b8ec..d633e95 100644 --- a/src/cmd.py +++ b/src/cmd.py @@ -43,7 +43,7 @@ class NewInteractiveShell: logger.add(lambda msg: print_formatted_text(ANSI(msg), end=""), colorize=True, level="INFO") for device_info in self.config.devices: - device = Device(frida_path=device_info.fridaPath, su_method=device_info.suMethod) + device = Device(su_method=device_info.suMethod) device.connect(device_info.host, device_info.port) logger.info(f"Device {device_info.host}:{device_info.port} has connected") self.devices.append(device) diff --git a/src/config.py b/src/config.py index 0bc2a40..25c78a6 100644 --- a/src/config.py +++ b/src/config.py @@ -12,7 +12,6 @@ class Device(BaseModel): host: str port: int agentPort: int - fridaPath: str suMethod: str