S9+ G9650 Kernel 编译

以下过程若非特别说明,均使用Ubuntu环境。
在进行Kernel 编译之前,请先对手机进行ROOT,方法请搜索网上相关教程。
本文使用的Kernel关闭了大部分的安全加固特性,不能保证手机的安全性,仅供研究学习使用。

感谢leilei大神的指点,和travismills82的部分开源patch。

准备

下载 NDK并解压
android-ndk-r17b-linux-x86_64.zip

下载Kernel代码及boot镜像生成工具

cd ~
git clone https://github.com/0x1Fu/SM-G9650_CHN_kernel.git
git clone https://github.com/0x1Fu/android_image_tools.git

编译Kernel

cd ~/SM-G9650_CHN_kernel
export PATH=~/android-ndk-r17b/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin:$PATH
./build_kernel.sh

生成BOOT镜像

cd ~/android_image_tools/images/G9650ZCU2ARE6/
cp ~/SM-G9650_CHN_kernel/out/arch/arm64/boot/Image.gz-dtb .
./create_boot.sh

烧写

进入 download 模式,使用odin工具包烧入boot_xxx.img.tar
烧写完成重启进入recovery,重刷SuperSU

备注

root后若出现serivce异常,可删除相关服务脚本,

[   40.003681] init: kill(6460, 9) failed: No such process
[   44.874730] init: computing context for service 'proca'
[   44.875192] init: starting service 'proca'…
[   44.875996] init: property_set("ro.boottime.proca", "44875709303") failed: property already set
[   44.982124] init: Service 'proca' (pid 7213) exited with status 0
[   44.982192] init: Sending signal 9 to service 'proca' (pid 7213) process group…
[   44.982422] init: kill(7213, 9) failed: No such process
$ adb shell

star2qltechn:/ $ su
star2qltechn:/ # mount -o rw,remount /system
star2qltechn:/ # rm /system/etc/init/pa_daemon.rc
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 1:InputChannel提供函数创建底层的Pipe对象 2: 1)客户端需要新建窗口 2)new ViewRo...
    自由人是工程师阅读 10,829评论 0 18
  • [TOC] Android 简介 Android 操作系统是基于Linux内核, Google使用Linux内核构...
    Joe_HUST阅读 12,994评论 0 9
  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 135,442评论 19 139
  • 易允强~微信企划~利他组 【日精进打卡第202天】 【知~学习】 《六项精进》2遍 共284遍 《大学》2遍 共2...
    云自闲阅读 876评论 0 0
  • 如果少了口腹之欲,生命里很多的追求也就淡了。 可是,这就是取舍吧。 看了很多资料,说的是血糖不控制,降不下来,之后...
    阅读 1,696评论 0 1