pub struct Device<'a> { /* private fields */ }Expand description
Access to a Frida device.
Implementations§
Source§impl<'a> Device<'a>
impl<'a> Device<'a>
Sourcepub fn get_type(&self) -> DeviceType
pub fn get_type(&self) -> DeviceType
Sourcepub fn query_system_parameters(&self) -> Result<HashMap<String, Variant>>
pub fn query_system_parameters(&self) -> Result<HashMap<String, Variant>>
Returns the device’s system parameters
§Example
ⓘ
let params = device.query_system_parameters().unwrap();
let os_version = params
.get("os")
.expect("No parameter \"os\" present")
.get_map()
.expect("Parameter \"os\" was not a mapping")
.get("version")
.expect("Parameter \"os\" did not contain a version field")
.get_string()
.expect("Version is not a string");Sourcepub fn enumerate_processes<'b>(&'a self) -> Vec<Process<'b>>where
'a: 'b,
pub fn enumerate_processes<'b>(&'a self) -> Vec<Process<'b>>where
'a: 'b,
Returns all processes.
Sourcepub fn attach<'b>(&'a self, pid: u32) -> Result<Session<'b>>where
'a: 'b,
pub fn attach<'b>(&'a self, pid: u32) -> Result<Session<'b>>where
'a: 'b,
Creates Session and attaches the device to the current PID.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Device<'a>
impl<'a> RefUnwindSafe for Device<'a>
impl<'a> !Send for Device<'a>
impl<'a> !Sync for Device<'a>
impl<'a> Unpin for Device<'a>
impl<'a> UnwindSafe for Device<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more