ReChronoRain / HyperCeiler

MIUI & HyperOS enhancement module - Make MIUI & HyperOS Great Again!
https://hyperceiler.sevtinge.cc
GNU Affero General Public License v3.0
1.99k stars 123 forks source link

🐛 [BUG] 打开副卡VoLTE通话时可联网无效 #72

Closed cibimo closed 8 months ago

cibimo commented 8 months ago

问题描述

package com.sevtinge.hyperceiler.module.hook.phone

import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass
import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
import com.sevtinge.hyperceiler.module.base.BaseHook
import com.sevtinge.hyperceiler.utils.exec

object ViceSlotVolteButton : BaseHook() {
    override fun init() {
        runCatching {
            exec("settings put global vice_slot_volte_data_enabled 1")
            loadClass("com.android.phone.MiuiPhoneUtils").methodFinder().first {
                name == "shouldHideViceSlotVolteDataButton"
            }.createHook {
                returnConstant(false)
            }
        }
        runCatching {
            loadClass("com.android.phone.MiuiPhoneUtils").methodFinder().first {
                name == "shouldHideSmartDualSimButton"
            }.createHook {
                returnConstant(false)
            }
        }
    }
}

定位代码后推断打开开关会执行exec("settings put global vice_slot_volte_data_enabled 1") 但打开开关后重启设备拨打电话测试没有启用,shell中settings get global vice_slot_volte_data_enabled为0 我没有找到 com.sevtinge.hyperceiler.utils.exec 方法,无法继续分析 (root环境为kernel SU,已给予 hyperceiler root权限)

模块日志

无崩溃无报错

复现步骤

1. 前往 '...'
2. 点击 '....'

....
出现问题

问题截图

图片注释

机型

Xiaomi 12S Ultra

MIUI/HyperOS 版本

MIUI14

Android 版本

Android 13

HyperCeiler 版本

MIUI14 V14.0.23.10.15 DEV

cibimo commented 8 months ago

另外vice_slot_volte_data_enabled这个属性好像每次启动默认为0,设置后不会保存,不知道有没有关系

HChenX commented 8 months ago

无法复现,搁置