@@ -69,7 +69,7 @@ public Toolbox(Shell shell) {
69
69
* @throws BrokenBusyboxException
70
70
*/
71
71
public boolean isRootAccessGiven () throws BrokenBusyboxException , TimeoutException , IOException {
72
- SimpleCommand idCommand = new SimpleCommand ("toolbox id" );
72
+ SimpleCommand idCommand = new SimpleCommand ("id" );
73
73
shell .add (idCommand ).waitForFinish ();
74
74
75
75
if (idCommand .getOutput ().contains ("uid=0" )) {
@@ -89,7 +89,7 @@ private class PsCommand extends Command {
89
89
private Pattern psPattern ;
90
90
91
91
public PsCommand (String processName ) {
92
- super ("toolbox ps" );
92
+ super ("ps" );
93
93
this .processName = processName ;
94
94
pids = new ArrayList <String >();
95
95
@@ -169,7 +169,7 @@ public boolean killAll(String processName) throws BrokenBusyboxException, Timeou
169
169
// kill processes
170
170
if (!psCommand .getPids ().isEmpty ()) {
171
171
// example: kill -9 1234 1222 5343
172
- SimpleCommand killCommand = new SimpleCommand ("toolbox kill -9 "
172
+ SimpleCommand killCommand = new SimpleCommand ("kill -9 "
173
173
+ psCommand .getPidsString ());
174
174
shell .add (killCommand ).waitForFinish ();
175
175
@@ -261,7 +261,7 @@ public String getPermissions() {
261
261
}
262
262
263
263
public LsCommand (String file ) {
264
- super ("toolbox ls -l " + file );
264
+ super ("ls -l " + file );
265
265
266
266
// get only filename:
267
267
this .fileName = (new File (file )).getName ();
@@ -417,7 +417,7 @@ public boolean setFilePermissions(String file, String permissions)
417
417
throws BrokenBusyboxException , TimeoutException , IOException {
418
418
Log .d (RootCommands .TAG , "Set permissions of " + file + " to " + permissions );
419
419
420
- SimpleCommand chmodCommand = new SimpleCommand ("toolbox chmod " + permissions + " " + file );
420
+ SimpleCommand chmodCommand = new SimpleCommand ("chmod " + permissions + " " + file );
421
421
shell .add (chmodCommand ).waitForFinish ();
422
422
423
423
if (chmodCommand .getExitCode () == 0 ) {
@@ -500,15 +500,15 @@ public boolean copyFile(String source, String destination, boolean remountAsRw,
500
500
501
501
boolean commandSuccess = false ;
502
502
503
- SimpleCommand ddCommand = new SimpleCommand ("toolbox dd if=" + source + " of="
503
+ SimpleCommand ddCommand = new SimpleCommand ("dd if=" + source + " of="
504
504
+ destination );
505
505
shell .add (ddCommand ).waitForFinish ();
506
506
507
507
if (ddCommand .getExitCode () == 0 ) {
508
508
commandSuccess = true ;
509
509
} else {
510
510
// try cat if dd fails
511
- SimpleCommand catCommand = new SimpleCommand ("toolbox cat " + source + " > "
511
+ SimpleCommand catCommand = new SimpleCommand ("cat " + source + " > "
512
512
+ destination );
513
513
shell .add (catCommand ).waitForFinish ();
514
514
@@ -585,7 +585,7 @@ private class FileExistsCommand extends Command {
585
585
private boolean fileExists = false ;
586
586
587
587
public FileExistsCommand (String file ) {
588
- super ("toolbox ls " + file );
588
+ super ("ls " + file );
589
589
this .file = file ;
590
590
}
591
591
0 commit comments