# 准备工作 下载 Android_boot_image_editor 用来解包、打包 boot.img
git clone https://github.com/cfig/Android_boot_image_editor.git
### 解包
# 复制 boot.img 到 Android_boot_image_editor 目录下
./gradlew unpack
# 解包路径
build/unzip_boot/
#root@archlinux:~/Android_boot_image_editor/build/unzip_boot# ls
#total 13884
#-rw-r--r-- 1 root root 1021 Oct 1 14:11 boot.json
#-rw-r--r-- 1 root root 13265794 Oct 1 14:10 kernel
#-rw-r--r-- 1 root root 134269 Oct 1 14:10 kernel_configs.txt
#-rw-r--r-- 1 root root 7 Oct 1 14:10 kernel_version.txt
#-rw-r--r-- 1 root root 802471 Oct 1 14:11 ramdisk.img.gz
#drwxr-xr-x 8 root root 4096 Oct 1 14:10 root
# 看到的大概就是这样的结构了
# 编辑 boot.json,找到名为 cmdline 的 key,往对应的值添加(注意用空格隔开)
androidboot.selinux=permissive
### 打包
cd Android_boot_image_editor
./gradlew pack
# 会在当前目录生成一个 boot.img.signed 文件
# 刷入
fastboot flash boot boot.img.signed
准确来说,也不是禁用,是设为“宽容”模式
还是蛮简单的。
我是为了体验 ViPER4Android FX 音效。
一劳永逸!!!
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.