Git Product home page Git Product logo

op5dc's Introduction

oneplus 5 (cheeseburger) / 5T (dumpling) DC Dimming kernel on lineageOS

适用于一加5(cheeseburger)/5T(dumpling)、基于lineageOS的dc调光内核。

项目起初是由于第三方内核在一加5、官方lineageOS 16上,出现WiFi不可用的问题,所以把DC调光移植回lineageOS官方内核。

特性:

  • 跟随lineageOS维护的内核持续更新。
  • 使用aosp的ndk clang构建。
  • 仅包含官方功能。
  • 含有kernelsu的内核(实验性)

本项目仅维护dc调光和构建编译。

安装与使用内核

刷入前建议备份当前boot.img。打开本项目的release页面,根据tag查找对应的内核版本,在recovery模式下刷入,然后进入系统安装下方的控制器软件。

recovey:https://twrp.me/oneplus/oneplus5-5t.html

控制器:DC%20tuner.apk

注意,一加5需要设置DC最小亮度为200以上。

如何选择release

一般情况下请使用最新的lineageOS系统和最新发布的内核稳定版本

release命名方式:系统版本 + 内核版本 + 对用系统发布日期/发布次数(autobuild无此标签) + 构建日期(仅autobuild) + 内核文件hash(仅autobuild)

形如 (新)op5lin19.1-dc-44302v20220919.zip
        |—— 系统版本:lineageOS 19.1
        |—— 内核版本:4.4.302
        |—— 对应系统发布版本日期:20220919

形如 (旧)op5lin19.1-dc-44302v9.zip
        |—— 系统版本:lineageOS 19.1
        |—— 内核版本:4.4.302
        |—— 发布次数:9

如命名末尾带有 ksu 和相对应版本的号的,说明含有 kernelsu 模块,如果您无需使用 kernelsu ,请下载仅包含dc的内核

有关kernelsu相关的内容,请参阅后续的“关于kernelsu”章节

在release'页面标注:“20220919 and up”,说明适用于lineage-19.1-20220919-nightly-cheeseburger-signed.zip、lineage-19.1-20220920-nightly-dumpling-signed.zip(5T在LineageOS官方构建时间晚一天)。

由于官方维护者在维护系统内核的时候,修改内核但并不是会同时合并kernel的主线代码,所以会导致同一个内核版本号发布多次的问题。

而且没更新的内核版本号并不代表与之前系统兼容(可能会更新HAL层),所以请仔细核对release页面的发布信息。

恢复官方内核

请刷入备份的内核或者使用官方刷机包重新刷机,或者刷入对应版本官方刷机包内boot.img。

兼容性

2023年1月2日,官方lineageOS20.0已经发布,所有测试迁移到Android13,请更新到最新的lineageOS版本。

系统与内核兼容性

系统版本 内核
lineageOS16(Android9) 4.4.153
lineageOS17(Android10) 4.4.153 - 4.4.258
lineageOS18.1(Android11) 4.4.258v2 - 4.4.302v2
lineageOS19.1(android12) 4.4.302v3 - 4.4.302v20221205
lineageOS20(android13) 4.4.302v20230102 - 4.4.302v20240212v2
lineageOS21(android14) 4.4.302v20240311 and up

lineageOS16(Android9)最后经过测试的内核版本为4.4.153。

lineageOS17(Android10)最后经过测试的版本为4.4.258。(注意4.4.258v2为不同的版本,请参阅发布的tag)

lineageOS18.1(Android11)最后经过测试的内核版本为4.4.302v2。(注意4.4.302v3为适配Android12的内核)

关于kernelsu

kernelsu 是一个 Android 上基于内核的 root 方案。它和 DC Dimming 并无相关,意味着您可以只用dc Dimming,而不需要依赖 kernelsu 。

因为 kernelsu 项目尚在早期的开发中,引入 kernelsu 仅为了学习和研究,所以本项目对 kernelsu 相关的构建无任何保证,亦可能在未来移除 kernelsu 的相关代码,如果您使用到含有 kernelsu 的构建,请确保自己有能力从内核错误中恢复。

注意!!!因为我使用的root方案为magisk, kernelsu 仅测试能成功开机和运行其的控制器,模块功能从未经过测试

构建

测试环境是docker的Ubuntu20.02 x86_64镜像

拉取本仓库以及子模块,只编译的情况下推荐使用--depth=1获取最新一次的提交。

#由于文档更新延后,可以参阅repo根目录下的ci.sh了解具体执行的操作
#以下内容仅供参考
#
#自动构建(推荐)
#
##################################################
#先进入到当前repo的根目录
#如果非github actions,请指定GITHUB_WORKSPACE变量
export GITHUB_WORKSPACE=${pwd}
bash -x ci.sh
#由于使用git submoudle导致开发时大量的资源开销(需要pull完整模块的提交)
#所以修改成脚本处理依赖
#脚本会自动处理构建过程中的依赖和内核源码
##################################################

#
#手动构建
#
##################################################
#以下是编译过程中使用的指令,你需要手动解决依赖问题
#环境变量需要指定下面几个项目,请参阅ci.sh是怎么处理的
#prebuilts_build-tools
#aarch64 gcc
#arm gcc
#clang
make -j"$(nproc --all)" O=out lineage_oneplus5_defconfig \
    ARCH=arm64 \
    SUBARCH=arm64 \
    LLVM=1

make -j"$(nproc --all)" O=out \
    ARCH=arm64 \
    SUBARCH=arm64 \
    CROSS_COMPILE=aarch64-linux-android- \
    CROSS_COMPILE_ARM32=arm-linux-androideabi- \
    CLANG_TRIPLE=aarch64-linux-gnu- \
    LLVM=1
##################################################

引用和参考过的资料

本项目开发中参考了许多开源项目/公开文档,非常感谢各位作者的付出,排名不分先后:

部分项目/文档由于各种问题未能记录,深表歉意。

op5dc's People

Contributors

seshiria avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

op5dc's Issues

System corruption after installing LineageOS update

Hi,
installing your kernel on a 5T has worked fine for me. Thanks a lot for your work.
I'm facing some problems when installing new LOS updates, thow.
After fresh installing LOS + MindTheGapps + ksu all worked fine since day 1. But after installing an update for LOS the system went mad. Google Play Services started crashing making the device unusable. It seems that most of Google apps and probably other system apps lost their permissions. Eventually I managed to almost fix that by reenabling their permissions, but location was not working well so I finally had to resort to restore factory settings.

When it comes to updating LOS I've already tried 2 different strategies:

  1. First time I installed LOS (without KSU). It worked fine for many months. Then I installed you KSU and worked fine for some weeks. Then after installing a LOS update from update app I rebooted and then Google Play Services started crashing. Then rebooted to install KSU but Google Play Services kept crashing. After reinstalling MindTheGapps the crash was solved but some apps had lost their permissions. After fixing the permissions mostly everything worked fine except for location. Google Maps worked fine most of the time with some casual quirks.
  2. Next time I tried to install a LOS update I did it by downloading it to a PC and sideloading it + your KSU (same kernel version than updated LOS). I faced the same problems. Flashing again MindTheGapps solved Google Play Services but some apps needed to be reinstalled. The device was not working fine, thow. Again some Google apps lost their permissions and even after trying to fix that not everything was working fine, mainly location.

Now I've fully wiped the storage from TWRP and clean installed LOS20 20231010, MindTheGapps and KSU op5lin20-dc-ksu11272-44302v20231009. Everything works fine.

What could I've done wrong when installing LOS updates? Are there any steps or method I should follow in order to safely apply LOS updates?

Manor thanks in advance

Not buildable locally

Hi.
I've been trying to build your kernel locally, without the main.yml in in .github directory.

For a local build I changed ${GITHUB_WORKSPACE} to $(pwd).

And I've got a few problems:

  1. arch/arm64/Makefile:54: *** arm-linux-gnueabi-gcc not found, check CROSS_COMPILE_ARM32. Stop.
    Ok, I suppose gcc-arm-linux-gnueabi package was missing, so I ran a sudo apt install -y gcc-arm-linux-gnueabi.
    Moving on..

  2. /bin/sh: 1: clang: not found
    That was a bit strange to me, because I thought android prebuilds already included clang.
    Ok, I tried sudo apt install -y clang.
    Moving on..

  3. Finally, I got this:
    make[2]: *** [..././Kbuild:20: kernel/bounds.s] Error 1
    make[1]: *** [/home/pc/Desktop/project/op5dc/kernel/Makefile:1077: prepare0] Error 2
    And a lot of code-related errors.

The machine I use is the latest Ubuntu distro.

Could you provide some advice and/or comment on this?
I would like to build the kernel myself, and I don't understand how is it I can't do that, but there are ready .zip archives in the Release tab.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.