joneschrisg / android-system-core Goto Github PK
View Code? Open in Web Editor NEWFork to enable local modifications
Home Page: git://android.git.linaro.org/platform/system/core.git
Fork to enable local modifications
Home Page: git://android.git.linaro.org/platform/system/core.git
Hi,
can you give me please a simple example, how i can use jadb.jar service?
i want to send a simple command like "pm list packages"
thanks
When getting the list of devices (with JadbConnection.getDevices()
), ADB closes the connection (as per protocol), so the next call (to JadbDevice.getState()
), fails with
se.vidstige.jadb.JadbException: command failed: closed
at se.vidstige.jadb.Transport.verifyResponse(Transport.java:39)
at se.vidstige.jadb.JadbDevice.getState(JadbDevice.java:46)
That is also true with a device acquired with JadbConnection.getAnyDevice()
.
There doesn't seem to be any other way getting hold of a device.
What gives? Are there circumstances in which JadbDevice.getState()
works?
PS: Thanks for this library. Installing packages work, so it does help quite a lot.
//String path = "/data/user/0/com.package/files/";
String path = "/data/user/0/com.package/files/";
String file = "TEST2.txt";
JadbConnection jadb = new JadbConnection();
JadbDevice device = jadb.getDevices().get(0);
device.executeShell("run-as", "com.package");
try {
device.pull(new RemoteFile(path), new File(file));
} catch (Exception e) {
//Keep getting a Permission denied exception
System.err.println("Error while pulling: " + e.getMessage());
}
I keep getting Permission denied error when trying to pull a file from the device.
Do you have any ideas on why this is happening and how to solve it?
Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.