From b609a8b76a776faf1b52a00b915cf0226f939394 Mon Sep 17 00:00:00 2001 From: Yimura <24669514+Yimura@users.noreply.github.com> Date: Mon, 16 Sep 2024 18:20:34 +0200 Subject: [PATCH] fix(FridaServer): crash on no USAP property found --- app/src/main/java/sh/damon/fridamgr/FridaServer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/sh/damon/fridamgr/FridaServer.java b/app/src/main/java/sh/damon/fridamgr/FridaServer.java index 3f872b9..3394f7b 100644 --- a/app/src/main/java/sh/damon/fridamgr/FridaServer.java +++ b/app/src/main/java/sh/damon/fridamgr/FridaServer.java @@ -270,7 +270,7 @@ public void unregisterEventListener(FridaServerCallback callback) { private boolean toggleUsap(boolean toggle) { // determine usap state ShellUtil.ProcessResponse res = ShellUtil.runAsSuperuser("getprop | grep usap | awk -F'[][]' '{print $2 \" \" $4}'"); - if (res.isSuccess()) { + if (res.isSuccess() && !res.out.isEmpty()) { final String[] tmp = res.out.split(" "); final Pair prop = new Pair<>(tmp[0], tmp[1]);