pub struct Apk {
pub path: PathBuf,
/* private fields */
}Available on crate feature
apk only.Expand description
Meta information about an APK.
This type is used in the UserMeta::Apk variant.
The corresponding file offset is normalized only to the APK container, not
any potential internal ELF files. Use the
Apk symbolization source in order
to symbolize the offset:
let addr_in_elf_in_apk = capture_addr_in_elf_in_apk();
let normalizer = normalize::Normalizer::new();
let normalized = normalizer
.normalize_user_addrs(Pid::Slf, [addr_in_elf_in_apk].as_slice())
.unwrap();
let (output, meta_idx) = normalized.outputs[0];
let meta = &normalized.meta[meta_idx];
let apk = meta.as_apk().unwrap();
// We assume that we have the APK lying around at the same path as on the
// "remote" system.
let src = symbolize::source::Source::from(symbolize::source::Apk::new(&apk.path));
let symbolizer = symbolize::Symbolizer::new();
let sym = symbolizer
.symbolize_single(&src, symbolize::Input::FileOffset(output))
.unwrap()
.into_sym()
.unwrap();Fields§
§path: PathBufThe canonical absolute path to the APK, including its name.
Trait Implementations§
impl StructuralPartialEq for Apk
Auto Trait Implementations§
impl Freeze for Apk
impl RefUnwindSafe for Apk
impl Send for Apk
impl Sync for Apk
impl Unpin for Apk
impl UnwindSafe for Apk
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