diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 580e625..8fabe0f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,29 +25,29 @@ jobs: - name: "Setup directories" run: | - mkdir -p /tmp/pyonbuild/apks - mkdir -p /tmp/pyonbuild/tools + mkdir -p /tmp/pupubuild/apks + mkdir -p /tmp/pupubuild/tools - name: "Move debug APK" - run: mv ./app/build/outputs/apk/debug/app-debug.apk /tmp/pyonbuild/apks + run: mv ./app/build/outputs/apk/debug/app-debug.apk /tmp/pupubuild/apks - name: "Download uber-apk-signer" - run: wget -nv "https://github.com/patrickfav/uber-apk-signer/releases/download/v1.2.1/uber-apk-signer-1.2.1.jar" -O /tmp/pyonbuild/tools/uber-apk-signer.jar + run: wget -nv "https://github.com/patrickfav/uber-apk-signer/releases/download/v1.2.1/uber-apk-signer-1.2.1.jar" -O /tmp/pupubuild/tools/uber-apk-signer.jar - name: "Sign release APK" - run: java -jar /tmp/pyonbuild/tools/uber-apk-signer.jar --apks ./app/build/outputs/apk/release/app-release-unsigned.apk --out /tmp/pyonbuild/apks/ + run: java -jar /tmp/pupubuild/tools/uber-apk-signer.jar --apks ./app/build/outputs/apk/release/app-release-unsigned.apk --out /tmp/pupubuild/apks/ - name: "Rename release APK" - run: mv /tmp/pyonbuild/apks/app-release-aligned-debugSigned.apk /tmp/pyonbuild/apks/app-release.apk + run: mv /tmp/pupubuild/apks/app-release-aligned-debugSigned.apk /tmp/pupubuild/apks/app-release.apk - name: "Upload debug APK" uses: actions/upload-artifact@v4 with: name: app-debug - path: /tmp/pyonbuild/apks/app-debug.apk + path: /tmp/pupubuild/apks/app-debug.apk - name: "Upload release APK" uses: actions/upload-artifact@v4 with: name: app-release - path: /tmp/pyonbuild/apks/app-release.apk \ No newline at end of file + path: /tmp/pupubuild/apks/app-release.apk \ No newline at end of file diff --git a/.idea/.name b/.idea/.name index bb21b8f..0ee4b28 100644 --- a/.idea/.name +++ b/.idea/.name @@ -1 +1 @@ -BunnyXposed \ No newline at end of file +PupuXposed \ No newline at end of file diff --git a/README.md b/README.md index ebd1de1..a88e4d6 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,6 @@ ![Downloads (latest)](https://img.shields.io/github/downloads/C0C0B01/PupuXposed/latest/total?style=for-the-badge&logo=github&label=Downloads%20(Latest)&color=blue) ![Total downloads](https://img.shields.io/github/downloads/C0C0B01/PupuXposed/total?style=for-the-badge&logo=github&label=Downloads%20(Total)&color=blue) - ![GitHub top language](https://img.shields.io/github/languages/top/C0C0B01/PupuXposed?style=for-the-badge) - [![Stars](https://img.shields.io/github/stars/C0C0B01/PupuManager?logo=github&style=for-the-badge)](https://github.com/C0C0B01/PupuXposed/stargazers)
diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 02020ab..47ffa32 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -5,15 +5,15 @@ plugins { } android { - namespace = "io.github.pyoncord.xposed" - compileSdk = 35 + namespace = "cocobo1.pupu.xposed" + compileSdk = 36 defaultConfig { - applicationId = "io.github.pyoncord.xposed" - minSdk = 24 - targetSdk = 35 - versionCode = 300 - versionName = "0.3.0" + applicationId = "cocobo1.pupu.xposed" + minSdk = 22 + targetSdk = 36 + versionCode = 010 + versionName = "0.1" } buildTypes { diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 9e52cff..c8aae73 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -13,7 +13,7 @@ android:value="true" /> + android:value="An Xposed module to inject Pupu, a mod for Discord's mobile apps." /> diff --git a/app/src/main/assets/xposed_init b/app/src/main/assets/xposed_init index 9afddb0..572cbc0 100644 --- a/app/src/main/assets/xposed_init +++ b/app/src/main/assets/xposed_init @@ -1 +1 @@ -io.github.pyoncord.xposed.Main \ No newline at end of file +cocobo1.pupu.xposed.Main \ No newline at end of file diff --git a/app/src/main/kotlin/io/github/pyoncord/xposed/FontsModule.kt b/app/src/main/kotlin/io/github/pyoncord/xposed/FontsModule.kt index 896d960..f591efc 100644 --- a/app/src/main/kotlin/io/github/pyoncord/xposed/FontsModule.kt +++ b/app/src/main/kotlin/io/github/pyoncord/xposed/FontsModule.kt @@ -1,7 +1,7 @@ // credits to janisslsm from his PR: https://github.com/vendetta-mod/VendettaXposed/pull/17 // hooks are modified function from RN codebase -package io.github.pyoncord.xposed +package cocobo1.pupu.xposed import android.content.res.AssetManager import android.os.Build @@ -80,7 +80,7 @@ class FontsModule: PyonModule() { if (!fileName.startsWith(".")) { val fontName = fileName.split('.')[0] if (fontDef.main.keys.none { it == fontName }) { - Log.i("Bunny", "Deleting font file: $fileName") + Log.i("Pupu", "Deleting font file: $fileName") file.delete() } } @@ -92,12 +92,12 @@ class FontsModule: PyonModule() { async { val url = fontDef.main.getValue(name) try { - Log.i("Bunny", "Downloading $name from $url") + Log.i("Pupu", "Downloading $name from $url") val file = File(fontsDir, "$name${FILE_EXTENSIONS.first { url.endsWith(it) }}") if (file.exists()) return@async val client = HttpClient(CIO) { - install(UserAgent) { agent = "BunnyXposed" } + install(UserAgent) { agent = "PupuXposed" } } val response: HttpResponse = client.get(url) @@ -108,7 +108,7 @@ class FontsModule: PyonModule() { return@async } catch (e: Throwable) { - Log.e("Bunny", "Failed to download fonts ($name from $url)", e) + Log.e("Pupu", "Failed to download fonts ($name from $url)", e) } } }.awaitAll() diff --git a/app/src/main/kotlin/io/github/pyoncord/xposed/LogBoxModule.kt b/app/src/main/kotlin/io/github/pyoncord/xposed/LogBoxModule.kt index 8754b3c..01480de 100644 --- a/app/src/main/kotlin/io/github/pyoncord/xposed/LogBoxModule.kt +++ b/app/src/main/kotlin/io/github/pyoncord/xposed/LogBoxModule.kt @@ -59,7 +59,7 @@ class LogBoxModule: PyonModule() { } } } catch (ex: Exception) { - Log.e("Bunny", "Failed to show dev options dialog: $ex") + Log.e("Pupu", "Failed to show dev options dialog: $ex") alertDialog = null } @@ -84,7 +84,7 @@ class LogBoxModule: PyonModule() { private fun showRecoveryAlert(context: Context, onClose: () -> Unit): AlertDialog { return AlertDialog.Builder(context) - .setTitle("Bunny Recovery Options") + .setTitle("Pupu Recovery Options") .setItems(arrayOf("Reload", "Delete bundle.js")) { _, which -> when (which) { 0 -> { diff --git a/app/src/main/kotlin/io/github/pyoncord/xposed/Main.kt b/app/src/main/kotlin/io/github/pyoncord/xposed/Main.kt index cb594d7..9b14357 100644 --- a/app/src/main/kotlin/io/github/pyoncord/xposed/Main.kt +++ b/app/src/main/kotlin/io/github/pyoncord/xposed/Main.kt @@ -43,7 +43,7 @@ class Main : IXposedHookLoadPackage { fun buildLoaderJsonString(): String { val obj = buildJsonObject { - put("loaderName", "BunnyXposed") + put("loaderName", "PupuXposed") put("loaderVersion", BuildConfig.VERSION_NAME) for (module in pyonModules) { @@ -134,14 +134,14 @@ class Main : IXposedHookLoadPackage { install(HttpTimeout) { requestTimeoutMillis = if (bundle.exists()) 5000 else 10000 } - install(UserAgent) { agent = "BunnyXposed" } + install(UserAgent) { agent = "PupuXposed" } } val url = if (config.customLoadUrl.enabled) config.customLoadUrl.url - else "https://raw.githubusercontent.com/pyoncord/detta-builds/main/bunny.min.js" + else "https://raw.githubusercontent.com/pyoncord/detta-builds/main/pupu.min.js" - Log.e("Bunny", "Fetching JS bundle from $url") + Log.e("Pupu", "Fetching JS bundle from $url") val response: HttpResponse = client.get(url) { headers { @@ -163,19 +163,19 @@ class Main : IXposedHookLoadPackage { return@async } catch (e: RedirectResponseException) { if (e.response.status != HttpStatusCode.NotModified) throw e - Log.e("Bunny", "Server responded with status code 304 - no changes to file") + Log.e("Pupu", "Server responded with status code 304 - no changes to file") } catch (e: Throwable) { onActivityCreate { activity -> activity.runOnUiThread { Toast.makeText( activity.applicationContext, - "Failed to fetch JS bundle, Bunny may not load!", + "Failed to fetch JS bundle, Pupu may not load!", Toast.LENGTH_SHORT ).show() } } - Log.e("Bunny", "Failed to download bundle", e) + Log.e("Pupu", "Failed to download bundle", e) } } diff --git a/app/src/main/kotlin/io/github/pyoncord/xposed/PyonModule.kt b/app/src/main/kotlin/io/github/pyoncord/xposed/PupuModule.kt similarity index 88% rename from app/src/main/kotlin/io/github/pyoncord/xposed/PyonModule.kt rename to app/src/main/kotlin/io/github/pyoncord/xposed/PupuModule.kt index ebcab56..7213f3c 100644 --- a/app/src/main/kotlin/io/github/pyoncord/xposed/PyonModule.kt +++ b/app/src/main/kotlin/io/github/pyoncord/xposed/PupuModule.kt @@ -1,4 +1,4 @@ -package io.github.pyoncord.xposed +package cocobo1.pupu.xposed import de.robv.android.xposed.callbacks.XC_LoadPackage import kotlinx.serialization.json.JsonObjectBuilder diff --git a/app/src/main/kotlin/io/github/pyoncord/xposed/SysColorsModule.kt b/app/src/main/kotlin/io/github/pyoncord/xposed/SysColorsModule.kt index 123526e..cab069c 100644 --- a/app/src/main/kotlin/io/github/pyoncord/xposed/SysColorsModule.kt +++ b/app/src/main/kotlin/io/github/pyoncord/xposed/SysColorsModule.kt @@ -1,4 +1,4 @@ -package io.github.pyoncord.xposed +package cocobo1.pupu.xposed import android.app.AndroidAppHelper import android.content.Context @@ -16,7 +16,7 @@ data class SysColors( val accent3: List ) -class SysColorsModule : PyonModule() { +class SysColorsModule : PupuModule() { private lateinit var context: Context private fun isSupported() = Build.VERSION.SDK_INT >= Build.VERSION_CODES.S diff --git a/app/src/main/kotlin/io/github/pyoncord/xposed/ThemeModule.kt b/app/src/main/kotlin/io/github/pyoncord/xposed/ThemeModule.kt index 97e0947..d3da0dd 100644 --- a/app/src/main/kotlin/io/github/pyoncord/xposed/ThemeModule.kt +++ b/app/src/main/kotlin/io/github/pyoncord/xposed/ThemeModule.kt @@ -1,4 +1,4 @@ -package io.github.pyoncord.xposed +package cocobo1.pupu.xposed import android.content.Context import android.graphics.Color @@ -35,7 +35,7 @@ data class Theme( val data: ThemeData ) -class ThemeModule : PyonModule() { +class ThemeModule : PupuModule() { private lateinit var param: XC_LoadPackage.LoadPackageParam private var theme: Theme? = null @@ -67,8 +67,8 @@ class ThemeModule : PyonModule() { private fun getTheme(): Theme? { val filesDir = File(param.appInfo.dataDir, "files").apply { mkdirs() } - val pyonDir = File(filesDir, "pyoncord").apply { mkdirs() } - val themeFile = File(pyonDir, "current-theme.json") + val pupuDir = File(filesDir, "pupu").apply { mkdirs() } + val themeFile = File(pupuDir, "current-theme.json") val legacyThemeFile = File(filesDir, "vendetta_theme.json") if (legacyThemeFile.isValidish() && !themeFile.isValidish()) { diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a327e5c..052d1b7 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,3 +1,3 @@ - BunnyXposed + PupuXposed \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index 808d13f..6babc05 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,2 +1,2 @@ -rootProject.name = "BunnyXposed" +rootProject.name = "PupuXposed" include(":app")