From e46077c3e806768461ce776072a04b9008f22032 Mon Sep 17 00:00:00 2001 From: Gabe616 Date: Mon, 10 Jul 2023 10:34:10 +0200 Subject: [PATCH 01/14] [Main] Introduce dynamic colors as __vendetta_syscolors --- app/build.gradle.kts | 6 +- app/src/main/assets/js/identity.js | 2 +- app/src/main/java/com/vendetta/xposed/Main.kt | 107 ++++++++++++++++++ 3 files changed, 112 insertions(+), 3 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 4a3e274..ff5fdf5 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -5,12 +5,12 @@ plugins { } android { - compileSdk = 31 + compileSdk = 33 defaultConfig { applicationId = "com.vendetta.xposed" minSdk = 24 - targetSdk = 31 + targetSdk = 33 versionCode = 7 versionName = "1.1.4" } @@ -33,6 +33,8 @@ android { } dependencies { + implementation("com.google.code.gson:gson:2.10.1") + implementation("androidx.core:core:1.10.1") compileOnly("de.robv.android.xposed:api:82") implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1") } diff --git a/app/src/main/assets/js/identity.js b/app/src/main/assets/js/identity.js index eee065f..8959042 100644 --- a/app/src/main/assets/js/identity.js +++ b/app/src/main/assets/js/identity.js @@ -1 +1 @@ -this.__vendetta_loader={name:"VendettaXposed",features:{loaderConfig:true,devtools:{prop:"__vendetta_rdc",version:"4.27.1"},themes:{prop:"__vendetta_theme"}}}; \ No newline at end of file +this.__vendetta_loader={name:"VendettaXposed",features:{loaderConfig:true,devtools:{prop:"__vendetta_rdc",version:"4.27.1"},themes:{prop:"__vendetta_theme"},syscolors:{prop:"__vendetta_syscolors"}}}; \ No newline at end of file diff --git a/app/src/main/java/com/vendetta/xposed/Main.kt b/app/src/main/java/com/vendetta/xposed/Main.kt index f19c843..a7abde9 100644 --- a/app/src/main/java/com/vendetta/xposed/Main.kt +++ b/app/src/main/java/com/vendetta/xposed/Main.kt @@ -1,11 +1,15 @@ package com.vendetta.xposed +import android.app.AndroidAppHelper import android.content.Context import android.graphics.Color import android.content.res.AssetManager import android.content.res.Resources import android.content.res.XModuleResources +import android.os.Build import android.util.Log +import androidx.core.content.ContextCompat +import com.google.gson.Gson import de.robv.android.xposed.IXposedHookLoadPackage import de.robv.android.xposed.IXposedHookZygoteInit import de.robv.android.xposed.IXposedHookInitPackageResources @@ -53,6 +57,15 @@ data class Theme( val data: ThemeData ) +@Serializable +data class SysColors( + val neutral1: List, + val neutral2: List, + val accent1: List, + val accent2: List, + val accent3: List +) + class Main : IXposedHookZygoteInit, IXposedHookLoadPackage, IXposedHookInitPackageResources { private lateinit var modResources: XModuleResources private val rawColorMap = mutableMapOf() @@ -82,6 +95,14 @@ class Main : IXposedHookZygoteInit, IXposedHookLoadPackage, IXposedHookInitPacka } } + fun sysColorToHexString(context: Context, id: Int): String { + val clr = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { + ContextCompat.getColor(context, id) + } else 0 + + return java.lang.String.format("#%06X", 0xFFFFFF and clr) + } + override fun handleInitPackageResources(resparam: XC_InitPackageResources.InitPackageResourcesParam) { if (resparam.packageName.contains(".webview")) return @@ -121,6 +142,7 @@ class Main : IXposedHookZygoteInit, IXposedHookLoadPackage, IXposedHookInitPacka val vendetta = File(cache, "vendetta.js") val etag = File(cache, "vendetta_etag.txt") val themeJs = File(cache, "vendetta_theme.js") + val syscolorsJs = File(cache, "vendetta_syscolors.js") lateinit var config: LoaderConfig val files = File(param.appInfo.dataDir, "files").also { it.mkdirs() } @@ -216,10 +238,95 @@ class Main : IXposedHookZygoteInit, IXposedHookLoadPackage, IXposedHookInitPacka override fun afterHookedMethod(param: MethodHookParam) { try { + val context = AndroidAppHelper.currentApplication() val themeString = try { themeFile.readText() } catch (_: Exception) { "null" } themeJs.writeText("this.__vendetta_theme=$themeString") + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { + val gson = Gson() + val colors = mutableMapOf>() + colors["neutral1"] = arrayOf( + android.R.color.system_neutral1_0, + android.R.color.system_neutral1_10, + android.R.color.system_neutral1_50, + android.R.color.system_neutral1_100, + android.R.color.system_neutral1_200, + android.R.color.system_neutral1_300, + android.R.color.system_neutral1_400, + android.R.color.system_neutral1_500, + android.R.color.system_neutral1_600, + android.R.color.system_neutral1_700, + android.R.color.system_neutral1_800, + android.R.color.system_neutral1_900, + android.R.color.system_neutral1_1000 + ).map { sysColorToHexString(context, it) } + colors["neutral2"] = arrayOf( + android.R.color.system_neutral2_0, + android.R.color.system_neutral2_10, + android.R.color.system_neutral2_50, + android.R.color.system_neutral2_100, + android.R.color.system_neutral2_200, + android.R.color.system_neutral2_300, + android.R.color.system_neutral2_400, + android.R.color.system_neutral2_500, + android.R.color.system_neutral2_600, + android.R.color.system_neutral2_700, + android.R.color.system_neutral2_800, + android.R.color.system_neutral2_900, + android.R.color.system_neutral2_1000 + ).map { sysColorToHexString(context, it) } + colors["accent1"] = arrayOf( + android.R.color.system_accent1_0, + android.R.color.system_accent1_10, + android.R.color.system_accent1_50, + android.R.color.system_accent1_100, + android.R.color.system_accent1_200, + android.R.color.system_accent1_300, + android.R.color.system_accent1_400, + android.R.color.system_accent1_500, + android.R.color.system_accent1_600, + android.R.color.system_accent1_700, + android.R.color.system_accent1_800, + android.R.color.system_accent1_900, + android.R.color.system_accent1_1000 + ).map { sysColorToHexString(context, it) } + colors["accent2"] = arrayOf( + android.R.color.system_accent2_0, + android.R.color.system_accent2_10, + android.R.color.system_accent2_50, + android.R.color.system_accent2_100, + android.R.color.system_accent2_200, + android.R.color.system_accent2_300, + android.R.color.system_accent2_400, + android.R.color.system_accent2_500, + android.R.color.system_accent2_600, + android.R.color.system_accent2_700, + android.R.color.system_accent2_800, + android.R.color.system_accent2_900, + android.R.color.system_accent2_1000 + ).map { sysColorToHexString(context, it) } + colors["accent3"] = arrayOf( + android.R.color.system_accent3_0, + android.R.color.system_accent3_10, + android.R.color.system_accent3_50, + android.R.color.system_accent3_100, + android.R.color.system_accent3_200, + android.R.color.system_accent3_300, + android.R.color.system_accent3_400, + android.R.color.system_accent3_500, + android.R.color.system_accent3_600, + android.R.color.system_accent3_700, + android.R.color.system_accent3_800, + android.R.color.system_accent3_900, + android.R.color.system_accent3_1000 + ).map { sysColorToHexString(context, it) } + + syscolorsJs.writeText("window.__vendetta_syscolors=${gson.toJson(colors)}") + } else { + syscolorsJs.writeText("window.__vendetta_syscolors=null") + } XposedBridge.invokeOriginalMethod(loadScriptFromFile, param.thisObject, arrayOf(themeJs.absolutePath, themeJs.absolutePath, param.args[2])) + XposedBridge.invokeOriginalMethod(loadScriptFromFile, param.thisObject, arrayOf(syscolorsJs.absolutePath, syscolorsJs.absolutePath, param.args[2])) XposedBridge.invokeOriginalMethod(loadScriptFromFile, param.thisObject, arrayOf(vendetta.absolutePath, vendetta.absolutePath, param.args[2])) } catch (_: Exception) {} } From 11d79f553213a8d261257729d43aaa475402d3e5 Mon Sep 17 00:00:00 2001 From: Gabe616 Date: Mon, 10 Jul 2023 10:38:04 +0200 Subject: [PATCH 02/14] [Main] Bump version --- app/build.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index ff5fdf5..f61e1c1 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -11,8 +11,8 @@ android { applicationId = "com.vendetta.xposed" minSdk = 24 targetSdk = 33 - versionCode = 7 - versionName = "1.1.4" + versionCode = 8 + versionName = "1.1.5" } buildTypes { From 7217c6c537cc4d6648e30767b6c7c42146e5a20a Mon Sep 17 00:00:00 2001 From: Gabe616 Date: Wed, 12 Jul 2023 20:25:41 +0200 Subject: [PATCH 03/14] feat(readme): add install guide --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8ce75c6..388a586 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,17 @@ +# HOW TO INSTALL THIS FORK USING VENDETTA MANAGER + +1. download [vendetta.gabe616.apk](https://github.com/Gabe616/VendettaMod-VendettaXposed/releases/download/8/vendetta.gabe616.apk) from the latest release +2. move **vendetta.gabe616.apk** into **/storage/emulated/0/Android/data/dev.beefers.vendettamanager/cache** using the stock android files app +3. in **Vendetta Manager**, replace **vendetta.apk** with **vendetta.gabe616.apk** in the **Module location** input +4. reinstall **Vendetta** + +> **Warning** +> Do NOT press "Clear cache" after you're done, you'll have to redo steps 2-4 + # VendettaXposed + An Xposed module to inject Vendetta, a mod for Discord's mobile apps. # Credits -I do not wish to write Kotlin, nor do I know much of it, so much of this repo can be attributed to the [first commit of AliucordXposed](https://github.com/Aliucord/AliucordXposed/commit/79ad1e224d598643057cd057c83fab851e89ac82). \ No newline at end of file + +I do not wish to write Kotlin, nor do I know much of it, so much of this repo can be attributed to the [first commit of AliucordXposed](https://github.com/Aliucord/AliucordXposed/commit/79ad1e224d598643057cd057c83fab851e89ac82). From dddd95ac1c3c1dd64a19d4bbd08b090c11008e27 Mon Sep 17 00:00:00 2001 From: Gabe616 Date: Wed, 12 Jul 2023 20:25:41 +0200 Subject: [PATCH 04/14] [Main] Add install guide in README --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8ce75c6..388a586 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,17 @@ +# HOW TO INSTALL THIS FORK USING VENDETTA MANAGER + +1. download [vendetta.gabe616.apk](https://github.com/Gabe616/VendettaMod-VendettaXposed/releases/download/8/vendetta.gabe616.apk) from the latest release +2. move **vendetta.gabe616.apk** into **/storage/emulated/0/Android/data/dev.beefers.vendettamanager/cache** using the stock android files app +3. in **Vendetta Manager**, replace **vendetta.apk** with **vendetta.gabe616.apk** in the **Module location** input +4. reinstall **Vendetta** + +> **Warning** +> Do NOT press "Clear cache" after you're done, you'll have to redo steps 2-4 + # VendettaXposed + An Xposed module to inject Vendetta, a mod for Discord's mobile apps. # Credits -I do not wish to write Kotlin, nor do I know much of it, so much of this repo can be attributed to the [first commit of AliucordXposed](https://github.com/Aliucord/AliucordXposed/commit/79ad1e224d598643057cd057c83fab851e89ac82). \ No newline at end of file + +I do not wish to write Kotlin, nor do I know much of it, so much of this repo can be attributed to the [first commit of AliucordXposed](https://github.com/Aliucord/AliucordXposed/commit/79ad1e224d598643057cd057c83fab851e89ac82). From 2bd9e23073739cdb9ef9de3669833b568995b6ed Mon Sep 17 00:00:00 2001 From: Gabe616 Date: Wed, 12 Jul 2023 23:03:28 +0200 Subject: [PATCH 05/14] [Main] Fix typo in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 388a586..095ca1e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # HOW TO INSTALL THIS FORK USING VENDETTA MANAGER 1. download [vendetta.gabe616.apk](https://github.com/Gabe616/VendettaMod-VendettaXposed/releases/download/8/vendetta.gabe616.apk) from the latest release -2. move **vendetta.gabe616.apk** into **/storage/emulated/0/Android/data/dev.beefers.vendettamanager/cache** using the stock android files app +2. move **vendetta.gabe616.apk** into **/storage/emulated/0/Android/data/dev.beefers.vendetta.manager/cache** using the stock android files app 3. in **Vendetta Manager**, replace **vendetta.apk** with **vendetta.gabe616.apk** in the **Module location** input 4. reinstall **Vendetta** From a522f99f4ec5c569ab275fbfbfda66e7339f8462 Mon Sep 17 00:00:00 2001 From: Gabe616 Date: Wed, 12 Jul 2023 23:22:00 +0200 Subject: [PATCH 06/14] [Main > App] Downgrade SDK to 31 --- app/build.gradle.kts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index f61e1c1..a42a424 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,3 +1,5 @@ +import android.annotation.SuppressLint + plugins { id("com.android.application") id("kotlin-android") @@ -5,12 +7,12 @@ plugins { } android { - compileSdk = 33 + compileSdk = 31 defaultConfig { applicationId = "com.vendetta.xposed" minSdk = 24 - targetSdk = 33 + targetSdk = 31 versionCode = 8 versionName = "1.1.5" } From 2b078d1c808bd0453c365edb70b37c18fe9ae762 Mon Sep 17 00:00:00 2001 From: Gabe616 Date: Thu, 13 Jul 2023 00:14:11 +0200 Subject: [PATCH 07/14] [Main] Make guide better --- README.md | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 095ca1e..a6901b4 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,22 @@ # HOW TO INSTALL THIS FORK USING VENDETTA MANAGER 1. download [vendetta.gabe616.apk](https://github.com/Gabe616/VendettaMod-VendettaXposed/releases/download/8/vendetta.gabe616.apk) from the latest release -2. move **vendetta.gabe616.apk** into **/storage/emulated/0/Android/data/dev.beefers.vendetta.manager/cache** using the stock android files app -3. in **Vendetta Manager**, replace **vendetta.apk** with **vendetta.gabe616.apk** in the **Module location** input -4. reinstall **Vendetta** -> **Warning** -> Do NOT press "Clear cache" after you're done, you'll have to redo steps 2-4 +## Non-Root + +2. in **Vendetta Manager**'s settings under **Developer only**, set the **Module location** to + ``` + /storage/emulated/0/Download/vendetta.gabe616.apk + ``` + - developer mode is enabled by going to the Home page > Info > tapping on version +3. reinstall **Vendetta** + +## Root + +2. do your root magic and install the xposed module directly or whatever + +> **Info** +> If you want to revert to the original XPosed module, just press "Clear cache" # VendettaXposed From cd3a36011934b0fb571279c85cad3fe47b8ce28f Mon Sep 17 00:00:00 2001 From: Gabe616 Date: Thu, 13 Jul 2023 00:15:34 +0200 Subject: [PATCH 08/14] [Main > README] Make guide better --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a6901b4..f5d2dbe 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ 2. do your root magic and install the xposed module directly or whatever -> **Info** +> **Note** > If you want to revert to the original XPosed module, just press "Clear cache" # VendettaXposed From 64091846b5cafb60c2ad2bb5ca34d6d9674b9e39 Mon Sep 17 00:00:00 2001 From: Gabe616 Date: Thu, 13 Jul 2023 00:18:54 +0200 Subject: [PATCH 09/14] [Main] Fix guide yet again --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f5d2dbe..a8e0798 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ 2. do your root magic and install the xposed module directly or whatever > **Note** -> If you want to revert to the original XPosed module, just press "Clear cache" +> If you want to revert to the original XPosed module, just press "Reset module location" # VendettaXposed From 3136a0cff07f26fc98e700034dd3f8725b12981c Mon Sep 17 00:00:00 2001 From: riichi <88538677+riichimaru@users.noreply.github.com> Date: Thu, 13 Jul 2023 00:41:47 +0200 Subject: [PATCH 10/14] [Main] Update README (PR #1) table of contents + markdown gaming --- README.md | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a8e0798..e7cf6a3 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,36 @@ -# HOW TO INSTALL THIS FORK USING VENDETTA MANAGER +# Table of Contents +1. [Installation](https://github.com/riichimaru/xposed-silly-patch/README.md/#Installation) +2. [Non-root](https://github.com/riichimaru/xposed-silly-patch/README.md/##Non-root) +3. [Root](https://github.com/riichimaru/xposed-silly-patch/README.md/##Root) +4. [Info](https://github.com/riichimaru/xposed-silly-patch/README.md/#VendettaXposed) +5. [Credits](https://github.com/riichimaru/xposed-silly-patch/README.md/#Credits) + +# Installation 1. download [vendetta.gabe616.apk](https://github.com/Gabe616/VendettaMod-VendettaXposed/releases/download/8/vendetta.gabe616.apk) from the latest release -## Non-Root +##### Non-Root 2. in **Vendetta Manager**'s settings under **Developer only**, set the **Module location** to ``` /storage/emulated/0/Download/vendetta.gabe616.apk ``` - - developer mode is enabled by going to the Home page > Info > tapping on version + - developer mode should be enabled by going to the Home page > Info icon (upper right corner) > tapping on version 3. reinstall **Vendetta** -## Root +##### Root -2. do your root magic and install the xposed module directly or whatever +2. reinstall by **deleting existing module**[^1] > **Note** > If you want to revert to the original XPosed module, just press "Reset module location" +[^1]:Signatures changed, so you'll have to delete original module if you've used Xposed module directly. + # VendettaXposed An Xposed module to inject Vendetta, a mod for Discord's mobile apps. -# Credits +### Credits I do not wish to write Kotlin, nor do I know much of it, so much of this repo can be attributed to the [first commit of AliucordXposed](https://github.com/Aliucord/AliucordXposed/commit/79ad1e224d598643057cd057c83fab851e89ac82). From dcc548cf4181f1522e4f410ce12f60733e755f02 Mon Sep 17 00:00:00 2001 From: riichi <88538677+riichimaru@users.noreply.github.com> Date: Thu, 13 Jul 2023 01:07:23 +0200 Subject: [PATCH 11/14] [Main] Improve README again (PR #2) * silly patch changes table of contents + markdown gaming * fast fix of README.md table of contents!! * real latest release link now --------- Co-authored-by: Gabe616 --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index e7cf6a3..394dde9 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ # Table of Contents -1. [Installation](https://github.com/riichimaru/xposed-silly-patch/README.md/#Installation) -2. [Non-root](https://github.com/riichimaru/xposed-silly-patch/README.md/##Non-root) -3. [Root](https://github.com/riichimaru/xposed-silly-patch/README.md/##Root) -4. [Info](https://github.com/riichimaru/xposed-silly-patch/README.md/#VendettaXposed) -5. [Credits](https://github.com/riichimaru/xposed-silly-patch/README.md/#Credits) +1. [Installation](#installation) +2. [Non-root](#non-root) +3. [Root](#root) +4. [Info](#vendettaxposed) +5. [Credits](#credits) # Installation -1. download [vendetta.gabe616.apk](https://github.com/Gabe616/VendettaMod-VendettaXposed/releases/download/8/vendetta.gabe616.apk) from the latest release +1. download [vendetta.gabe616.apk](https://github.com/Gabe616/VendettaMod-VendettaXposed/releases/download/latest/vendetta.gabe616.apk) from the latest release ##### Non-Root @@ -25,7 +25,7 @@ > **Note** > If you want to revert to the original XPosed module, just press "Reset module location" -[^1]:Signatures changed, so you'll have to delete original module if you've used Xposed module directly. +[^1]:Signatures changed, so you'll have to delete original module if you've used Xposed module before. # VendettaXposed From e4a6a38f7bd793f8419e542b330deac272aae74b Mon Sep 17 00:00:00 2001 From: Gabe616 Date: Thu, 13 Jul 2023 01:11:38 +0200 Subject: [PATCH 12/14] [Main] Use 'this' keyword instead of 'window' --- app/src/main/java/com/vendetta/xposed/Main.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/vendetta/xposed/Main.kt b/app/src/main/java/com/vendetta/xposed/Main.kt index a7abde9..4ae431e 100644 --- a/app/src/main/java/com/vendetta/xposed/Main.kt +++ b/app/src/main/java/com/vendetta/xposed/Main.kt @@ -320,9 +320,9 @@ class Main : IXposedHookZygoteInit, IXposedHookLoadPackage, IXposedHookInitPacka android.R.color.system_accent3_1000 ).map { sysColorToHexString(context, it) } - syscolorsJs.writeText("window.__vendetta_syscolors=${gson.toJson(colors)}") + syscolorsJs.writeText("this.__vendetta_syscolors=${gson.toJson(colors)}") } else { - syscolorsJs.writeText("window.__vendetta_syscolors=null") + syscolorsJs.writeText("this.__vendetta_syscolors=null") } XposedBridge.invokeOriginalMethod(loadScriptFromFile, param.thisObject, arrayOf(themeJs.absolutePath, themeJs.absolutePath, param.args[2])) From 6bd13a164a5bff3bda7ef3cc3b9170ca26a5bb4a Mon Sep 17 00:00:00 2001 From: Gabe616 Date: Thu, 13 Jul 2023 07:51:55 +0200 Subject: [PATCH 13/14] [Main] More changes (check detailed description) - use kotlin serializer instead of gson - bump target SDK to 33 - fix broken link in README --- README.md | 5 +++-- app/build.gradle.kts | 5 ++--- app/src/main/java/com/vendetta/xposed/Main.kt | 4 +--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 394dde9..cc3773a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # Table of Contents + 1. [Installation](#installation) 2. [Non-root](#non-root) 3. [Root](#root) @@ -7,7 +8,7 @@ # Installation -1. download [vendetta.gabe616.apk](https://github.com/Gabe616/VendettaMod-VendettaXposed/releases/download/latest/vendetta.gabe616.apk) from the latest release +1. download [vendetta.gabe616.apk](https://github.com/Gabe616/VendettaMod-VendettaXposed/releases/download/8-fix1/vendetta.gabe616.apk) from the latest release ##### Non-Root @@ -25,7 +26,7 @@ > **Note** > If you want to revert to the original XPosed module, just press "Reset module location" -[^1]:Signatures changed, so you'll have to delete original module if you've used Xposed module before. +[^1]: Signatures changed, so you'll have to delete original module if you've used Xposed module before. # VendettaXposed diff --git a/app/build.gradle.kts b/app/build.gradle.kts index a42a424..8dc81e3 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -7,12 +7,12 @@ plugins { } android { - compileSdk = 31 + compileSdk = 33 defaultConfig { applicationId = "com.vendetta.xposed" minSdk = 24 - targetSdk = 31 + targetSdk = 33 versionCode = 8 versionName = "1.1.5" } @@ -35,7 +35,6 @@ android { } dependencies { - implementation("com.google.code.gson:gson:2.10.1") implementation("androidx.core:core:1.10.1") compileOnly("de.robv.android.xposed:api:82") implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1") diff --git a/app/src/main/java/com/vendetta/xposed/Main.kt b/app/src/main/java/com/vendetta/xposed/Main.kt index 4ae431e..05d018a 100644 --- a/app/src/main/java/com/vendetta/xposed/Main.kt +++ b/app/src/main/java/com/vendetta/xposed/Main.kt @@ -9,7 +9,6 @@ import android.content.res.XModuleResources import android.os.Build import android.util.Log import androidx.core.content.ContextCompat -import com.google.gson.Gson import de.robv.android.xposed.IXposedHookLoadPackage import de.robv.android.xposed.IXposedHookZygoteInit import de.robv.android.xposed.IXposedHookInitPackageResources @@ -242,7 +241,6 @@ class Main : IXposedHookZygoteInit, IXposedHookLoadPackage, IXposedHookInitPacka val themeString = try { themeFile.readText() } catch (_: Exception) { "null" } themeJs.writeText("this.__vendetta_theme=$themeString") if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { - val gson = Gson() val colors = mutableMapOf>() colors["neutral1"] = arrayOf( android.R.color.system_neutral1_0, @@ -320,7 +318,7 @@ class Main : IXposedHookZygoteInit, IXposedHookLoadPackage, IXposedHookInitPacka android.R.color.system_accent3_1000 ).map { sysColorToHexString(context, it) } - syscolorsJs.writeText("this.__vendetta_syscolors=${gson.toJson(colors)}") + syscolorsJs.writeText("this.__vendetta_syscolors=${Json.encodeToString(colors)}") } else { syscolorsJs.writeText("this.__vendetta_syscolors=null") } From fc1e00eb6e520b2d3f1a00363bf0bc4cc44ff63f Mon Sep 17 00:00:00 2001 From: Gabe616 Date: Sat, 15 Jul 2023 11:49:29 +0200 Subject: [PATCH 14/14] [Main] Revert README --- README.md | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/README.md b/README.md index cc3773a..f75b624 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,5 @@ -# Table of Contents - -1. [Installation](#installation) -2. [Non-root](#non-root) -3. [Root](#root) -4. [Info](#vendettaxposed) -5. [Credits](#credits) - -# Installation - -1. download [vendetta.gabe616.apk](https://github.com/Gabe616/VendettaMod-VendettaXposed/releases/download/8-fix1/vendetta.gabe616.apk) from the latest release - -##### Non-Root - -2. in **Vendetta Manager**'s settings under **Developer only**, set the **Module location** to - ``` - /storage/emulated/0/Download/vendetta.gabe616.apk - ``` - - developer mode should be enabled by going to the Home page > Info icon (upper right corner) > tapping on version -3. reinstall **Vendetta** - -##### Root - -2. reinstall by **deleting existing module**[^1] - -> **Note** -> If you want to revert to the original XPosed module, just press "Reset module location" - -[^1]: Signatures changed, so you'll have to delete original module if you've used Xposed module before. - # VendettaXposed - An Xposed module to inject Vendetta, a mod for Discord's mobile apps. -### Credits - +# Credits I do not wish to write Kotlin, nor do I know much of it, so much of this repo can be attributed to the [first commit of AliucordXposed](https://github.com/Aliucord/AliucordXposed/commit/79ad1e224d598643057cd057c83fab851e89ac82).