Full project restructuring

This commit is contained in:
topjohnwu 2019-01-30 03:10:12 -05:00
parent 5df426380d
commit 60f69feaff
91 changed files with 219 additions and 238 deletions

View File

@ -12,7 +12,7 @@ android {
dependencies { dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar']) implementation fileTree(dir: 'libs', include: ['*.jar'])
api project(':net') api project(':net')
api project(':utils') api project(':signing')
api 'org.kamranzafar:jtar:2.3' api 'org.kamranzafar:jtar:2.3'
def libsuVersion = '2.2.0' def libsuVersion = '2.2.0'

View File

@ -1,2 +1,2 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.topjohnwu.core" /> package="com.topjohnwu.magisk.core" />

View File

@ -1,4 +1,4 @@
package com.topjohnwu.core; package com.topjohnwu.magisk;
import android.content.Context; import android.content.Context;
import android.content.SharedPreferences; import android.content.SharedPreferences;
@ -8,10 +8,11 @@ import android.os.Handler;
import android.os.Looper; import android.os.Looper;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import com.topjohnwu.core.database.MagiskDB; import com.topjohnwu.magisk.core.BuildConfig;
import com.topjohnwu.core.database.RepoDatabaseHelper; import com.topjohnwu.magisk.database.MagiskDB;
import com.topjohnwu.core.utils.LocaleManager; import com.topjohnwu.magisk.database.RepoDatabaseHelper;
import com.topjohnwu.core.utils.RootUtils; import com.topjohnwu.magisk.utils.LocaleManager;
import com.topjohnwu.magisk.utils.RootUtils;
import com.topjohnwu.net.Networking; import com.topjohnwu.net.Networking;
import com.topjohnwu.superuser.ContainerApp; import com.topjohnwu.superuser.ContainerApp;
import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.Shell;

View File

@ -1,10 +1,10 @@
package com.topjohnwu.core; package com.topjohnwu.magisk;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.os.Bundle; import android.os.Bundle;
import android.util.Xml; import android.util.Xml;
import com.topjohnwu.core.utils.Utils; import com.topjohnwu.magisk.utils.Utils;
import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.Shell;
import com.topjohnwu.superuser.ShellUtils; import com.topjohnwu.superuser.ShellUtils;
import com.topjohnwu.superuser.io.SuFile; import com.topjohnwu.superuser.io.SuFile;

View File

@ -1,4 +1,4 @@
package com.topjohnwu.core; package com.topjohnwu.magisk;
import android.os.Environment; import android.os.Environment;
import android.os.Process; import android.os.Process;

View File

@ -1,4 +1,4 @@
package com.topjohnwu.core.container; package com.topjohnwu.magisk.container;
import android.content.ContentValues; import android.content.ContentValues;
import android.database.Cursor; import android.database.Cursor;

View File

@ -1,4 +1,4 @@
package com.topjohnwu.core.container; package com.topjohnwu.magisk.container;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;

View File

@ -1,10 +1,10 @@
package com.topjohnwu.core.container; package com.topjohnwu.magisk.container;
import android.content.ContentValues; import android.content.ContentValues;
import android.content.pm.ApplicationInfo; import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import com.topjohnwu.core.utils.Utils; import com.topjohnwu.magisk.utils.Utils;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;

View File

@ -1,13 +1,13 @@
package com.topjohnwu.core.container; package com.topjohnwu.magisk.container;
import android.content.ContentValues; import android.content.ContentValues;
import android.database.Cursor; import android.database.Cursor;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;
import com.topjohnwu.core.Const; import com.topjohnwu.magisk.Const;
import com.topjohnwu.core.utils.Logger; import com.topjohnwu.magisk.utils.Logger;
import com.topjohnwu.core.utils.Utils; import com.topjohnwu.magisk.utils.Utils;
import java.text.DateFormat; import java.text.DateFormat;
import java.util.Date; import java.util.Date;

View File

@ -1,8 +1,8 @@
package com.topjohnwu.core.container; package com.topjohnwu.magisk.container;
import android.content.ContentValues; import android.content.ContentValues;
import com.topjohnwu.core.utils.LocaleManager; import com.topjohnwu.magisk.utils.LocaleManager;
import java.text.DateFormat; import java.text.DateFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;

View File

@ -1,4 +1,4 @@
package com.topjohnwu.core.container; package com.topjohnwu.magisk.container;
import org.kamranzafar.jtar.TarHeader; import org.kamranzafar.jtar.TarHeader;

View File

@ -1,4 +1,4 @@
package com.topjohnwu.core.container; package com.topjohnwu.magisk.container;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;

View File

@ -1,16 +1,16 @@
package com.topjohnwu.core.database; package com.topjohnwu.magisk.database;
import android.content.ContentValues; import android.content.ContentValues;
import android.content.Context; import android.content.Context;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.text.TextUtils; import android.text.TextUtils;
import com.topjohnwu.core.Const; import com.topjohnwu.magisk.Config;
import com.topjohnwu.core.Config; import com.topjohnwu.magisk.Const;
import com.topjohnwu.core.container.Policy; import com.topjohnwu.magisk.container.Policy;
import com.topjohnwu.core.container.SuLogEntry; import com.topjohnwu.magisk.container.SuLogEntry;
import com.topjohnwu.core.utils.LocaleManager; import com.topjohnwu.magisk.utils.LocaleManager;
import com.topjohnwu.core.utils.Utils; import com.topjohnwu.magisk.utils.Utils;
import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.Shell;
import java.text.DateFormat; import java.text.DateFormat;

View File

@ -1,14 +1,14 @@
package com.topjohnwu.core.database; package com.topjohnwu.magisk.database;
import android.content.Context; import android.content.Context;
import android.database.Cursor; import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper; import android.database.sqlite.SQLiteOpenHelper;
import com.topjohnwu.core.App; import com.topjohnwu.magisk.App;
import com.topjohnwu.core.Const; import com.topjohnwu.magisk.Config;
import com.topjohnwu.core.Config; import com.topjohnwu.magisk.Const;
import com.topjohnwu.core.container.Repo; import com.topjohnwu.magisk.container.Repo;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;

View File

@ -1,8 +1,8 @@
package com.topjohnwu.core.tasks; package com.topjohnwu.magisk.tasks;
import com.topjohnwu.core.Const; import com.topjohnwu.magisk.Config;
import com.topjohnwu.core.Config; import com.topjohnwu.magisk.Const;
import com.topjohnwu.core.utils.Topic; import com.topjohnwu.magisk.utils.Topic;
import com.topjohnwu.net.Networking; import com.topjohnwu.net.Networking;
import com.topjohnwu.net.Request; import com.topjohnwu.net.Request;
import com.topjohnwu.net.ResponseListener; import com.topjohnwu.net.ResponseListener;

View File

@ -1,12 +1,12 @@
package com.topjohnwu.core.tasks; package com.topjohnwu.magisk.tasks;
import android.net.Uri; import android.net.Uri;
import android.os.AsyncTask; import android.os.AsyncTask;
import com.topjohnwu.core.App; import com.topjohnwu.magisk.App;
import com.topjohnwu.core.Const; import com.topjohnwu.magisk.Const;
import com.topjohnwu.core.utils.Utils; import com.topjohnwu.magisk.utils.Utils;
import com.topjohnwu.core.utils.ZipUtils; import com.topjohnwu.magisk.utils.ZipUtils;
import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.Shell;
import com.topjohnwu.superuser.ShellUtils; import com.topjohnwu.superuser.ShellUtils;

View File

@ -1,25 +1,25 @@
package com.topjohnwu.core.tasks; package com.topjohnwu.magisk.tasks;
import android.net.Uri; import android.net.Uri;
import android.os.AsyncTask; import android.os.AsyncTask;
import android.os.Build; import android.os.Build;
import android.text.TextUtils; import android.text.TextUtils;
import com.topjohnwu.core.App; import com.topjohnwu.magisk.App;
import com.topjohnwu.core.Const; import com.topjohnwu.magisk.Config;
import com.topjohnwu.core.Config; import com.topjohnwu.magisk.Const;
import com.topjohnwu.core.R; import com.topjohnwu.magisk.container.TarEntry;
import com.topjohnwu.core.container.TarEntry; import com.topjohnwu.magisk.core.R;
import com.topjohnwu.core.utils.Utils; import com.topjohnwu.magisk.utils.Utils;
import com.topjohnwu.net.DownloadProgressListener; import com.topjohnwu.net.DownloadProgressListener;
import com.topjohnwu.net.Networking; import com.topjohnwu.net.Networking;
import com.topjohnwu.signing.SignBoot;
import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.Shell;
import com.topjohnwu.superuser.ShellUtils; import com.topjohnwu.superuser.ShellUtils;
import com.topjohnwu.superuser.internal.NOPList; import com.topjohnwu.superuser.internal.NOPList;
import com.topjohnwu.superuser.io.SuFile; import com.topjohnwu.superuser.io.SuFile;
import com.topjohnwu.superuser.io.SuFileInputStream; import com.topjohnwu.superuser.io.SuFileInputStream;
import com.topjohnwu.superuser.io.SuFileOutputStream; import com.topjohnwu.superuser.io.SuFileOutputStream;
import com.topjohnwu.utils.SignBoot;
import org.kamranzafar.jtar.TarInputStream; import org.kamranzafar.jtar.TarInputStream;
import org.kamranzafar.jtar.TarOutputStream; import org.kamranzafar.jtar.TarOutputStream;

View File

@ -1,11 +1,11 @@
package com.topjohnwu.core.tasks; package com.topjohnwu.magisk.tasks;
import android.app.Activity; import android.app.Activity;
import com.topjohnwu.core.App; import com.topjohnwu.magisk.App;
import com.topjohnwu.core.Const; import com.topjohnwu.magisk.Const;
import com.topjohnwu.core.utils.ISafetyNetHelper; import com.topjohnwu.magisk.utils.ISafetyNetHelper;
import com.topjohnwu.core.utils.Topic; import com.topjohnwu.magisk.utils.Topic;
import com.topjohnwu.net.Networking; import com.topjohnwu.net.Networking;
import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.Shell;

View File

@ -1,15 +1,15 @@
package com.topjohnwu.core.tasks; package com.topjohnwu.magisk.tasks;
import android.database.Cursor; import android.database.Cursor;
import android.os.AsyncTask; import android.os.AsyncTask;
import com.topjohnwu.core.App; import com.topjohnwu.magisk.App;
import com.topjohnwu.core.Const; import com.topjohnwu.magisk.Config;
import com.topjohnwu.core.Config; import com.topjohnwu.magisk.Const;
import com.topjohnwu.core.container.Repo; import com.topjohnwu.magisk.container.Repo;
import com.topjohnwu.core.utils.Logger; import com.topjohnwu.magisk.utils.Logger;
import com.topjohnwu.core.utils.Topic; import com.topjohnwu.magisk.utils.Topic;
import com.topjohnwu.core.utils.Utils; import com.topjohnwu.magisk.utils.Utils;
import com.topjohnwu.net.Networking; import com.topjohnwu.net.Networking;
import com.topjohnwu.net.Request; import com.topjohnwu.net.Request;

View File

@ -1,4 +1,4 @@
package com.topjohnwu.core.utils; package com.topjohnwu.magisk.utils;
public interface ISafetyNetHelper { public interface ISafetyNetHelper {

View File

@ -1,12 +1,12 @@
package com.topjohnwu.core.utils; package com.topjohnwu.magisk.utils;
import android.content.Context; import android.content.Context;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.content.res.Resources; import android.content.res.Resources;
import android.os.Build; import android.os.Build;
import com.topjohnwu.core.App; import com.topjohnwu.magisk.App;
import com.topjohnwu.core.Config; import com.topjohnwu.magisk.Config;
import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.Shell;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -1,9 +1,9 @@
package com.topjohnwu.core.utils; package com.topjohnwu.magisk.utils;
import android.util.Log; import android.util.Log;
import com.topjohnwu.core.BuildConfig; import com.topjohnwu.magisk.Const;
import com.topjohnwu.core.Const; import com.topjohnwu.magisk.core.BuildConfig;
public class Logger { public class Logger {

View File

@ -1,10 +1,10 @@
package com.topjohnwu.core.utils; package com.topjohnwu.magisk.utils;
import android.content.Context; import android.content.Context;
import com.topjohnwu.core.Const; import com.topjohnwu.magisk.Config;
import com.topjohnwu.core.Config; import com.topjohnwu.magisk.Const;
import com.topjohnwu.core.R; import com.topjohnwu.magisk.core.R;
import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.Shell;
import com.topjohnwu.superuser.ShellUtils; import com.topjohnwu.superuser.ShellUtils;
import com.topjohnwu.superuser.io.SuFile; import com.topjohnwu.superuser.io.SuFile;

View File

@ -1,6 +1,6 @@
package com.topjohnwu.core.utils; package com.topjohnwu.magisk.utils;
import com.topjohnwu.core.App; import com.topjohnwu.magisk.App;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy; import java.lang.annotation.RetentionPolicy;

View File

@ -1,4 +1,4 @@
package com.topjohnwu.core.utils; package com.topjohnwu.magisk.utils;
import android.content.Context; import android.content.Context;
import android.content.SharedPreferences; import android.content.SharedPreferences;
@ -13,11 +13,11 @@ import android.os.Build;
import android.provider.OpenableColumns; import android.provider.OpenableColumns;
import android.widget.Toast; import android.widget.Toast;
import com.topjohnwu.core.App; import com.topjohnwu.magisk.App;
import com.topjohnwu.core.Const; import com.topjohnwu.magisk.Config;
import com.topjohnwu.core.Config; import com.topjohnwu.magisk.Const;
import com.topjohnwu.core.container.Module; import com.topjohnwu.magisk.container.Module;
import com.topjohnwu.core.container.ValueSortedMap; import com.topjohnwu.magisk.container.ValueSortedMap;
import com.topjohnwu.net.Networking; import com.topjohnwu.net.Networking;
import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.Shell;
import com.topjohnwu.superuser.io.SuFile; import com.topjohnwu.superuser.io.SuFile;

View File

@ -1,10 +1,10 @@
package com.topjohnwu.core.utils; package com.topjohnwu.magisk.utils;
import com.topjohnwu.signing.JarMap;
import com.topjohnwu.signing.SignAPK;
import com.topjohnwu.superuser.ShellUtils; import com.topjohnwu.superuser.ShellUtils;
import com.topjohnwu.superuser.io.SuFile; import com.topjohnwu.superuser.io.SuFile;
import com.topjohnwu.superuser.io.SuFileOutputStream; import com.topjohnwu.superuser.io.SuFileOutputStream;
import com.topjohnwu.utils.JarMap;
import com.topjohnwu.utils.SignAPK;
import java.io.BufferedInputStream; import java.io.BufferedInputStream;
import java.io.BufferedOutputStream; import java.io.BufferedOutputStream;

View File

@ -6,7 +6,7 @@ configProps.load(new FileInputStream(configPath))
android { android {
defaultConfig { defaultConfig {
applicationId "com.topjohnwu.magisk" applicationId 'com.topjohnwu.magisk'
vectorDrawables.useSupportLibrary = true vectorDrawables.useSupportLibrary = true
} }
@ -33,7 +33,7 @@ android {
} }
} }
flavorDimensions "mode" flavorDimensions 'mode'
productFlavors { productFlavors {
full { full {
@ -47,7 +47,7 @@ android {
} }
stub { stub {
versionCode 1 versionCode 1
versionName "stub" versionName 'stub'
} }
} }
@ -59,7 +59,7 @@ android {
dependencies { dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs') implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation project(':net') implementation project(':net')
fullImplementation project(':core') fullImplementation project(':app-core')
fullImplementation 'ru.noties:markwon:2.0.1' fullImplementation 'ru.noties:markwon:2.0.1'
fullImplementation 'com.caverock:androidsvg-aar:1.3' fullImplementation 'com.caverock:androidsvg-aar:1.3'

View File

@ -23,14 +23,16 @@
-dontwarn javax.naming.** -dontwarn javax.naming.**
# Snet extention # Snet extention
-keepclassmembers class com.topjohnwu.core.utils.ISafetyNetHelper { *; } -keepclassmembers class com.topjohnwu.magisk.utils.ISafetyNetHelper { *; }
-keepclassmembers class com.topjohnwu.core.utils.BootSigner { *; }
# BootSigner
-keepclassmembers class com.topjohnwu.signer.BootSigner { *; }
# SVG # SVG
-dontwarn com.caverock.androidsvg.SVGAndroidRenderer -dontwarn com.caverock.androidsvg.SVGAndroidRenderer
# Strip logging # Strip logging
-assumenosideeffects class com.topjohnwu.core.utils.Logger { -assumenosideeffects class com.topjohnwu.magisk.utils.Logger {
public *** debug(...); public *** debug(...);
} }

View File

@ -1,7 +1,7 @@
package a; package a;
import com.topjohnwu.core.utils.BootSigner;
import com.topjohnwu.magisk.utils.PatchAPK; import com.topjohnwu.magisk.utils.PatchAPK;
import com.topjohnwu.signing.BootSigner;
import androidx.annotation.Keep; import androidx.annotation.Keep;

View File

@ -1,6 +1,6 @@
package a; package a;
import com.topjohnwu.core.App; import com.topjohnwu.magisk.App;
public class e extends App { public class e extends App {
/* stub */ /* stub */

View File

@ -5,7 +5,6 @@ import android.os.Bundle;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.View; import android.view.View;
import com.topjohnwu.core.Const;
import com.topjohnwu.magisk.components.AboutCardRow; import com.topjohnwu.magisk.components.AboutCardRow;
import com.topjohnwu.magisk.components.BaseActivity; import com.topjohnwu.magisk.components.BaseActivity;
import com.topjohnwu.magisk.components.MarkDownWindow; import com.topjohnwu.magisk.components.MarkDownWindow;

View File

@ -1,6 +1,5 @@
package com.topjohnwu.magisk; package com.topjohnwu.magisk;
import com.topjohnwu.core.App;
import com.topjohnwu.magisk.components.AboutCardRow; import com.topjohnwu.magisk.components.AboutCardRow;
import com.topjohnwu.magisk.receivers.GeneralReceiver; import com.topjohnwu.magisk.receivers.GeneralReceiver;
import com.topjohnwu.magisk.receivers.ShortcutReceiver; import com.topjohnwu.magisk.receivers.ShortcutReceiver;

View File

@ -8,13 +8,11 @@ import android.widget.Button;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.Toast; import android.widget.Toast;
import com.topjohnwu.core.App;
import com.topjohnwu.core.Const;
import com.topjohnwu.core.tasks.FlashZip;
import com.topjohnwu.core.tasks.MagiskInstaller;
import com.topjohnwu.core.utils.Utils;
import com.topjohnwu.magisk.adapters.StringListAdapter; import com.topjohnwu.magisk.adapters.StringListAdapter;
import com.topjohnwu.magisk.components.BaseActivity; import com.topjohnwu.magisk.components.BaseActivity;
import com.topjohnwu.magisk.tasks.FlashZip;
import com.topjohnwu.magisk.tasks.MagiskInstaller;
import com.topjohnwu.magisk.utils.Utils;
import com.topjohnwu.superuser.CallbackList; import com.topjohnwu.superuser.CallbackList;
import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.Shell;

View File

@ -9,10 +9,6 @@ import android.view.MenuItem;
import android.view.View; import android.view.View;
import com.google.android.material.navigation.NavigationView; import com.google.android.material.navigation.NavigationView;
import com.topjohnwu.core.Config;
import com.topjohnwu.core.Const;
import com.topjohnwu.core.utils.Topic;
import com.topjohnwu.core.utils.Utils;
import com.topjohnwu.magisk.components.BaseActivity; import com.topjohnwu.magisk.components.BaseActivity;
import com.topjohnwu.magisk.fragments.LogFragment; import com.topjohnwu.magisk.fragments.LogFragment;
import com.topjohnwu.magisk.fragments.MagiskFragment; import com.topjohnwu.magisk.fragments.MagiskFragment;
@ -21,6 +17,8 @@ import com.topjohnwu.magisk.fragments.ModulesFragment;
import com.topjohnwu.magisk.fragments.ReposFragment; import com.topjohnwu.magisk.fragments.ReposFragment;
import com.topjohnwu.magisk.fragments.SettingsFragment; import com.topjohnwu.magisk.fragments.SettingsFragment;
import com.topjohnwu.magisk.fragments.SuperuserFragment; import com.topjohnwu.magisk.fragments.SuperuserFragment;
import com.topjohnwu.magisk.utils.Topic;
import com.topjohnwu.magisk.utils.Utils;
import com.topjohnwu.net.Networking; import com.topjohnwu.net.Networking;
import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.Shell;

View File

@ -5,16 +5,14 @@ import android.content.pm.PackageManager;
import android.os.Bundle; import android.os.Bundle;
import android.text.TextUtils; import android.text.TextUtils;
import com.topjohnwu.core.Config;
import com.topjohnwu.core.Const;
import com.topjohnwu.core.tasks.CheckUpdates;
import com.topjohnwu.core.tasks.UpdateRepos;
import com.topjohnwu.core.utils.LocaleManager;
import com.topjohnwu.core.utils.Utils;
import com.topjohnwu.magisk.components.BaseActivity; import com.topjohnwu.magisk.components.BaseActivity;
import com.topjohnwu.magisk.components.Notifications; import com.topjohnwu.magisk.components.Notifications;
import com.topjohnwu.magisk.receivers.ShortcutReceiver; import com.topjohnwu.magisk.receivers.ShortcutReceiver;
import com.topjohnwu.magisk.tasks.CheckUpdates;
import com.topjohnwu.magisk.tasks.UpdateRepos;
import com.topjohnwu.magisk.utils.AppUtils; import com.topjohnwu.magisk.utils.AppUtils;
import com.topjohnwu.magisk.utils.LocaleManager;
import com.topjohnwu.magisk.utils.Utils;
import com.topjohnwu.net.Networking; import com.topjohnwu.net.Networking;
import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.Shell;

View File

@ -16,9 +16,8 @@ import android.widget.LinearLayout;
import android.widget.Spinner; import android.widget.Spinner;
import android.widget.TextView; import android.widget.TextView;
import com.topjohnwu.core.Config;
import com.topjohnwu.core.container.Policy;
import com.topjohnwu.magisk.components.BaseActivity; import com.topjohnwu.magisk.components.BaseActivity;
import com.topjohnwu.magisk.container.Policy;
import com.topjohnwu.magisk.utils.FingerprintHelper; import com.topjohnwu.magisk.utils.FingerprintHelper;
import com.topjohnwu.magisk.utils.SuConnector; import com.topjohnwu.magisk.utils.SuConnector;

View File

@ -13,10 +13,10 @@ import android.widget.Filter;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
import com.topjohnwu.core.Const; import com.topjohnwu.magisk.Const;
import com.topjohnwu.core.utils.Topic;
import com.topjohnwu.core.utils.Utils;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.utils.Topic;
import com.topjohnwu.magisk.utils.Utils;
import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.Shell;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -10,9 +10,9 @@ import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
import com.google.android.material.snackbar.Snackbar; import com.google.android.material.snackbar.Snackbar;
import com.topjohnwu.core.container.Module;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.components.SnackbarMaker; import com.topjohnwu.magisk.components.SnackbarMaker;
import com.topjohnwu.magisk.container.Module;
import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.Shell;
import java.util.List; import java.util.List;

View File

@ -11,12 +11,12 @@ import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
import com.google.android.material.snackbar.Snackbar; import com.google.android.material.snackbar.Snackbar;
import com.topjohnwu.core.container.Policy;
import com.topjohnwu.core.database.MagiskDB;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.components.CustomAlertDialog; import com.topjohnwu.magisk.components.CustomAlertDialog;
import com.topjohnwu.magisk.components.ExpandableViewHolder; import com.topjohnwu.magisk.components.ExpandableViewHolder;
import com.topjohnwu.magisk.components.SnackbarMaker; import com.topjohnwu.magisk.components.SnackbarMaker;
import com.topjohnwu.magisk.container.Policy;
import com.topjohnwu.magisk.database.MagiskDB;
import com.topjohnwu.magisk.utils.FingerprintHelper; import com.topjohnwu.magisk.utils.FingerprintHelper;
import java.util.List; import java.util.List;

View File

@ -12,14 +12,14 @@ import android.view.ViewGroup;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
import com.topjohnwu.core.container.Module;
import com.topjohnwu.core.container.Repo;
import com.topjohnwu.core.database.RepoDatabaseHelper;
import com.topjohnwu.magisk.ClassMap; import com.topjohnwu.magisk.ClassMap;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.components.BaseActivity; import com.topjohnwu.magisk.components.BaseActivity;
import com.topjohnwu.magisk.components.CustomAlertDialog; import com.topjohnwu.magisk.components.CustomAlertDialog;
import com.topjohnwu.magisk.components.MarkDownWindow; import com.topjohnwu.magisk.components.MarkDownWindow;
import com.topjohnwu.magisk.container.Module;
import com.topjohnwu.magisk.container.Repo;
import com.topjohnwu.magisk.database.RepoDatabaseHelper;
import com.topjohnwu.magisk.services.DownloadModuleService; import com.topjohnwu.magisk.services.DownloadModuleService;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -9,10 +9,10 @@ import android.view.animation.RotateAnimation;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
import com.topjohnwu.core.container.SuLogEntry;
import com.topjohnwu.core.database.MagiskDB;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.components.ExpandableViewHolder; import com.topjohnwu.magisk.components.ExpandableViewHolder;
import com.topjohnwu.magisk.container.SuLogEntry;
import com.topjohnwu.magisk.database.MagiskDB;
import java.util.Collections; import java.util.Collections;
import java.util.HashSet; import java.util.HashSet;

View File

@ -9,12 +9,12 @@ import android.os.Bundle;
import android.view.WindowManager; import android.view.WindowManager;
import android.widget.Toast; import android.widget.Toast;
import com.topjohnwu.core.App; import com.topjohnwu.magisk.App;
import com.topjohnwu.core.Config; import com.topjohnwu.magisk.Config;
import com.topjohnwu.core.Const; import com.topjohnwu.magisk.Const;
import com.topjohnwu.core.utils.LocaleManager;
import com.topjohnwu.core.utils.Topic;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.utils.LocaleManager;
import com.topjohnwu.magisk.utils.Topic;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;

View File

@ -2,8 +2,8 @@ package com.topjohnwu.magisk.components;
import android.content.Intent; import android.content.Intent;
import com.topjohnwu.core.App; import com.topjohnwu.magisk.App;
import com.topjohnwu.core.utils.Topic; import com.topjohnwu.magisk.utils.Topic;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import butterknife.Unbinder; import butterknife.Unbinder;

View File

@ -8,9 +8,9 @@ import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import com.topjohnwu.core.App; import com.topjohnwu.magisk.App;
import com.topjohnwu.core.utils.Topic;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.utils.Topic;
import androidx.preference.Preference; import androidx.preference.Preference;
import androidx.preference.PreferenceCategory; import androidx.preference.PreferenceCategory;

View File

@ -4,9 +4,9 @@ import android.app.Activity;
import android.app.ProgressDialog; import android.app.ProgressDialog;
import android.widget.Toast; import android.widget.Toast;
import com.topjohnwu.core.tasks.MagiskInstaller;
import com.topjohnwu.core.utils.Utils;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.tasks.MagiskInstaller;
import com.topjohnwu.magisk.utils.Utils;
import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.Shell;
import com.topjohnwu.superuser.io.SuFile; import com.topjohnwu.superuser.io.SuFile;

View File

@ -5,12 +5,12 @@ import android.content.Intent;
import android.widget.Toast; import android.widget.Toast;
import com.google.android.material.snackbar.Snackbar; import com.google.android.material.snackbar.Snackbar;
import com.topjohnwu.core.Config;
import com.topjohnwu.core.Const;
import com.topjohnwu.core.utils.Utils;
import com.topjohnwu.magisk.ClassMap; import com.topjohnwu.magisk.ClassMap;
import com.topjohnwu.magisk.Config;
import com.topjohnwu.magisk.Const;
import com.topjohnwu.magisk.FlashActivity; import com.topjohnwu.magisk.FlashActivity;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.utils.Utils;
import com.topjohnwu.net.Networking; import com.topjohnwu.net.Networking;
import java.io.File; import java.io.File;

View File

@ -3,10 +3,10 @@ package com.topjohnwu.magisk.components;
import android.net.Uri; import android.net.Uri;
import android.text.TextUtils; import android.text.TextUtils;
import com.topjohnwu.core.Config; import com.topjohnwu.magisk.Config;
import com.topjohnwu.core.utils.Utils;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.utils.AppUtils; import com.topjohnwu.magisk.utils.AppUtils;
import com.topjohnwu.magisk.utils.Utils;
import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.Shell;
import com.topjohnwu.superuser.ShellUtils; import com.topjohnwu.superuser.ShellUtils;

View File

@ -3,10 +3,10 @@ package com.topjohnwu.magisk.components;
import android.app.Activity; import android.app.Activity;
import android.text.TextUtils; import android.text.TextUtils;
import com.topjohnwu.core.Config; import com.topjohnwu.magisk.Config;
import com.topjohnwu.core.utils.Utils;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.utils.DownloadApp; import com.topjohnwu.magisk.utils.DownloadApp;
import com.topjohnwu.magisk.utils.Utils;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;

View File

@ -11,13 +11,13 @@ import android.view.View;
import com.caverock.androidsvg.SVG; import com.caverock.androidsvg.SVG;
import com.caverock.androidsvg.SVGParseException; import com.caverock.androidsvg.SVGParseException;
import com.topjohnwu.core.App; import com.topjohnwu.magisk.App;
import com.topjohnwu.core.utils.Utils;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.utils.Utils;
import com.topjohnwu.net.Networking; import com.topjohnwu.net.Networking;
import com.topjohnwu.net.ResponseListener; import com.topjohnwu.net.ResponseListener;
import com.topjohnwu.signing.ByteArrayStream;
import com.topjohnwu.superuser.ShellUtils; import com.topjohnwu.superuser.ShellUtils;
import com.topjohnwu.utils.ByteArrayStream;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;

View File

@ -7,14 +7,14 @@ import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.os.Build; import android.os.Build;
import com.topjohnwu.core.App; import com.topjohnwu.magisk.App;
import com.topjohnwu.core.Config;
import com.topjohnwu.core.Const;
import com.topjohnwu.core.utils.Utils;
import com.topjohnwu.magisk.ClassMap; import com.topjohnwu.magisk.ClassMap;
import com.topjohnwu.magisk.Config;
import com.topjohnwu.magisk.Const;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.SplashActivity; import com.topjohnwu.magisk.SplashActivity;
import com.topjohnwu.magisk.receivers.GeneralReceiver; import com.topjohnwu.magisk.receivers.GeneralReceiver;
import com.topjohnwu.magisk.utils.Utils;
import androidx.core.app.NotificationCompat; import androidx.core.app.NotificationCompat;
import androidx.core.app.NotificationManagerCompat; import androidx.core.app.NotificationManagerCompat;

View File

@ -3,9 +3,9 @@ package com.topjohnwu.magisk.components;
import android.app.Notification; import android.app.Notification;
import android.widget.Toast; import android.widget.Toast;
import com.topjohnwu.core.App; import com.topjohnwu.magisk.App;
import com.topjohnwu.core.utils.Utils;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.utils.Utils;
import com.topjohnwu.net.DownloadProgressListener; import com.topjohnwu.net.DownloadProgressListener;
import androidx.core.app.NotificationCompat; import androidx.core.app.NotificationCompat;

View File

@ -6,8 +6,8 @@ import android.view.View;
import android.widget.TextView; import android.widget.TextView;
import com.google.android.material.snackbar.Snackbar; import com.google.android.material.snackbar.Snackbar;
import com.topjohnwu.core.utils.Utils;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.utils.Utils;
import androidx.annotation.StringRes; import androidx.annotation.StringRes;

View File

@ -7,12 +7,12 @@ import android.net.Uri;
import android.text.TextUtils; import android.text.TextUtils;
import android.widget.Toast; import android.widget.Toast;
import com.topjohnwu.core.Config;
import com.topjohnwu.core.Const;
import com.topjohnwu.core.utils.Utils;
import com.topjohnwu.magisk.ClassMap; import com.topjohnwu.magisk.ClassMap;
import com.topjohnwu.magisk.Config;
import com.topjohnwu.magisk.Const;
import com.topjohnwu.magisk.FlashActivity; import com.topjohnwu.magisk.FlashActivity;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.utils.Utils;
import com.topjohnwu.net.Networking; import com.topjohnwu.net.Networking;
import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.Shell;

View File

@ -12,12 +12,8 @@ import android.widget.LinearLayout;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import android.widget.TextView; import android.widget.TextView;
import com.topjohnwu.core.Config;
import com.topjohnwu.core.tasks.CheckUpdates;
import com.topjohnwu.core.tasks.SafetyNet;
import com.topjohnwu.core.utils.ISafetyNetHelper;
import com.topjohnwu.core.utils.Topic;
import com.topjohnwu.magisk.BuildConfig; import com.topjohnwu.magisk.BuildConfig;
import com.topjohnwu.magisk.Config;
import com.topjohnwu.magisk.MainActivity; import com.topjohnwu.magisk.MainActivity;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.components.BaseActivity; import com.topjohnwu.magisk.components.BaseActivity;
@ -29,6 +25,10 @@ import com.topjohnwu.magisk.components.MagiskInstallDialog;
import com.topjohnwu.magisk.components.ManagerInstallDialog; import com.topjohnwu.magisk.components.ManagerInstallDialog;
import com.topjohnwu.magisk.components.UninstallDialog; import com.topjohnwu.magisk.components.UninstallDialog;
import com.topjohnwu.magisk.components.UpdateCardHolder; import com.topjohnwu.magisk.components.UpdateCardHolder;
import com.topjohnwu.magisk.tasks.CheckUpdates;
import com.topjohnwu.magisk.tasks.SafetyNet;
import com.topjohnwu.magisk.utils.ISafetyNetHelper;
import com.topjohnwu.magisk.utils.Topic;
import com.topjohnwu.net.Networking; import com.topjohnwu.net.Networking;
import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.Shell;
import com.topjohnwu.superuser.ShellUtils; import com.topjohnwu.superuser.ShellUtils;

View File

@ -8,10 +8,10 @@ import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.SearchView; import android.widget.SearchView;
import com.topjohnwu.core.utils.Topic;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.adapters.ApplicationAdapter; import com.topjohnwu.magisk.adapters.ApplicationAdapter;
import com.topjohnwu.magisk.components.BaseFragment; import com.topjohnwu.magisk.components.BaseFragment;
import com.topjohnwu.magisk.utils.Topic;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;

View File

@ -10,12 +10,12 @@ import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import com.google.android.material.snackbar.Snackbar; import com.google.android.material.snackbar.Snackbar;
import com.topjohnwu.core.Const; import com.topjohnwu.magisk.Const;
import com.topjohnwu.core.utils.Utils;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.adapters.StringListAdapter; import com.topjohnwu.magisk.adapters.StringListAdapter;
import com.topjohnwu.magisk.components.BaseFragment; import com.topjohnwu.magisk.components.BaseFragment;
import com.topjohnwu.magisk.components.SnackbarMaker; import com.topjohnwu.magisk.components.SnackbarMaker;
import com.topjohnwu.magisk.utils.Utils;
import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.Shell;
import com.topjohnwu.superuser.internal.NOPList; import com.topjohnwu.superuser.internal.NOPList;

View File

@ -12,15 +12,15 @@ import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.TextView; import android.widget.TextView;
import com.topjohnwu.core.Const;
import com.topjohnwu.core.container.Module;
import com.topjohnwu.core.utils.Topic;
import com.topjohnwu.core.utils.Utils;
import com.topjohnwu.magisk.ClassMap; import com.topjohnwu.magisk.ClassMap;
import com.topjohnwu.magisk.Const;
import com.topjohnwu.magisk.FlashActivity; import com.topjohnwu.magisk.FlashActivity;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.adapters.ModulesAdapter; import com.topjohnwu.magisk.adapters.ModulesAdapter;
import com.topjohnwu.magisk.components.BaseFragment; import com.topjohnwu.magisk.components.BaseFragment;
import com.topjohnwu.magisk.container.Module;
import com.topjohnwu.magisk.utils.Topic;
import com.topjohnwu.magisk.utils.Utils;
import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.Shell;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -11,13 +11,13 @@ import android.view.ViewGroup;
import android.widget.SearchView; import android.widget.SearchView;
import android.widget.TextView; import android.widget.TextView;
import com.topjohnwu.core.Config; import com.topjohnwu.magisk.Config;
import com.topjohnwu.core.container.Module;
import com.topjohnwu.core.tasks.UpdateRepos;
import com.topjohnwu.core.utils.Topic;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.adapters.ReposAdapter; import com.topjohnwu.magisk.adapters.ReposAdapter;
import com.topjohnwu.magisk.components.BaseFragment; import com.topjohnwu.magisk.components.BaseFragment;
import com.topjohnwu.magisk.container.Module;
import com.topjohnwu.magisk.tasks.UpdateRepos;
import com.topjohnwu.magisk.utils.Topic;
import java.util.Map; import java.util.Map;

View File

@ -8,19 +8,19 @@ import android.view.View;
import android.widget.EditText; import android.widget.EditText;
import android.widget.Toast; import android.widget.Toast;
import com.topjohnwu.core.Config;
import com.topjohnwu.core.Const;
import com.topjohnwu.core.tasks.CheckUpdates;
import com.topjohnwu.core.utils.LocaleManager;
import com.topjohnwu.core.utils.Topic;
import com.topjohnwu.core.utils.Utils;
import com.topjohnwu.magisk.BuildConfig; import com.topjohnwu.magisk.BuildConfig;
import com.topjohnwu.magisk.Config;
import com.topjohnwu.magisk.Const;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.components.BasePreferenceFragment; import com.topjohnwu.magisk.components.BasePreferenceFragment;
import com.topjohnwu.magisk.tasks.CheckUpdates;
import com.topjohnwu.magisk.utils.AppUtils; import com.topjohnwu.magisk.utils.AppUtils;
import com.topjohnwu.magisk.utils.DownloadApp; import com.topjohnwu.magisk.utils.DownloadApp;
import com.topjohnwu.magisk.utils.FingerprintHelper; import com.topjohnwu.magisk.utils.FingerprintHelper;
import com.topjohnwu.magisk.utils.LocaleManager;
import com.topjohnwu.magisk.utils.PatchAPK; import com.topjohnwu.magisk.utils.PatchAPK;
import com.topjohnwu.magisk.utils.Topic;
import com.topjohnwu.magisk.utils.Utils;
import com.topjohnwu.net.Networking; import com.topjohnwu.net.Networking;
import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.Shell;

View File

@ -7,10 +7,10 @@ import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.TextView; import android.widget.TextView;
import com.topjohnwu.core.container.Policy;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.adapters.PolicyAdapter; import com.topjohnwu.magisk.adapters.PolicyAdapter;
import com.topjohnwu.magisk.components.BaseFragment; import com.topjohnwu.magisk.components.BaseFragment;
import com.topjohnwu.magisk.container.Policy;
import java.util.List; import java.util.List;

View File

@ -5,10 +5,10 @@ import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.os.AsyncTask; import android.os.AsyncTask;
import com.topjohnwu.core.App; import com.topjohnwu.magisk.App;
import com.topjohnwu.core.Config;
import com.topjohnwu.core.Const;
import com.topjohnwu.magisk.ClassMap; import com.topjohnwu.magisk.ClassMap;
import com.topjohnwu.magisk.Config;
import com.topjohnwu.magisk.Const;
import com.topjohnwu.magisk.SuRequestActivity; import com.topjohnwu.magisk.SuRequestActivity;
import com.topjohnwu.magisk.components.Notifications; import com.topjohnwu.magisk.components.Notifications;
import com.topjohnwu.magisk.utils.DownloadApp; import com.topjohnwu.magisk.utils.DownloadApp;

View File

@ -8,13 +8,13 @@ import android.content.pm.ShortcutManager;
import android.graphics.drawable.Icon; import android.graphics.drawable.Icon;
import android.os.Build; import android.os.Build;
import com.topjohnwu.core.App; import com.topjohnwu.magisk.App;
import com.topjohnwu.core.Config;
import com.topjohnwu.core.Const;
import com.topjohnwu.core.utils.Utils;
import com.topjohnwu.magisk.ClassMap; import com.topjohnwu.magisk.ClassMap;
import com.topjohnwu.magisk.Config;
import com.topjohnwu.magisk.Const;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.SplashActivity; import com.topjohnwu.magisk.SplashActivity;
import com.topjohnwu.magisk.utils.Utils;
import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.Shell;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -9,17 +9,13 @@ import com.google.common.util.concurrent.ListenableFuture;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.UUID; import java.util.UUID;
import java.util.concurrent.Executor;
import androidx.annotation.MainThread; import androidx.annotation.MainThread;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi; import androidx.annotation.RequiresApi;
import androidx.annotation.RestrictTo;
import androidx.work.Data; import androidx.work.Data;
import androidx.work.ListenableWorker; import androidx.work.ListenableWorker;
import androidx.work.WorkerFactory;
import androidx.work.impl.utils.taskexecutor.TaskExecutor;
public abstract class DelegateWorker { public abstract class DelegateWorker {

View File

@ -6,13 +6,13 @@ import android.net.Uri;
import android.os.IBinder; import android.os.IBinder;
import android.widget.Toast; import android.widget.Toast;
import com.topjohnwu.core.Const;
import com.topjohnwu.core.container.Repo;
import com.topjohnwu.core.utils.Utils;
import com.topjohnwu.magisk.ClassMap; import com.topjohnwu.magisk.ClassMap;
import com.topjohnwu.magisk.Const;
import com.topjohnwu.magisk.FlashActivity; import com.topjohnwu.magisk.FlashActivity;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.components.ProgressNotification; import com.topjohnwu.magisk.components.ProgressNotification;
import com.topjohnwu.magisk.container.Repo;
import com.topjohnwu.magisk.utils.Utils;
import com.topjohnwu.net.Networking; import com.topjohnwu.net.Networking;
import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.Shell;
import com.topjohnwu.superuser.ShellUtils; import com.topjohnwu.superuser.ShellUtils;

View File

@ -1,9 +1,9 @@
package com.topjohnwu.magisk.services; package com.topjohnwu.magisk.services;
import com.topjohnwu.core.Config;
import com.topjohnwu.core.tasks.CheckUpdates;
import com.topjohnwu.magisk.BuildConfig; import com.topjohnwu.magisk.BuildConfig;
import com.topjohnwu.magisk.Config;
import com.topjohnwu.magisk.components.Notifications; import com.topjohnwu.magisk.components.Notifications;
import com.topjohnwu.magisk.tasks.CheckUpdates;
import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.Shell;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;

View File

@ -5,10 +5,9 @@ import android.content.Intent;
import android.net.Uri; import android.net.Uri;
import android.widget.Toast; import android.widget.Toast;
import com.topjohnwu.core.Config;
import com.topjohnwu.core.Const;
import com.topjohnwu.core.utils.Utils;
import com.topjohnwu.magisk.ClassMap; import com.topjohnwu.magisk.ClassMap;
import com.topjohnwu.magisk.Config;
import com.topjohnwu.magisk.Const;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.services.UpdateCheckService; import com.topjohnwu.magisk.services.UpdateCheckService;

View File

@ -2,11 +2,9 @@ package com.topjohnwu.magisk.utils;
import android.os.AsyncTask; import android.os.AsyncTask;
import com.topjohnwu.core.App; import com.topjohnwu.magisk.App;
import com.topjohnwu.core.Config;
import com.topjohnwu.core.utils.RootUtils;
import com.topjohnwu.core.utils.Utils;
import com.topjohnwu.magisk.BuildConfig; import com.topjohnwu.magisk.BuildConfig;
import com.topjohnwu.magisk.Config;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.components.ProgressNotification; import com.topjohnwu.magisk.components.ProgressNotification;
import com.topjohnwu.net.Networking; import com.topjohnwu.net.Networking;

View File

@ -16,10 +16,9 @@ import android.security.keystore.KeyProperties;
import android.view.Gravity; import android.view.Gravity;
import android.widget.Toast; import android.widget.Toast;
import com.topjohnwu.core.App; import com.topjohnwu.magisk.App;
import com.topjohnwu.core.Config; import com.topjohnwu.magisk.Config;
import com.topjohnwu.core.Const; import com.topjohnwu.magisk.Const;
import com.topjohnwu.core.utils.Utils;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.components.CustomAlertDialog; import com.topjohnwu.magisk.components.CustomAlertDialog;

View File

@ -3,17 +3,15 @@ package com.topjohnwu.magisk.utils;
import android.os.AsyncTask; import android.os.AsyncTask;
import android.widget.Toast; import android.widget.Toast;
import com.topjohnwu.core.App; import com.topjohnwu.magisk.App;
import com.topjohnwu.core.Config;
import com.topjohnwu.core.Const;
import com.topjohnwu.core.utils.RootUtils;
import com.topjohnwu.core.utils.Utils;
import com.topjohnwu.magisk.BuildConfig; import com.topjohnwu.magisk.BuildConfig;
import com.topjohnwu.magisk.Config;
import com.topjohnwu.magisk.Const;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.components.Notifications; import com.topjohnwu.magisk.components.Notifications;
import com.topjohnwu.signing.JarMap;
import com.topjohnwu.signing.SignAPK;
import com.topjohnwu.superuser.ShellUtils; import com.topjohnwu.superuser.ShellUtils;
import com.topjohnwu.utils.JarMap;
import com.topjohnwu.utils.SignAPK;
import java.io.BufferedOutputStream; import java.io.BufferedOutputStream;
import java.io.File; import java.io.File;

View File

@ -9,12 +9,11 @@ import android.os.Process;
import android.text.TextUtils; import android.text.TextUtils;
import android.widget.Toast; import android.widget.Toast;
import com.topjohnwu.core.App; import com.topjohnwu.magisk.App;
import com.topjohnwu.core.Config; import com.topjohnwu.magisk.Config;
import com.topjohnwu.core.container.Policy;
import com.topjohnwu.core.container.SuLogEntry;
import com.topjohnwu.core.utils.Utils;
import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.R;
import com.topjohnwu.magisk.container.Policy;
import com.topjohnwu.magisk.container.SuLogEntry;
import java.io.BufferedInputStream; import java.io.BufferedInputStream;
import java.io.BufferedOutputStream; import java.io.BufferedOutputStream;

View File

@ -89,7 +89,7 @@ def zip_with_msg(zipfile, source, target):
def collect_binary(): def collect_binary():
for arch in archs: for arch in archs:
mkdir_p(os.path.join('native', 'out', arch)) mkdir_p(os.path.join('native', 'out', arch))
for bin in ['magisk', 'magiskinit', 'magiskboot', 'busybox', 'b64xz']: for bin in ['magisk', 'magiskinit', 'magiskboot', 'busybox']:
source = os.path.join('native', 'libs', arch, bin) source = os.path.join('native', 'libs', arch, bin)
target = os.path.join('native', 'out', arch, bin) target = os.path.join('native', 'out', arch, bin)
mv(source, target) mv(source, target)
@ -105,11 +105,11 @@ def xz(data):
def sign_zip(unsigned, output, release): def sign_zip(unsigned, output, release):
signer_name = 'zipsigner-3.0.jar' signer_name = 'zipsigner-3.0.jar'
zipsigner = os.path.join('utils', 'build', 'libs', signer_name) zipsigner = os.path.join('signing', 'build', 'libs', signer_name)
if not os.path.exists(zipsigner): if not os.path.exists(zipsigner):
header('* Building ' + signer_name) header('* Building ' + signer_name)
proc = execv([gradlew, 'utils:shadowJar']) proc = execv([gradlew, 'signing:shadowJar'])
if proc.returncode != 0: if proc.returncode != 0:
error(f'Build {signer_name} failed!') error(f'Build {signer_name} failed!')
@ -236,7 +236,7 @@ def build_apk(args, flavor):
def build_app(args): def build_app(args):
source = os.path.join('scripts', 'util_functions.sh') source = os.path.join('scripts', 'util_functions.sh')
target = os.path.join('core', 'src', 'main', 'res', 'raw', 'util_functions.sh') target = os.path.join('app-core', 'src', 'main', 'res', 'raw', 'util_functions.sh')
cp(source, target) cp(source, target)
build_apk(args, 'Full') build_apk(args, 'Full')
@ -379,7 +379,7 @@ def cleanup(args):
if 'java' in args.target: if 'java' in args.target:
header('* Cleaning java') header('* Cleaning java')
execv([gradlew, 'app:clean', 'snet:clean', 'utils:clean']) execv([gradlew, 'app:clean', 'app-core:clean', 'snet:clean', 'signing:clean'])
def build_all(args): def build_all(args):
vars(args)['target'] = [] vars(args)['target'] = []

View File

@ -1 +1 @@
<manifest package="com.topjohnwu.core.magisk" /> <manifest package="com.topjohnwu.magisk.binary" />

View File

@ -1 +1 @@
include ':app', ':native', ':utils', ':snet', ':net', ':core' include ':app', ':app-core', ':net', ':signing', ':native', ':snet'

View File

@ -8,7 +8,7 @@ targetCompatibility = "1.8"
jar { jar {
manifest { manifest {
attributes 'Main-Class': 'com.topjohnwu.utils.ZipSigner' attributes 'Main-Class': 'com.topjohnwu.signing.ZipSigner'
} }
} }

View File

@ -1,6 +1,4 @@
package com.topjohnwu.core.utils; package com.topjohnwu.signing;
import com.topjohnwu.utils.SignBoot;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.InputStream; import java.io.InputStream;

View File

@ -1,4 +1,4 @@
package com.topjohnwu.utils; package com.topjohnwu.signing;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;

View File

@ -1,4 +1,4 @@
package com.topjohnwu.utils; package com.topjohnwu.signing;
import org.bouncycastle.asn1.ASN1InputStream; import org.bouncycastle.asn1.ASN1InputStream;
import org.bouncycastle.asn1.ASN1ObjectIdentifier; import org.bouncycastle.asn1.ASN1ObjectIdentifier;

View File

@ -1,4 +1,4 @@
package com.topjohnwu.utils; package com.topjohnwu.signing;
import java.io.Closeable; import java.io.Closeable;
import java.io.File; import java.io.File;

View File

@ -1,4 +1,4 @@
package com.topjohnwu.utils; package com.topjohnwu.signing;
import org.bouncycastle.asn1.ASN1InputStream; import org.bouncycastle.asn1.ASN1InputStream;
import org.bouncycastle.asn1.ASN1ObjectIdentifier; import org.bouncycastle.asn1.ASN1ObjectIdentifier;

View File

@ -1,4 +1,4 @@
package com.topjohnwu.utils; package com.topjohnwu.signing;
import org.bouncycastle.asn1.ASN1Encodable; import org.bouncycastle.asn1.ASN1Encodable;
import org.bouncycastle.asn1.ASN1EncodableVector; import org.bouncycastle.asn1.ASN1EncodableVector;

View File

@ -1,4 +1,4 @@
package com.topjohnwu.utils; package com.topjohnwu.signing;
import java.io.File; import java.io.File;
import java.io.FileOutputStream; import java.io.FileOutputStream;

View File

@ -1,4 +1,4 @@
package com.topjohnwu.utils; package com.topjohnwu.signing;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.FileOutputStream; import java.io.FileOutputStream;

View File

@ -2,10 +2,10 @@ apply plugin: 'com.android.application'
android { android {
defaultConfig { defaultConfig {
applicationId "com.topjohnwu.snet" applicationId 'com.topjohnwu.snet'
minSdkVersion 14 minSdkVersion 14
versionCode 12 versionCode 12
versionName "snet" versionName 'snet'
} }
buildTypes { buildTypes {