mirror of
https://github.com/frida/frida-core.git
synced 2026-11-10 17:12:10 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
329c4075d0 | ||
|
|
c4198498d5 | ||
|
|
20ef7bb318 | ||
|
|
367f8cf22b |
No files matched your search
@@ -235,7 +235,13 @@ namespace Frida {
|
||||
Cancellable? cancellable) throws Error, IOError {
|
||||
var opts = FrontmostQueryOptions._deserialize (options);
|
||||
|
||||
return yield springboard_agent.get_frontmost_application (opts, cancellable);
|
||||
try {
|
||||
return yield springboard_agent.get_frontmost_application (opts, cancellable);
|
||||
} catch (Error e) {
|
||||
if (e is Error.PERMISSION_DENIED)
|
||||
throw new Error.NOT_SUPPORTED ("Frontmost query is only supported with SIP disabled (for now)");
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
public async HostApplicationInfo[] enumerate_applications (HashTable<string, Variant> options,
|
||||
@@ -246,12 +252,28 @@ namespace Frida {
|
||||
Future<Gee.List<Simmy.Application>> list_apps_request = device.list_applications ();
|
||||
Future<Gee.List<LaunchdJob>> list_jobs_request = list_launchd_jobs (cancellable);
|
||||
|
||||
var selected_ids = new Gee.HashSet<string> ();
|
||||
opts.enumerate_selected_identifiers (identifier => {
|
||||
selected_ids.add (identifier);
|
||||
});
|
||||
bool include_all_apps = selected_ids.is_empty;
|
||||
|
||||
var apps = new Gee.ArrayList<Simmy.Application> ();
|
||||
foreach (Simmy.Application app in yield list_apps_request.wait_async (cancellable)) {
|
||||
unowned string id = app.identifier;
|
||||
if (include_all_apps || id in selected_ids)
|
||||
apps.add (app);
|
||||
}
|
||||
|
||||
Gee.Map<string, Bytes>? icons = null;
|
||||
if (scope == FULL) {
|
||||
var app_ids = new Gee.ArrayList<string> ();
|
||||
foreach (Simmy.Application app in yield list_apps_request.wait_async (cancellable))
|
||||
foreach (var app in apps)
|
||||
app_ids.add (app.identifier);
|
||||
icons = yield springboard_agent.fetch_application_icons (app_ids, cancellable);
|
||||
try {
|
||||
icons = yield springboard_agent.fetch_application_icons (app_ids, cancellable);
|
||||
} catch (Error e) {
|
||||
}
|
||||
}
|
||||
|
||||
var pids = new Gee.HashMap<string, uint> ();
|
||||
@@ -268,11 +290,11 @@ namespace Frida {
|
||||
}
|
||||
|
||||
var result = new HostApplicationInfo[0];
|
||||
foreach (Simmy.Application app in yield list_apps_request.wait_async (cancellable)) {
|
||||
foreach (var app in apps) {
|
||||
unowned string identifier = app.identifier;
|
||||
|
||||
var info = HostApplicationInfo (identifier, app.display_name, pids[identifier], make_parameters_dict ());
|
||||
if (scope == FULL)
|
||||
if (scope == FULL && icons != null)
|
||||
add_app_icons (info.parameters, icons[identifier]);
|
||||
result += info;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[wrap-git]
|
||||
url = https://github.com/frida/frida-gum.git
|
||||
revision = 17.4.2
|
||||
revision = 17.4.3
|
||||
depth = 1
|
||||
|
||||
[provide]
|
||||
|
||||
Reference in new issue
Block a user