Compare commits

...

7 Commits

Author SHA1 Message Date
semantic-release-bot
0c0e30d7be chore(release): 2.175.0-dev.11 [skip ci]
# [2.175.0-dev.11](https://github.com/revanced/revanced-patches/compare/v2.175.0-dev.10...v2.175.0-dev.11) (2023-05-28)

### Features

* **scbeasy:** add `remove-debugging-detection` patch ([#2287](https://github.com/revanced/revanced-patches/issues/2287)) ([be94f17](be94f17302))
2023-05-28 01:01:55 +00:00
ssense
be94f17302 feat(scbeasy): add remove-debugging-detection patch (#2287)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-05-28 02:59:42 +02:00
semantic-release-bot
877f82d88c chore(release): 2.175.0-dev.10 [skip ci]
# [2.175.0-dev.10](https://github.com/revanced/revanced-patches/compare/v2.175.0-dev.9...v2.175.0-dev.10) (2023-05-27)

### Features

* **youtube/hide-shorts-components:** hide channel bar & sound button ([d9a4796](d9a4796af9))
* **youtube/navigation-buttons:** use a better preference screen title ([af805d5](af805d500d))
2023-05-27 17:57:30 +00:00
oSumAtrIX
af805d500d feat(youtube/navigation-buttons): use a better preference screen title 2023-05-27 19:55:05 +02:00
oSumAtrIX
d9a4796af9 feat(youtube/hide-shorts-components): hide channel bar & sound button 2023-05-27 19:53:39 +02:00
semantic-release-bot
48c12179ad chore(release): 2.175.0-dev.9 [skip ci]
# [2.175.0-dev.9](https://github.com/revanced/revanced-patches/compare/v2.175.0-dev.8...v2.175.0-dev.9) (2023-05-27)

### Features

* **youtube/hide-seekbar:** more fine grained hiding of seekbar ([#2252](https://github.com/revanced/revanced-patches/issues/2252)) ([de607d7](de607d7c17))
2023-05-27 07:53:49 +00:00
LisoUseInAIKyrios
de607d7c17 feat(youtube/hide-seekbar): more fine grained hiding of seekbar (#2252)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-05-27 11:52:03 +04:00
13 changed files with 157 additions and 21 deletions

View File

@@ -1,3 +1,25 @@
# [2.175.0-dev.11](https://github.com/revanced/revanced-patches/compare/v2.175.0-dev.10...v2.175.0-dev.11) (2023-05-28)
### Features
* **scbeasy:** add `remove-debugging-detection` patch ([#2287](https://github.com/revanced/revanced-patches/issues/2287)) ([53d91e3](https://github.com/revanced/revanced-patches/commit/53d91e32183663b0aa70994cc4e1d8ae5eb8c8e4))
# [2.175.0-dev.10](https://github.com/revanced/revanced-patches/compare/v2.175.0-dev.9...v2.175.0-dev.10) (2023-05-27)
### Features
* **youtube/hide-shorts-components:** hide channel bar & sound button ([749c83d](https://github.com/revanced/revanced-patches/commit/749c83d068c2201ed6f29047d5428d1072924960))
* **youtube/navigation-buttons:** use a better preference screen title ([5d7772b](https://github.com/revanced/revanced-patches/commit/5d7772be942c72e05644eca3f68d2bd6b9762d26))
# [2.175.0-dev.9](https://github.com/revanced/revanced-patches/compare/v2.175.0-dev.8...v2.175.0-dev.9) (2023-05-27)
### Features
* **youtube/hide-seekbar:** more fine grained hiding of seekbar ([#2252](https://github.com/revanced/revanced-patches/issues/2252)) ([0f07bf4](https://github.com/revanced/revanced-patches/commit/0f07bf467a4aa06c9bcdf60a2498d88eea8c1429))
# [2.175.0-dev.8](https://github.com/revanced/revanced-patches/compare/v2.175.0-dev.7...v2.175.0-dev.8) (2023-05-27)

View File

@@ -284,6 +284,14 @@ The official ReVanced Patches.
| `remove-broadcasts-restriction` | Enables starting/stopping NetGuard via broadcasts. | all |
</details>
### [📦 `com.scb.phone`](https://play.google.com/store/apps/details?id=com.scb.phone)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `remove-debugging-detection` | Removes the USB and wireless debugging checks. | all |
</details>
### [📦 `com.dci.dev.androidtwelvewidgets`](https://play.google.com/store/apps/details?id=com.dci.dev.androidtwelvewidgets)
<details>

View File

@@ -1,2 +1,2 @@
kotlin.code.style = official
version = 2.175.0-dev.8
version = 2.175.0-dev.11

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,8 @@
package app.revanced.patches.scbeasy.detection.debugging.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.scb.phone")])
@Target(AnnotationTarget.CLASS)
internal annotation class RemoveDebuggingDetectionCompatibility

View File

@@ -0,0 +1,8 @@
package app.revanced.patches.scbeasy.detection.debugging.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object DebuggingDetectionFingerprint : MethodFingerprint(
returnType = "Z",
strings = listOf("adb_enabled")
)

View File

@@ -0,0 +1,31 @@
package app.revanced.patches.scbeasy.detection.debugging.patch
import app.revanced.patcher.annotation.*
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.scbeasy.detection.debugging.annotations.RemoveDebuggingDetectionCompatibility
import app.revanced.patches.scbeasy.detection.debugging.fingerprints.DebuggingDetectionFingerprint
@Patch(false)
@Name("remove-debugging-detection")
@Description("Removes the USB and wireless debugging checks.")
@RemoveDebuggingDetectionCompatibility
@Version("0.0.1")
class RemoveDebuggingDetectionPatch : BytecodePatch(
listOf(DebuggingDetectionFingerprint)
) {
override fun execute(context: BytecodeContext): PatchResult {
DebuggingDetectionFingerprint.result!!.mutableMethod.addInstructions(
0,
"""
const/4 v0, 0x0
return v0
"""
)
return PatchResultSuccess()
}
}

View File

@@ -42,7 +42,7 @@ class NavigationButtonsPatch : BytecodePatch(listOf(AddCreateButtonViewFingerpri
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
PreferenceScreen(
"revanced_navigation_buttons_preference_screen",
StringResource("revanced_navigation_buttons_preference_screen_title", "Navigation button settings"),
StringResource("revanced_navigation_buttons_preference_screen_title", "Navigation buttons"),
listOf(
SwitchPreference(
"revanced_hide_home_button",

View File

@@ -17,6 +17,7 @@ import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
import app.revanced.patches.youtube.layout.hide.seekbar.annotations.HideSeekbarCompatibility
import app.revanced.patches.youtube.layout.seekbar.bytecode.patch.SeekbarColorBytecodePatch
import app.revanced.patches.youtube.layout.seekbar.resource.SeekbarPreferencesPatch
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@@ -24,7 +25,10 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@DependsOn([
IntegrationsPatch::class,
SettingsPatch::class,
SeekbarColorBytecodePatch::class // Used to hide the seekbar in the feed and watch history
// Does not alter the behavior of the seek bar by default.
SeekbarColorBytecodePatch::class,
// Used to add preferences to the seekbar settings menu.
SeekbarPreferencesPatch::class
])
@Name("hide-seekbar")
@Description("Hides the seekbar.")
@@ -34,12 +38,18 @@ class HideSeekbarPatch : BytecodePatch(
listOf(SeekbarFingerprint)
) {
override fun execute(context: BytecodeContext): PatchResult {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
SeekbarPreferencesPatch.addPreferences(
SwitchPreference(
"revanced_hide_seekbar",
StringResource("revanced_hide_seekbar_title", "Hide seekbar"),
StringResource("revanced_hide_seekbar_summary_on", "Seekbar is hidden"),
StringResource("revanced_hide_seekbar_summary_off", "Seekbar is shown")
StringResource("revanced_hide_seekbar_title", "Hide seekbar in video player"),
StringResource("revanced_hide_seekbar_summary_on", "Video player seekbar is hidden"),
StringResource("revanced_hide_seekbar_summary_off", "Video player seekbar is shown")
),
SwitchPreference(
"revanced_hide_seekbar_thumbnail",
StringResource("revanced_hide_seekbar_thumbnail_title", "Hide seekbar in video thumbnails"),
StringResource("revanced_hide_seekbar_thumbnail_summary_on", "Thumbnail seekbar is hidden"),
StringResource("revanced_hide_seekbar_thumbnail_summary_off", "Thumbnail seekbar is shown")
)
)

View File

@@ -69,12 +69,24 @@ class HideShortsComponentsResourcePatch : ResourcePatch {
StringResource("revanced_hide_shorts_info_panel_on", "Info panel is hidden"),
StringResource("revanced_hide_shorts_info_panel_off", "Info panel is shown")
),
SwitchPreference(
"revanced_hide_shorts_channel_bar",
StringResource("revanced_hide_shorts_channel_bar_title", "Hide channel bar"),
StringResource("revanced_hide_shorts_channel_bar_on", "Channel bar is hidden"),
StringResource("revanced_hide_shorts_channel_bar_off", "Channel bar is shown")
),
SwitchPreference(
"revanced_hide_shorts_sound_button",
StringResource("revanced_hide_shorts_sound_button_title", "Hide sound button"),
StringResource("revanced_hide_shorts_sound_button_on", "Sound button is hidden"),
StringResource("revanced_hide_shorts_sound_button_off", "Sound button is shown")
),
SwitchPreference(
"revanced_hide_shorts_navigation_bar",
StringResource("revanced_hide_shorts_navigation_bar_title", "Hide navigation bar"),
StringResource("revanced_hide_shorts_navigation_bar_on", "Navigation bar is hidden"),
StringResource("revanced_hide_shorts_navigation_bar_off", "Navigation bar is shown")
),
)
),
StringResource("revanced_shorts_preference_screen_summary", "Manage the visibility of Shorts components")
)

View File

@@ -15,9 +15,9 @@ import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.patches.youtube.layout.seekbar.annotations.SeekbarColorCompatibility
import app.revanced.patches.youtube.layout.seekbar.bytecode.fingerprints.CreateDarkThemeSeekbarFingerprint
import app.revanced.patches.youtube.layout.seekbar.bytecode.fingerprints.SetSeekbarClickedColorFingerprint
import app.revanced.patches.youtube.layout.seekbar.resource.SeekbarColorResourcePatch
import app.revanced.patches.youtube.layout.theme.bytecode.patch.LithoColorHookPatch
import app.revanced.patches.youtube.layout.theme.bytecode.patch.LithoColorHookPatch.Companion.lithoColorOverrideHook
import app.revanced.patches.youtube.layout.seekbar.resource.SeekbarColorResourcePatch
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
import app.revanced.util.patch.indexOfFirstConstantInstruction
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@@ -37,7 +37,7 @@ class SeekbarColorBytecodePatch : BytecodePatch(
addInstructions(
registerIndex + 1,
"""
invoke-static { v$colorRegister }, $INTEGRATIONS_CLASS_DESCRIPTOR->getSeekbarColorValue(I)I
invoke-static { v$colorRegister }, $INTEGRATIONS_CLASS_DESCRIPTOR->getVideoPlayerSeekbarColor(I)I
move-result v$colorRegister
"""
)
@@ -47,7 +47,7 @@ class SeekbarColorBytecodePatch : BytecodePatch(
addInstructions(
registerIndex + 1,
"""
invoke-static { v$colorRegister }, $INTEGRATIONS_CLASS_DESCRIPTOR->getSeekbarColorValue(I)I
invoke-static { v$colorRegister }, $INTEGRATIONS_CLASS_DESCRIPTOR->getVideoPlayerSeekbarColor(I)I
move-result v$colorRegister
"""
)
@@ -66,7 +66,7 @@ class SeekbarColorBytecodePatch : BytecodePatch(
addInstructions(
0,
"""
invoke-static { v$colorRegister }, $INTEGRATIONS_CLASS_DESCRIPTOR->getSeekbarColorOverride(I)I
invoke-static { v$colorRegister }, $INTEGRATIONS_CLASS_DESCRIPTOR->getVideoPlayerSeekbarClickedColor(I)I
move-result v$colorRegister
"""
)
@@ -74,7 +74,7 @@ class SeekbarColorBytecodePatch : BytecodePatch(
}
} ?: return SetSeekbarClickedColorFingerprint.toErrorResult()
lithoColorOverrideHook(INTEGRATIONS_CLASS_DESCRIPTOR, "getSeekbarColorOverride")
lithoColorOverrideHook(INTEGRATIONS_CLASS_DESCRIPTOR, "getLithoColor")
return PatchResultSuccess()
}

View File

@@ -0,0 +1,39 @@
package app.revanced.patches.youtube.layout.seekbar.resource
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.*
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
import app.revanced.patches.shared.settings.preference.BasePreference
import app.revanced.patches.shared.settings.preference.impl.PreferenceScreen
import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
import java.io.Closeable
@DependsOn([SettingsPatch::class, ResourceMappingPatch::class])
class SeekbarPreferencesPatch : ResourcePatch, Closeable {
override fun execute(context: ResourceContext): PatchResult {
// Nothing to do here. All work is done in close method.
return PatchResultSuccess()
}
override fun close() {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
PreferenceScreen(
"revanced_seekbar_preference_screen",
StringResource("revanced_seekbar_preference_screen_title", "Seekbar settings"),
seekbarPreferences
)
)
}
companion object {
private val seekbarPreferences = mutableListOf<BasePreference>()
internal fun addPreferences(vararg preferencesToAdd: BasePreference) {
seekbarPreferences.addAll(preferencesToAdd)
}
}
}

View File

@@ -9,25 +9,23 @@ import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
import app.revanced.patches.shared.settings.preference.impl.InputType
import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.patches.shared.settings.preference.impl.TextPreference
import app.revanced.patches.youtube.layout.seekbar.resource.SeekbarPreferencesPatch
import app.revanced.patches.youtube.layout.theme.bytecode.patch.ThemeBytecodePatch.Companion.darkThemeBackgroundColor
import app.revanced.patches.youtube.layout.theme.bytecode.patch.ThemeBytecodePatch.Companion.lightThemeBackgroundColor
import app.revanced.patches.youtube.layout.theme.bytecode.patch.ThemeBytecodePatch.Companion.splashScreenBackgroundColor
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
import org.w3c.dom.Element
@DependsOn([SettingsPatch::class, ResourceMappingPatch::class])
@DependsOn([SettingsPatch::class, ResourceMappingPatch::class, SeekbarPreferencesPatch::class])
class ThemeResourcePatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
SeekbarPreferencesPatch.addPreferences(
TextPreference(
"revanced_seekbar_color",
StringResource("revanced_seekbar_color_title", "Seekbar color"),
StringResource(
"revanced_seekbar_color_summary",
"The color of the seekbar"
),
StringResource("revanced_seekbar_color_summary", "The color of the seekbar"),
InputType.TEXT_CAP_CHARACTERS
),
)
)
// Edit theme colors via resources.