Skip to content

Commit

Permalink
fix(FridaServer): crash on no USAP property found
Browse files Browse the repository at this point in the history
  • Loading branch information
Yimura committed Sep 16, 2024
1 parent 16cb8b9 commit b609a8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/main/java/sh/damon/fridamgr/FridaServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, String> prop = new Pair<>(tmp[0], tmp[1]);

Expand Down

0 comments on commit b609a8b

Please sign in to comment.