Skip to content

Commit

Permalink
fix: pad load hook failed
Browse files Browse the repository at this point in the history
  • Loading branch information
lingqiqi5211 committed Dec 22, 2024
1 parent bd88e99 commit 8ac48e3
Show file tree
Hide file tree
Showing 89 changed files with 93 additions and 92 deletions.
3 changes: 2 additions & 1 deletion app/processor/src/main/java/com/hchen/database/HookBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@

/*
* 是否是 pad 专属
* 0 通用,1 Pad,2 手机
* */
boolean isPad() default false;
int isPad() default 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ public class DataBase {
public String mTargetPackage;
public int mTargetSdk;
public float mTargetOSVersion;
public boolean isPad;
public int isPad;
public DataBase(String targetPackage, int targetSdk, float targetOSVersion, boolean isPad){
public DataBase(String targetPackage, int targetSdk, float targetOSVersion, int isPad){
this.mTargetPackage = targetPackage;
this.mTargetSdk = targetSdk;
this.mTargetOSVersion = targetOSVersion;
Expand All @@ -108,7 +108,7 @@ public void accept(Element element) {
String targetPackage = hookBase.targetPackage();
int targetSdk = hookBase.targetSdk();
float targetOSVersion = hookBase.targetOSVersion();
boolean isPad = hookBase.isPad();
int isPad = hookBase.isPad();
try {
writer.write(" ");
writer.write("dataMap.put(\"" + fullClassName + "\", new DataBase(\"" + targetPackage + "\", "
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/sevtinge/hyperceiler/XposedInit.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public void accept(String s, DataBase dataBase) {
return;
if (!(dataBase.mTargetOSVersion == -1F) && !(isHyperOSVersion(dataBase.mTargetOSVersion) || isMiuiVersion(dataBase.mTargetOSVersion)))
return;
if (dataBase.isPad != isPad())
if ((dataBase.isPad == 1 && !isPad()) || (dataBase.isPad == 2 && isPad()))
return;

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import com.sevtinge.hyperceiler.module.hook.aiasst.DisableWatermark;
import com.sevtinge.hyperceiler.module.hook.aiasst.UnlockAllCaptions;

@HookBase(targetPackage = "com.xiaomi.aiasst.vision", isPad = false)
@HookBase(targetPackage = "com.xiaomi.aiasst.vision")
public class AiAsst extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.sevtinge.hyperceiler.module.base.BaseModule;
import com.sevtinge.hyperceiler.module.hook.analytics.FuckMiuiUpload;

@HookBase(targetPackage = "com.miui.analytics", isPad = false)
@HookBase(targetPackage = "com.miui.analytics")
public class Analytics extends BaseModule {
@Override
public void handleLoadPackage() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.sevtinge.hyperceiler.module.hook.aod.UnlockAlwaysOnDisplay;
import com.sevtinge.hyperceiler.module.hook.aod.UnlockAodAon;

@HookBase(targetPackage = "com.miui.aod", isPad = false)
@HookBase(targetPackage = "com.miui.aod")
public class Aod extends BaseModule {
@Override
public void handleLoadPackage() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.sevtinge.hyperceiler.module.hook.backup.AllowBackupAllApps;
import com.sevtinge.hyperceiler.module.hook.backup.UnlockBrokenScreenBackup;

@HookBase(targetPackage = "com.miui.backup", isPad = false)
@HookBase(targetPackage = "com.miui.backup")
public class Backup extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.sevtinge.hyperceiler.module.hook.barrage.AnyBarrage;
import com.sevtinge.hyperceiler.module.hook.barrage.CustomBarrageLength;

@HookBase(targetPackage = "com.xiaomi.barrage", isPad = false)
@HookBase(targetPackage = "com.xiaomi.barrage")
public class Barrage extends BaseModule {
@Override
public void handleLoadPackage() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import com.sevtinge.hyperceiler.module.hook.browser.EnableDebugEnvironment;
import com.sevtinge.hyperceiler.module.hook.various.UnlockSuperClipboard;

@HookBase(targetPackage = "com.android.browser", isPad = false)
@HookBase(targetPackage = "com.android.browser")
public class Browser extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import com.sevtinge.hyperceiler.module.base.BaseModule;
import com.sevtinge.hyperceiler.module.hook.calendar.UnlockSubscription;

@HookBase(targetPackage = "com.android.calendar", isPad = false)
@HookBase(targetPackage = "com.android.calendar")
public class Calendar extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
import com.sevtinge.hyperceiler.module.hook.camera.UnlockVlog;
import com.sevtinge.hyperceiler.module.hook.camera.UnlockVlogPro;

@HookBase(targetPackage = "com.android.camera", isPad = false)
@HookBase(targetPackage = "com.android.camera")
public class Camera extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import com.sevtinge.hyperceiler.module.hook.community.DeviceModify;
import com.sevtinge.hyperceiler.module.hook.community.FuckDetection;

@HookBase(targetPackage = "com.xiaomi.vipaccount", isPad = false)
@HookBase(targetPackage = "com.xiaomi.vipaccount")
public class Community extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import com.sevtinge.hyperceiler.module.hook.contentextension.UnlockTaplus;
import com.sevtinge.hyperceiler.module.hook.contentextension.UseThirdPartyBrowser;

@HookBase(targetPackage = "com.miui.contentextension", isPad = false)
@HookBase(targetPackage = "com.miui.contentextension")
public class ContentExtension extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.sevtinge.hyperceiler.module.hook.creation.UnlockCreation;
import com.sevtinge.hyperceiler.module.hook.various.UnlockSuperClipboard;

@HookBase(targetPackage = "com.miui.creation", isPad = false)
@HookBase(targetPackage = "com.miui.creation")
public class Creation extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import com.sevtinge.hyperceiler.module.hook.demo.CrashDemo;
import com.sevtinge.hyperceiler.module.hook.demo.ToastTest;

@HookBase(targetPackage = "com.hchen.demo", isPad = false)
@HookBase(targetPackage = "com.hchen.demo")
public class Demo extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import com.sevtinge.hyperceiler.module.base.BaseModule;
import com.sevtinge.hyperceiler.module.hook.downloads.FuckXlDownload;

@HookBase(targetPackage = "com.android.providers.downloads", isPad = false)
@HookBase(targetPackage = "com.android.providers.downloads")
public class Downloads extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import com.sevtinge.hyperceiler.module.base.BaseModule;
import com.sevtinge.hyperceiler.module.hook.downloadsui.AlwaysShowDownloadLink;

@HookBase(targetPackage = "com.android.providers.downloads.ui", isPad = false)
@HookBase(targetPackage = "com.android.providers.downloads.ui")
public class DownloadsUI extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import com.sevtinge.hyperceiler.module.base.BaseModule;
import com.sevtinge.hyperceiler.module.hook.externalstorage.DisableFolderCantUse;

@HookBase(targetPackage = "com.android.externalstorage", isPad = false)
@HookBase(targetPackage = "com.android.externalstorage")
public class ExternalStorage extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import com.sevtinge.hyperceiler.module.hook.fileexplorer.UnlockFileParse;
import com.sevtinge.hyperceiler.module.hook.various.UnlockSuperClipboard;

@HookBase(targetPackage = "com.android.fileexplorer", isPad = false)
@HookBase(targetPackage = "com.android.fileexplorer")
public class FileExplorer extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import com.sevtinge.hyperceiler.module.hook.gallery.UnlockAIGallery;
import com.sevtinge.hyperceiler.module.hook.various.UnlockSuperClipboard;

@HookBase(targetPackage = "com.miui.gallery", isPad = false)
@HookBase(targetPackage = "com.miui.gallery")
public class Gallery extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import com.sevtinge.hyperceiler.module.hook.getapps.DisablePackageMonitor;
import com.sevtinge.hyperceiler.module.hook.getapps.DisableStartPushDialog;

@HookBase(targetPackage = "com.xiaomi.market", isPad = false)
@HookBase(targetPackage = "com.xiaomi.market")
public class GetApps extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.sevtinge.hyperceiler.module.hook.guardprovider.DisableRootedCheck;
import com.sevtinge.hyperceiler.module.hook.guardprovider.DisableUploadAppListNew;

@HookBase(targetPackage = "com.miui.guardprovider", isPad = false)
@HookBase(targetPackage = "com.miui.guardprovider")
public class GuardProvider extends BaseModule {
@Override
public void handleLoadPackage() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@

import java.util.Objects;

@HookBase(targetPackage = "com.miui.home", isPad = true, targetSdk = 33)
@HookBase(targetPackage = "com.miui.home", isPad = 1, targetSdk = 33)
public class HomeT extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@

import java.util.Objects;

@HookBase(targetPackage = "com.miui.home", isPad = true, targetSdk = 34)
@HookBase(targetPackage = "com.miui.home", isPad = 1, targetSdk = 34)
public class HomeU extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@

import java.util.Objects;

@HookBase(targetPackage = "com.miui.home", isPad = true, targetSdk = 35)
@HookBase(targetPackage = "com.miui.home", isPad = 1, targetSdk = 35)
public class HomeV extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@

import java.util.Objects;

@HookBase(targetPackage = "com.miui.home", isPad = false, targetSdk = 33)
@HookBase(targetPackage = "com.miui.home", isPad = 2, targetSdk = 33)
public class HomeT extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@

import java.util.Objects;

@HookBase(targetPackage = "com.miui.home", isPad = false, targetSdk = 34)
@HookBase(targetPackage = "com.miui.home", isPad = 2, targetSdk = 34)
public class HomeU extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@

import java.util.Objects;

@HookBase(targetPackage = "com.miui.home", isPad = false, targetSdk = 35)
@HookBase(targetPackage = "com.miui.home", isPad = 2, targetSdk = 35)
public class HomeV extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import com.sevtinge.hyperceiler.module.base.BaseModule;
import com.sevtinge.hyperceiler.module.hook.htmlviewer.DisableUpdateCloudAllData;

@HookBase(targetPackage = "com.android.htmlviewer", isPad = false)
@HookBase(targetPackage = "com.android.htmlviewer")
public class HtmlViewer extends BaseModule {
@Override
public void handleLoadPackage() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import com.sevtinge.hyperceiler.module.base.BaseModule;
import com.sevtinge.hyperceiler.module.hook.huanji.AllowMoveAllApps;

@HookBase(targetPackage = "com.miui.huanji", isPad = false)
@HookBase(targetPackage = "com.miui.huanji")
public class Huanji extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.sevtinge.hyperceiler.module.hook.incallui.AnswerInHeadUp;
import com.sevtinge.hyperceiler.module.hook.incallui.HideCrbt;

@HookBase(targetPackage = "com.android.incallui", isPad = false)
@HookBase(targetPackage = "com.android.incallui")
public class InCallUi extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.sevtinge.hyperceiler.module.hook.joyose.DisableCloudControl;
import com.sevtinge.hyperceiler.module.hook.joyose.EnableGpuTuner;

@HookBase(targetPackage = "com.xiaomi.joyose", isPad = false)
@HookBase(targetPackage = "com.xiaomi.joyose")
public class Joyose extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.sevtinge.hyperceiler.module.hook.lbe.AutoStart;
import com.sevtinge.hyperceiler.module.hook.lbe.DisableClipboardTip;

@HookBase(targetPackage = "com.lbe.security.miui", isPad = false)
@HookBase(targetPackage = "com.lbe.security.miui")
public class Lbe extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import java.util.Objects;

@HookBase(targetPackage = "com.miui.euicc", isPad = false)
@HookBase(targetPackage = "com.miui.euicc")
public class Lpa extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

import java.util.Objects;

@HookBase(targetPackage = "com.miui.mediaeditor", isPad = false)
@HookBase(targetPackage = "com.miui.mediaeditor")
public class MediaEditor extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import com.sevtinge.hyperceiler.module.base.BaseModule;
import com.sevtinge.hyperceiler.module.hook.cloudservice.CloudList;

@HookBase(targetPackage = "com.miui.cloudservice", isPad = false)
@HookBase(targetPackage = "com.miui.cloudservice")
public class MiCloudService extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import com.sevtinge.hyperceiler.module.hook.milink.NewUnlockHMind;
import com.sevtinge.hyperceiler.module.hook.milink.UnlockMiShare;

@HookBase(targetPackage = "com.milink.service", isPad = false)
@HookBase(targetPackage = "com.milink.service")
public class MiLink extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.sevtinge.hyperceiler.module.hook.misettings.CustomRefreshRate;
import com.sevtinge.hyperceiler.module.hook.misettings.ShowMoreFpsList;

@HookBase(targetPackage = "com.xiaomi.misettings", isPad = false)
@HookBase(targetPackage = "com.xiaomi.misettings")
public class MiSettings extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.sevtinge.hyperceiler.module.hook.misound.BluetoothListener;
import com.sevtinge.hyperceiler.module.hook.misound.IncreaseSamplingRate;

@HookBase(targetPackage = "com.miui.misound", isPad = false)
@HookBase(targetPackage = "com.miui.misound")
public class MiSound extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import com.sevtinge.hyperceiler.module.base.BaseModule;
import com.sevtinge.hyperceiler.module.hook.miwallpaper.UnlockSuperWallpaper;

@HookBase(targetPackage = "com.miui.miwallpaper", isPad = false)
@HookBase(targetPackage = "com.miui.miwallpaper")
public class MiWallpaper extends BaseModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import com.sevtinge.hyperceiler.module.hook.mms.ImOldDevice;
import com.sevtinge.hyperceiler.module.hook.various.UnlockSuperClipboard;

@HookBase(targetPackage = "com.android.mms", isPad = false)
@HookBase(targetPackage = "com.android.mms")
public class Mms extends BaseModule {
@Override
public void handleLoadPackage() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.sevtinge.hyperceiler.module.hook.mtb.BypassAuthentication;
import com.sevtinge.hyperceiler.module.hook.mtb.IsUserBuild;

@HookBase(targetPackage = "com.xiaomi.mtb", isPad = false)
@HookBase(targetPackage = "com.xiaomi.mtb")
public class Mtb extends BaseModule {
@Override
public void handleLoadPackage() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.sevtinge.hyperceiler.module.hook.nfc.AllowInformationScreen;
import com.sevtinge.hyperceiler.module.hook.nfc.DisableSound;

@HookBase(targetPackage = "com.android.nfc", isPad = false)
@HookBase(targetPackage = "com.android.nfc")
public class Nfc extends BaseModule {

@Override
Expand Down
Loading

0 comments on commit 8ac48e3

Please sign in to comment.