Comments (7)
There isn't one, currently.
from libsuperuser.
I didn't know it's even possible. It seems it can be useful though:
http://www.longluo.me/blog/2016/10/01/Android-Develop-Tools-ADB-Manual/
pm install-write: write a package into existing session; path may
be '-' to read from stdin
-S: size in bytes of package, required for stdin
That's probably what the repository is using.
Weird is that I don't see all commands on official docs though:
https://developer.android.com/studio/command-line/adb
Anyway, can you please add it somehow? Or maybe think of a workaround for now?
from libsuperuser.
This would be very tricky to get right for an interactive shell, due to all the edge-cases on how programs handle STDIN., and only very rarely used. If you must do this exact thing, use the sample code you provided yourself.
Think of a work-around? For this specific case there are several. For this install-write command you could just use the source paths of the APKs in the command directly instead of reading the APK into a stream and then writing it to another, for example. Or PIPE the commands on the shell level rather than the Java level.
If the data isn't coming from disk, you can cache it on disk and pass the path, or maybe even create a fifo file you write to from Java and read from in the shell.
from libsuperuser.
Suppose I got root, though, this could still work later, no?
It won't ask the user for root again, right?
from libsuperuser.
That depends on the root management app. They can be set to ask for every "su" request, in which case you'd be asked again. Mostly the default is ask once for any UID and then keep it granted, so you'd only see it once regardless of which method you use to execute root commands.
from libsuperuser.
Thought so.
Would you please reconsider adding this though? Even as a stand-alone function?
I think you got all the other cases covered, except this one.
from libsuperuser.
Like @AndroidDeveloperLB, I'm here after looking at the same code in SAI and wondering if it's possible with libsuperuser. While it's not a must-have feature, but it will definitely make this library complete.
from libsuperuser.
Related Issues (20)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libsuperuser.