forked from ReChronoRain/HyperCeiler
-
Notifications
You must be signed in to change notification settings - Fork 0
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
ec79298
commit fd5c29e
Showing
1 changed file
with
33 additions
and
11 deletions.
There are no files selected for viewing
44 changes: 33 additions & 11 deletions
44
app/src/main/java/com/sevtinge/hyperceiler/module/hook/updater/AutoUpdateDialog.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 |
---|---|---|
@@ -1,20 +1,42 @@ | ||
package com.sevtinge.hyperceiler.module.hook.updater | ||
|
||
import com.github.kyuubiran.ezxhelper.* | ||
import com.sevtinge.hyperceiler.module.base.BaseHook | ||
import de.robv.android.xposed.XposedBridge.* | ||
|
||
class AutoUpdateDialog : BaseHook() { | ||
override fun init() { | ||
//TODO 不写死程序 | ||
findAndHookMethod( | ||
"com.android.updater.i1", | ||
"Z2", | ||
Boolean::class.java, | ||
Boolean::class.java, | ||
object : replaceHookedMethod() { | ||
override fun replace(param: MethodHookParam?): Any { | ||
return 0 | ||
// TODO 不写死程序 | ||
try { | ||
findAndHookMethod( | ||
"com.android.updater.i1", | ||
"Z2", | ||
Boolean::class.java, | ||
Boolean::class.java, | ||
object : replaceHookedMethod() { | ||
override fun replace(param: MethodHookParam?): Any { | ||
return 0 | ||
} | ||
} | ||
} | ||
) | ||
) | ||
} catch (e: Exception) { | ||
log(e) | ||
} | ||
|
||
try { | ||
findAndHookMethod( | ||
"com.android.updater.i1", | ||
"q3", | ||
Long::class.java, | ||
Int::class.java, | ||
object : replaceHookedMethod() { | ||
override fun replace(param: MethodHookParam?): Any { | ||
return 0 | ||
} | ||
} | ||
) | ||
} catch (e: Exception) { | ||
log(e) | ||
} | ||
} | ||
} |