From fe837fd8627d062fb87e1653b1fa0724e6f13e5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=80=E6=BC=93=E4=B8=A8Sevtinge?= Date: Sat, 28 Oct 2023 05:05:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/SystemFrameworkForCorePatch.java | 8 +- .../hyperceiler/module/base/BaseHook.java | 5 +- .../module/hook/browser/DebugMode.kt | 6 +- .../module/hook/camera/EnableLabOptions.kt | 2 +- .../module/hook/camera/UnlockCvlens.java | 2 +- .../module/hook/clock/EnableHourGlass.java | 4 +- .../UseThirdPartyBrowser.java | 6 +- .../module/hook/downloads/FuckXlDownload.java | 4 +- .../guardprovider/DisableUploadAppList.java | 24 +++--- .../module/hook/home/ScreenSwipe.java | 2 +- .../module/hook/home/SeekPoints.java | 4 +- .../home/StickyFloatingWindowsForHome.java | 2 +- .../home/folder/BigFolderItemMaxCount.java | 4 +- .../module/hook/home/folder/FolderBlur.kt | 2 +- .../home/other/BlurWhenShowShortcutMenu.kt | 10 +-- .../hook/home/other/ShortcutBackgroundBlur.kt | 4 +- .../module/hook/home/title/FixAnimation.java | 2 +- .../module/hook/home/title/IconScaleHook.java | 2 +- .../module/hook/incallui/HideCrbt.java | 2 +- .../module/hook/lbe/DisableClipboardTip.kt | 2 +- .../module/hook/mishare/NoAutoTurnOff.kt | 10 +-- .../hyperceiler/module/hook/mms/DisableAd.kt | 2 +- .../packageinstaller/DisplayMoreApkInfo.java | 2 +- .../packageinstaller/DisplayMoreApkInfoNew.kt | 2 +- .../hook/personalassistant/WidgetCrack.kt | 2 +- .../hook/screenshot/UnlockPrivacyMarking.kt | 2 +- .../hook/securitycenter/BlurSecurity.kt | 10 +-- .../hook/securitycenter/GetBubbleAppString.kt | 2 +- .../hook/securitycenter/SidebarLineCustom.kt | 6 +- .../hook/securitycenter/VideoDolbyOpen.java | 2 +- .../securitycenter/app/AppDefaultSort.java | 2 +- .../hook/securitycenter/app/AppDetails.java | 6 +- .../hook/securitycenter/app/AppRestrict.java | 2 +- .../securitycenter/beauty/BeautyLightAuto.kt | 2 +- .../securitycenter/lab/AiClipboardEnable.kt | 2 +- .../securitycenter/lab/BlurLocationEnable.kt | 2 +- .../securitycenter/lab/GetNumberEnable.kt | 2 +- .../sidebar/AddSideBarExpandReceiver.java | 4 +- .../hook/settings/HyperCeilerSettings.java | 2 + .../VolumeSeparateControlForSettings.java | 4 +- .../hook/systemframework/AllowUninstall.java | 14 ++-- .../hook/systemframework/AppLinkVerify.java | 2 +- .../systemframework/BackgroundBlurDrawable.kt | 5 +- .../hook/systemframework/CleanOpenMenu.java | 2 +- .../hook/systemframework/CleanShareMenu.java | 2 +- .../hook/systemframework/FlagSecure.java | 2 +- .../systemframework/LocationSimulation.java | 14 ++-- .../systemframework/MultiFreeFormSupported.kt | 4 +- .../systemframework/PackagePermissions.java | 2 +- .../RemoveSmallWindowRestrictions.kt | 18 ++--- .../StickyFloatingWindows.java | 2 +- .../systemframework/ThermalBrightness.java | 10 +-- .../corepatch/BypassSignCheckForT.kt | 2 +- .../hook/systemui/ChargeAnimationStyle.java | 2 +- .../module/hook/systemui/EnableVolumeBlur.kt | 8 +- .../hook/systemui/HideNavigationBar.java | 6 +- .../hook/systemui/MonetThemeOverlay.java | 2 +- .../hook/systemui/StatusBarActions.java | 2 +- .../AddBlurEffectToNotificationView.kt | 4 +- .../controlcenter/FixMediaControlPanel.kt | 2 +- .../systemui/controlcenter/FlashLight.java | 44 +++++------ .../hook/systemui/controlcenter/GmsTile.java | 10 +-- .../controlcenter/NotificationWeatherOld.kt | 2 +- .../QSControlDetailBackgroundAlpha.kt | 8 +- .../systemui/controlcenter/SunlightMode.java | 8 +- .../systemui/navigation/HandleLineCustom.kt | 6 +- .../systemui/navigation/NavigationCustom.java | 8 +- .../statusbar/DisplayHardwareDetail.java | 6 +- .../SelectiveHideIconForAlarmClock.java | 6 +- .../statusbar/icon/all/BatteryStyle.kt | 2 +- .../statusbar/model/MobileTypeSingleHook.kt | 2 +- .../statusbar/network/NetworkSpeed.kt | 6 +- .../statusbar/network/NetworkSpeedStyle.kt | 6 +- .../hook/thememanager/DisableThemeAdNew.kt | 2 +- .../module/hook/thememanager/ThemeCrackNew.kt | 8 +- .../module/hook/updater/DeviceModify.kt | 2 +- .../module/hook/various/DialogCustom.java | 8 +- .../module/hook/various/DialogGravity.java | 10 ++- .../hook/various/NoAccessDeviceLogsRequest.kt | 6 +- .../hook/voiceassist/UseThirdPartyBrowser.kt | 8 +- .../module/hook/weather/SetDeviceLevel.java | 2 +- .../sevtinge/hyperceiler/utils/ColorUtils.kt | 2 +- .../sevtinge/hyperceiler/utils/HookUtils.kt | 11 --- .../hyperceiler/utils/PropertyUtils.kt | 2 +- .../sevtinge/hyperceiler/utils/TileUtils.java | 30 ++++---- .../hyperceiler/utils/log/XposedLogUtils.java | 76 ++++++++++++++----- 86 files changed, 287 insertions(+), 264 deletions(-) diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemFrameworkForCorePatch.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemFrameworkForCorePatch.java index 7bae8f1393..038fffdaf4 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemFrameworkForCorePatch.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/SystemFrameworkForCorePatch.java @@ -18,7 +18,7 @@ public class SystemFrameworkForCorePatch implements IXposedHookLoadPackage, IXpo @Override public void handleLoadPackage(XC_LoadPackage.LoadPackageParam lpparam) throws Throwable { if (("android".equals(lpparam.packageName)) && (lpparam.processName.equals("android"))) { - XposedLogUtils.logI(TAG, "Current sdk version " + Build.VERSION.SDK_INT); + XposedLogUtils.logI(TAG, "android", "Current sdk version " + Build.VERSION.SDK_INT); switch (Build.VERSION.SDK_INT) { case Build.VERSION_CODES.UPSIDE_DOWN_CAKE -> // 34 new CorePatchForU().handleLoadPackage(lpparam); @@ -30,7 +30,7 @@ public void handleLoadPackage(XC_LoadPackage.LoadPackageParam lpparam) throws Th new CorePatchForS().handleLoadPackage(lpparam); case Build.VERSION_CODES.R -> // 30 new CorePatchForR().handleLoadPackage(lpparam); - default -> XposedLogUtils.logW(TAG, "Unsupported Version of Android " + Build.VERSION.SDK_INT); + default -> XposedLogUtils.logW(TAG, "android","Unsupported Version of Android " + Build.VERSION.SDK_INT); } } } @@ -38,7 +38,7 @@ public void handleLoadPackage(XC_LoadPackage.LoadPackageParam lpparam) throws Th @Override public void initZygote(StartupParam startupParam) throws Throwable { if (startupParam.startsSystemServer) { - XposedLogUtils.logI(TAG, "Current sdk version " + Build.VERSION.SDK_INT); + XposedLogUtils.logI(TAG, "android", "Current sdk version " + Build.VERSION.SDK_INT); switch (Build.VERSION.SDK_INT) { case Build.VERSION_CODES.UPSIDE_DOWN_CAKE -> // 34 new CorePatchForU().initZygote(startupParam); @@ -50,7 +50,7 @@ public void initZygote(StartupParam startupParam) throws Throwable { new CorePatchForS().initZygote(startupParam); case Build.VERSION_CODES.R -> // 30 new CorePatchForR().initZygote(startupParam); - default -> XposedLogUtils.logW(TAG, "Unsupported Version of Android " + Build.VERSION.SDK_INT); + default -> XposedLogUtils.logW(TAG, "android","Unsupported Version of Android " + Build.VERSION.SDK_INT); } } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/base/BaseHook.java b/app/src/main/java/com/sevtinge/hyperceiler/module/base/BaseHook.java index 86069aced2..97674ce234 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/base/BaseHook.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/base/BaseHook.java @@ -7,7 +7,6 @@ import com.sevtinge.hyperceiler.utils.PrefsMap; import com.sevtinge.hyperceiler.utils.ResourcesHook; import com.sevtinge.hyperceiler.utils.log.XposedLogUtils; -import com.sevtinge.hyperceiler.utils.log.XposedLogUtils.*; import java.lang.reflect.Field; import java.lang.reflect.Method; @@ -36,10 +35,10 @@ public void onCreate(LoadPackageParam lpparam) { setLoadPackageParam(lpparam); init(); if (detailLog && isNotReleaseVersion) { - XposedLogUtils.logI(TAG, "Hook Success."); + XposedLogUtils.logI(TAG, lpparam.packageName, "Hook Success."); } } catch (Throwable t) { - XposedLogUtils.logE(TAG, "Hook Failed", t); + XposedLogUtils.logE(TAG, lpparam.packageName, "Hook Failed", t); } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/browser/DebugMode.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/browser/DebugMode.kt index 7934bb1e3b..f7003c225e 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/browser/DebugMode.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/browser/DebugMode.kt @@ -69,7 +69,7 @@ object DebugMode : BaseHook() { }.forEach { val debugMode = it.getMethodInstance(lpparam.classLoader) if (debugMode.toString().contains("getDebugMode")) { - XposedLogUtils.logI("DebugMode method is $debugMode") + XposedLogUtils.logI(TAG, this.lpparam.packageName, "DebugMode method is $debugMode") found = true XposedBridge.hookMethod( debugMode, @@ -87,7 +87,7 @@ object DebugMode : BaseHook() { }.forEach { val debugMode1 = it.getMethodInstance(safeClassLoader) if (debugMode1.toString().contains("getDebugMode")) { - XposedLogUtils.logI("DebugMode1 method is $debugMode1") + XposedLogUtils.logI(TAG, this.lpparam.packageName, "DebugMode1 method is $debugMode1") found = true XposedBridge.hookMethod( debugMode1, @@ -106,7 +106,7 @@ object DebugMode : BaseHook() { }.forEach { val debugMode2 = it.getMethodInstance(lpparam.classLoader) if (debugMode2.toString().contains("getDebugMode")) { - XposedLogUtils.logI("DebugMode2 method is $debugMode2") + XposedLogUtils.logI(TAG, this.lpparam.packageName, "DebugMode2 method is $debugMode2") found = true XposedBridge.hookMethod( debugMode2, diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/camera/EnableLabOptions.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/camera/EnableLabOptions.kt index 84b7890184..a6db5aa0e6 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/camera/EnableLabOptions.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/camera/EnableLabOptions.kt @@ -13,7 +13,7 @@ object EnableLabOptions : BaseHook() { if (it.args[0] == "camera.lab.options") it.result = true } } catch (e: Exception) { - XposedLogUtils.logE(TAG, e) + XposedLogUtils.logE(TAG, this.lpparam.packageName, e) } } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/camera/UnlockCvlens.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/camera/UnlockCvlens.java index 0572556f85..6639b70528 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/camera/UnlockCvlens.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/camera/UnlockCvlens.java @@ -32,7 +32,7 @@ protected void before(MethodHookParam param) { } }); } catch (Exception e) { - XposedLogUtils.logI("try to hook CvLensVersion failed!\n" + e); + XposedLogUtils.logE(TAG, this.lpparam.packageName, "try to hook CvLensVersion failed" + e); throw new RuntimeException(e); } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/clock/EnableHourGlass.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/clock/EnableHourGlass.java index 528e895450..aa6e433ee2 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/clock/EnableHourGlass.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/clock/EnableHourGlass.java @@ -15,8 +15,8 @@ protected void before(MethodHookParam param) { if (appVersionCode <= 130206400) { param.setResult(true); } else { - XposedLogUtils.logI("Your clock versionCode is " + appVersionCode); - XposedLogUtils.logI("Please revert to a supported version yourself"); + XposedLogUtils.logI(TAG, EnableHourGlass.this.lpparam.packageName, "Your clock versionCode is " + appVersionCode); + XposedLogUtils.logI(TAG, EnableHourGlass.this.lpparam.packageName, "Please revert to a supported version yourself"); } } }); diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/contentextension/UseThirdPartyBrowser.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/contentextension/UseThirdPartyBrowser.java index 63d893276c..5f989ba336 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/contentextension/UseThirdPartyBrowser.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/contentextension/UseThirdPartyBrowser.java @@ -24,7 +24,7 @@ public void init() { XposedHelpers.findAndHookMethod(clazz, "getIntentWithBrowser", String.class, new XC_MethodReplacement() { @Override protected Object replaceHookedMethod(XC_MethodHook.MethodHookParam param) throws Throwable { - XposedLogUtils.logI("com.miui.contentextension hooked url " + param.args[0].toString()); + XposedLogUtils.logI(TAG, UseThirdPartyBrowser.this.lpparam.packageName, "hooked url " + param.args[0].toString()); Uri uri = Uri.parse(param.args[0].toString()); Intent intent = new Intent(); intent.setAction("android.intent.action.VIEW"); @@ -36,7 +36,7 @@ protected Object replaceHookedMethod(XC_MethodHook.MethodHookParam param) throws XposedHelpers.findAndHookMethod(clazz, "openGlobalSearch", Context.class, String.class, String.class, new XC_MethodReplacement() { @Override protected Object replaceHookedMethod(MethodHookParam param) throws Throwable { - XposedLogUtils.logI("com.miui.contentextension hooked all-search on, word is " + param.args[1].toString() + ", from " + param.args[2].toString()); + XposedLogUtils.logI(TAG, UseThirdPartyBrowser.this.lpparam.packageName, "hooked all-search on, word is " + param.args[1].toString() + ", from " + param.args[2].toString()); try { Intent intent = new Intent(); intent.setAction(Intent.ACTION_WEB_SEARCH); @@ -44,7 +44,7 @@ protected Object replaceHookedMethod(MethodHookParam param) throws Throwable { intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); ((Context) param.args[0]).startActivity(intent); } catch (Exception e) { - XposedLogUtils.logE(TAG, e); + XposedLogUtils.logE(TAG, UseThirdPartyBrowser.this.lpparam.packageName, e); } return null; } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/downloads/FuckXlDownload.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/downloads/FuckXlDownload.java index d46710f1a3..6949bc22ee 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/downloads/FuckXlDownload.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/downloads/FuckXlDownload.java @@ -18,13 +18,13 @@ public class FuckXlDownload extends BaseHook { @Override public void init() { if (!TARGET_PACKAGE.equals(lpparam.packageName)) return; - XposedLogUtils.logI("Target path = " + TARGET_PATH); + XposedLogUtils.logI(TAG, this.lpparam.packageName, "Target path = " + TARGET_PATH); XposedHelpers.findAndHookMethod(File.class, "mkdirs", new XC_MethodHook() { @Override protected void beforeHookedMethod(MethodHookParam param) { final boolean isXlDownload = ((File) param.thisObject).getAbsoluteFile().equals(TARGET_PATH); if (isXlDownload) { - XposedLogUtils.logI("blocked"); + XposedLogUtils.logI(TAG, FuckXlDownload.this.lpparam.packageName, "blocked"); param.setThrowable(new FileNotFoundException("blocked")); } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/guardprovider/DisableUploadAppList.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/guardprovider/DisableUploadAppList.java index eae9f2f465..131a115b28 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/guardprovider/DisableUploadAppList.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/guardprovider/DisableUploadAppList.java @@ -19,7 +19,7 @@ public class DisableUploadAppList extends BaseHook { @Override public void init(/*final XC_LoadPackage.LoadPackageParam lpparam*/) { if (lpparam.packageName.equals("com.miui.guardprovider")) { - XposedLogUtils.logI("Start to hook package " + lpparam.packageName); + XposedLogUtils.logI(TAG, this.lpparam.packageName, "Start to hook package " + lpparam.packageName); // Debug mode flag process final Class guardApplication = XposedHelpers.findClass("com.miui.guardprovider.GuardApplication", lpparam.classLoader); @@ -28,21 +28,21 @@ public void init(/*final XC_LoadPackage.LoadPackageParam lpparam*/) { for (Field field : guardApplicationFields) { if (field.getName().equals("c")) { XposedHelpers.setStaticBooleanField(guardApplication, "c", true); - XposedLogUtils.logI("Info: GuardProvider will work as debug mode!"); + XposedLogUtils.logI(TAG, this.lpparam.packageName, "GuardProvider will work as debug mode!"); } - XposedLogUtils.logI("Warning: GuardProvider debug mode flag not found!"); + XposedLogUtils.logW(TAG, this.lpparam.packageName, "GuardProvider debug mode flag not found!"); } } else { - XposedLogUtils.logI("Warning: GuardApplication class not found. GuardProvider will not work as debug mode! "); + XposedLogUtils.logW(TAG, this.lpparam.packageName, "GuardApplication class not found. GuardProvider will not work as debug mode! "); } // Prevent miui from uploading app list final Class antiDefraudAppManager = XposedHelpers.findClassIfExists("com.miui.guardprovider.engine.mi.antidefraud.AntiDefraudAppManager", lpparam.classLoader); if (antiDefraudAppManager == null) { - XposedLogUtils.logI("Skip: AntiDefraudAppManager class not found."); + XposedLogUtils.logI(TAG, this.lpparam.packageName, "Skip: AntiDefraudAppManager class not found."); return; } else { - XposedLogUtils.logI("Info: AntiDefraudAppManager class found."); + XposedLogUtils.logI(TAG, this.lpparam.packageName, "AntiDefraudAppManager class found."); } final Method[] methods = antiDefraudAppManager.getDeclaredMethods(); @@ -54,10 +54,10 @@ public void init(/*final XC_LoadPackage.LoadPackageParam lpparam*/) { } } if (getAllUnSystemAppsStatus == null) { - XposedLogUtils.logI("Skip: getAllUnSystemAppsStatus method not found."); + XposedLogUtils.logI(TAG, this.lpparam.packageName, "Skip: getAllUnSystemAppsStatus method not found."); return; } else { - XposedLogUtils.logI("Info: getAllUnSystemAppsStatus method found."); + XposedLogUtils.logI(TAG, this.lpparam.packageName, "getAllUnSystemAppsStatus method found."); } XposedBridge.hookMethod(getAllUnSystemAppsStatus, new XC_MethodHook() { @@ -73,7 +73,7 @@ protected void beforeHookedMethod(MethodHookParam methodHookParam) throws Throwa } } if (MIUI_VERSION == null) { - XposedLogUtils.logI("Warning: Can't get MIUI_VERSION."); + XposedLogUtils.logW(TAG, DisableUploadAppList.this.lpparam.packageName, "Can't get MIUI_VERSION."); } String uuid = null; @@ -91,10 +91,10 @@ protected void beforeHookedMethod(MethodHookParam methodHookParam) throws Throwa getUUID.setAccessible(true); uuid = (String) getUUID.invoke(methodHookParam); } else { - XposedLogUtils.logI("Warning: getUUID method not found."); + XposedLogUtils.logW(TAG, DisableUploadAppList.this.lpparam.packageName, "getUUID method not found."); } } else { - XposedLogUtils.logI("Warning: uuidHelper class not found."); + XposedLogUtils.logW(TAG, DisableUploadAppList.this.lpparam.packageName, "uuidHelper class not found."); } JSONObject jSONObject = new JSONObject(); @@ -137,7 +137,7 @@ protected void beforeHookedMethod(MethodHookParam methodHookParam) throws Throwa } jSONObject.put("content", jSONArray); - XposedLogUtils.logI("Info: Intercept=" + jSONObject.toString()); + XposedLogUtils.logI(TAG, DisableUploadAppList.this.lpparam.packageName, "Info: Intercept=" + jSONObject.toString()); methodHookParam.setResult(null); } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/ScreenSwipe.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/ScreenSwipe.java index 84651184c1..bf3d121493 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/ScreenSwipe.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/ScreenSwipe.java @@ -144,6 +144,6 @@ protected void before(final MethodHookParam param) { param.setResult(false); } })) if (lpparam.packageName.equals("com.miui.home")) - XposedLogUtils.logI(TAG, "Cannot disable swipe up search"); + XposedLogUtils.logI(TAG, this.lpparam.packageName, "Cannot disable swipe up search"); } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/SeekPoints.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/SeekPoints.java index fc6dbc143a..62639af308 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/SeekPoints.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/SeekPoints.java @@ -50,7 +50,7 @@ private void showSeekBar(View workspace) { boolean isInEditingMode = (boolean) XposedHelpers.callMethod(workspace, "isInNormalEditingMode"); View mScreenSeekBar = (View) XposedHelpers.getObjectField(workspace, "mScreenSeekBar"); if (mScreenSeekBar == null) { - XposedLogUtils.logI("showSeekBar", "HideSeekPointsHook Cannot find seekbar"); + XposedLogUtils.logI(TAG, this.lpparam.packageName, "showSeekBar HideSeekPointsHook Cannot find seekbar"); return; } Context mContext = workspace.getContext(); @@ -72,7 +72,7 @@ public void run() { XposedHelpers.setAdditionalInstanceField(workspace, "mHandlerEx", mHandler); } if (mHandler == null) { - XposedLogUtils.logI("showSeekBar", "HideSeekPointsHook Cannot create handler"); + XposedLogUtils.logI(TAG, this.lpparam.packageName, "showSeekBar HideSeekPointsHook Cannot create handler"); return; } if (mHandler.hasMessages(666)) mHandler.removeMessages(666); diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/StickyFloatingWindowsForHome.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/StickyFloatingWindowsForHome.java index df8337fcd1..a755cc085d 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/StickyFloatingWindowsForHome.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/StickyFloatingWindowsForHome.java @@ -29,7 +29,7 @@ public void onReceive(Context context, Intent intent) { XposedHelpers.callMethod(param.thisObject, "dismissRecentsToLaunchTargetTaskOrHome", pkgName, true); } } catch (Throwable t) { - XposedLogUtils.logW(TAG, t); + XposedLogUtils.logW(TAG, StickyFloatingWindowsForHome.this.lpparam.packageName, t); } } }, new IntentFilter(ACTION_PREFIX + "dismissRecentsWhenFreeWindowOpen")); diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/folder/BigFolderItemMaxCount.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/folder/BigFolderItemMaxCount.java index 83c590325f..f4a2a003b1 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/folder/BigFolderItemMaxCount.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/folder/BigFolderItemMaxCount.java @@ -26,7 +26,7 @@ public void init() { protected void before(MethodHookParam param) throws Throwable { mRealPvChildCount = (int) XposedHelpers.callMethod(param.thisObject, "getMRealPvChildCount"); - XposedLogUtils.logI(TAG, "getMRealPvChildCount1:" + mRealPvChildCount); + XposedLogUtils.logI(TAG, BigFolderItemMaxCount.this.lpparam.packageName, "getMRealPvChildCount1:" + mRealPvChildCount); if (mRealPvChildCount < 10) { XposedHelpers.callMethod(param.thisObject, "setMItemsMaxCount", 9); @@ -43,7 +43,7 @@ protected void before(MethodHookParam param) throws Throwable { protected void before(MethodHookParam param) throws Throwable { mRealPvChildCount = (int) XposedHelpers.callMethod(param.thisObject, "getMRealPvChildCount"); - XposedLogUtils.logI(TAG, "getMRealPvChildCount1:" + mRealPvChildCount); + XposedLogUtils.logI(TAG, BigFolderItemMaxCount.this.lpparam.packageName, "getMRealPvChildCount1:" + mRealPvChildCount); if (mRealPvChildCount < 5) { XposedHelpers.callMethod(param.thisObject, "setMItemsMaxCount", 4); diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/folder/FolderBlur.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/folder/FolderBlur.kt index 1bb4d81464..99095269de 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/folder/FolderBlur.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/folder/FolderBlur.kt @@ -29,7 +29,7 @@ object FolderBlur : BaseHook() { it.result = null } } catch (e: Exception) { - XposedLogUtils.logE(TAG, e) + XposedLogUtils.logE(TAG, this.lpparam.packageName, e) } var isShouldBlur = false diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/other/BlurWhenShowShortcutMenu.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/other/BlurWhenShowShortcutMenu.kt index d3a5aaba93..c7d8b12eda 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/other/BlurWhenShowShortcutMenu.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/other/BlurWhenShowShortcutMenu.kt @@ -224,7 +224,7 @@ object BlurWhenShowShortcutMenu : BaseHook() { valueAnimator.start() if (editStateChangeReason != null) { - XposedLogUtils.logI(editStateChangeReason.toString()) + XposedLogUtils.logI(TAG, this@BlurWhenShowShortcutMenu.lpparam.packageName, editStateChangeReason.toString()) } else { isShortcutMenuLayerBlurred = false XposedHelpers.callMethod(dragView, "remove") @@ -286,7 +286,7 @@ object BlurWhenShowShortcutMenu : BaseHook() { } } } catch (e: Exception) { - XposedLogUtils.logI("BlurWhenShowShortcutMenu get mAppShortcutMenu failed by: $e") + XposedLogUtils.logE(TAG, this@BlurWhenShowShortcutMenu.lpparam.packageName, "BlurWhenShowShortcutMenu get mAppShortcutMenu failed by: $e") } try { mSystemShortcutMenu = param.thisObject.getObjectField("mSystemShortcutMenu") as ViewGroup @@ -303,7 +303,7 @@ object BlurWhenShowShortcutMenu : BaseHook() { } } } catch (e: Exception) { - XposedLogUtils.logI("BlurWhenShowShortcutMenu get mSystemShortcutMenu failed by: $e") + XposedLogUtils.logE(TAG, this@BlurWhenShowShortcutMenu.lpparam.packageName, "BlurWhenShowShortcutMenu get mSystemShortcutMenu failed by: $e") } try { mAppPersonaliseShortcutMenu = @@ -321,7 +321,7 @@ object BlurWhenShowShortcutMenu : BaseHook() { } } } catch (e: Exception) { - XposedLogUtils.logI("BlurWhenShowShortcutMenu get mAppPersonaliseShortcutMenu failed by: $e") + XposedLogUtils.logE(TAG, this@BlurWhenShowShortcutMenu.lpparam.packageName, "BlurWhenShowShortcutMenu get mAppPersonaliseShortcutMenu failed by: $e") } try { mFolderShortcutMenu = param.thisObject.getObjectField("mFolderShortcutMenu") as ViewGroup @@ -338,7 +338,7 @@ object BlurWhenShowShortcutMenu : BaseHook() { } } } catch (e: Exception) { - XposedLogUtils.logI("BlurWhenShowShortcutMenu get mFolderShortcutMenu failed by: $e") + XposedLogUtils.logE(TAG, this@BlurWhenShowShortcutMenu.lpparam.packageName, "BlurWhenShowShortcutMenu get mFolderShortcutMenu failed by: $e") } /*try { mWidgetShortcutMenu = param.thisObject.getObjectField("mWidgetShortcutMenu") as ViewGroup diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/other/ShortcutBackgroundBlur.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/other/ShortcutBackgroundBlur.kt index c6765ed8b0..2ff8a813f6 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/other/ShortcutBackgroundBlur.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/other/ShortcutBackgroundBlur.kt @@ -49,8 +49,8 @@ object ShortcutBackgroundBlur : BaseHook() { 将改公式转换为x=f(y):x=1-√(1-y) */ val singleLayerAlpha = ((1.0 - sqrt(1.0 - (shortcutMenuBackgroundAlpha / 255.0))) * 255.0).toInt() - XposedLogUtils.logI("" + shortcutMenuBackgroundAlpha) - XposedLogUtils.logI("" + singleLayerAlpha) + XposedLogUtils.logI(TAG, this.lpparam.packageName, "shortcutMenuBackgroundAlpha = $shortcutMenuBackgroundAlpha") + XposedLogUtils.logI(TAG, this.lpparam.packageName, "singleLayerAlpha = $singleLayerAlpha") val mBlurIconAppName = arrayOf("锁屏", "手电筒", "数据", "飞行模式", "蓝牙", "WLAN 热点") val allBlurredDrawable: MutableList = ArrayList() diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/title/FixAnimation.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/title/FixAnimation.java index ec0767cf2f..a7018a12d3 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/title/FixAnimation.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/title/FixAnimation.java @@ -50,7 +50,7 @@ protected void after(MethodHookParam param) { Object obj = param.args[0]; Intrinsics.checkNotNull(obj, "null cannot be cast to non-null type android.view.MotionEvent"); MotionEvent motionEvent = (MotionEvent) obj; - XposedLogUtils.logI("onInputConsumerEvent: Action: " + motionEvent.getAction() + ", return " + param.getResult() + ". x: " + motionEvent.getX() + " y: " + motionEvent.getY()); + XposedLogUtils.logI(TAG, FixAnimation.this.lpparam.packageName, "onInputConsumerEvent: Action: " + motionEvent.getAction() + ", return " + param.getResult() + ". x: " + motionEvent.getX() + " y: " + motionEvent.getY()); if (XposedHelpers.getObjectField(param.thisObject, "mAppToHomeAnim2") != null || getMAppToHomeAnim2Bak() == null) { return; } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/title/IconScaleHook.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/title/IconScaleHook.java index 39c0d41dde..694c9cd508 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/title/IconScaleHook.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/title/IconScaleHook.java @@ -76,7 +76,7 @@ public void afterTextChanged(Editable s) { mMessage.animate().scaleX(multx).scaleY(multx).setStartDelay(0).start(); } } catch (Throwable t) { - XposedLogUtils.logI(String.valueOf(t)); + XposedLogUtils.logE(TAG, IconScaleHook.this.lpparam.packageName, "", t); } }); diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/incallui/HideCrbt.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/incallui/HideCrbt.java index e1e30a9a3b..0b202fb24b 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/incallui/HideCrbt.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/incallui/HideCrbt.java @@ -26,7 +26,7 @@ protected void before(MethodHookParam param) throws Throwable { Integer.TYPE, Boolean.TYPE, beforeHookedMethod() });*/ } catch (Exception e) { - XposedLogUtils.logI("method hooked failed! " + e); + XposedLogUtils.logE(TAG, this.lpparam.packageName, "method hooked failed! " + e); } } /*public final void beforeHookedMethod(XC_MethodHook.MethodHookParam methodHookParam) { diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/lbe/DisableClipboardTip.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/lbe/DisableClipboardTip.kt index 5a14d189b6..3afdc8241e 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/lbe/DisableClipboardTip.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/lbe/DisableClipboardTip.kt @@ -48,7 +48,7 @@ object DisableClipboardTip : BaseHook() { } hideDialog(lpparam, packageName, param) - XposedLogUtils.logI(" $packageName -> $appName read clipboard.") + XposedLogUtils.logI(TAG, this@DisableClipboardTip.lpparam.packageName, " $packageName -> $appName read clipboard.") } } }) diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/mishare/NoAutoTurnOff.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/mishare/NoAutoTurnOff.kt index d2d70b9b08..23f42d3c50 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/mishare/NoAutoTurnOff.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/mishare/NoAutoTurnOff.kt @@ -90,19 +90,19 @@ object NoAutoTurnOff : BaseHook() { val fieldNames = ('a'..'z').map { name -> name.toString() } val getField = getValueByFields(it.thisObject, fieldNames) ?: return@after XposedHelpers.callMethod(getField, "removeCallbacks", it.thisObject) - XposedLogUtils.logI("null3Method hook success, $getField") + XposedLogUtils.logI(TAG, this@NoAutoTurnOff.lpparam.packageName, "null3Method hook success, $getField") } } } catch (t: Throwable) { - XposedLogUtils.logE(TAG, "null3Method hook failed", t) + XposedLogUtils.logE(TAG, this.lpparam.packageName, "null3Method hook failed", t) } try { - XposedLogUtils.logI("$nullField") + XposedLogUtils.logI(TAG, this.lpparam.packageName, "$nullField") XposedHelpers.setStaticIntField(nullClass, nullField.name, 999999999) - XposedLogUtils.logI(TAG, "nullField hook success.") + XposedLogUtils.logI(TAG, this.lpparam.packageName, "nullField hook success.") } catch (t: Throwable) { - XposedLogUtils.logE(TAG, "nullField hook failed", t) + XposedLogUtils.logE(TAG, this.lpparam.packageName, "nullField hook failed", t) } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/mms/DisableAd.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/mms/DisableAd.kt index 838f78eacb..9c63b742b9 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/mms/DisableAd.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/mms/DisableAd.kt @@ -35,7 +35,7 @@ object DisableAd : BaseHook() { }) }*/ } catch (e: Throwable) { - XposedLogUtils.logE(TAG, e) + XposedLogUtils.logE(TAG, this.lpparam.packageName, e) } findAndHookMethod("com.miui.smsextra.ui.BottomMenu", "allowMenuMode", Context::class.java, object : MethodHook() { diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/packageinstaller/DisplayMoreApkInfo.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/packageinstaller/DisplayMoreApkInfo.java index 3bcd035863..e162fb49cb 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/packageinstaller/DisplayMoreApkInfo.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/packageinstaller/DisplayMoreApkInfo.java @@ -36,7 +36,7 @@ public void init() { Class ViewHolderClass = findClassIfExists("com.miui.packageInstaller.ui.listcomponets.AppInfoViewObject$ViewHolder"); Method[] methods = XposedHelpers.findMethodsByExactParameters(mAppInfoViewObject, void.class, ViewHolderClass); if (methods.length == 0) { - XposedLogUtils.logI("AppInfoDuringMiuiInstallHook", "Cannot find appropriate method"); + XposedLogUtils.logI(TAG, this.lpparam.packageName, "Cannot find appropriate method"); return; } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/packageinstaller/DisplayMoreApkInfoNew.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/packageinstaller/DisplayMoreApkInfoNew.kt index 8441e5c156..52fc33cebd 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/packageinstaller/DisplayMoreApkInfoNew.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/packageinstaller/DisplayMoreApkInfoNew.kt @@ -38,7 +38,7 @@ object DisplayMoreApkInfoNew : BaseHook() { mAppInfoViewObject = findClassIfExists("com.miui.packageInstaller.ui.listcomponets.AppInfoViewObject")//.findClassOrNull() if (mAppInfoViewObject != null) { - XposedLogUtils.logI("mAppInfoViewObject is $mAppInfoViewObject") + XposedLogUtils.logI(TAG, this.lpparam.packageName, "mAppInfoViewObject is $mAppInfoViewObject") mAppInfoViewObjectViewHolder = findClassIfExists("com.miui.packageInstaller.ui.listcomponets.AppInfoViewObject\$ViewHolder")//"com.miui.packageInstaller.ui.listcomponets.AppInfoViewObject\$ViewHolder".findClassOrNull() val methods: Array = diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/personalassistant/WidgetCrack.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/personalassistant/WidgetCrack.kt index 6738b853ac..f8d138f087 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/personalassistant/WidgetCrack.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/personalassistant/WidgetCrack.kt @@ -62,7 +62,7 @@ class WidgetCrack : BaseHook() { returnConstant(true) } } catch (t: Throwable) { - XposedLogUtils.logE(TAG, t) + XposedLogUtils.logE(TAG, this.lpparam.packageName, t) } } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/screenshot/UnlockPrivacyMarking.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/screenshot/UnlockPrivacyMarking.kt index 77255fd319..36ab68a0d6 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/screenshot/UnlockPrivacyMarking.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/screenshot/UnlockPrivacyMarking.kt @@ -18,7 +18,7 @@ object UnlockPrivacyMarking : BaseHook() { try { returnConstant(true) } catch (e: Exception) { - XposedLogUtils.logW("UnSupport Privacy Marking") + XposedLogUtils.logW(TAG, this@UnlockPrivacyMarking.lpparam.packageName, "UnSupport Privacy Marking") } } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/BlurSecurity.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/BlurSecurity.kt index 6108df09a0..814bb9dcd2 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/BlurSecurity.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/BlurSecurity.kt @@ -384,9 +384,6 @@ object BlurSecurity : BaseHook() { } }) - - XposedLogUtils.logI("3") - XposedHelpers.findAndHookMethod( srsLevelSeekBarProClass, if (appVersionCode >= 40000749) "b" else "a", Context::class.java, @@ -453,7 +450,6 @@ object BlurSecurity : BaseHook() { override fun afterHookedMethod(param: MethodHookParam) { val view = HookUtils.getValueByField(param.thisObject, "d") as View val parentView = view.parent - XposedLogUtils.logI(parentView.toString()) if (parentView is ViewGroup) { val lastChild = parentView.getChildAt(parentView.childCount - 1) if (lastChild is ImageView && lastChild.drawable is VectorDrawable) { @@ -474,8 +470,6 @@ object BlurSecurity : BaseHook() { } }) } - - XposedLogUtils.logI("4") } // 尽量给最外层加 RenderEffect 而不是 最内层 @@ -509,7 +503,7 @@ object BlurSecurity : BaseHook() { } } } catch (e: Throwable) { - logW("$TAG => invertViewColor", e) + logW(TAG, this.lpparam.packageName, "invertViewColor err", e) } } @@ -545,7 +539,7 @@ object BlurSecurity : BaseHook() { } } } catch (e: Throwable) { - logW("$TAG => isChildNeedInvertColor", e) + logW(TAG, this.lpparam.packageName, "isChildNeedInvertColor err", e) } return true } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/GetBubbleAppString.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/GetBubbleAppString.kt index 0d56460935..2dfab2b97e 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/GetBubbleAppString.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/GetBubbleAppString.kt @@ -30,7 +30,7 @@ object GetBubbleAppString : BaseHook() { } } } catch (e: Throwable) { - XposedLogUtils.logE(TAG, e) + XposedLogUtils.logE(TAG, this.lpparam.packageName, e) } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/SidebarLineCustom.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/SidebarLineCustom.kt index d962d5fdcf..e45652871b 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/SidebarLineCustom.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/SidebarLineCustom.kt @@ -12,9 +12,9 @@ object SidebarLineCustom : BaseHook() { val mSidebarLineColorDefault = mPrefsMap.getInt("security_center_sidebar_line_color_default", -1294740525) val mSidebarLineColorDark = mPrefsMap.getInt("security_center_sidebar_line_color_dark", -6842473) val mSidebarLineColorLight = mPrefsMap.getInt("security_center_sidebar_line_color_light", -872415232) - XposedLogUtils.logI("mSidebarLineColorDefault is $mSidebarLineColorDefault") - XposedLogUtils.logI("mSidebarLineColorDark is $mSidebarLineColorDark") - XposedLogUtils.logI("mSidebarLineColorLight is $mSidebarLineColorLight") + XposedLogUtils.logI(TAG, "com.miui.securitycenter", "mSidebarLineColorDefault is $mSidebarLineColorDefault") + XposedLogUtils.logI(TAG, "com.miui.securitycenter", "mSidebarLineColorDark is $mSidebarLineColorDark") + XposedLogUtils.logI(TAG, "com.miui.securitycenter", "mSidebarLineColorLight is $mSidebarLineColorLight") resParam.res.setReplacement( "com.miui.securitycenter", "color", diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/VideoDolbyOpen.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/VideoDolbyOpen.java index b09bddb065..ade17b7062 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/VideoDolbyOpen.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/VideoDolbyOpen.java @@ -69,7 +69,7 @@ public void onMethodHooked(@NonNull XC_MethodHook.MethodHookParam methodHookPara } }); } catch (NoSuchMethodException e) { - XposedLogUtils.logE(TAG, "NoSuchMethodException: " + e); + XposedLogUtils.logE(TAG, this.lpparam.packageName, "NoSuchMethodException: " + e); } } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/app/AppDefaultSort.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/app/AppDefaultSort.java index 00fb7b03a7..6b0072b0a0 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/app/AppDefaultSort.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/app/AppDefaultSort.java @@ -53,7 +53,7 @@ protected void before(final MethodHookParam param) throws Throwable { public static Bundle checkBundle(Context context, Bundle bundle) { if (context == null) { - XposedLogUtils.logI("AppDefaultSort", "Context is null!"); + XposedLogUtils.logI("AppDefaultSort", "com.miui.securitycenter", "Context is null!"); return null; } if (bundle == null) bundle = new Bundle(); diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/app/AppDetails.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/app/AppDetails.java index 9342d3e9af..d407586c34 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/app/AppDetails.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/app/AppDetails.java @@ -71,7 +71,7 @@ protected void after(MethodHookParam param) throws Throwable { Object contentFrag = act.getFragmentManager().findFragmentById(android.R.id.content); Object frag = contentFrag != null ? contentFrag : mSupportFragment; if (frag == null) { - XposedLogUtils.logI(TAG, "Unable to find fragment"); + XposedLogUtils.logI(TAG, AppDetails.this.lpparam.packageName, "Unable to find fragment"); return; } @@ -82,7 +82,7 @@ protected void after(MethodHookParam param) throws Throwable { mLastPackageInfo = (PackageInfo) piField.get(frag); Method[] addPref = XposedHelpers.findMethodsByExactParameters(frag.getClass(), void.class, String.class, String.class, String.class); if (mLastPackageInfo == null || addPref.length == 0) { - XposedLogUtils.logI(TAG, "Unable to find field/class/method in SecurityCenter to hook"); + XposedLogUtils.logI(TAG, AppDetails.this.lpparam.packageName, "Unable to find field/class/method in SecurityCenter to hook"); return; } else { addPref[0].setAccessible(true); @@ -170,7 +170,7 @@ protected void before(MethodHookParam param1) throws Throwable { }); } } else { - XposedLogUtils.logI(TAG, "Cannot find activity class!"); + XposedLogUtils.logE(TAG, this.lpparam.packageName, "Cannot find activity class!"); } } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/app/AppRestrict.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/app/AppRestrict.java index a90b4b7ec7..514af570fb 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/app/AppRestrict.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/app/AppRestrict.java @@ -22,7 +22,7 @@ public void init() { Method[] mGetAppInfo = XposedHelpers.findMethodsByExactParameters(mAppManageUtils, ApplicationInfo.class, Object.class, PackageManager.class, String.class, int.class, int.class); if (mGetAppInfo.length == 0) { - XposedLogUtils.logI(TAG, "Cannot find getAppInfo method!"); + XposedLogUtils.logE(TAG, this.lpparam.packageName, "Cannot find getAppInfo method!"); } else { hookMethod(mGetAppInfo[0], new MethodHook() { @Override diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/beauty/BeautyLightAuto.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/beauty/BeautyLightAuto.kt index 7ba70f70c8..c8dfe852ed 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/beauty/BeautyLightAuto.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/beauty/BeautyLightAuto.kt @@ -19,7 +19,7 @@ object BeautyLightAuto : BaseHook() { val beautyLightAuto: java.lang.reflect.Method = it.getMethodInstance(lpparam.classLoader) if (!java.lang.String.valueOf(it).contains(BeautyFace.beautyFace.toString())) { - XposedLogUtils.logI("beautyLightAuto method is $beautyLightAuto") + XposedLogUtils.logI(TAG, this.lpparam.packageName, "beautyLightAuto method is $beautyLightAuto") XposedBridge.hookMethod( beautyLightAuto, XC_MethodReplacement.returnConstant(true) diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/lab/AiClipboardEnable.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/lab/AiClipboardEnable.kt index 3634c38956..9b2eda807d 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/lab/AiClipboardEnable.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/lab/AiClipboardEnable.kt @@ -12,7 +12,7 @@ object AiClipboardEnable : BaseHook() { override fun init() { labUtilClass.forEach { labUtils = it.getInstance(EzXHelper.classLoader) - XposedLogUtils.logI("labUtils class is $labUtils") + XposedLogUtils.logI(TAG, this.lpparam.packageName, "labUtils class is $labUtils") findAndHookMethod( "com.miui.permcenter.settings.PrivacyLabActivity", "onCreateFragment", diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/lab/BlurLocationEnable.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/lab/BlurLocationEnable.kt index 565bc1bc06..ba112b071e 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/lab/BlurLocationEnable.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/lab/BlurLocationEnable.kt @@ -12,7 +12,7 @@ object BlurLocationEnable : BaseHook() { override fun init() { labUtilClass.forEach { labUtils = it.getInstance(EzXHelper.classLoader) - XposedLogUtils.logI("labUtils class is $labUtils") + XposedLogUtils.logI(TAG, this.lpparam.packageName, "labUtils class is $labUtils") findAndHookMethod( "com.miui.permcenter.settings.PrivacyLabActivity", "onCreateFragment", diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/lab/GetNumberEnable.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/lab/GetNumberEnable.kt index 1df8177de9..412bc3dce0 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/lab/GetNumberEnable.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/lab/GetNumberEnable.kt @@ -11,7 +11,7 @@ object GetNumberEnable : BaseHook() { override fun init() { labUtilClass.forEach { labUtils = it.getInstance(EzXHelper.classLoader) - XposedLogUtils.logI("labUtils class is $labUtils") + XposedLogUtils.logI(TAG, this.lpparam.packageName, "labUtils class is $labUtils") findAndHookMethod( "com.miui.permcenter.settings.PrivacyLabActivity", "onCreateFragment", diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/sidebar/AddSideBarExpandReceiver.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/sidebar/AddSideBarExpandReceiver.java index 8001e5b3ec..183f4a70c8 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/sidebar/AddSideBarExpandReceiver.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/sidebar/AddSideBarExpandReceiver.java @@ -31,7 +31,7 @@ public void init() { } Class RegionSamplingHelper = findClassIfExists("com.android.systemui.navigationbar.gestural.RegionSamplingHelper", lpparam.classLoader); if (RegionSamplingHelper == null) { - XposedLogUtils.logI("failed to find RegionSamplingHelper"); + XposedLogUtils.logW(TAG, this.lpparam.packageName, "failed to find RegionSamplingHelper"); } hookAllConstructors(RegionSamplingHelper, new MethodHook() { private int originDockLocation = -1; @@ -107,7 +107,7 @@ protected void after(MethodHookParam param) throws Throwable { }); Method[] methods = XposedHelpers.findMethodsByExactParameters(RegionSamplingHelper, void.class, Rect.class); if (methods.length == 0) { - XposedLogUtils.logI("Cannot find appropriate start method"); + XposedLogUtils.logE(TAG, this.lpparam.packageName, "Cannot find appropriate start method"); return; } hookMethod(methods[0], new MethodHook() { diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/settings/HyperCeilerSettings.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/settings/HyperCeilerSettings.java index 0d1d80c023..089836b923 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/settings/HyperCeilerSettings.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/settings/HyperCeilerSettings.java @@ -1,5 +1,7 @@ package com.sevtinge.hyperceiler.module.hook.settings; +import static com.sevtinge.hyperceiler.utils.log.XposedLogUtils.logI; + import android.annotation.SuppressLint; import android.app.Activity; import android.content.Context; diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/settings/VolumeSeparateControlForSettings.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/settings/VolumeSeparateControlForSettings.java index 0f0d44a5ce..899a6802b4 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/settings/VolumeSeparateControlForSettings.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/settings/VolumeSeparateControlForSettings.java @@ -48,7 +48,7 @@ protected void after(MethodHookParam param) throws Throwable { try { initSeekBar = XposedHelpers.findMethodsByExactParameters(fragment.getClass(), void.class, String.class, int.class, int.class); if (mVsbCls == null || initSeekBar.length == 0) { - XposedLogUtils.logI(TAG, "Unable to find class/method in Settings to hook"); + XposedLogUtils.logE(TAG, VolumeSeparateControlForSettings.this.lpparam.packageName, "Unable to find class/method in Settings to hook"); return; } else { initSeekBar[0].setAccessible(true); @@ -62,7 +62,7 @@ protected void after(MethodHookParam param) throws Throwable { } } } catch (Throwable t) { - XposedLogUtils.logI(TAG, "Unable to find class/method in Settings to hook"); + XposedLogUtils.logE(TAG, VolumeSeparateControlForSettings.this.lpparam.packageName, "Unable to find class/method in Settings to hook", t); return; } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/AllowUninstall.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/AllowUninstall.java index 5f5a82419a..9f8f6c53cd 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/AllowUninstall.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/AllowUninstall.java @@ -19,37 +19,37 @@ public class AllowUninstall implements IXposedHookZygoteInit { @Override public void initZygote(StartupParam startupParam) { - XposedBridge.log("[HyperCeiler][I][AllowUninstall]: hook all PathClassLoader Constructors"); + XposedBridge.log("[HyperCeiler][I][android][AllowUninstall]: hook all PathClassLoader Constructors"); pathClassLoaderHook = XposedBridge.hookAllConstructors(PathClassLoader.class, new XC_MethodHook() { @Override protected void afterHookedMethod(MethodHookParam param) { String path = param.args[0].toString(); if (path.contains("/system/framework/services.jar")) { - XposedBridge.log("[HyperCeiler][I][AllowUninstall]: find services.jar ClassLoader"); + XposedBridge.log("[HyperCeiler][I][android][AllowUninstall]: find services.jar ClassLoader"); try { servicesClassLoader = (PathClassLoader) param.thisObject; SecurityManagerServiceClazz = XposedHelpers.findClass( SecurityManagerServiceName, servicesClassLoader); - XposedBridge.log("[HyperCeiler][I][AllowUninstall]: findClass SecurityManagerService$1"); + XposedBridge.log("[HyperCeiler][I][android][AllowUninstall]: findClass SecurityManagerService$1"); XposedHelpers.findAndHookMethod(SecurityManagerServiceClazz, "run", new XC_MethodReplacement() { @Override protected Object replaceHookedMethod(MethodHookParam unused) { - XposedBridge.log("[HyperCeiler][I][AllowUninstall]: hooked checkSystemSelfProtection invoke"); + XposedBridge.log("[HyperCeiler][I][android][AllowUninstall]: hooked checkSystemSelfProtection invoke"); return null; } }); - XposedBridge.log("[HyperCeiler][I][AllowUninstall]: hook method 'SecurityManagerService$1.run()'"); + XposedBridge.log("[HyperCeiler][I][android][AllowUninstall]: hook method 'SecurityManagerService$1.run()'"); } catch (Exception e) { - XposedBridge.log("[HyperCeiler][E][AllowUninstall]: AllowUninstall Exception!"); + XposedBridge.log("[HyperCeiler][E][android][AllowUninstall]: AllowUninstall Exception!"); e.printStackTrace(); } finally { for (Unhook hook : pathClassLoaderHook) { hook.unhook(); } - XposedBridge.log("[HyperCeiler][I][AllowUninstall]: unhook all PathClassLoader Constructors"); + XposedBridge.log("[HyperCeiler][I][android][AllowUninstall]: unhook all PathClassLoader Constructors"); } } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/AppLinkVerify.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/AppLinkVerify.java index 743dbaa288..5eddef35d8 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/AppLinkVerify.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/AppLinkVerify.java @@ -16,7 +16,7 @@ protected void before(MethodHookParam param) { } ); } catch (Throwable t) { - XposedLogUtils.logE(TAG, t); + XposedLogUtils.logE(TAG, this.lpparam.packageName, t); } } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/BackgroundBlurDrawable.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/BackgroundBlurDrawable.kt index 1b5c3e7c13..c184e5dd2c 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/BackgroundBlurDrawable.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/BackgroundBlurDrawable.kt @@ -7,12 +7,13 @@ import com.sevtinge.hyperceiler.utils.log.XposedLogUtils.logI import de.robv.android.xposed.IXposedHookZygoteInit import de.robv.android.xposed.XC_MethodHook import de.robv.android.xposed.XposedBridge +import de.robv.android.xposed.XposedHelpers class BackgroundBlurDrawable : IXposedHookZygoteInit { override fun initZygote(startupParam: IXposedHookZygoteInit.StartupParam) { val classLoader = startupParam.javaClass.classLoader val mBackgroundBlurDrawableClass = classLoader?.let { - HookUtils.getClass("com.android.internal.graphics.drawable.BackgroundBlurDrawable", it) + XposedHelpers.findClassIfExists("com.android.internal.graphics.drawable.BackgroundBlurDrawable", it) } ?: return // 为 BackgroundBlurDrawable 应当增加一个判断 // 此处应该可以为AOSP提交修复补丁 @@ -23,7 +24,7 @@ class BackgroundBlurDrawable : IXposedHookZygoteInit { override fun beforeHookedMethod(param: MethodHookParam) { val canvas = param.args[0] as Canvas if (!canvas.isHardwareAccelerated) { - XposedLogUtils.logI("BackgroundBlurDrawable canvas is not HardwareAccelerated.") + XposedLogUtils.logI("BackgroundBlurDrawable", "android", "BackgroundBlurDrawable canvas is not HardwareAccelerated.") param.result = null } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/CleanOpenMenu.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/CleanOpenMenu.java index 5e144c88e4..44840b3d06 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/CleanOpenMenu.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/CleanOpenMenu.java @@ -55,7 +55,7 @@ public void onChange(Uri uri) { mPrefsMap.put(key, Helpers.getSharedIntPref(mContext, key, 0)); } } catch (Throwable t) { - XposedLogUtils.logE(TAG, t); + XposedLogUtils.logE(TAG, CleanOpenMenu.this.lpparam.packageName, t); } } }; diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/CleanShareMenu.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/CleanShareMenu.java index b3f0687024..469dd59e31 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/CleanShareMenu.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/CleanShareMenu.java @@ -78,7 +78,7 @@ protected void after(MethodHookParam param) throws Throwable { } param.setResult(resolved); } catch (Throwable t) { - if (!(t instanceof BadParcelableException)) XposedLogUtils.logE(TAG, t); + if (!(t instanceof BadParcelableException)) XposedLogUtils.logE(TAG, CleanShareMenu.this.lpparam.packageName, t); } } }; diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/FlagSecure.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/FlagSecure.java index 9864b85c2c..a8bac735e8 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/FlagSecure.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/FlagSecure.java @@ -92,7 +92,7 @@ public void init() { } } } catch (Throwable t) { - XposedLogUtils.logE(TAG, t); + XposedLogUtils.logE(TAG, this.lpparam.packageName, t); } } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/LocationSimulation.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/LocationSimulation.java index 10006128ef..8fced0a4ca 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/LocationSimulation.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/LocationSimulation.java @@ -16,49 +16,49 @@ public void init() { findAndHookMethod(mTelephonyManager, "getNetworkOperatorName", new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { - XposedLogUtils.logI(TAG, "getNetworkOperatorName:" + param.getResult()); + XposedLogUtils.logI(TAG, LocationSimulation.this.lpparam.packageName, "getNetworkOperatorName:" + param.getResult()); } }); findAndHookMethod(mTelephonyManager, "getSimOperatorName", new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { - XposedLogUtils.logI(TAG, "getSimOperatorName:" + param.getResult()); + XposedLogUtils.logI(TAG, LocationSimulation.this.lpparam.packageName, "getSimOperatorName:" + param.getResult()); } }); findAndHookMethod(mTelephonyManager, "getSimOperator", new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { - XposedLogUtils.logI(TAG, "getSimOperator:" + param.getResult()); + XposedLogUtils.logI(TAG, LocationSimulation.this.lpparam.packageName, "getSimOperator:" + param.getResult()); } }); findAndHookMethod(mTelephonyManager, "getNetworkOperator", new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { - XposedLogUtils.logI(TAG, "getNetworkOperator:" + param.getResult()); + XposedLogUtils.logI(TAG, LocationSimulation.this.lpparam.packageName, "getNetworkOperator:" + param.getResult()); } }); findAndHookMethod(mTelephonyManager, "getSimCountryIso", new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { - XposedLogUtils.logI(TAG, "getSimCountryIso:" + param.getResult()); + XposedLogUtils.logI(TAG, LocationSimulation.this.lpparam.packageName, "getSimCountryIso:" + param.getResult()); } }); findAndHookMethod(mTelephonyManager, "getNetworkCountryIso", new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { - XposedLogUtils.logI(TAG, "getNetworkCountryIso:" + param.getResult()); + XposedLogUtils.logI(TAG, LocationSimulation.this.lpparam.packageName, "getNetworkCountryIso:" + param.getResult()); } }); findAndHookMethod(mTelephonyManager, "getNeighboringCellInfo", new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { - XposedLogUtils.logI(TAG, "getNeighboringCellInfo:" + param.getResult()); + XposedLogUtils.logI(TAG, LocationSimulation.this.lpparam.packageName, "getNeighboringCellInfo:" + param.getResult()); } }); diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/MultiFreeFormSupported.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/MultiFreeFormSupported.kt index 9b62d094cd..e7044dc7a4 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/MultiFreeFormSupported.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/MultiFreeFormSupported.kt @@ -26,14 +26,14 @@ object MultiFreeFormSupported : BaseHook() { it.result = mResult } } - XposedLogUtils.logI("Hook with recents_to_small_freeform success!") + XposedLogUtils.logI(TAG, this.lpparam.packageName, "Hook with recents_to_small_freeform success!") } else { loadClass("android.util.MiuiMultiWindowUtils").methodFinder().first { name == "multiFreeFormSupported" }.createHook { returnConstant(true) } - XposedLogUtils.logI("Hook success!") + XposedLogUtils.logI(TAG, this.lpparam.packageName, "Hook success!") } } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/PackagePermissions.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/PackagePermissions.java index 8ec1d039ca..b6c126b241 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/PackagePermissions.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/PackagePermissions.java @@ -90,7 +90,7 @@ protected void after(MethodHookParam param) { mySystemApps.addAll(systemPackages); XposedHelpers.setStaticObjectField(dpgpiClass, "MIUI_SYSTEM_APPS", mySystemApps.toArray(new String[0])); } catch (Throwable t) { - XposedLogUtils.logW(TAG, t); + XposedLogUtils.logW(TAG, this.lpparam.packageName, t); } } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/RemoveSmallWindowRestrictions.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/RemoveSmallWindowRestrictions.kt index 3cadcc0af6..3b564b66e5 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/RemoveSmallWindowRestrictions.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/RemoveSmallWindowRestrictions.kt @@ -25,7 +25,7 @@ object RemoveSmallWindowRestrictions : BaseHook() { } } } catch (e: Throwable) { - XposedLogUtils.logI("Hook retrieveSettings failed by: $e") + XposedLogUtils.logE(TAG, this.lpparam.packageName, "Hook retrieveSettings failed by: $e") } try { @@ -39,7 +39,7 @@ object RemoveSmallWindowRestrictions : BaseHook() { } } } catch (e: Throwable) { - XposedLogUtils.logI("Hook updateDevEnableNonResizableMultiWindow failed by: $e") + XposedLogUtils.logE(TAG, this.lpparam.packageName, "Hook updateDevEnableNonResizableMultiWindow failed by: $e") } try { @@ -53,7 +53,7 @@ object RemoveSmallWindowRestrictions : BaseHook() { } } } catch (e: Throwable) { - XposedLogUtils.logI("Hook onChange failed by: $e") + XposedLogUtils.logE(TAG, this.lpparam.packageName, "Hook onChange failed by: $e") } try { @@ -63,7 +63,7 @@ object RemoveSmallWindowRestrictions : BaseHook() { returnConstant(true) } } catch (e: Throwable) { - XposedLogUtils.logI("Hook isForceResizeable failed by: $e") + XposedLogUtils.logE(TAG, this.lpparam.packageName, "Hook isForceResizeable failed by: $e") } // Author: LittleTurtle2333 @@ -74,7 +74,7 @@ object RemoveSmallWindowRestrictions : BaseHook() { returnConstant(true) } } catch (e: Throwable) { - XposedLogUtils.logI("Hook isResizeable failed by: $e") + XposedLogUtils.logE(TAG, this.lpparam.packageName, "Hook isResizeable failed by: $e") } try { @@ -84,7 +84,7 @@ object RemoveSmallWindowRestrictions : BaseHook() { returnConstant(mutableListOf()) } } catch (e: Throwable) { - XposedLogUtils.logI("Hook getFreeformBlackList failed by: $e") + XposedLogUtils.logE(TAG, this.lpparam.packageName, "Hook getFreeformBlackList failed by: $e") } try { @@ -94,7 +94,7 @@ object RemoveSmallWindowRestrictions : BaseHook() { returnConstant(mutableListOf()) } } catch (e: Throwable) { - XposedLogUtils.logI("Hook getFreeformBlackListFromCloud failed by: $e") + XposedLogUtils.logE(TAG, this.lpparam.packageName, "Hook getFreeformBlackListFromCloud failed by: $e") } try { @@ -104,7 +104,7 @@ object RemoveSmallWindowRestrictions : BaseHook() { returnConstant(mutableListOf()) } } catch (e: Throwable) { - XposedLogUtils.logI("Hook getStartFromFreeformBlackListFromCloud failed by: $e") + XposedLogUtils.logE(TAG, this.lpparam.packageName, "Hook getStartFromFreeformBlackListFromCloud failed by: $e") } try { @@ -114,7 +114,7 @@ object RemoveSmallWindowRestrictions : BaseHook() { returnConstant(true) } } catch (e: Throwable) { - XposedLogUtils.logI("Hook supportFreeform failed by: $e") + XposedLogUtils.logE(TAG, this.lpparam.packageName, "Hook supportFreeform failed by: $e") } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/StickyFloatingWindows.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/StickyFloatingWindows.java index 04b78a0c45..07e7aec0c1 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/StickyFloatingWindows.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/StickyFloatingWindows.java @@ -51,7 +51,7 @@ protected void after(MethodHookParam param) { if (windowingMode != 5 && fwApps.containsKey(pkgName)) { try { if (MiuiMultiWindowUtils == null) { - XposedLogUtils.logI(TAG, "Cannot find MiuiMultiWindowUtils class"); + XposedLogUtils.logE(TAG, StickyFloatingWindows.this.lpparam.packageName, "Cannot find MiuiMultiWindowUtils class"); return; } options = patchActivityOptions(mContext, options, pkgName, MiuiMultiWindowUtils); diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/ThermalBrightness.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/ThermalBrightness.java index a37ef40339..b24f6152f2 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/ThermalBrightness.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/ThermalBrightness.java @@ -26,7 +26,7 @@ protected void after(MethodHookParam param) { } ); } catch (XposedHelpers.ClassNotFoundError e) { - XposedLogUtils.logE(TAG, "No found class: " + e); + XposedLogUtils.logE(TAG, "android", "No found class: " + e); } try { @@ -40,7 +40,7 @@ protected void after(MethodHookParam param) { } ); } catch (XposedHelpers.ClassNotFoundError e) { - XposedLogUtils.logE(TAG, "No found class: " + e); + XposedLogUtils.logE(TAG, "android", "No found class: " + e); } try { @@ -54,7 +54,7 @@ protected void before(MethodHookParam param) { } ); } catch (NoSuchMethodException e) { - XposedLogUtils.logE(TAG, "Don't Have updateTemperature: " + e); + XposedLogUtils.logE(TAG, "android", "Don't Have updateTemperature: " + e); } /*hookAllMethods("com.android.server.display.DisplayPowerControllerImpl", @@ -77,7 +77,7 @@ protected void before(MethodHookParam param) { } ); } catch (NoSuchMethodException e) { - XposedLogUtils.logE(TAG, "Don't Have updateThermalBrightness: " + e); + XposedLogUtils.logE(TAG, "android", "Don't Have updateThermalBrightness: " + e); } try { @@ -91,7 +91,7 @@ protected void before(MethodHookParam param) { } ); } catch (NoSuchMethodException e) { - XposedLogUtils.logE(TAG, "Don't Have updateThermalBrightnessIfNeeded: " + e); + XposedLogUtils.logE(TAG, "android", "Don't Have updateThermalBrightnessIfNeeded: " + e); } } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/corepatch/BypassSignCheckForT.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/corepatch/BypassSignCheckForT.kt index ae84983bc0..c538a2ef64 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/corepatch/BypassSignCheckForT.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/corepatch/BypassSignCheckForT.kt @@ -12,7 +12,7 @@ object BypassSignCheckForT : BaseHook() { } }) } catch (e: Throwable) { - XposedLogUtils.logE(TAG, e) + XposedLogUtils.logE(TAG, this.lpparam.packageName, e) } } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/ChargeAnimationStyle.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/ChargeAnimationStyle.java index 63a9191981..811a27f8f2 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/ChargeAnimationStyle.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/ChargeAnimationStyle.java @@ -56,7 +56,7 @@ protected void after(MethodHookParam param) throws Throwable { i++; } else { mResult = true; - XposedLogUtils.logI(TAG, stackElement[i].getClassName()); + XposedLogUtils.logI(TAG, ChargeAnimationStyle.this.lpparam.packageName, stackElement[i].getClassName()); break; } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/EnableVolumeBlur.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/EnableVolumeBlur.kt index 891f9e0e63..e4b8ea3ae0 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/EnableVolumeBlur.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/EnableVolumeBlur.kt @@ -34,7 +34,7 @@ class EnableVolumeBlur : BaseHook() { } } catch (e: Throwable) { // Do Nothings. - logW(TAG, e) + logW(TAG, this@EnableVolumeBlur.lpparam.packageName, e) } } }) @@ -43,7 +43,7 @@ class EnableVolumeBlur : BaseHook() { } } catch (e: Throwable) { // Do Nothings. - logW(TAG, e) + logW(TAG, this.lpparam.packageName, e) } } } @@ -72,7 +72,7 @@ class EnableVolumeBlur : BaseHook() { afterGetClassLoader(classLoader) } catch (e: Throwable) { // Do Nothings. - logW("$TAG => hookClassInPlugin", e) + logW(TAG, this@EnableVolumeBlur.lpparam.packageName, "hookClassInPlugin failed", e) } } }) @@ -103,7 +103,7 @@ class EnableVolumeBlur : BaseHook() { afterGetClassLoader(classLoader) } catch (e: Throwable) { // Do Nothings. - logW(TAG, e) + logW(TAG, this@EnableVolumeBlur.lpparam.packageName, e) } } }) diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/HideNavigationBar.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/HideNavigationBar.java index 6727c83e7e..06284d6f38 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/HideNavigationBar.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/HideNavigationBar.java @@ -56,10 +56,10 @@ protected void before(MethodHookParam param) { int End = Settings.Global.getInt(mContext.getContentResolver(), "hide_gesture_line"); if (End == 1) { Settings.Global.putInt(mContext.getContentResolver(), "hide_gesture_line", 0); - XposedLogUtils.logI("Settings The hide_gesture_line To 0"); + XposedLogUtils.logI(TAG, HideNavigationBar.this.lpparam.packageName, "Settings The hide_gesture_line To 0"); } } catch (Settings.SettingNotFoundException e) { - XposedLogUtils.logI("Don‘t Have hide_gesture_line"); + XposedLogUtils.logW(TAG, HideNavigationBar.this.lpparam.packageName, "Don‘t Have hide_gesture_line"); } param.setResult(null); } @@ -98,7 +98,7 @@ public void onChange(boolean z) { if (languageCode.equals("zh")) language = true; Settings.Global.putInt(context.getContentResolver(), "force_fsg_nav_bar", 1); Toast.makeText(context, language ? "请勿切换经典导航键" : "Don't switch navigation keys", Toast.LENGTH_SHORT).show(); - XposedLogUtils.logI("Please don't switch classic navigation keys"); + XposedLogUtils.logI(TAG, HideNavigationBar.this.lpparam.packageName, "Please don't switch classic navigation keys"); } }; context.getContentResolver().registerContentObserver(Settings.Global.getUriFor("force_fsg_nav_bar"), false, contentObserver); diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/MonetThemeOverlay.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/MonetThemeOverlay.java index 1074e97c87..43fa218b6b 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/MonetThemeOverlay.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/MonetThemeOverlay.java @@ -33,7 +33,7 @@ protected void before(MethodHookParam param) throws Throwable { @Override public void onChange(String name, int defValue) { mPrefsMap.put(name, PrefsUtils.getSharedIntPrefs(mContext, name, defValue)); - XposedLogUtils.logI(TAG, name + ": " + PrefsUtils.getSharedIntPrefs(mContext, name, defValue)); + XposedLogUtils.logI(TAG, MonetThemeOverlay.this.lpparam.packageName, name + ": " + PrefsUtils.getSharedIntPrefs(mContext, name, defValue)); } }; diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/StatusBarActions.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/StatusBarActions.java index 61e5e879e0..839d1e1ade 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/StatusBarActions.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/StatusBarActions.java @@ -126,7 +126,7 @@ public static void OpenVolumeDialogs(Context context) { Object mVolumeDialogPlugin = XposedHelpers.getObjectField(mVolumeComponent, "mDialog"); Object miuiVolumeDialog = XposedHelpers.getObjectField(mVolumeDialogPlugin, "mVolumeDialogImpl"); if (miuiVolumeDialog == null) { - XposedLogUtils.logI("OpenVolumeDialog", "MIUI volume dialog is NULL!"); + XposedLogUtils.logI("OpenVolumeDialog", "com.android.systemui", "MIUI volume dialog is NULL!"); return; } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/AddBlurEffectToNotificationView.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/AddBlurEffectToNotificationView.kt index 2337df25cc..d106331a91 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/AddBlurEffectToNotificationView.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/AddBlurEffectToNotificationView.kt @@ -137,7 +137,7 @@ object AddBlurEffectToNotificationView : BaseHook() { } } } catch (t: Throwable) { - XposedLogUtils.logE(TAG, t) + XposedLogUtils.logE(TAG, this.lpparam.packageName, t) } try { @@ -158,7 +158,7 @@ object AddBlurEffectToNotificationView : BaseHook() { } } } catch (t: Throwable) { - XposedLogUtils.logE(TAG, t) + XposedLogUtils.logE(TAG, this.lpparam.packageName, t) } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/FixMediaControlPanel.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/FixMediaControlPanel.kt index b54010055e..21df80ccf1 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/FixMediaControlPanel.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/FixMediaControlPanel.kt @@ -21,7 +21,7 @@ object FixMediaControlPanel : BaseHook() { } }) } catch (t: Throwable) { - XposedLogUtils.logE(TAG, t) + XposedLogUtils.logE(TAG, this.lpparam.packageName, t) } } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/FlashLight.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/FlashLight.java index 60679c0950..1ed584ee6a 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/FlashLight.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/FlashLight.java @@ -83,7 +83,7 @@ public void tileClickAfter(XC_MethodHook.MethodHookParam param, String tileName) public ArrayMap tileUpdateState(XC_MethodHook.MethodHookParam param, Class mResourceIcon, String tileName) { Context mContext = (Context) XposedHelpers.getObjectField(param.thisObject, "mContext"); ContentObserver contentObserver; - // XposedLogUtils.logE(TAG, "tileUpdateState: args: " + param.args[1]); + // XposedLogUtils.logE(TAG, this.lpparam.packageName, "tileUpdateState: args: " + param.args[1]); if (param.args[1] != null) { boolean enabled = (boolean) param.args[1]; Object flash = XposedHelpers.getObjectField(param.thisObject, "flashlightController"); @@ -93,14 +93,14 @@ public ArrayMap tileUpdateState(XC_MethodHook.MethodHookParam p } if (!isListening) listening(mContext, param, flash, isListening); setFlashLightEnabled(mContext, 1); - // XposedLogUtils.logE(TAG, "tileUpdateState: isListening1: " + isListening); + // XposedLogUtils.logE(TAG, this.lpparam.packageName, "tileUpdateState: isListening1: " + isListening); } else if ((boolean) XposedHelpers.callMethod(flash, "isEnabled")) { if (getFlashLightEnabled(mContext) == 1 && !isListening) { setFlashLightEnabled(mContext, 0); } if (!isListening) listening(mContext, param, flash, isListening); setFlashLightEnabled(mContext, 1); - // XposedLogUtils.logE(TAG, "tileUpdateState: isListening2: " + isListening + " call: " + XposedHelpers.callMethod(flash, "isEnabled")); + // XposedLogUtils.logE(TAG, this.lpparam.packageName, "tileUpdateState: isListening2: " + isListening + " call: " + XposedHelpers.callMethod(flash, "isEnabled")); } else { setFlashLightEnabled(mContext, 0); if (isListening) { @@ -110,7 +110,7 @@ public ArrayMap tileUpdateState(XC_MethodHook.MethodHookParam p mContext.getContentResolver().unregisterContentObserver(contentObserver); } } - // XposedLogUtils.logE(TAG, "tileUpdateState: isListening3: " + isListening); + // XposedLogUtils.logE(TAG, this.lpparam.packageName, "tileUpdateState: isListening3: " + isListening); } } return null; @@ -124,7 +124,7 @@ public void listening(Context mContext, XC_MethodHook.MethodHookParam param, Obj public void onChange(boolean selfChange, @Nullable Uri uri) { super.onChange(selfChange, uri); hookFlash(param.thisObject, flash, mContext, readFile()); - // XposedLogUtils.logE(TAG, "listening: listening: selfChange: " + selfChange + " uri: " + uri); + // XposedLogUtils.logE(TAG, this.lpparam.packageName, "listening: listening: selfChange: " + selfChange + " uri: " + uri); } }; mContext.getContentResolver().registerContentObserver(Settings.System.getUriFor("flash_light_enabled"), false, contentObserver); @@ -140,10 +140,10 @@ public void hookFlash(Object o, Object flash, Context context, int max) { "lambda$onChanged$0", boolean.class, float.class, new MethodHook() { @Override protected void before(MethodHookParam param) { - // XposedLogUtils.logE(TAG, "MiuiBrightnessController lambda$onChanged$0: " + param.args[0] + " 2: " + param.args[1]); + // XposedLogUtils.logE(TAG, this.lpparam.packageName, "MiuiBrightnessController lambda$onChanged$0: " + param.args[0] + " 2: " + param.args[1]); Context mContext = (Context) XposedHelpers.getObjectField(param.thisObject, "mContext"); int enabled = getFlashLightEnabled(mContext); - // XposedLogUtils.logE(TAG, "lambda$onChanged$0 enabled: " + enabled); + // XposedLogUtils.logE(TAG, this.lpparam.packageName, "lambda$onChanged$0 enabled: " + enabled); if (enabled == 1) { param.setResult(null); } @@ -156,9 +156,9 @@ protected void before(MethodHookParam param) { @Override protected void before(MethodHookParam param) { int enabled = getFlashLightEnabled(context); - // XposedLogUtils.logE(TAG, "MiuiBrightnessController$5 enabled: " + enabled); + // XposedLogUtils.logE(TAG, this.lpparam.packageName, "MiuiBrightnessController$5 enabled: " + enabled); if (enabled == 1) { - // XposedLogUtils.logE(TAG, "MiuiBrightnessController$5 run"); + // XposedLogUtils.logE(TAG, this.lpparam.packageName, "MiuiBrightnessController$5 run"); param.setResult(null); } } @@ -171,7 +171,7 @@ protected void before(MethodHookParam param) { @Override protected void before(MethodHookParam param) { if (getFlashLightEnabled(context) == 1) { - // XposedLogUtils.logE(TAG, "MiuiBrightnessController$$ExternalSyntheticLambda0 run"); + // XposedLogUtils.logE(TAG, this.lpparam.packageName, "MiuiBrightnessController$$ExternalSyntheticLambda0 run"); param.setResult(null); } } @@ -182,7 +182,7 @@ protected void before(MethodHookParam param) { @Override protected void before(MethodHookParam param) { if (getFlashLightEnabled(context) == 1) { - // XposedLogUtils.logE(TAG, "MiuiBrightnessController$2 run"); + // XposedLogUtils.logE(TAG, this.lpparam.packageName, "MiuiBrightnessController$2 run"); param.setResult(null); } } @@ -200,9 +200,9 @@ protected void before(MethodHookParam param) { // AndroidLogUtils.deLogI("FlashLight", "convertGammaToLinearFloat int 1: " + param.args[0]); // AndroidLogUtils.deLogI("FlashLight", "convertGammaToLinearFloat float 2: " + param.args[1]); // AndroidLogUtils.deLogI("FlashLight", "convertGammaToLinearFloat float 3: " + param.args[2]); - // XposedLogUtils.logE(TAG, "convertGammaToLinearFloat int 1: " + param.args[0]); - // XposedLogUtils.logE(TAG, "convertGammaToLinearFloat float 2: " + param.args[1]); - // XposedLogUtils.logE(TAG, "convertGammaToLinearFloat float 3: " + param.args[2]); + // XposedLogUtils.logE(TAG, this.lpparam.packageName, "convertGammaToLinearFloat int 1: " + param.args[0]); + // XposedLogUtils.logE(TAG, this.lpparam.packageName, "convertGammaToLinearFloat float 2: " + param.args[1]); + // XposedLogUtils.logE(TAG, this.lpparam.packageName, "convertGammaToLinearFloat float 3: " + param.args[2]); float min = (float) param.args[1]; float max = (float) param.args[2]; if (min < 0.001f) { @@ -237,7 +237,7 @@ protected void before(MethodHookParam param) { if (maxPath != -1 && i > maxPath) { i = maxPath; } - // XposedLogUtils.logE(TAG, "convertGammaToLinearFloat i: " + i); + // XposedLogUtils.logE(TAG, this.lpparam.packageName, "convertGammaToLinearFloat i: " + i); writeFile(i); } else { XposedHelpers.callMethod(flash, "setFlashlight", false); @@ -254,7 +254,7 @@ public int getFlashLightEnabled(Context context) { try { return Settings.System.getInt(context.getContentResolver(), "flash_light_enabled"); } catch (Settings.SettingNotFoundException e) { - XposedLogUtils.logE(TAG, "No Found flash_light_enabled: " + e); + XposedLogUtils.logE(TAG, this.lpparam.packageName, "No Found flash_light_enabled: " + e); return -1; } } @@ -276,18 +276,18 @@ public int readFile() { builder.append(line); } } catch (IOException e) { - XposedLogUtils.logE(TAG, "Error to read: " + maxFile, e); + XposedLogUtils.logE(TAG, this.lpparam.packageName, "Error to read: " + maxFile, e); } finally { try { if (reader != null) { reader.close(); } } catch (IOException e) { - XposedLogUtils.logE(TAG, "Close reader error: ", e); + XposedLogUtils.logE(TAG, this.lpparam.packageName, "Close reader error: ", e); } } } else { - XposedLogUtils.logE(TAG, "Not Found FlashLight File: " + maxFile); + XposedLogUtils.logE(TAG, this.lpparam.packageName, "Not Found FlashLight File: " + maxFile); } if (builder != null) { @@ -310,7 +310,7 @@ public void writeFile(int flashInt) { writeFileModule(flashFileOther, flashInt); } } else - XposedLogUtils.logE(TAG, "Not Found FlashLight File: " + flashFileMtk + " And: " + flashFileTorch); + XposedLogUtils.logE(TAG, this.lpparam.packageName, "Not Found FlashLight File: " + flashFileMtk + " And: " + flashFileTorch); // if (file1.exists() && file2.exists()) { // writeFileModule(flashFileTorch, flashInt); // writeFileModule(flashFileSwitch, 1); @@ -318,7 +318,7 @@ public void writeFile(int flashInt) { // } else if (file1.exists()) { // writeFileModule(flashFileTorch, flashInt); // } else - // XposedLogUtils.logE(TAG, "Not Found FlashLight File: " + flashFileMtk + " And: " + flashFileTorch); + // XposedLogUtils.logE(TAG, this.lpparam.packageName, "Not Found FlashLight File: " + flashFileMtk + " And: " + flashFileTorch); } } @@ -335,7 +335,7 @@ public void writeFileModule(String filePath, int flashInt) { writer.write(Integer.toString(flashInt)); writer.flush(); } catch (IOException f) { - XposedLogUtils.logE(TAG, "Write FlashLight File Error: " + f + " File Path: " + filePath); + XposedLogUtils.logE(TAG, this.lpparam.packageName, "Write FlashLight File Error: " + f + " File Path: " + filePath); } } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/GmsTile.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/GmsTile.java index f99ba877d3..e7efe79ccb 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/GmsTile.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/GmsTile.java @@ -84,7 +84,7 @@ public void tileCheck(MethodHookParam param, String tileName) { packageManager.getPackageInfo(CheckGms, PackageManager.GET_ACTIVITIES); param.setResult(true); } catch (PackageManager.NameNotFoundException e) { - XposedLogUtils.logE(TAG, "Not Find GMS App: " + e); + XposedLogUtils.logE(TAG, "com.android.systemui", "Not Find GMS App: " + e); param.setResult(false); } } @@ -108,9 +108,9 @@ public void tileClick(MethodHookParam param, String tileName) { try { packageManager.getPackageInfo(GmsAppsSystem, PackageManager.GET_ACTIVITIES); packageManager.setApplicationEnabledSetting(GmsAppsSystem, PackageManager.COMPONENT_ENABLED_STATE_ENABLED, 0); - XposedLogUtils.logI("To Enabled Gms App:" + GmsAppsSystem); + XposedLogUtils.logI(TAG, "com.android.systemui", "To Enabled Gms App:" + GmsAppsSystem); } catch (PackageManager.NameNotFoundException e) { - XposedLogUtils.logI("Don't have Gms app :" + GmsAppsSystem); + XposedLogUtils.logE(TAG, "com.android.systemui", "Don't have Gms app :" + GmsAppsSystem); } } XposedHelpers.callMethod(param.thisObject, "refreshState"); @@ -119,9 +119,9 @@ public void tileClick(MethodHookParam param, String tileName) { try { packageManager.getPackageInfo(GmsAppsSystem, PackageManager.GET_ACTIVITIES); packageManager.setApplicationEnabledSetting(GmsAppsSystem, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, 0); - XposedLogUtils.logI("To Disabled Gms App:" + GmsAppsSystem); + XposedLogUtils.logI(TAG, "com.android.systemui", "To Disabled Gms App:" + GmsAppsSystem); } catch (PackageManager.NameNotFoundException e) { - XposedLogUtils.logI("Don't have Gms app :" + GmsAppsSystem); + XposedLogUtils.logE(TAG, "com.android.systemui", "Don't have Gms app :" + GmsAppsSystem); } } XposedHelpers.callMethod(param.thisObject, "refreshState"); diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/NotificationWeatherOld.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/NotificationWeatherOld.kt index d584fb8099..47ea9e9d21 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/NotificationWeatherOld.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/NotificationWeatherOld.kt @@ -82,7 +82,7 @@ object NotificationWeatherOld : BaseHook() { } context.startActivity(intent) } catch (e: Exception) { - XposedLogUtils.logE(TAG, e) + XposedLogUtils.logE(TAG, this@NotificationWeatherOld.lpparam.packageName, e) } } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/QSControlDetailBackgroundAlpha.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/QSControlDetailBackgroundAlpha.kt index 2788359f94..eb918334f1 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/QSControlDetailBackgroundAlpha.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/QSControlDetailBackgroundAlpha.kt @@ -66,12 +66,12 @@ object QSControlDetailBackgroundAlpha : BaseHook() { currentDrawable.alpha = qSControlDetailBackgroundAlpha } catch (e: Throwable) { // Do Nothings. - logW(TAG, e) + logW(TAG, this@QSControlDetailBackgroundAlpha.lpparam.packageName, e) } } }) } catch (e: Throwable) { - logW(TAG, e) + logW(TAG, this.lpparam.packageName, e) } } } @@ -102,7 +102,7 @@ object QSControlDetailBackgroundAlpha : BaseHook() { afterGetClassLoader(classLoader) } catch (e: Throwable) { // Do Nothings. - logW(TAG, e) + logW(TAG, this@QSControlDetailBackgroundAlpha.lpparam.packageName, e) } } }) @@ -135,7 +135,7 @@ object QSControlDetailBackgroundAlpha : BaseHook() { afterGetClassLoader(classLoader) } catch (e: Throwable) { // Do Nothings. - logW(TAG, e) + logW(TAG, this@QSControlDetailBackgroundAlpha.lpparam.packageName, e) } } }) diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/SunlightMode.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/SunlightMode.java index 40df7585a8..a58d4266e1 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/SunlightMode.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/controlcenter/SunlightMode.java @@ -99,7 +99,7 @@ public void setPath() { intentListening = true;*/ if (path == null) { useSystem = true; - XposedLogUtils.logE(TAG, "Missing directory, unable to set this mode: true"); + XposedLogUtils.logE(TAG, this.lpparam.packageName, "Missing directory, unable to set this mode: true"); } else { ShellUtils.execCommand("chmod 777 " + path, true, false); // XposedLogUtils.logI("setPath: im get file: " + path); @@ -168,7 +168,7 @@ public void tileClick(MethodHookParam param, String tileName) { Settings.System.putInt(mContext.getContentResolver(), sunlightMode, 1); refreshState(param.thisObject); } else { - XposedLogUtils.logE(TAG, "ERROR Int For sunlight_mode"); + XposedLogUtils.logE(TAG, this.lpparam.packageName, "ERROR Int For sunlight_mode"); } } else { if (!useSystem) { @@ -334,7 +334,7 @@ public ArrayMap tileUpdateState(MethodHookParam param, Class } } } catch (Settings.SettingNotFoundException e) { - XposedLogUtils.logE(TAG, "tileUpdateState: Missing system API: " + sunlightMode); + XposedLogUtils.logE(TAG, this.lpparam.packageName, "tileUpdateState: Missing system API: " + sunlightMode); } try { if (!mMode) { @@ -359,7 +359,7 @@ public ArrayMap tileUpdateState(MethodHookParam param, Class } // sLog("tileUpdateState: isEnable is: " + isEnable); } catch (Settings.SettingNotFoundException e) { - XposedLogUtils.logE(TAG, "tileUpdateState: Not Find sunlight_mode"); + XposedLogUtils.logE(TAG, this.lpparam.packageName, "tileUpdateState: Not Find sunlight_mode"); } ArrayMap tileResMap = new ArrayMap<>(); tileResMap.put("custom_SUN_Enable", isEnable ? 1 : 0); diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/navigation/HandleLineCustom.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/navigation/HandleLineCustom.kt index 2d522bdca8..19089220dd 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/navigation/HandleLineCustom.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/navigation/HandleLineCustom.kt @@ -13,7 +13,7 @@ object HandleLineCustom : BaseHook() { "com.android.systemui", "dimen", "navigation_handle_radius", mNavigationHandleRadius ) } catch (e: Exception) { - XposedLogUtils.logI(e.toString()) + XposedLogUtils.logE(TAG, this.lpparam.packageName, e.toString()) } /* val mNavigationHandleHeight = @@ -59,8 +59,8 @@ object HandleLineCustom : BaseHook() { mPrefsMap.getInt("system_ui_navigation_handle_custom_color", -872415232) val mNavigationHandleDarkColor = mPrefsMap.getInt("system_ui_navigation_handle_custom_color_dark", -1) - XposedLogUtils.logI("mNavigationHandleLightColor is $mNavigationHandleLightColor") - XposedLogUtils.logI("mNavigationHandleDarkColor is $mNavigationHandleDarkColor") + XposedLogUtils.logI(TAG, "com.android.systemui", "mNavigationHandleLightColor is $mNavigationHandleLightColor") + XposedLogUtils.logI(TAG, "com.android.systemui", "mNavigationHandleDarkColor is $mNavigationHandleDarkColor") resParam.res.setReplacement( "com.android.systemui", "color", diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/navigation/NavigationCustom.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/navigation/NavigationCustom.java index 842edecd31..2667ef6b11 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/navigation/NavigationCustom.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/navigation/NavigationCustom.java @@ -15,22 +15,22 @@ public void init() { try { mResHook.setDensityReplacement("com.android.systemui", "dimen", "navigation_bar_height", mNavigationHeight); } catch (Exception e) { - XposedLogUtils.logI(String.valueOf(e)); + XposedLogUtils.logE(TAG, this.lpparam.packageName, "navigation_bar_height error", e); } try { mResHook.setDensityReplacement("com.android.systemui", "dimen", "navigation_bar_height_landscape", mNavigationHeightLand); } catch (Exception e) { - XposedLogUtils.logI(String.valueOf(e)); + XposedLogUtils.logE(TAG, this.lpparam.packageName, "navigation_bar_height_landscape error", e); } try { mResHook.setDensityReplacement("com.android.systemui", "dimen", "navigation_bar_frame_height", mNavigationFrameHeight); } catch (Exception e) { - XposedLogUtils.logI(String.valueOf(e)); + XposedLogUtils.logE(TAG, this.lpparam.packageName, "navigation_bar_frame_height error", e); } try { mResHook.setDensityReplacement("com.android.systemui", "dimen", "navigation_bar_frame_height_landscape", mNavigationFrameHeightLand); } catch (Exception e) { - XposedLogUtils.logI(String.valueOf(e)); + XposedLogUtils.logE(TAG, this.lpparam.packageName, "navigation_bar_frame_height_landscape error", e); } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/statusbar/DisplayHardwareDetail.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/statusbar/DisplayHardwareDetail.java index efe6c30c2a..5c8b3ab0fc 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/statusbar/DisplayHardwareDetail.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/statusbar/DisplayHardwareDetail.java @@ -279,7 +279,7 @@ public void handleMessage(@NonNull Message message) { try { cpuReader = new RandomAccessFile("/sys/devices/virtual/thermal/thermal_zone" + mPrefsMap.getString("system_ui_statusbar_temp_fix_cpu_get", "0") + "/temp", "r"); } catch (FileNotFoundException e) { - XposedLogUtils.logI("get /sys/devices/virtual/thermal/thermal_zone*/temp (" + mPrefsMap.getString("system_ui_statusbar_temp_fix_cpu_get", "0") + ") failed: " + e); + XposedLogUtils.logI(TAG, DisplayHardwareDetail.this.lpparam.packageName, "get /sys/devices/virtual/thermal/thermal_zone*/temp (" + mPrefsMap.getString("system_ui_statusbar_temp_fix_cpu_get", "0") + ") failed: " + e); } } cpuProps = cpuReader.readLine(); @@ -303,7 +303,7 @@ public void handleMessage(@NonNull Message message) { try { rawCurr = -1 * Math.round(Integer.parseInt(props.getProperty("POWER_SUPPLY_CURRENT_NOW")) / 1000f);// 概率fc } catch (NumberFormatException e) { - XposedLogUtils.logI("get POWER_SUPPLY_CURRENT_NOW failed: " + e); + XposedLogUtils.logE(TAG, DisplayHardwareDetail.this.lpparam.packageName, "get POWER_SUPPLY_CURRENT_NOW failed", e); } String preferred = "mA"; if (mPrefsMap.getBoolean("system_ui_statusbar_battery_electric_current")) { // 电流始终显示正值 @@ -433,7 +433,7 @@ private TextView createBatteryDetailView(Context mContext, LinearLayout.LayoutPa if (!mPrefsMap.getBoolean("system_ui_statusbar_" + subKey + "_line_show") || mPrefsMap.getStringAsInt("system_ui_statusbar_" + subKey + "_show", 1) != 1) { fontSize = (float) (fontSize * 0.5); } - XposedLogUtils.logI("fontsize = " + fontSize); + XposedLogUtils.logI(TAG, this.lpparam.packageName, "fontsize = " + fontSize); int align = mPrefsMap.getStringAsInt("system_ui_status_bar_" + subKey + "_align", 1); int fixedWidth = mPrefsMap.getInt("system_ui_statusbar_" + subKey + "_fixedcontent_width", 10); int leftMargin = mPrefsMap.getInt("system_ui_statusbar_" + subKey + "_left_margin", 4); diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/statusbar/SelectiveHideIconForAlarmClock.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/statusbar/SelectiveHideIconForAlarmClock.java index 5d96ebc2e5..36d648084a 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/statusbar/SelectiveHideIconForAlarmClock.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/statusbar/SelectiveHideIconForAlarmClock.java @@ -106,9 +106,9 @@ private void updateAlarmVisibility(Object thisObject, boolean state) { XposedHelpers.callMethod(mIconController, "setIconVisibility", "alarm_clock", vis); mIconController = XposedHelpers.getObjectField(thisObject, "miuiDripLeftStatusBarIconController"); XposedHelpers.callMethod(mIconController, "setIconVisibility", "alarm_clock", vis); - XposedLogUtils.logI("Now is " + diffHours + "min remain, show when " + vis + "min remain."); + XposedLogUtils.logI(TAG, this.lpparam.packageName, "Now is " + diffHours + "min remain, show when " + vis + "min remain."); } catch (Throwable t) { - XposedLogUtils.logI("updateAlarmVisibility failed by " + t); + XposedLogUtils.logE(TAG, this.lpparam.packageName, "updateAlarmVisibility failed", t); } } @@ -141,7 +141,7 @@ public long getNextMIUIAlarmTime(Context context) { nextTime = cal.getTimeInMillis(); } catch (Throwable t) { - XposedLogUtils.logE(TAG, t); + XposedLogUtils.logE(TAG, this.lpparam.packageName, t); } return nextTime; } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/statusbar/icon/all/BatteryStyle.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/statusbar/icon/all/BatteryStyle.kt index 60bff2c225..60cb59f7d2 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/statusbar/icon/all/BatteryStyle.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/statusbar/icon/all/BatteryStyle.kt @@ -139,7 +139,7 @@ object BatteryStyle : BaseHook() { mBatteryPercentMarkView.setPaddingRelative(0, topMargin, markRightMargin, 0) } } catch (t: Throwable) { - XposedLogUtils.logE(TAG, t) + XposedLogUtils.logE(TAG, this.lpparam.packageName, t) } } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/statusbar/model/MobileTypeSingleHook.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/statusbar/model/MobileTypeSingleHook.kt index 4b7cee99d9..336dc2487b 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/statusbar/model/MobileTypeSingleHook.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/statusbar/model/MobileTypeSingleHook.kt @@ -161,7 +161,7 @@ object MobileTypeSingleHook : BaseHook() { } } } catch (t: Throwable) { - XposedLogUtils.logE(TAG, t) + XposedLogUtils.logE(TAG, this.lpparam.packageName, t) } // 显示非上网卡的大图标 diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/statusbar/network/NetworkSpeed.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/statusbar/network/NetworkSpeed.kt index f28f257870..b80b23eca3 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/statusbar/network/NetworkSpeed.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/statusbar/network/NetworkSpeed.kt @@ -72,7 +72,7 @@ object NetworkSpeed : BaseHook() { } } } catch (t: Throwable) { - XposedLogUtils.logE(TAG, t) + XposedLogUtils.logE(TAG, this.lpparam.packageName, t) tx = TrafficStats.getTotalTxBytes() rx = TrafficStats.getTotalRxBytes() } @@ -99,7 +99,7 @@ object NetworkSpeed : BaseHook() { (if (f < 100.0f) String.format("%.1f", f) else String.format("%.0f", f)) + String.format("%s$unitSuffix", pre) } } catch (t: Throwable) { - XposedLogUtils.logE(TAG, t) + XposedLogUtils.logE(TAG, this.lpparam.packageName, t) "" } } @@ -116,7 +116,7 @@ object NetworkSpeed : BaseHook() { } if (nscCls == null) { - XposedLogUtils.logE(TAG, "DetailedNetSpeedHook: No NetworkSpeed view or controller") + XposedLogUtils.logE(TAG, this.lpparam.packageName, "DetailedNetSpeedHook: No NetworkSpeed view or controller") } else { nscCls.methodFinder().first { name == "getTotalByte" diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/statusbar/network/NetworkSpeedStyle.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/statusbar/network/NetworkSpeedStyle.kt index dd840b897c..f80a487c01 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/statusbar/network/NetworkSpeedStyle.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/statusbar/network/NetworkSpeedStyle.kt @@ -49,7 +49,7 @@ object NetworkSpeedStyle : BaseHook() { meter.setTextSize(TypedValue.COMPLEX_UNIT_DIP, fontSize.toFloat()) } } catch (e: Exception) { - XposedLogUtils.logE(TAG, e) + XposedLogUtils.logE(TAG, this@NetworkSpeedStyle.lpparam.packageName, e) } } } @@ -76,7 +76,7 @@ object NetworkSpeedStyle : BaseHook() { meter.setTextSize(TypedValue.COMPLEX_UNIT_DIP, fontSize.toFloat()) } } catch (e: Exception) { - XposedLogUtils.logE(TAG, e) + XposedLogUtils.logE(TAG, this@NetworkSpeedStyle.lpparam.packageName, e) } } @@ -135,7 +135,7 @@ object NetworkSpeedStyle : BaseHook() { meter.setLineSpacing(0f, spacing) } } catch (e: Exception) { - XposedLogUtils.logE(TAG, e) + XposedLogUtils.logE(TAG, this@NetworkSpeedStyle.lpparam.packageName, e) } } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/thememanager/DisableThemeAdNew.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/thememanager/DisableThemeAdNew.kt index b0638908dc..ece1b8093e 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/thememanager/DisableThemeAdNew.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/thememanager/DisableThemeAdNew.kt @@ -54,7 +54,7 @@ class DisableThemeAdNew : BaseHook() { } } } catch (t: Throwable) { - XposedLogUtils.logE(TAG, t) + XposedLogUtils.logE(TAG, this.lpparam.packageName, t) } } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/thememanager/ThemeCrackNew.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/thememanager/ThemeCrackNew.kt index 6f57189adf..a964af2d08 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/thememanager/ThemeCrackNew.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/thememanager/ThemeCrackNew.kt @@ -31,7 +31,7 @@ class ThemeCrackNew { } } } catch (t: Throwable) { - XposedLogUtils.logE(TAG, t) + XposedLogUtils.logE(TAG, "com.android.thememanager", t) } try { loadClass("com.android.thememanager.basemodule.views.DiscountPriceView").methodFinder().filterByParamCount(2) @@ -41,7 +41,7 @@ class ThemeCrackNew { } } } catch (t: Throwable) { - XposedLogUtils.logE(TAG, t) + XposedLogUtils.logE(TAG, "com.android.thememanager", t) } try { loadClass("com.android.thememanager.recommend.view.listview.viewholder.LargeIconDetailRecommendViewHolder").methodFinder().filterByParamCount(1) @@ -51,14 +51,14 @@ class ThemeCrackNew { } } } catch (t: Throwable) { - XposedLogUtils.logE(TAG, t) + XposedLogUtils.logE(TAG, "com.android.thememanager", t) } try { loadClass("com.miui.maml.widget.edit.MamlutilKt").methodFinder().filterByName("themeManagerSupportPaidWidget").first().createHook { returnConstant(false) } } catch (t: Throwable) { - XposedLogUtils.logE(TAG, t) + XposedLogUtils.logE(TAG, "com.android.thememanager", t) } try { diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/updater/DeviceModify.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/updater/DeviceModify.kt index 87f2808910..b2c954c709 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/updater/DeviceModify.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/updater/DeviceModify.kt @@ -35,7 +35,7 @@ object DeviceModify : BaseHook() { methodData.getMethodInstance(lpparam.classLoader).hookBeforeMethod { if (it.args[0] == "ro.product.mod_device") it.result = deviceName } - XposedLogUtils.logI("(Updater) dexkit method is $methodData") + XposedLogUtils.logI(TAG, this.lpparam.packageName, "dexkit method is $methodData") } /*try { diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/various/DialogCustom.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/various/DialogCustom.java index f9da76342c..e9157fa8d2 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/various/DialogCustom.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/various/DialogCustom.java @@ -64,7 +64,7 @@ protected void after(MethodHookParam param) { for (Method method : mAlertControllerCls.getDeclaredMethods()) { if (method.getName().equals("setupDialogPanel")) { oldMethodFound = true; - XposedLogUtils.logI(TAG, method.getName()); + XposedLogUtils.logI(TAG, this.lpparam.packageName, method.getName()); } mAllMethodList.add(method); } @@ -76,7 +76,7 @@ protected void after(MethodHookParam param) { } if (oldMethodFound) { - XposedLogUtils.logI(TAG, "oldMethod found."); + XposedLogUtils.logI(TAG, this.lpparam.packageName, "oldMethod found."); findAndHookMethod(mAlertControllerCls, "setupDialogPanel", Configuration.class, new MethodHook() { @Override @@ -99,7 +99,7 @@ protected void after(MethodHookParam param) { }); } else { - XposedLogUtils.logI(TAG, "oldMethod not found."); + XposedLogUtils.logI(TAG, this.lpparam.packageName, "oldMethod not found."); hookAllMethods(mAlertControllerCls, "updateDialogPanel", new MethodHook() { @Override protected void after(MethodHookParam param) { @@ -143,7 +143,7 @@ protected void after(MethodHookParam param) { } }); } catch (Exception e) { - XposedLogUtils.logE(TAG, e); + XposedLogUtils.logE(TAG, this.lpparam.packageName, e); } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/various/DialogGravity.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/various/DialogGravity.java index 4e67bc9fb0..8722ba1b2e 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/various/DialogGravity.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/various/DialogGravity.java @@ -5,6 +5,7 @@ import android.content.Context; import android.content.res.Configuration; +import android.os.Build; import android.view.Gravity; import android.view.View; import android.widget.FrameLayout; @@ -74,7 +75,9 @@ protected void after(MethodHookParam param) throws Throwable { mParentPanel.setLayoutParams(layoutParams); /*new BlurUtils(mParentPanel);*/ - new BlurUtils(mParentPanel, "default"); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { + new BlurUtils(mParentPanel, "default"); + } } }); @@ -83,7 +86,6 @@ protected void after(MethodHookParam param) throws Throwable { for (Method method : methodList) { if (Arrays.equals(method.getParameterTypes(), new Class[]{Configuration.class}) && method.getReturnType() == Void.TYPE && method.getModifiers() == 2 && method.getParameterCount() == 1) { - XposedLogUtils.logI(TAG, "2222" + method.getName()); XposedHelpers.findAndHookMethod(mDialogCls, method.getName(), new MethodHook() { @Override protected void after(MethodHookParam param) throws Throwable { @@ -107,7 +109,9 @@ protected void after(MethodHookParam param) throws Throwable { mParentPanel.setLayoutParams(layoutParams); /*new BlurUtils(mParentPanel);*/ - new BlurUtils(mParentPanel, "default"); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { + new BlurUtils(mParentPanel, "default"); + } } }); } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/various/NoAccessDeviceLogsRequest.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/various/NoAccessDeviceLogsRequest.kt index a5d36ff5cf..0aa38708b9 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/various/NoAccessDeviceLogsRequest.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/various/NoAccessDeviceLogsRequest.kt @@ -51,11 +51,11 @@ object NoAccessDeviceLogsRequest : BaseHook() { client ) // debug 用,取消禁用详细日志输出可进行调试 - XposedLogUtils.logI("NoAccessDeviceLogsRequest bypass for package=$packageName uid=$uid") + XposedLogUtils.logI(TAG, this@NoAccessDeviceLogsRequest.lpparam.packageName, "NoAccessDeviceLogsRequest bypass for package=$packageName uid=$uid") param.result = null } catch (t: Throwable) { // 输出异常日志 - XposedLogUtils.logE("NoAccessDeviceLogsRequest -> processNewLogAccessRequest", t) + XposedLogUtils.logE(TAG, this@NoAccessDeviceLogsRequest.lpparam.packageName, "processNewLogAccessRequest failed", t) } } }) @@ -70,7 +70,7 @@ object NoAccessDeviceLogsRequest : BaseHook() { } } } catch (t: Throwable) { - XposedLogUtils.logE(TAG, t) + XposedLogUtils.logE(TAG, this.lpparam.packageName, t) }*/ } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/voiceassist/UseThirdPartyBrowser.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/voiceassist/UseThirdPartyBrowser.kt index 4b15ed4e55..5a3587b87f 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/voiceassist/UseThirdPartyBrowser.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/voiceassist/UseThirdPartyBrowser.kt @@ -33,7 +33,7 @@ object UseThirdPartyBrowser : BaseHook() { } catch (e: Throwable) { e.printStackTrace() }*/ - XposedLogUtils.logI("com.miui.voiceassist browserActivityWithIntent method is $browserActivityWithIntent") + XposedLogUtils.logI(TAG, this.lpparam.packageName, "com.miui.voiceassist browserActivityWithIntent method is $browserActivityWithIntent") // Class clazz = XposedHelpers.findClass("e.D.L.pa.Wa", lpparam.classLoader); XposedBridge.hookMethod(browserActivityWithIntent, object : XC_MethodHook() { @Throws(Throwable::class) @@ -41,10 +41,10 @@ object UseThirdPartyBrowser : BaseHook() { super.beforeHookedMethod(param) // XposedBridge.log("0)Hook到Activity启动,开始判断"); val intent = param.args[0] as android.content.Intent - XposedLogUtils.logI(intent.toString()) + XposedLogUtils.logI(TAG, this@UseThirdPartyBrowser.lpparam.packageName, intent.toString()) try { if (intent.getPackage() == "com.android.browser") { - XposedLogUtils.logI("com.miui.voiceassist get URL " + intent.dataString) + XposedLogUtils.logI(TAG, this@UseThirdPartyBrowser.lpparam.packageName, "com.miui.voiceassist get URL " + intent.dataString) val uri = android.net.Uri.parse(intent.dataString) val newIntent = android.content.Intent() newIntent.setAction("android.intent.action.VIEW") @@ -52,7 +52,7 @@ object UseThirdPartyBrowser : BaseHook() { param.args[0] = newIntent } } catch (e: Exception) { - XposedLogUtils.logE(TAG, e) + XposedLogUtils.logE(TAG, this@UseThirdPartyBrowser.lpparam.packageName, e) } } }) diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/weather/SetDeviceLevel.java b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/weather/SetDeviceLevel.java index 5b0cf654f9..e426fbecf2 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/weather/SetDeviceLevel.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/weather/SetDeviceLevel.java @@ -22,7 +22,7 @@ public void init() { public static Bundle checkBundle(Context context, Bundle bundle) { if (context == null) { - XposedLogUtils.logI("SetWeatherDeviceLevel", "Context is null!"); + XposedLogUtils.logE("SetWeatherDeviceLevel","com.miui.weather2", "Context is null!"); return null; } if (bundle == null) bundle = new Bundle(); diff --git a/app/src/main/java/com/sevtinge/hyperceiler/utils/ColorUtils.kt b/app/src/main/java/com/sevtinge/hyperceiler/utils/ColorUtils.kt index 1fc8ba2cf7..315c5059b0 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/utils/ColorUtils.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/utils/ColorUtils.kt @@ -13,7 +13,7 @@ object ColorUtils { originalColor = Color.valueOf(color) } catch (e: Throwable) { // 颜色转换失败 - XposedLogUtils.logI("colorToHex", "ColorUtils colorToHex Hook failed by: $e") + XposedLogUtils.logI("ColorUtils", "colorToHex", "ColorUtils colorToHex Hook failed by: $e") } val alpha = (originalColor.alpha() * 255).toInt() val red = (originalColor.red() * 255).toInt() diff --git a/app/src/main/java/com/sevtinge/hyperceiler/utils/HookUtils.kt b/app/src/main/java/com/sevtinge/hyperceiler/utils/HookUtils.kt index 0189bf8b13..f765302cdf 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/utils/HookUtils.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/utils/HookUtils.kt @@ -18,17 +18,6 @@ object HookUtils { return dpValue * scale + 0.5f } - fun getClass(className: String, classLoader: ClassLoader): Class<*>? { - val result = XposedHelpers.findClassIfExists( - className, - classLoader - ) - if (result == null) { - logE("getClass", "'$className' is NOT found.") - } - return result - } - fun replaceMethodResult( className: String, classLoader: ClassLoader, diff --git a/app/src/main/java/com/sevtinge/hyperceiler/utils/PropertyUtils.kt b/app/src/main/java/com/sevtinge/hyperceiler/utils/PropertyUtils.kt index 4a0db735c9..1e9e6c3bbe 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/utils/PropertyUtils.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/utils/PropertyUtils.kt @@ -15,7 +15,7 @@ object PropertyUtils { kotlin.runCatching { get.invoke(null, prop, defaultValue) as String? }.onFailure { - logW("", it) + logW("PropertyUtils", it) }.onSuccess { return it } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/utils/TileUtils.java b/app/src/main/java/com/sevtinge/hyperceiler/utils/TileUtils.java index c992b7396c..076d26f367 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/utils/TileUtils.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/utils/TileUtils.java @@ -16,9 +16,9 @@ import de.robv.android.xposed.XposedHelpers; public abstract class TileUtils extends BaseHook { + final boolean[] isListened = {false}; Class mResourceIcon; Class mQSFactory; - final boolean[] isListened = {false}; /*固定语法,必须调用。 * 调用方法: @@ -55,7 +55,7 @@ protected void before(MethodHookParam param) { } }); } catch (NoSuchMethodException e) { - XposedLogUtils.logE(TAG, "Don't Have isAvailable: " + e); + XposedLogUtils.logE(TAG, "com.android.systemui", "Don't Have isAvailable: " + e); } tileName(myTile); // 不需要覆写 try { @@ -70,7 +70,7 @@ protected void before(MethodHookParam param) { tileListening(param, tileName); param.setResult(null); } catch (Throwable e) { - XposedLogUtils.logE(TAG, "handleSetListening have Throwable: " + e); + XposedLogUtils.logE(TAG, "com.android.systemui", "handleSetListening have Throwable: " + e); param.setResult(null); } } @@ -81,7 +81,7 @@ protected void before(MethodHookParam param) { } }); } catch (NoSuchMethodException e) { - XposedLogUtils.logE(TAG, "Don't Have handleSetListening: " + e); + XposedLogUtils.logE(TAG, "com.android.systemui", "Don't Have handleSetListening: " + e); } try { myTile.getDeclaredMethod("getLongClickIntent"); @@ -100,7 +100,7 @@ protected void before(MethodHookParam param) { } }); } catch (NoSuchMethodException e) { - XposedLogUtils.logE(TAG, "Don't Have getLongClickIntent: " + e); + XposedLogUtils.logE(TAG, "com.android.systemui", "Don't Have getLongClickIntent: " + e); } try { myTile.getDeclaredMethod("handleLongClick", View.class); @@ -122,7 +122,7 @@ protected void before(MethodHookParam param) { } }); } catch (NoSuchMethodException t) { - XposedLogUtils.logE(TAG, "Don't Have handleLongClick: " + t); + XposedLogUtils.logE(TAG, "com.android.systemui", "Don't Have handleLongClick: " + t); } try { myTile.getDeclaredMethod("handleClick", View.class); @@ -136,7 +136,7 @@ protected void before(MethodHookParam param) { tileClick(param, tileName); param.setResult(null); } catch (Throwable e) { - XposedLogUtils.logE(TAG, "handleClick have Throwable: " + e); + XposedLogUtils.logE(TAG, "com.android.systemui", "handleClick have Throwable: " + e); param.setResult(null); } } @@ -155,7 +155,7 @@ protected void after(MethodHookParam param) { } }); } catch (NoSuchMethodException e) { - XposedLogUtils.logE(TAG, "Don't Have handleClick: " + e); + XposedLogUtils.logE(TAG, "com.android.systemui", "Don't Have handleClick: " + e); } hookAllMethods(myTile, "handleUpdateState", new MethodHook() { @Override @@ -235,7 +235,7 @@ private void SystemUiHook() { String custom = customName(); if (needCustom()) { if (custom.equals("")) { - XposedLogUtils.logE(TAG, "Error custom:" + custom); + XposedLogUtils.logE(TAG, "com.android.systemui", "Error custom:" + custom); return; } try { @@ -258,7 +258,7 @@ protected void after(MethodHookParam param) { } }); } catch (NoSuchMethodException e) { - XposedLogUtils.logE(TAG, "Don't Have onCreate: " + e); + XposedLogUtils.logE(TAG, "com.android.systemui", "Don't Have onCreate: " + e); } } } @@ -284,7 +284,7 @@ protected void before(MethodHookParam param) { } }); } catch (NoSuchMethodException e) { - XposedLogUtils.logE(TAG, "Don't Have " + customTileProvider()[1], e); + XposedLogUtils.logE(TAG, "com.android.systemui", "Don't Have " + customTileProvider()[1], e); } } } @@ -315,7 +315,7 @@ protected void before(MethodHookParam param) { } ); } catch (NoSuchMethodException e) { - XposedLogUtils.logE(TAG, "Don't Have " + customTileProvider()[2], e); + XposedLogUtils.logE(TAG, "com.android.systemui", "Don't Have " + customTileProvider()[2], e); } } } @@ -334,7 +334,7 @@ protected void before(MethodHookParam param) { } ); } catch (NoSuchMethodException e) { - XposedLogUtils.logE(TAG, "Don't Have handleShowStateMessage: " + e); + XposedLogUtils.logE(TAG, "com.android.systemui", "Don't Have handleShowStateMessage: " + e); } } @@ -350,7 +350,7 @@ private void tileName(Class myTile) { int customValue = customValue(); String custom = customName(); if (customValue == -1 || custom.equals("")) { - XposedLogUtils.logE(TAG, "Error customValue:" + customValue); + XposedLogUtils.logE(TAG, "com.android.systemui", "Error customValue:" + customValue); return; } try { @@ -369,7 +369,7 @@ protected void before(MethodHookParam param) throws Throwable { } }); } catch (NoSuchMethodException e) { - XposedLogUtils.logE(TAG, "Don't Have getTileLabel: ", e); + XposedLogUtils.logE(TAG, "com.android.systemui", "Don't Have getTileLabel: ", e); } } } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/utils/log/XposedLogUtils.java b/app/src/main/java/com/sevtinge/hyperceiler/utils/log/XposedLogUtils.java index a8517714a4..c231fe7d6f 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/utils/log/XposedLogUtils.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/utils/log/XposedLogUtils.java @@ -2,16 +2,22 @@ import static com.sevtinge.hyperceiler.utils.BuildUtils.getBuildType; -import java.util.Optional; - -import com.sevtinge.hyperceiler.BuildConfig; +import com.sevtinge.hyperceiler.XposedInit; import com.sevtinge.hyperceiler.module.base.BaseHook; +import com.sevtinge.hyperceiler.utils.PrefsMap; import de.robv.android.xposed.XposedBridge; +import de.robv.android.xposed.callbacks.XC_LoadPackage; public class XposedLogUtils { + public XC_LoadPackage.LoadPackageParam mLoadPackageParam = null; + + public void init(XC_LoadPackage.LoadPackageParam lpparam) { + mLoadPackageParam = lpparam; + } + private static final boolean isDebugVersion = getBuildType().equals("debug"); private static final boolean isReleaseVersion = getBuildType().equals("release"); private static boolean isDisableDetailLog = BaseHook.mPrefsMap.getBoolean("settings_disable_detailed_log"); @@ -22,10 +28,10 @@ public static void logI(String msg) { XposedBridge.log("[HyperCeiler][I]: " + msg); } - public static void logI(String tag, String msg) { + public static void logI(String tag, String pkg, String msg) { if (!isDebugVersion) return; if (isDisableDetailLog) return; - XposedBridge.log("[HyperCeiler][I][" + tag + "]: " + msg); + XposedBridge.log("[HyperCeiler][I][" + pkg + "][" + tag + "]: " + msg); } public static void logW(String msg) { @@ -34,6 +40,36 @@ public static void logW(String msg) { XposedBridge.log("[HyperCeiler][W]: " + msg); } + public static void logW(String tag, String pkg, String msg) { + if (isReleaseVersion) return; + if (isDisableDetailLog) return; + XposedBridge.log("[HyperCeiler][W][" + pkg + "][" + tag + "]: " + msg); + } + + public static void logW(String tag, String pkg, Throwable log) { + if (isReleaseVersion) return; + if (isDisableDetailLog) return; + XposedBridge.log("[HyperCeiler][W][" + pkg + "][" + tag + "]: " + log); + } + + public static void logW(String tag, String pkg, String msg, Exception exp) { + if (isReleaseVersion) return; + if (isDisableDetailLog) return; + XposedBridge.log("[HyperCeiler][W][" + pkg + "][" + tag + "]: " + msg + ", by" + exp); + } + + public static void logW(String tag, String pkg, String msg, Throwable log) { + if (isReleaseVersion) return; + if (isDisableDetailLog) return; + XposedBridge.log("[HyperCeiler][W][" + pkg + "][" + tag + "]: " + msg + ", by" + log); + } + + public static void logI(String tag, String msg) { + if (!isDebugVersion) return; + if (isDisableDetailLog) return; + XposedBridge.log("[HyperCeiler][I][" + tag + "]: " + msg); + } + public static void logW(String tag, String msg) { if (isReleaseVersion) return; if (isDisableDetailLog) return; @@ -52,30 +88,28 @@ public static void logW(String tag, String msg, Exception exp) { XposedBridge.log("[HyperCeiler][W][" + tag + "]: " + msg + ", by" + exp); } - public static void logW(String tag, String msg, Throwable log) { - if (isReleaseVersion) return; - if (isDisableDetailLog) return; - XposedBridge.log("[HyperCeiler][W][" + tag + "]: " + msg + ", by" + log); - } - public static void logE(String tag, String msg) { XposedBridge.log("[HyperCeiler][E][" + tag + "]: " + msg); } - public static void logE(String tag, Throwable log) { - XposedBridge.log("[HyperCeiler][E][" + tag + "]: " + log); + public static void logE(String tag, String pkg, String msg) { + XposedBridge.log("[HyperCeiler][E][" + pkg + "][" + tag + "]: " + msg); + } + + public static void logE(String tag, String pkg, Throwable log) { + XposedBridge.log("[HyperCeiler][E][" + pkg + "][" + tag + "]: " + log); } - public static void logE(String tag, Exception exp) { - XposedBridge.log("[HyperCeiler][E][" + tag + "]: " + exp); + public static void logE(String tag, String pkg, Exception exp) { + XposedBridge.log("[HyperCeiler][E][" + pkg + "][" + tag + "]: " + exp); } - public static void logE(String tag, String msg, Throwable log) { - XposedBridge.log("[HyperCeiler][E][" + tag + "]: " + msg + ", by" + log); + public static void logE(String tag, String pkg, String msg, Throwable log) { + XposedBridge.log("[HyperCeiler][E][" + pkg + "][" + tag + "]: " + msg + ", by" + log); } - public static void logE(String tag, String msg, Exception exp) { - XposedBridge.log("[HyperCeiler][E][" + tag + "]: " + msg + ", by" + exp); + public static void logE(String tag, String pkg, String msg, Exception exp) { + XposedBridge.log("[HyperCeiler][E][" + pkg + "][" + tag + "]: " + msg + ", by" + exp); } public static void logD(String msg) { @@ -83,9 +117,9 @@ public static void logD(String msg) { XposedBridge.log("[HyperCeiler][D]: " + msg); } - public static void logD(String tag, String msg) { + public static void logD(String tag, String pkg, String msg) { if (!isDebugVersion) return; - XposedBridge.log("[HyperCeiler][D][" + tag + "]: " + msg); + XposedBridge.log("[HyperCeiler][D][" + pkg + "][" + tag + "]: " + msg); } }