You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Add Shell logging
This commit is contained in:
@@ -9,6 +9,8 @@ public class Logger {
|
||||
|
||||
private static final String LOG_TAG = "Magisk: DEV";
|
||||
|
||||
private static final boolean logShell = true;
|
||||
|
||||
public static void dev(String msg, Object... args) {
|
||||
Context context = null;
|
||||
try {
|
||||
@@ -37,6 +39,12 @@ public class Logger {
|
||||
}
|
||||
}
|
||||
|
||||
public static void shell(boolean root, String msg) {
|
||||
if (logShell) {
|
||||
Log.d(root ? "SU" : "SH", msg);
|
||||
}
|
||||
}
|
||||
|
||||
private static Application getApplicationUsingReflection() throws Exception {
|
||||
return (Application) Class.forName("android.app.AppGlobals")
|
||||
.getMethod("getInitialApplication").invoke(null, (Object[]) null);
|
||||
|
||||
Reference in New Issue
Block a user