mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-29 05:31:02 +00:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a70da4f6c4 | ||
|
|
e53b490edf | ||
|
|
bfe995f635 | ||
|
|
19cc4a3e91 | ||
|
|
16f6486258 | ||
|
|
47360ea3b7 | ||
|
|
5c5b3d562d | ||
|
|
a62316a8c8 | ||
|
|
14f7d514d2 | ||
|
|
78d901338f | ||
|
|
9ae3d0546c | ||
|
|
3076a16d14 |
4
.github/ISSUE_TEMPLATE/bug-issue.yml
vendored
4
.github/ISSUE_TEMPLATE/bug-issue.yml
vendored
@@ -52,10 +52,10 @@ body:
|
|||||||
label: Solution
|
label: Solution
|
||||||
description: If applicable, add a possible solution.
|
description: If applicable, add a possible solution.
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: false
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Additional context
|
label: Additional context
|
||||||
description: Add additional context here.
|
description: Add additional context here.
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
|
|||||||
15
CHANGELOG.md
15
CHANGELOG.md
@@ -1,3 +1,18 @@
|
|||||||
|
# [2.29.0](https://github.com/revanced/revanced-patches/compare/v2.28.2...v2.29.0) (2022-08-02)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add "Application Icon Path" option to branding ([1748d1e](https://github.com/revanced/revanced-patches/commit/1748d1e5badf61213d793ff7ae1d090ea2ea82f0))
|
||||||
|
* add "Application Name" option to branding and move renaming to CustomBrandingPatch.kt ([8dafe05](https://github.com/revanced/revanced-patches/commit/8dafe05b2c5e2b0291d46b02717d910721673712))
|
||||||
|
|
||||||
|
## [2.28.2](https://github.com/revanced/revanced-patches/compare/v2.28.1...v2.28.2) (2022-08-02)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* remove requirement for solution [skip ci] ([#271](https://github.com/revanced/revanced-patches/issues/271)) ([553fad3](https://github.com/revanced/revanced-patches/commit/553fad3fe1bb79bdf34e9f91c0e1cbfda78e1054))
|
||||||
|
|
||||||
## [2.28.1](https://github.com/revanced/revanced-patches/compare/v2.28.0...v2.28.1) (2022-07-31)
|
## [2.28.1](https://github.com/revanced/revanced-patches/compare/v2.28.0...v2.28.1) (2022-07-31)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ Official patches by ReVanced
|
|||||||
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 17.29.34 |
|
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 17.29.34 |
|
||||||
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 17.29.34 |
|
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 17.29.34 |
|
||||||
| `premium-heading` | Shows premium branding on the home screen. | all |
|
| `premium-heading` | Shows premium branding on the home screen. | all |
|
||||||
| `custom-branding` | Changes the YouTube launcher icon to be ReVanced's. | all |
|
| `custom-branding` | Changes the YouTube launcher icon and name to your choice (defaults to ReVanced). | all |
|
||||||
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 17.29.34 |
|
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 17.29.34 |
|
||||||
| `old-quality-layout` | Enables the original quality flyout menu. | 17.29.34 |
|
| `old-quality-layout` | Enables the original quality flyout menu. | 17.29.34 |
|
||||||
| `hide-shorts-button` | Hides the shorts button on the navigation bar. | 17.29.34 |
|
| `hide-shorts-button` | Hides the shorts button on the navigation bar. | 17.29.34 |
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ repositories {
|
|||||||
dependencies {
|
dependencies {
|
||||||
implementation(kotlin("stdlib"))
|
implementation(kotlin("stdlib"))
|
||||||
|
|
||||||
implementation("app.revanced:revanced-patcher:2.4.0")
|
implementation("app.revanced:revanced-patcher:3.3.0")
|
||||||
implementation("app.revanced:multidexlib2:2.5.2.r2")
|
implementation("app.revanced:multidexlib2:2.5.2.r2")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 2.28.1
|
version = 2.29.0
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import org.jf.dexlib2.builder.instruction.BuilderInstruction21t
|
|||||||
import org.jf.dexlib2.builder.instruction.BuilderInstruction35c
|
import org.jf.dexlib2.builder.instruction.BuilderInstruction35c
|
||||||
import org.jf.dexlib2.immutable.reference.ImmutableMethodReference
|
import org.jf.dexlib2.immutable.reference.ImmutableMethodReference
|
||||||
import org.w3c.dom.Node
|
import org.w3c.dom.Node
|
||||||
import java.io.OutputStream
|
|
||||||
import java.nio.file.Files
|
import java.nio.file.Files
|
||||||
|
|
||||||
// TODO: this method does not make sense here
|
// TODO: this method does not make sense here
|
||||||
@@ -146,7 +145,7 @@ fun ResourceData.injectStrings(
|
|||||||
// open source strings.xml
|
// open source strings.xml
|
||||||
val sourceInputStream = classLoader.getResourceAsStream("$patchDirectoryPath/$relativePath")
|
val sourceInputStream = classLoader.getResourceAsStream("$patchDirectoryPath/$relativePath")
|
||||||
?: throw PatchResultError("failed to open '$patchDirectoryPath/$relativePath'")
|
?: throw PatchResultError("failed to open '$patchDirectoryPath/$relativePath'")
|
||||||
xmlEditor[sourceInputStream, OutputStream.nullOutputStream()].use { sourceStringsXml ->
|
xmlEditor[sourceInputStream].use { sourceStringsXml ->
|
||||||
val strings = sourceStringsXml.file.getElementsByTagName("resources").item(0).childNodes
|
val strings = sourceStringsXml.file.getElementsByTagName("resources").item(0).childNodes
|
||||||
|
|
||||||
// open target strings.xml
|
// open target strings.xml
|
||||||
|
|||||||
@@ -4,20 +4,21 @@ import app.revanced.patcher.annotation.Description
|
|||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.data.impl.ResourceData
|
import app.revanced.patcher.data.impl.ResourceData
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.*
|
||||||
import app.revanced.patcher.patch.PatchResultError
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
|
||||||
import app.revanced.patcher.patch.annotations.Dependencies
|
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patcher.patch.impl.ResourcePatch
|
import app.revanced.patcher.patch.impl.ResourcePatch
|
||||||
import app.revanced.patches.youtube.layout.branding.icon.annotations.CustomBrandingCompatibility
|
import app.revanced.patches.youtube.layout.branding.icon.annotations.CustomBrandingCompatibility
|
||||||
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
|
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
|
||||||
|
import java.io.File
|
||||||
|
import java.io.FileInputStream
|
||||||
|
import java.io.InputStream
|
||||||
import java.nio.file.Files
|
import java.nio.file.Files
|
||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
@Dependencies([FixLocaleConfigErrorPatch::class])
|
@DependsOn(FixLocaleConfigErrorPatch::class)
|
||||||
@Name("custom-branding")
|
@Name("custom-branding")
|
||||||
@Description("Changes the YouTube launcher icon to be ReVanced's.")
|
@Description("Changes the YouTube launcher icon and name to your choice (defaults to ReVanced).")
|
||||||
@CustomBrandingCompatibility
|
@CustomBrandingCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
class CustomBrandingPatch : ResourcePatch() {
|
class CustomBrandingPatch : ResourcePatch() {
|
||||||
@@ -25,6 +26,7 @@ class CustomBrandingPatch : ResourcePatch() {
|
|||||||
val resDirectory = data["res"]
|
val resDirectory = data["res"]
|
||||||
if (!resDirectory.isDirectory) return PatchResultError("The res folder can not be found.")
|
if (!resDirectory.isDirectory) return PatchResultError("The res folder can not be found.")
|
||||||
|
|
||||||
|
// Icon branding
|
||||||
val iconNames = arrayOf(
|
val iconNames = arrayOf(
|
||||||
"adaptiveproduct_youtube_background_color_108",
|
"adaptiveproduct_youtube_background_color_108",
|
||||||
"adaptiveproduct_youtube_foreground_color_108",
|
"adaptiveproduct_youtube_foreground_color_108",
|
||||||
@@ -40,15 +42,59 @@ class CustomBrandingPatch : ResourcePatch() {
|
|||||||
"mdpi" to 48
|
"mdpi" to 48
|
||||||
).forEach { (iconDirectory, size) ->
|
).forEach { (iconDirectory, size) ->
|
||||||
iconNames.forEach iconLoop@{ iconName ->
|
iconNames.forEach iconLoop@{ iconName ->
|
||||||
val iconFile = this.javaClass.classLoader.getResourceAsStream("branding/$size/$iconName.png")
|
val iconFile = getIconStream("branding/$size/$iconName.png")
|
||||||
?: return PatchResultError("The icon $iconName can not be found.")
|
?: return PatchResultError("The icon $iconName can not be found.")
|
||||||
|
|
||||||
Files.write(
|
Files.write(
|
||||||
resDirectory.resolve("mipmap-$iconDirectory").resolve("$iconName.png").toPath(), iconFile.readAllBytes()
|
resDirectory.resolve("mipmap-$iconDirectory").resolve("$iconName.png").toPath(),
|
||||||
|
iconFile.readAllBytes()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Name branding
|
||||||
|
val appName: String by options[keyAppName]
|
||||||
|
|
||||||
|
val manifest = data["AndroidManifest.xml"]
|
||||||
|
manifest.writeText(
|
||||||
|
manifest.readText()
|
||||||
|
.replace(
|
||||||
|
"android:label=\"@string/application_name",
|
||||||
|
"android:label=\"$appName"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override val options = PatchOptions(
|
||||||
|
PatchOption.StringOption(
|
||||||
|
key = keyAppName,
|
||||||
|
default = "YouTube ReVanced",
|
||||||
|
title = "Application Name",
|
||||||
|
description = "The name of the application it will show on your home screen.",
|
||||||
|
required = true
|
||||||
|
),
|
||||||
|
PatchOption.StringOption(
|
||||||
|
key = keyAppIconPath,
|
||||||
|
default = null,
|
||||||
|
title = "Application Icon Path",
|
||||||
|
description = "A path to the icon of the application."
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
private fun getIconStream(iconPath: String): InputStream? {
|
||||||
|
val appIconPath: String? by options[keyAppIconPath]
|
||||||
|
if (appIconPath == null) {
|
||||||
|
return this.javaClass.classLoader.getResourceAsStream(iconPath)
|
||||||
|
}
|
||||||
|
val file = File(appIconPath!!).resolve(iconPath)
|
||||||
|
if (!file.exists()) return null
|
||||||
|
return FileInputStream(file)
|
||||||
|
}
|
||||||
|
|
||||||
|
private companion object {
|
||||||
|
private const val keyAppName = "appName"
|
||||||
|
private const val keyAppIconPath = "appIconPath"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.sponsorblock.resource.patch
|
|||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.data.impl.DomFileEditor
|
|
||||||
import app.revanced.patcher.data.impl.ResourceData
|
import app.revanced.patcher.data.impl.ResourceData
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
@@ -10,7 +9,7 @@ import app.revanced.patcher.patch.annotations.Dependencies
|
|||||||
import app.revanced.patcher.patch.impl.ResourcePatch
|
import app.revanced.patcher.patch.impl.ResourcePatch
|
||||||
import app.revanced.patches.youtube.layout.sponsorblock.annotations.SponsorBlockCompatibility
|
import app.revanced.patches.youtube.layout.sponsorblock.annotations.SponsorBlockCompatibility
|
||||||
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
|
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
|
||||||
import java.io.OutputStream
|
import app.revanced.util.resources.ResourceUtils.copyXmlNode
|
||||||
import java.nio.file.Files
|
import java.nio.file.Files
|
||||||
|
|
||||||
@Name("sponsorblock-resource-patch")
|
@Name("sponsorblock-resource-patch")
|
||||||
@@ -29,7 +28,7 @@ class SponsorBlockResourcePatch : ResourcePatch() {
|
|||||||
|
|
||||||
// copy nodes from the resources node to the real resource node
|
// copy nodes from the resources node to the real resource node
|
||||||
"resources".copyXmlNode(
|
"resources".copyXmlNode(
|
||||||
data.xmlEditor[stringsResourceInputStream, OutputStream.nullOutputStream()],
|
data.xmlEditor[stringsResourceInputStream],
|
||||||
data.xmlEditor["res/$stringsResourcePath"]
|
data.xmlEditor["res/$stringsResourcePath"]
|
||||||
).close() // close afterwards
|
).close() // close afterwards
|
||||||
|
|
||||||
@@ -78,7 +77,7 @@ class SponsorBlockResourcePatch : ResourcePatch() {
|
|||||||
|
|
||||||
val targetXmlEditor = data.xmlEditor["res/$path/$resource.xml"]
|
val targetXmlEditor = data.xmlEditor["res/$path/$resource.xml"]
|
||||||
"RelativeLayout".copyXmlNode(
|
"RelativeLayout".copyXmlNode(
|
||||||
data.xmlEditor[hostingResourceStream, OutputStream.nullOutputStream()],
|
data.xmlEditor[hostingResourceStream],
|
||||||
targetXmlEditor
|
targetXmlEditor
|
||||||
).also {
|
).also {
|
||||||
val children = targetXmlEditor.file.getElementsByTagName("RelativeLayout").item(0).childNodes
|
val children = targetXmlEditor.file.getElementsByTagName("RelativeLayout").item(0).childNodes
|
||||||
@@ -102,27 +101,4 @@ class SponsorBlockResourcePatch : ResourcePatch() {
|
|||||||
}
|
}
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies the specified node of the source [DomFileEditor] to the target [DomFileEditor].
|
|
||||||
* @param source the source [DomFileEditor].
|
|
||||||
* @param target the target [DomFileEditor]-
|
|
||||||
*/
|
|
||||||
private fun String.copyXmlNode(source: DomFileEditor, target: DomFileEditor): AutoCloseable {
|
|
||||||
val hostNodes = source.file.getElementsByTagName(this).item(0).childNodes
|
|
||||||
|
|
||||||
val destinationResourceFile = target.file
|
|
||||||
val destinationNode = destinationResourceFile.getElementsByTagName(this).item(0)
|
|
||||||
|
|
||||||
for (index in 0 until hostNodes.length) {
|
|
||||||
val node = hostNodes.item(index).cloneNode(true)
|
|
||||||
destinationResourceFile.adoptNode(node)
|
|
||||||
destinationNode.appendChild(node)
|
|
||||||
}
|
|
||||||
|
|
||||||
return AutoCloseable {
|
|
||||||
source.close()
|
|
||||||
target.close()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -6,17 +6,17 @@ import app.revanced.patcher.annotation.Version
|
|||||||
import app.revanced.patcher.data.impl.ResourceData
|
import app.revanced.patcher.data.impl.ResourceData
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
import app.revanced.patcher.patch.annotations.Dependencies
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
import app.revanced.patcher.patch.impl.ResourcePatch
|
import app.revanced.patcher.patch.impl.ResourcePatch
|
||||||
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
|
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
|
||||||
import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility
|
import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility
|
||||||
import app.revanced.patches.youtube.misc.microg.shared.Constants.BASE_MICROG_PACKAGE_NAME
|
import app.revanced.patches.youtube.misc.microg.shared.Constants.BASE_MICROG_PACKAGE_NAME
|
||||||
import app.revanced.patches.youtube.misc.microg.shared.Constants.REVANCED_APP_NAME
|
|
||||||
import app.revanced.patches.youtube.misc.microg.shared.Constants.REVANCED_PACKAGE_NAME
|
import app.revanced.patches.youtube.misc.microg.shared.Constants.REVANCED_PACKAGE_NAME
|
||||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsResourcePatch
|
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsResourcePatch
|
||||||
|
|
||||||
@Name("microg-resource-patch")
|
@Name("microg-resource-patch")
|
||||||
@Dependencies([FixLocaleConfigErrorPatch::class, SettingsResourcePatch::class])
|
@DependsOn(FixLocaleConfigErrorPatch::class)
|
||||||
|
@DependsOn(SettingsResourcePatch::class)
|
||||||
@Description("Resource patch to allow YouTube ReVanced to run without root and under a different package name.")
|
@Description("Resource patch to allow YouTube ReVanced to run without root and under a different package name.")
|
||||||
@MicroGPatchCompatibility
|
@MicroGPatchCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
@@ -34,32 +34,32 @@ class MicroGResourcePatch : ResourcePatch() {
|
|||||||
it.file.firstChild.appendChild(settingsElement)
|
it.file.firstChild.appendChild(settingsElement)
|
||||||
}
|
}
|
||||||
|
|
||||||
val settings_fragment = data.get("res/xml/settings_fragment.xml")
|
val settingsFragment = data["res/xml/settings_fragment.xml"]
|
||||||
val text = settings_fragment.readText()
|
settingsFragment.writeText(
|
||||||
settings_fragment.writeText(
|
settingsFragment.readText().replace(
|
||||||
text.replace("android:targetPackage=\"com.google.android.youtube", "android:targetPackage=\"$REVANCED_PACKAGE_NAME")
|
"android:targetPackage=\"com.google.android.youtube",
|
||||||
|
"android:targetPackage=\"$REVANCED_PACKAGE_NAME"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
val manifest = data.get("AndroidManifest.xml").readText()
|
val manifest = data["AndroidManifest.xml"]
|
||||||
|
manifest.writeText(
|
||||||
data.get("AndroidManifest.xml").writeText(
|
manifest.readText()
|
||||||
manifest.replace(
|
.replace(
|
||||||
"package=\"com.google.android.youtube", "package=\"$REVANCED_PACKAGE_NAME"
|
"package=\"com.google.android.youtube", "package=\"$REVANCED_PACKAGE_NAME"
|
||||||
).replace(
|
).replace(
|
||||||
"android:label=\"@string/application_name", "android:label=\"$REVANCED_APP_NAME"
|
"android:authorities=\"com.google.android.youtube", "android:authorities=\"$REVANCED_PACKAGE_NAME"
|
||||||
).replace(
|
).replace(
|
||||||
"android:authorities=\"com.google.android.youtube", "android:authorities=\"$REVANCED_PACKAGE_NAME"
|
"com.google.android.youtube.permission.C2D_MESSAGE", "$REVANCED_PACKAGE_NAME.permission.C2D_MESSAGE"
|
||||||
).replace(
|
).replace( // might not be needed
|
||||||
"com.google.android.youtube.permission.C2D_MESSAGE", "$REVANCED_PACKAGE_NAME.permission.C2D_MESSAGE"
|
"com.google.android.youtube.lifecycle-trojan", "$REVANCED_PACKAGE_NAME.lifecycle-trojan"
|
||||||
).replace( // TODO: might not be needed
|
).replace( // might not be needed
|
||||||
"com.google.android.youtube.lifecycle-trojan", "$REVANCED_PACKAGE_NAME.lifecycle-trojan"
|
"com.google.android.youtube.photopicker_images", "$REVANCED_PACKAGE_NAME.photopicker_images"
|
||||||
).replace( // TODO: might not be needed
|
).replace(
|
||||||
"com.google.android.youtube.photopicker_images", "$REVANCED_PACKAGE_NAME.photopicker_images"
|
"com.google.android.c2dm", "$BASE_MICROG_PACKAGE_NAME.android.c2dm"
|
||||||
).replace(
|
).replace(
|
||||||
"com.google.android.c2dm", "$BASE_MICROG_PACKAGE_NAME.android.c2dm"
|
"</queries>", "<package android:name=\"$BASE_MICROG_PACKAGE_NAME.android.gms\"/></queries>"
|
||||||
).replace(
|
)
|
||||||
"</queries>", "<package android:name=\"$BASE_MICROG_PACKAGE_NAME.android.gms\"/></queries>"
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
|
|||||||
@@ -3,5 +3,4 @@ package app.revanced.patches.youtube.misc.microg.shared
|
|||||||
object Constants {
|
object Constants {
|
||||||
internal const val BASE_MICROG_PACKAGE_NAME = "com.mgoogle"
|
internal const val BASE_MICROG_PACKAGE_NAME = "com.mgoogle"
|
||||||
internal const val REVANCED_PACKAGE_NAME = "app.revanced.android.youtube"
|
internal const val REVANCED_PACKAGE_NAME = "app.revanced.android.youtube"
|
||||||
internal const val REVANCED_APP_NAME = "YouTube ReVanced"
|
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,6 @@ package app.revanced.util.resources
|
|||||||
|
|
||||||
import app.revanced.patcher.data.impl.DomFileEditor
|
import app.revanced.patcher.data.impl.DomFileEditor
|
||||||
import app.revanced.patcher.data.impl.ResourceData
|
import app.revanced.patcher.data.impl.ResourceData
|
||||||
import java.io.OutputStream
|
|
||||||
import java.nio.file.Files
|
import java.nio.file.Files
|
||||||
|
|
||||||
internal object ResourceUtils {
|
internal object ResourceUtils {
|
||||||
@@ -44,7 +43,7 @@ internal object ResourceUtils {
|
|||||||
|
|
||||||
// Copy nodes from the resources node to the real resource node
|
// Copy nodes from the resources node to the real resource node
|
||||||
elementTag.copyXmlNode(
|
elementTag.copyXmlNode(
|
||||||
this.xmlEditor[stringsResourceInputStream, OutputStream.nullOutputStream()],
|
this.xmlEditor[stringsResourceInputStream],
|
||||||
this.xmlEditor["res/$targetResource"]
|
this.xmlEditor["res/$targetResource"]
|
||||||
).close()
|
).close()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user