Comments (20)
Can you show us your code you are using?
from roottools.
Ok. I've update the post
from roottools.
You are missing the super calls.
Add:
super.commandOutput(id, line);
as the last line in your commandOutput method.
from roottools.
I can't, eclipse says:
Cannot directly invoke the abstract method commandOutput(int, String) for the type
from roottools.
Are you sure you are using 4.0/4.1? commandOutput is not an abstract method anymore.
from roottools.
Yes, in roottools .ipr file is there
<project version="4">
it should be the beta version
from roottools.
I don't think you have version 4. That line doesn't have anything to do with the actual version number.
Additionally, commandOutput is not abstract in version 4.0 or 4.1.
from roottools.
I've downloaded the latest version and commandOutput is not abstract. However I still have the same problem also calling super.commandOutput(id, line); at the least line in my commandOutput method.
from roottools.
Ok, let me try and test this myself.
from roottools.
Hmmm, I can't seem to find a "touch_dev" on my device when I do getevent.
from roottools.
"touch_dev" there isn't in all devices (it might have an other name) but you can most likely find the event that say when an hardware button is pressed and use it to test. Its name can depend by device and you should try each event. I've the same problem also with that event.
from roottools.
I think part of the problem is that you are setting the timeout to 0.
I didn't really account for keeping a command running indefinitely....
Let me add this in and I'll give you a new version to test.
from roottools.
Can you try using this version?
Keep in mind you'll need to call cmd.terminate() when you want it to finish.
Once you confirm this is working I'll add in some better support for this use case.
https://drive.google.com/open?id=0B5Amguus3csDZzNMems4Zm5kNU0&authuser=0
from roottools.
I tried also with different values it's the same.
from roottools.
Can you give me the source code of the project because if I use the jar I get “Conversion to Dalvik format failed with error 1” when I try to run.
from roottools.
You may need to clean your project and rebuild it when adding the jar.
I'll check in the changes to the repos, there are changes to both RootShell and RootTools so you'll have to compile both and combine both into a jar or include both in your project.
from roottools.
Also, I added better support for this use case.
When you are done with a command you can either call:
cmd.finish();
OR
cmd.terminate();
One indicates that the command finished as desired and the other indicates that some problem occurred.
All code checked in.
from roottools.
@Stericson
Does .finish() / .terminate() really kill/stop the process executing?
Because it doesn't seem to do that for me (e.g. executing "logcat *:V" with a timeout of 10 sec, callback commandOutput still gets called after timeout with new data).
Btw (not sure if it's relevant) - I'm using my own "su" binary, which just runs a root shell (/system/bin/sh).
from roottools.
I use RootTools 4.2, and have the same problem with @andrea993 . It seems that commandOutput
can't return until certain number of lines.
So, I run getevent /dev/input/event5 > /storage/sdcard0/input.txt
instead, no problem with output, but, I can't stop outputing with finish()
or terminate()
, just as @kostaspl 's problem. isFinished()
returns true
, and isExecuting()
returns false
, but input.txt continues increasing.
So, I'd like to know how did you solve these problem, thank you! @andrea993 @kostaspl @Stericson
from roottools.
@zhuoensea It's been a long time since then, but I think I just used this way:
http://stackoverflow.com/a/10225072
from roottools.
Related Issues (20)
- Install "Aptoide" HOT 1
- Crash when Shell run HOT 3
- Root tool
- [email protected] HOT 1
- New
- is still alive the project?
- RootTools
- Apple
- __Originally posted by @jackiebrewster307 in https://github.com/IdeasOnCanvas/MNDocumentController/issues/1__
- Apple root HOT 1
- Apple root iPhone HOT 1
- save
- Roottools HOT 1
- How to unlock bootloader and on stylo 6???
- Root HOT 1
- Vivo
- How to Rename a File in /System/ HOT 2
- .
- Permission
- I'm using Castify
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 roottools.