-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
1 parent
f284b94
commit 90500fa
Showing
16 changed files
with
102 additions
and
36 deletions.
There are no files selected for viewing
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
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
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
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/kotlin/star/sky/voyager/hook/hooks/android/AospShareSheet.kt
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 star.sky.voyager.hook.hooks.android | ||
|
||
import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass | ||
import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook | ||
import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder | ||
import star.sky.voyager.utils.init.HookRegister | ||
import star.sky.voyager.utils.key.hasEnable | ||
|
||
object AospShareSheet : HookRegister() { | ||
override fun init() = hasEnable("aosp_share_sheet") { | ||
setOf( | ||
loadClass("com.android.internal.app.ResolverActivityStubImpl"), | ||
loadClass("com.android.internal.app.ResolverActivityStub") | ||
).forEach { clazz -> | ||
clazz.methodFinder() | ||
.filterByName("useAospShareSheet") | ||
.first().createHook { | ||
returnConstant(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
56 changes: 56 additions & 0 deletions
56
app/src/main/kotlin/star/sky/voyager/utils/init/PackageNameHook.kt
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,56 @@ | ||
package star.sky.voyager.utils.init | ||
|
||
object PackageNameHook { | ||
val PACKAGE_NAME_HOOKED = setOf( | ||
"com.xiaomi.aireco", | ||
"com.miui.aod", | ||
"com.xiaomi.barrage", | ||
"com.android.browser", | ||
"com.milink.service", | ||
"com.android.externalstorage", | ||
"com.android.fileexplorer", | ||
"com.miui.gallery", | ||
"com.miui.guardprovider", | ||
"com.miui.home", | ||
"com.lbe.security.miui", | ||
"com.xiaomi.market", | ||
"com.miui.mediaeditor", | ||
"com.xiaomi.mirror", | ||
"com.xiaomi.misettings", | ||
"com.miui.mishare.connectivity", | ||
"com.miui.player", | ||
"com.miui.packageinstaller", | ||
"com.miui.personalassistant", | ||
"com.miui.powerkeeper", | ||
"com.xiaomi.misubscreenui", | ||
"com.xiaomi.scanner", | ||
"com.miui.screenrecorder", | ||
"com.miui.screenshot", | ||
"com.miui.securitycenter", | ||
"com.android.settings", | ||
"com.android.systemui", | ||
"com.miui.contentextension", | ||
"com.android.updater", | ||
"com.miui.miwallpaper", | ||
"com.miui.weather2", | ||
) | ||
|
||
val AospShareHook = setOf( | ||
"android", | ||
"com.android.browser", | ||
"com.android.fileexplorer", | ||
"com.miui.gallery", | ||
"com.miui.home", | ||
"com.xiaomi.market", | ||
"com.miui.mediaeditor", | ||
"com.miui.mishare.connectivity", | ||
"com.miui.player", | ||
"com.xiaomi.scanner", | ||
"com.miui.screenrecorder", | ||
"com.miui.screenshot", | ||
"com.miui.securitycenter", | ||
"com.android.settings", | ||
"com.android.systemui", | ||
"com.miui.contentextension", | ||
) | ||
} |
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