mirror of
https://github.com/revanced/jadb.git
synced 2025-06-12 05:07:39 +02:00
bytearray shell execution added
This commit is contained in:
@ -1,8 +1,11 @@
|
||||
package se.vidstige.jadb.test;
|
||||
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.junit.Test;
|
||||
|
||||
import se.vidstige.jadb.JadbDevice;
|
||||
@ -92,4 +95,13 @@ public class RealDeviceTestCases {
|
||||
String s2=any.executeShell("ls");
|
||||
System.out.println(s2);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testShellArray() throws Exception
|
||||
{
|
||||
JadbConnection jadb = new JadbConnection();
|
||||
JadbDevice any = jadb.getAnyDevice();
|
||||
byte[] s=any.executeShellGetBytearr("screencap -p");
|
||||
FileUtils.writeByteArrayToFile(new File("screen.png"), s);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user