Skip to content

Commit

Permalink
新年快乐 New Version 2.0.25 && fix:优化网易云歌词强开代码
Browse files Browse the repository at this point in the history
  • Loading branch information
ghhccghk committed Jan 28, 2025
1 parent cf1e1e7 commit b8bd71f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ android {
applicationId = "cn.lyric.getter"
minSdk = 26
targetSdk = 35
versionCode = 24
versionName = "2.0.16"
versionCode = 25
versionName = "2.0.25"
dependenciesInfo.includeInApk = false
ndk.abiFilters += arrayOf("arm64-v8a", "armeabi-v7a", "x86", "x86_64")
buildConfigField("long", "BUILD_TIME", "$buildTime")
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/kotlin/cn/lyric/getter/config/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ class Config {
var saltUseFlyme: Boolean by serialLazy(false)
var updateTime: Long by serialLazy(0L)
var showTitle: Boolean by serialLazy(false)
var fuckwyy: Boolean by serialLazy(false)
var fuckwyysb163: Boolean by serialLazy(false)
}

9 changes: 4 additions & 5 deletions app/src/main/kotlin/cn/lyric/getter/hook/app/Netease.kt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ object Netease : BaseHook() {
}
Class::class.java.methodFinder().first { name == "getField" }.replaceName()
Class::class.java.methodFinder().first { name == "getDeclaredField" }.replaceName()
//fuckTinker()
HookTools.getApplication {
val verCode = it.packageManager?.getPackageInfo(it.packageName, 0)?.getVersionCode() ?: 0
if (verCode >= 8000041 || it.packageName == "com.hihonor.cloudmusic") {
Expand All @@ -60,16 +59,16 @@ object Netease : BaseHook() {
eventTools.sendLyric(hookParam.result as String)
}
}
if (verCode >= 9002033 ){
val fuckwyy = dexKitBridge.findClass {
if (xConfig.fuckwyysb163){
val sbNetease = dexKitBridge.findClass {
matcher {
usingStrings("com/netease/cloudmusic/module/lyric/flyme/StatusBarLyricSettingManager.class:setSwitchStatus:(Z)V")
}
}.single()
loadClass(fuckwyy.name).methodFinder().filterByParamCount(0).filterByName("a").first().createHook {
loadClass(sbNetease.name).methodFinder().filterByParamCount(0).filterByName("a").first().createHook {
after { hookParam ->
val a = hookParam.result as SharedPreferences
a.edit().putBoolean("status_bar_lyric_setting_key",xConfig.fuckwyy).commit()
a.edit().putBoolean("status_bar_lyric_setting_key",xConfig.fuckwyysb163).commit()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,10 @@ class SettingsFragment : Fragment() {
}
switch("fuckwyy") {
titleRes = R.string.fuckwyy
defaultValue = config.fuckwyy
summaryRes = R.string.fuckwyy_tips
defaultValue = config.fuckwyysb163
onClick {
config.fuckwyy = checked
config.fuckwyysb163 = checked
false
}
}
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-zh/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,5 @@
<string name="show_title">强制显示标题</string>
<string name="version_differences">发行版本 Release 不会输出 Log,Debug 版本会输出 Log,非必要不建议安装 Debug 版本</string>
<string name="fuckwyy">网易云状态栏歌词强开</string>
<string name="fuckwyy_tips">开启开关可能导致网易云出现异常,本模块概不负责</string>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,5 @@
<string name="show_title">Force show title</string>
<string name="version_differences">The release version won\'t generate logs, and the Debug version will generate logs, so it\'s recommended not to install the Debug version.</string>
<string name="fuckwyy">Force opening of lyrics in NetEase Cloud status bar</string>
<string name="fuckwyy_tips">Turning on the switch may cause abnormalities in the NetEase Cloud, which is not responsible for this module</string>
</resources>

0 comments on commit b8bd71f

Please sign in to comment.