-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixed random partition errors (if it still occurs: that is a bug!) * Added debug page * Fixed Sailfish being Unknown * Updated translations
- Loading branch information
Showing
13 changed files
with
141 additions
and
65 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
app/src/main/java/org/androidbootmanager/app/ui/debug/DebugActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package org.androidbootmanager.app.ui.debug; | ||
|
||
import android.app.AlertDialog; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
|
||
import androidx.appcompat.app.AppCompatActivity; | ||
|
||
import com.topjohnwu.superuser.Shell; | ||
|
||
import org.androidbootmanager.app.R; | ||
|
||
import java.util.ArrayList; | ||
|
||
public class DebugActivity extends AppCompatActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_debug); | ||
} | ||
|
||
public void errorTest(View v) { | ||
shelldialog("echo out && echo err 1>&2"); | ||
} | ||
|
||
public void shelldialog(String j) { | ||
ArrayList<String> o = new ArrayList<>(); | ||
ArrayList<String> e = new ArrayList<>(); | ||
Shell.Result r = Shell.su(j).to(o, e).exec(); | ||
new AlertDialog.Builder(this) | ||
.setTitle(j) | ||
.setMessage("OUT channel:\n" + String.join("\n", o) + "\nOUT channel using get:\n" + String.join("\n", r.getOut()) + "\nERR channel:\n" + String.join("\n", e) + "\nERR channel using get:\n" + String.join("\n", r.getErr())) | ||
.show(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.