小米6刷入Android P体验及部分问题解决

请注意,本文编写于 382 天前,最后修改于 381 天前,其中某些信息可能已经过时。

刷入

使用的是sbw编译好的包,这样就不用和其他机型一样要刷一堆东西了,传送门

刷入方法

  1. 格式化 cache, data, system, vendor, storage 分区.
  2. 复制Android P 刷机包到内置存储.
  3. 安装Android P zip刷机文件.
  4. 格式化data.(如果不格式,刷机包会一直保存在隐藏路径中.)
  5. 重启系统

如果需要刷入magisk,请在第一次开机进入了系统后再进rec刷入,否则会出问题,博主亲身经历
请使用支持Project Treble的rec

问题及解决

magisk所获取的root权限并不完整

不清楚是magisk的原因还是刷机包的原因,在系统下无法挂载system分区以及vendor分区为可写,所以无法修改其中的内容。我一开始认为是system锁(就像miui那样的),但是却无法对system锁的状态进行操作,提示user build无法修改,如有人知道为什么或者解决方案欢迎告诉我
现在system分区以及vendor分区又可以修改了,怀疑是selinux的问题,如果有遇到这个问题的可以把selinux状态设为permissive
好了,我知道了,必须改动过一次systemvendor分区才能正常在系统下挂载,这是什么玄学原因...

开启虚拟按键以及屏蔽实体按键

个人喜好,我比较习惯使用虚拟按键,因为它的触摸反馈更好。系统并未提供相关选项,所以只能修改系统文件了,但是由于root权限不完整,所以除了用ADB就只能通过rec了,我选择了后者,在TWRP的终端模拟器中操作即可

  1. /vendor/build.prop中的qemu.hw.mainkeys=1的值改为0,即qemu.hw.mainkeys=0,这个操作是开启虚拟按键
  2. /vendor/usr/keylayout/synaptics_dsx.kl的最后几行都注释掉,如下

    # Copyright (c) 2015, The Linux Foundation. All rights reserved.
    #
    # Redistribution and use in source and binary forms, with or without
    # modification, are permitted provided that the following conditions are
    # met:
    #     * Redistributions of source code must retain the above copyright
    #       notice, this list of conditions and the following disclaimer.
    #     * Redistributions in binary form must reproduce the above
    #       copyright notice, this list of conditions and the following
    #       disclaimer in the documentation and/or other materials provided
    #       with the distribution.
    #     * Neither the name of The Linux Foundation nor the names of its
    #       contributors may be used to endorse or promote products derived
    #       from this software without specific prior written permission.
    #
    # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
    # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
    # ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
    # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
    # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
    # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
    # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    
    #key 139    APP_SWITCH    VIRTUAL
    #key 158    BACK          VIRTUAL
    #key 143    WAKEUP
  3. /vendor/usr/keylayout/uinput-fpc.kl/vendor/usr/keylayout/uinput-goodix.kl也执行同样的操作
  4. 最后重启

通知栏部分元素显示错位

改一下dpi即可,可以在设置-->显示-->显示大小更改,如果你想自定义大小,在开发者选项-->最小宽度也可以修改

添加新评论

已有 3 条评论

朋友 交换链接吗

不好意思,暂不接受aff类