Rebranded Bunny to Pupu, added android 5 and 6 support, added android 16 compile version

This commit is contained in:
cocobo1 2025-04-30 17:45:57 +01:00
parent fa4c13f557
commit fcab2469bd
14 changed files with 41 additions and 43 deletions

View file

@ -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
path: /tmp/pupubuild/apks/app-release.apk

2
.idea/.name generated
View file

@ -1 +1 @@
BunnyXposed
PupuXposed

View file

@ -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)
<br>

View file

@ -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 {

View file

@ -13,7 +13,7 @@
android:value="true" />
<meta-data
android:name="xposeddescription"
android:value="An Xposed module to inject Bunny, a mod for Discord's mobile apps." />
android:value="An Xposed module to inject Pupu, a mod for Discord's mobile apps." />
<meta-data
android:name="xposedminversion"
android:value="82" />

View file

@ -1 +1 @@
io.github.pyoncord.xposed.Main
cocobo1.pupu.xposed.Main

View file

@ -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()

View file

@ -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 -> {

View file

@ -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)
}
}

View file

@ -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

View file

@ -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<String>
)
class SysColorsModule : PyonModule() {
class SysColorsModule : PupuModule() {
private lateinit var context: Context
private fun isSupported() = Build.VERSION.SDK_INT >= Build.VERSION_CODES.S

View file

@ -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()) {

View file

@ -1,3 +1,3 @@
<resources>
<string name="app_name">BunnyXposed</string>
<string name="app_name">PupuXposed</string>
</resources>

View file

@ -1,2 +1,2 @@
rootProject.name = "BunnyXposed"
rootProject.name = "PupuXposed"
include(":app")