Skip to content

Commit

Permalink
Update hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
KyuubiRan committed Jun 17, 2022
1 parent 6e72f43 commit 4dcf32e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
14 changes: 7 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ android {

defaultConfig {
applicationId "me.kyuubiran.akinatorhelper"
minSdk 21
minSdk 24
targetSdk 32
versionCode 6
versionName "1.6"
versionCode 7
versionName "1.7"
}

buildTypes {
Expand All @@ -24,15 +24,15 @@ android {
aaptOptions.additionalParameters '--allow-reserved-package-id', '--package-id', '0x64'

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '1.8'
jvmTarget = '11'
}
}

dependencies {
compileOnly 'de.robv.android.xposed:api:82'
implementation 'com.github.kyuubiran:EzXHelper:0.5.0'
implementation 'com.github.kyuubiran:EzXHelper:0.9.4'
}
2 changes: 1 addition & 1 deletion app/src/main/java/me/kyuubiran/akinatorhelper/HookEntry.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class HookEntry : IXposedHookLoadPackage, IXposedHookZygoteInit {
}

private val init: Unit by lazy {
initHooks(OnGameActivityCreateHook, SettingHook, ConfigHook, GameResultHook)
initHooks(AppHook, SettingHook, ConfigHook, GameResultHook)
}

private fun initHooks(vararg hooks: BaseHook) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package me.kyuubiran.akinatorhelper.hook

import android.app.Application
import com.github.kyuubiran.ezxhelper.init.EzXHelperInit
import com.github.kyuubiran.ezxhelper.init.InitFields.appContext
import com.github.kyuubiran.ezxhelper.utils.Log
Expand All @@ -8,11 +9,11 @@ import com.github.kyuubiran.ezxhelper.utils.hookAfter
import de.robv.android.xposed.XC_MethodHook
import me.kyuubiran.akinatorhelper.R

object OnGameActivityCreateHook : BaseHook() {
object AppHook : BaseHook() {
private var hook: XC_MethodHook.Unhook? = null

override fun init() {
hook = findMethod("com.digidust.elokence.akinator.activities.AkActivity") {
hook = findMethod(Application::class.java) {
name == "onCreate"
}.hookAfter {
hook?.unhook()
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ buildscript {
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.4"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10"
classpath 'com.android.tools.build:gradle:7.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.0"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Sep 03 19:00:52 CST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

0 comments on commit 4dcf32e

Please sign in to comment.