-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
app/src/main/java/com/sevtinge/hyperceiler/module/app/MiLink.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,19 @@ | ||
package com.sevtinge.hyperceiler.module.app; | ||
|
||
import com.sevtinge.hyperceiler.module.base.BaseModule; | ||
import com.sevtinge.hyperceiler.module.base.CloseHostDir; | ||
import com.sevtinge.hyperceiler.module.base.LoadHostDir; | ||
import com.sevtinge.hyperceiler.module.hook.milink.UnlockHMind; | ||
import com.sevtinge.hyperceiler.module.hook.milink.UnlockMiShare; | ||
|
||
public class MiLink extends BaseModule { | ||
|
||
@Override | ||
public void handleLoadPackage() { | ||
initHook(LoadHostDir.INSTANCE); | ||
initHook(new UnlockMiShare(), mPrefsMap.getBoolean("milink_unlock_mishare")); | ||
initHook(new UnlockHMind(), mPrefsMap.getBoolean("milink_unlock_hmind")); | ||
initHook(CloseHostDir.INSTANCE); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
app/src/main/java/com/sevtinge/hyperceiler/module/hook/milink/UnlockHMind.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.sevtinge.hyperceiler.module.hook.milink; | ||
|
||
import com.sevtinge.hyperceiler.module.base.BaseHook; | ||
import com.sevtinge.hyperceiler.utils.DexKit; | ||
|
||
import org.luckypray.dexkit.query.FindMethod; | ||
import org.luckypray.dexkit.query.matchers.MethodMatcher; | ||
import org.luckypray.dexkit.result.MethodData; | ||
|
||
import java.lang.reflect.Method; | ||
|
||
public class UnlockHMind extends BaseHook { | ||
@Override | ||
public void init() throws NoSuchMethodException { | ||
findAndHookMethod("com.milink.hmindlib.j", "C", new MethodHook() { | ||
@Override | ||
protected void after(MethodHookParam param) throws Throwable { | ||
param.setResult(true); | ||
} | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters