quamotion / madb

SharpAdbClient is a .NET library that allows .NET applications to communicate with Android devices. It provides a .NET implementation of the adb protocol, giving more flexibility to the developer than launching an adb.exe process and parsing the console output.
Apache License 2.0
361 stars 133 forks source link

Ability to load snapshot? #202

Open BrianVallelunga opened 3 years ago

BrianVallelunga commented 3 years ago

I was hoping I could use ExecuteRemoteCommand to run the following "emu avd snapshot load MySnapshot" but ExecuteRemoteCommand prepends everything with "shell:" https://github.com/quamotion/madb/blob/22e912559048035687c6977b19d2a702d41dec02/SharpAdbClient/AdbClient.cs#L352

Is there an easy way to add this functionality? I'm happy to work on the feature if it will get merged.

byronbytes commented 2 years ago

Does that mean there is no way to get the superuser using this method since it starts as shell: ?

Just an idea, you could fork the project and make another bool for removeshellprefix and if it's set to true, it just runs the command without the shell: prefix.