Skip to content
This repository has been archived by the owner on Dec 31, 2022. It is now read-only.

System.ArgumentOutOfRangeException: "" #212

Open
TheAirBlow opened this issue May 6, 2021 · 0 comments
Open

System.ArgumentOutOfRangeException: "" #212

TheAirBlow opened this issue May 6, 2021 · 0 comments

Comments

@TheAirBlow
Copy link

TheAirBlow commented May 6, 2021

Ok my previout dumb issue was easy fix (#211), but NOT THIS TIME.

I get System.ArgumentOutOfRangeException with no description provided.
This time my path is /data/app/net.airblowprod.ubox-xq9tbYgsYqN_cFVlCoeX3A==/base.apk

For some background, I am coding an app for backuping an Android smartphone.

My code:

private static void PullPackage(string package, SyncService service, string path)
{
    string cmd = $"pm path {package} | awk -F':' '{{print $2}}'";
    var receiver = new ConsoleOutputReceiver();
    client.ExecuteRemoteCommand(cmd, device, receiver);
    string data = receiver.ToString().Substring(0, receiver.ToString().Length - 2);
    using (Stream stream = File.OpenWrite(path))
        service.Pull(data, stream, null, CancellationToken.None);
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant