Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev' into feat/patcher_instruc…
Browse files Browse the repository at this point in the history
…tion_filters
  • Loading branch information
LisoUseInAIKyrios committed Feb 20, 2025
2 parents 46966e4 + 6b54879 commit 79d8f33
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 6 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# [5.13.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v5.13.0-dev.4...v5.13.0-dev.5) (2025-02-19)


### Bug Fixes

* **TikTok:** Resolve startup app crash ([c14bc24](https://github.com/ReVanced/revanced-patches/commit/c14bc244550de30eca975ca7c09e8eb0c47534b5))

# [5.13.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v5.13.0-dev.3...v5.13.0-dev.4) (2025-02-19)


### Bug Fixes

* **TikTok:** Resolve startup app crash ([d700076](https://github.com/ReVanced/revanced-patches/commit/d7000768a5e5a688c9f4e48858ac34e352222c1e))

# [5.13.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v5.13.0-dev.2...v5.13.0-dev.3) (2025-02-19)


Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ org.gradle.jvmargs = -Xms512M -Xmx2048M
org.gradle.parallel = true
android.useAndroidX = true
kotlin.code.style = official
version = 5.13.0-dev.3
version = 5.13.0-dev.5
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ package app.revanced.patches.tiktok.misc.extension

import app.revanced.patches.shared.misc.extension.sharedExtensionPatch

val sharedExtensionPatch = sharedExtensionPatch("tiktok", initHook)
val sharedExtensionPatch = sharedExtensionPatch("tiktok", initHook, jatoInitHook)
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,26 @@ import app.revanced.patches.shared.misc.extension.extensionHook
import com.android.tools.smali.dexlib2.AccessFlags

internal val initHook = extensionHook(
insertIndexResolver = { 1 }, // Insert after call to super class.
insertIndexResolver = { 0 }
) {
accessFlags(AccessFlags.PUBLIC, AccessFlags.CONSTRUCTOR)
custom { method, classDef ->
classDef.endsWith("/AwemeHostApplication;") &&
method.name == "<init>"
classDef.type == "Lcom/ss/android/ugc/aweme/main/MainActivity;" &&
method.name == "onCreate"
}
}

/**
* In some cases the extension code can be called before
* the app main activity onCreate is called.
*
* This class is called from startup code titled "BPEA RunnableGuardLancet"
*/
internal val jatoInitHook = extensionHook(
insertIndexResolver = { 0 },
contextRegisterResolver = { "p1" }
) {
custom { method, classDef ->
classDef.type == "Lcom/ss/android/ugc/aweme/legoImp/task/JatoInitTask;" &&
method.name == "run"
}
}

0 comments on commit 79d8f33

Please sign in to comment.