Skip to content

Commit

Permalink
fruity: Fix error marshaling in find_tunnel() for non-macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
oleavr committed Sep 17, 2024
1 parent fc500a1 commit 0fd255d
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/fruity/device-monitor.vala
Original file line number Diff line number Diff line change
Expand Up @@ -1099,13 +1099,17 @@ namespace Frida.Fruity {
try {
bool supported_by_os = true;
if (device != null) {
var lockdown = yield LockdownClient.open (device, cancellable);
yield lockdown.start_session (cancellable);
var response = yield lockdown.get_value (null, null, cancellable);
Fruity.PlistDict properties = response.get_dict ("Value");
if (properties.get_string ("ProductName") == "iPhone OS") {
uint ios_major_version = uint.parse (properties.get_string ("ProductVersion").split (".")[0]);
supported_by_os = ios_major_version >= 17;
try {
var lockdown = yield LockdownClient.open (device, cancellable);
yield lockdown.start_session (cancellable);
var response = yield lockdown.get_value (null, null, cancellable);
Fruity.PlistDict properties = response.get_dict ("Value");
if (properties.get_string ("ProductName") == "iPhone OS") {
uint ios_major_version = uint.parse (properties.get_string ("ProductVersion").split (".")[0]);
supported_by_os = ios_major_version >= 17;
}
} catch (LockdownError e) {
throw new Error.PERMISSION_DENIED ("%s", e.message);
}
}

Expand Down

0 comments on commit 0fd255d

Please sign in to comment.