用su权限写tinymix命令改A10寄存器值

这篇博客探讨了在Android系统中遇到的问题:当使用虚拟键盘时,蓝牙声音会消失。作者发现是由于寄存器pamute设置为off导致。文章提到,可以通过执行tinymix命令将该寄存器设置为1(on状态)来解决此问题,并列举了其他几个与音频相关的tinymix命令。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

public final String pamute = "tinymix 1 1";
public final String mixpas = "tinymix 2 1";
public final String fmr = "tinymix 8 1";
public final String fml = "tinymix 9 1";
public final String mixen = "tinymix 15 1";

/**  

     * 授权root用户权限  
     *   
     * @param command  
     * */  
    public boolean rootCommand(String command) {  
        Process process = null;  
        DataOutputStream dos = null;  
        try {  
            process = Runtime.getRuntime().exec("su");  
            dos = new DataOutputStream(process.getOutputStream());  
            dos.writeBytes(command + "\n");  
            dos.writeBytes("exit\n");  
            dos.flush();  
            process.waitFor();  
        } catch (Exception e) {  
            return false;  
        } finally {  
            try {  
                if (dos != null) {  
                    dos.close();  
                }  
                process.destroy();  
            } catch (Exception e) {  
            }  
        }  
        return true;  

    }  



现在新问题来了。

就是 播放蓝牙声音时,按虚拟键盘的按键时,蓝牙就没声音 咯 adb shell进去了看了。 是pamute这个寄存器为off。不是on

android中,view的按键音类型为系统音频(STREAM_SYSTEM),而音量的大小与媒体音量(STREAM_MUSIC)绑定了起来。

这个。要在虚拟键盘处理时发个广播。然后 把pamute这个寄存器写1.即on状态。。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值