wip
This commit is contained in:
parent
edd15fce67
commit
bd725ba91b
9 changed files with 187 additions and 67 deletions
|
|
@ -75,7 +75,7 @@ fn insert_code_model_class_loaders(apk: &mut Apk, runtime_data: &mut RuntimeData
|
|||
let classes = apk.list_classes();
|
||||
let mut class_loader = ClassLoader {
|
||||
id: dyn_data.classloader.clone(),
|
||||
parent: None,
|
||||
parent: dyn_data.classloader_parent.clone(),
|
||||
class,
|
||||
apk: ApkOrRef::Owned(apk),
|
||||
renamed_classes: HashMap::new(),
|
||||
|
|
@ -283,7 +283,8 @@ impl ClassLoader<'_> {
|
|||
tys: &HashSet<IdType>,
|
||||
class_loaders: &HashMap<String, Self>,
|
||||
) -> HashMap<IdType, IdType> {
|
||||
tys.iter()
|
||||
let r: HashMap<IdType, IdType> = tys
|
||||
.iter()
|
||||
.map(|ty| {
|
||||
(
|
||||
ty.clone(),
|
||||
|
|
@ -291,7 +292,12 @@ impl ClassLoader<'_> {
|
|||
.unwrap_or(ty.clone()),
|
||||
)
|
||||
})
|
||||
.collect()
|
||||
.collect();
|
||||
println!("rename for {}", self.id);
|
||||
for (old, new) in &r {
|
||||
println!(" {} -> {}", old.__str__(), new.__str__());
|
||||
}
|
||||
r
|
||||
}
|
||||
|
||||
pub fn get_ref_new_name(
|
||||
|
|
|
|||
|
|
@ -109,7 +109,6 @@ pub struct ReflectionInvokeData {
|
|||
pub addr: usize,
|
||||
/// If the method is static (static method don't take 'this' as argument)
|
||||
pub is_static: bool,
|
||||
// TODO: type of invoke?
|
||||
}
|
||||
|
||||
impl ReflectionInvokeData {
|
||||
|
|
@ -183,6 +182,8 @@ pub struct DynamicCodeLoadingData {
|
|||
pub classloader_class: IdType,
|
||||
/// An identifier for the classloader, valid for one specific run of the application.
|
||||
pub classloader: String,
|
||||
/// An identifier for the parent classloader, valid for one specific run of the applications.
|
||||
pub classloader_parent: Option<String>,
|
||||
/// The path to the files storing the .dex/.apk/other bytecode loaded.
|
||||
pub files: Vec<PathBuf>,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue