Skip to main content

Apk

Struct Apk 

Source
pub struct Apk { /* private fields */ }

Implementations§

Source§

impl Apk

Source

pub fn from_path<P: AsRef<Path>>(path: P) -> Result<Self, Error>

Examples found in repository?
examples/exporter.rs (line 45)
28fn run() -> Result<(), Error> {
29    let apk_path = match env::args().nth(1) {
30        Some(path) => path,
31        None => {
32            println!("Usage: exporter <apk> <path>");
33            return Ok(());
34        }
35    };
36
37    let output = match env::args().nth(2) {
38        Some(path) => path,
39        None => {
40            println!("Usage: exporter <apk> <path>");
41            return Ok(());
42        }
43    };
44
45    let mut apk = Apk::from_path(&apk_path).context("error loading APK")?;
46    apk.export(Path::new(&output), true)
47        .context("APK could not be exported")?;
48
49    Ok(())
50}
Source

pub fn export<P: AsRef<Path>>( &mut self, output_path: P, force: bool, ) -> Result<(), Error>

It exports to target output_path the contents of the APK, transcoding the binary XML files found on it.

Examples found in repository?
examples/exporter.rs (line 46)
28fn run() -> Result<(), Error> {
29    let apk_path = match env::args().nth(1) {
30        Some(path) => path,
31        None => {
32            println!("Usage: exporter <apk> <path>");
33            return Ok(());
34        }
35    };
36
37    let output = match env::args().nth(2) {
38        Some(path) => path,
39        None => {
40            println!("Usage: exporter <apk> <path>");
41            return Ok(());
42        }
43    };
44
45    let mut apk = Apk::from_path(&apk_path).context("error loading APK")?;
46    apk.export(Path::new(&output), true)
47        .context("APK could not be exported")?;
48
49    Ok(())
50}

Trait Implementations§

Source§

impl Debug for Apk

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Apk

§

impl RefUnwindSafe for Apk

§

impl Send for Apk

§

impl Sync for Apk

§

impl Unpin for Apk

§

impl UnsafeUnpin for Apk

§

impl UnwindSafe for Apk

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.