Questions tagged [roottools]

RootTools is a library with utilities for running commands as root from within Android Java Code.

RootTools is a library with utilities for running commands as root from within Android Java Code.

Old homepage: https://code.google.com/p/roottools/

New homepage: https://github.com/Stericson/RootTools

25 questions
6
votes
0 answers

Android App Root detection method was bypassed by focusing specifically on the rootbeer library being used

My Android App uses rootbear library to detect rooted devices. But during app security penetration testing, rootbear root detection mechanism is bypasssed using the "unrootbeer Xposed module script" Below are the steps followed during penetration…
4
votes
1 answer

Android app crashes when adding commands to RootTools v4.2 shell

I have an Android application utilizing RootTools v4.2 (the latest I know of) and I have followed their documentation on how to execute shell commands as root. Sometimes the commands execute just fine, other times the app crashes with the following…
Ryan
  • 6,756
  • 13
  • 49
  • 68
3
votes
2 answers

Importing roottools.jar into Android Studio

I'm trying to import roottools from here: https://code.google.com/p/roottools/ (jar file) to the Android Studio project. So far I've tried the following: copy RootTools-javadoc-3.4.jar into libs directory under my project. Add imports Reorganize…
XorOrNor
  • 8,868
  • 12
  • 48
  • 81
3
votes
2 answers

How to change the file's permission in android using chmod

I'm using chmod command to change file's permission but it's doesn't work in my code and my device is rooted too: String MyFilePath = "/data/data/MyPkgName/database/com.pocketchange.android.http.AsyncHttpRequestService.db"; CommandCapture command =…
Mahmoud Jorban
  • 952
  • 4
  • 13
  • 25
3
votes
2 answers

Android root app not working: Can't remove file from terminal or Java

I'm working on a simple root app for clearing browser localstore, and maybe later add other features that aren't possible with built-in apps. I'm using roottools, root seems to be working, but it won't remove the directory properly: public class…
NoBugs
  • 9,310
  • 13
  • 80
  • 146
2
votes
2 answers

Concurrent Modification Exception, despite waiting for finish

Here's a section of my onCreate, which sometimes is causing exception: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_tilisting); _context =…
NoBugs
  • 9,310
  • 13
  • 80
  • 146
1
vote
1 answer

No syntax errors, still code not working

In the code below, I tried to check root access using roottools. There aren't any syntax errors but whenever I click the "Check Root Access" button, I get an "application has stopped unexpectedly" message. Please help. package…
user3377697
1
vote
1 answer

Why is final variable not inspectable?

I'm reworking some code to make it usable with the new RootTools 3.0 (which fixes an important bug): One section I rewrote looks like this, with a callback-class for better readability. I'm adding the size of two directories to tell the total of…
NoBugs
  • 9,310
  • 13
  • 80
  • 146
1
vote
1 answer

Root permission not granted to Android app for exceuting "su" command

I want to execute the "su" comand from an app..I have rooted the emulator and installed Superuser.apk(superuser 2.3.6.1) Process pr= Runtime.getRuntime().exec("su"); process.waitFor(); Log.d("Ex.Value",Integer.toString(process.exitValue())); But…
user2068522
  • 11
  • 1
  • 1
  • 3
0
votes
0 answers

Get output of shell command using RootTools

I would like to get the output of a shell command, "ls -l" for example using RootTools and pass it to a variable or array so that i can manipulate it. This is the code that i use but does not work. final StringBuilder s = new StringBuilder(); final…
1995
  • 23
  • 4
0
votes
1 answer

Run multiple commands at once in RootTools/RootShell?

I'm using the RootTools library, and I need to execute two commands. The first one runs a binary, the second sends SIGINT to it, to kill it. RootTools (as far as I know) can only have one root shell open at a time, so commands can only be executed…
superl2
  • 13
  • 1
  • 5
0
votes
1 answer

Correct command for root access in Android

I have next example: RootTools.isRootAvailable() Command command = new Command(0, "echo this is a command", "echo this is another command"); try { RootTools.getShell(true).add(command); }catch (IOException | RootDeniedException |…
Tomas
  • 1,567
  • 3
  • 21
  • 38
0
votes
2 answers

I can't change chmod to 777 in Android programmatically

I have a rooted device, and want to change the chmod permission of an apk(Prueba.apk) that is inside /system/app , so to achieve that I am using the RootTools library with BusyBox. And my code is: Command comando = new Command(0, "chmod 777…
0
votes
1 answer

RootTools.jar and OneSignal SDK creates duplicate entry error

I have android project that include RootTools.jar, it was run without any problem, but when I add OneSignal SDk by following this guide: Android SDK Installation (Android Studio) I got error when try to run…
0
votes
1 answer

Return output from completed command using RootTools

I'm trying to retrieve the output of commandOutput in order to pass it to another function, but commandCompleted is never ran. Any help? Command command = new Command(0, "cat " + file){ private String output; @Override public void…
Qu3ntin0
  • 113
  • 1
  • 1
  • 8
1
2