diff --git a/src/lib.rs b/src/lib.rs index 898f427..6e8ea0e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -43,3 +43,19 @@ pub fn parse(filepath: &str) -> DexFile { let readers = DexReader::build_from_file(filepath); DexFile::merge(readers) } + +pub fn get_qualified_method_names(dex: &DexFile) -> Vec { + let mut methods = Vec::new(); + + let class_names = dex.get_classes_names(); + for class in class_names.iter() { + if let Some(class_def) = dex.classes.get_class_def(class) { + for method in class_def.get_methods() { + let name = method.get_method_name(); + methods.push(format!("{class}->{name}")); + } + } + } + + methods +}