Comments (13)
I found what you need. Use System.getenv("PATH").
Original comment by [email protected]
on 21 Sep 2011 at 1:39
from roottools.
This is an Android command?
Original comment by [email protected]
on 21 Sep 2011 at 1:41
from roottools.
This is standard android method getting enviroment variables. See
developer.android.com for details:
http://developer.android.com/reference/java/lang/System.html#getenv(java.lang.St
ring)
Original comment by [email protected]
on 21 Sep 2011 at 2:13
from roottools.
This should be fixed, now it checks via two different means and I think this
resolves your issue.
Original comment by [email protected]
on 7 Oct 2011 at 1:18
- Changed state: Fixed
from roottools.
[deleted comment]
from roottools.
The exceptions you are seeing are not cause by RootTools...in reality they are
caused because the first method RootTools uses to find binaries is failing.
However the second method kicks in and finds su.
01-04 09:26:16.989: D/RootTools v1.4.1(2336): su was found here: /system/bin/
however, to answer your question, I need to see the rest of the stack trace
before the exception is thrown.
Original comment by [email protected]
on 4 Jan 2012 at 6:14
from roottools.
I guess that first statement doesnt make since...rather I meant to say that the
exceptions are expected in some circumstances and roottools is ahdnling the
exceptions properly...you shouldnt have to worry about them.
Original comment by [email protected]
on 4 Jan 2012 at 6:35
from roottools.
hi Sreisco, exception handling is not handled properly . please catch the
FilenotFound exception in findBinary() as i cannot catch it from the calling
function. this needs to be added in both places ,before if(!found) as well as
keep the try catch for if(!found)
But I wonder why dont you add the second set of paths in the first try block
and can delete if(!found) completely ..
Original comment by [email protected]
on 11 Jan 2012 at 11:59
from roottools.
You are not suppose to catch it, RootTools catches the exception.
Please see line 266-270 of RootTools.java (Stable)
The exception is being handled properly. If you do not want to see the
stacktrace, then turn debug mode off.
Again, in your example, the method does find su as indicated by your log:
01-04 09:26:16.989: D/RootTools v1.4.1(2336): su was found here: /system/bin/
Original comment by [email protected]
on 12 Jan 2012 at 12:12
from roottools.
my bad !!! thanks Stersicso:) one last question how do i find Superuser.apk ?
is it always gonna be in the same location device is rooted ?
Original comment by [email protected]
on 12 Jan 2012 at 1:13
from roottools.
SuperUser.apk I would poll Packagemanager to see if it is installed or just
scan the phone for the package name....
In reality though, your application doesn't need to worry about whether or not
a user has or doesnt have superuser installed. If the su binary is installed
then I think it is a safe assumption that root access is available to you, of
course assuming permissions is given by the user.
Original comment by [email protected]
on 12 Jan 2012 at 5:06
from roottools.
As I told you before ,i am checking the rooted device programmatically not by
waiting user's permission. So All I could do to determine is only to figure out
if su binary is available or not. Is there any other checks I could include to
determine rooted device in this way ? Your comments are highly appreciated ?
Original comment by [email protected]
on 12 Jan 2012 at 7:41
from roottools.
So, is Su is one the device my thoughts are this:
Either, it's just a standard Su binary and does not need SuperUser
OR
It's SuperUsers Su binary and that indicates that SuperUser should be installed.
So the presence of Su is enough evidence of a rooted phone for me.
Although I do check for root access...I have a method for that..
isAccessGiven() which should return a boolean which is indicative of whether or
not you can actually execute rooted applications. Although, if Superuser is
installed it prompts for the users permission.
.
Original comment by [email protected]
on 12 Jan 2012 at 8:29
from roottools.
Related Issues (20)
- File resource is not released HOT 5
- isAccessGiven() returns false when Superuser (com.noshufou.android.su) is installed HOT 12
- Streams are not closed which leads to "too many open files errors" HOT 2
- Make deleteFileOrDirectory() a static method HOT 1
- copyFile() doesn't check the exit status from "cp" HOT 1
- ForceClose On getShell() HOT 9
- Add Rootools to Maven repository HOT 2
- Add a Busybox path setter HOT 2
- remount command not compatible with android 4.3? HOT 8
- Adding a non-returning command to a shell will trigger terminated timeout exception, even though it's not actually terminated. HOT 6
- Android 4.3 Remount issue and a small logic error HOT 2
- getMountedAs() returns wrong resulst HOT 3
- installBinary() - feature requests HOT 4
- RootTools.isRootAvailable() exception HOT 1
- Block Until Command has been processed HOT 1
- The method waitForFinish() is undefined for the type Command HOT 8
- Proper way to wait for the command to end HOT 9
- Read Command Output HOT 4
- Root action does not works when phone is sleeping HOT 2
- Android Zombien process
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.