Coder Social home page Coder Social logo

tiann / kernelsu Goto Github PK

View Code? Open in Web Editor NEW
8.3K 93.0 1.4K 14.48 MB

A Kernel based root solution for Android

Home Page: https://kernelsu.org

License: GNU General Public License v3.0

Makefile 0.59% C 22.74% Kotlin 39.42% CMake 0.07% C++ 2.13% Java 6.86% Shell 2.28% Rust 21.57% Python 0.94% TypeScript 2.83% AIDL 0.04% Just 0.10% JavaScript 0.43%
android kernel root su kernelsu

kernelsu's Introduction

English | Español | 简体中文 | 繁體中文 | 日本語 | Polski | Português (Brasil) | Türkçe | Русский | Tiếng Việt | Indonesia | עברית | हिंदी

KernelSU

logo

A Kernel-based root solution for Android devices.

Latest release Weblate Channel License: GPL v2 GitHub License

Features

  1. Kernel-based su and root access management.
  2. Module system based on OverlayFS.
  3. App Profile: Lock up the root power in a cage.

Compatibility State

KernelSU officially supports Android GKI 2.0 devices (kernel 5.10+). Older kernels (4.14+) are also compatible, but the kernel will have to be built manually.

With this, WSA, ChromeOS, and container-based Android are all supported.

Currently, only arm64-v8a and x86_64 are supported.

Usage

Translation

To help translate KernelSU or improve existing translations, please use Weblate. PR of Manager's translation is no longer accepted, because it will conflict with Weblate.

Discussion

Security

For information on reporting security vulnerabilities in KernelSU, see SECURITY.md.

License

Credits

kernelsu's People

Contributors

5ec1cff avatar aquarius223 avatar coconutat avatar dabao1955 avatar dependabot[bot] avatar diphons avatar dr-tsng avatar fede2782 avatar github-actions[bot] avatar gustavomends avatar hikari-no-tenshi avatar hmtheboy154 avatar howard20181 avatar igormiguell avatar kaitul avatar lateautumn233 avatar longhuan1999 avatar natsumerinchan avatar raystef66 avatar rooghz720 avatar s1204it avatar skbeh avatar symbuzzer avatar tiann avatar tinyhai avatar weblate avatar whyakari avatar ygorigor avatar ylarod avatar yujincheng08 avatar

Stargazers

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

Watchers

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

kernelsu's Issues

It is extremely difficult to obtain help information and version information for the su command.

I tried the following commands, but I couldn't get the correct help information and version information.

OP591BL1:/ $ su --help
su: su: --: unknown option
1|OP591BL1:/ $ su -h
OP591BL1:/ # exit
OP591BL1:/ $ su -?
su: su: -?: unknown option
1|OP591BL1:/ $ su -v
# Copyright (c) 2010, 2012, 2013, 2014
#       Thorsten Glaser <[email protected]>
# This file is provided under the same terms as mksh.
#-
# Minimal /system/etc/mkshrc for Android
#
# Support: https://launchpad.net/mksh

set +o nohup

if (( USER_ID )); then PS1='$'; else PS1='#'; fi
PS4='[$EPOCHREALTIME] '; PS1='${|
        local e=$?

        (( e )) && REPLY+="$e|"

        return $e
}$HOSTNAME:${PWD:-?} '"$PS1 "

# qiuchangping@BSP add for support "ll" commond
alias l='ls'
alias la='l -a'
alias ll='l -l'
alias lo='l -a -l'
OP591BL1:/ # exit
exit
OP591BL1:/ $ su -V
su: su: -V: unknown option
1|OP591BL1:/ $ su --version
su: su: --: unknown option
1|OP591BL1:/ $

Supporting x86/x86_64

Hi, I just read about the project and I really like it. I am maintaining BlissOS and currently looking for a better root solution than the old Superuser made by koush. But looking at the codes, it seems like the project only support arm64 so far, are there any plan for x86/x86_64 ? I can help you test with x86_64 if you want.

我该如何下载到boot.img

我的手机内核版本是5.10.101,我在action里面寻找但是最新版并没有对应我内核版本的boot.img,请问我必须亲自编译它吗
image

Manager crashes on some a13 custom roms

Some a13 custom roms force device to vibrate on overscroll animation. But app required to have permission to vibrate or else it will crash. Maybe you can add required permission to manifest?

ksud sepolicy apply file doesn't work

Describe the bug
command: ksud sepolicy apply file
1.Execution succeed and doesn't work.

To Reproduce
Steps to reproduce the behavior:

  1. exec: /data/adb/ksud sepolicy apply /cache/l.rule
  2. result: NormalPerm(NormalPerm { op: "allow", source: ["platform_app"], target: ["default_prop"], class: ["property_service"], perm: ["set"] })
  3. [ 1125.629091] type=1107 audit(1676100930.295:2015): uid=0 auid=4294967295 ses=4294967295 subj=u:r:init:s0 msg='avc: denied { set } for property=persist.mi.current_action pid=13647 uid=10062 gid=10062 scontext=u:r:platform_app:s0:c512,c768 tcontext=u:object_r:default_prop:s0 tclass=property_service permissive=0'

Expected behavior
Execute successfully and take effect

Screenshots
0001

Smartphone (please complete the following information):

  • Device: [xiaomi 10 pro]
  • OS: [android 12]
  • Version [miui dev 22.7.19]
  • KernelSU/Manager [10582/3.7]

Additional context
allow platform_app default_prop property_service set

I wonder whether we could patch vmlinux to support Kernel-SU.

I wonder whether we could patch vmlinux to support Kernel-SU or not.

For chromeOS, I've seen vmlinux system.raw.img vendor.raw.img into ROOT-A: /opt/google/vms/android.

I want to make its Android Container rooted, so could I patch vmlinux to support Kernel-SU?

Add Reload App List button

When the new application is installed, it does not appear in the applications list. It is necessary to exit the Kernelsu application and enter it again. It would be good to put a button to refresh the application list.

Configs are not going into effect for KernelSU

I'm trying to build my kernel with KernelSU and have defined the config in the device_defconfig file as per the documentation.
But still, when I'm trying to build it, I'm getting the error: #error("CONFIG_KPROBES must be enabled for KernelSU!")
Any pointers on this please?
Below are the flags which I'm putting in my defconfig file:

CONFIG_KPROBES=y
CONFIG_HAVE_KPROBES=y
CONFIG_KPROBE_EVENTS=y

无法使用太极 阳

我安装了太极,然后安装了太极模块zygsic版本后,可以正常开机,但是太极里面还显示太极阴,使用magisk模块后,重启卡米标接近十分钟,我强制关机,然后开机,仍然无法使用太极阳仍然显示太极阴且magisk版本太极为灰色开启状态无法调节
我卸载了所有模块和太极阴,直接安装太极zygsic版本提示需要先安装太极,安装之后模块在管理器中消失,太极仍旧显示阴,magisk版本也是一样
【超级会员V5】通过百度网盘分享的文件:qqqqq
链接:https://pan.baidu.com/s/1sujcCPXVu0MwKIH563KaXw?pwd=095z 
提取码:095z
复制这段内容打开「百度网盘APP 即可获取」
I installed Tai Chi, and then installed the zygsic version of the Tai Chi module, which can be started normally. However, Tai Chi Yin is also displayed in Tai Chi. After using the magisk module, restart the Kami sign for nearly ten minutes. I forced to shut down, and then start up, still unable to use Tai Chi Yang, which still displays Tai Chi Yin, and the magisk version of Tai Chi is gray and cannot be adjusted
I uninstalled all modules and Taiji Yin, and directly installed the Taiji zygsic version, which prompted that Taiji needs to be installed first. After installation, the module disappears in the manager, and Taiji still displays Yin, and so does the magisk version

No global namespace in libsu

Since KernelSU doesn't export su in system/bin, tried this way to create a root shell with KernelSU.

builder.build(getKsuDaemonPath(), "debug", "su")

And let's read its namespace:

D/SHELL_IN: readlink /proc/self/ns/mnt
D/SHELLOUT: mnt:[4026533238]

It still has its own namespace, not the global one. I also trid using simple_su in libsu, but failed as well.
And it doesn't act like su --mount-master.
When I tried simple_su in adb, it works fine.

cas:/data/local/tmp $ ./simple_su
cas:/data/local/tmp # readlink /proc/self/ns/mnt
mnt:[4026531840]

No working initrd-magisk

When i updated my android x86 whith kernalsu i doesn't have access to magisk, i meen kernalsu blocks initrd-magisk

[Add Device]: meizu16s

Repository URL

1

Device

4.14.83-perf+

Code of Conduct

  • I'm the maintainer of this repository

xiaomi12,android12

sorry to bother you.
My phone is xiaomi12,android12;The bootloader is unlocked;The GKI version is 5.10.101. I've download the file : "Image-android12-5.10.101_2022-05";
And I tried both the two files:Image、Image.lz4;Like this:
fastboot flash boot Image
fastboot reboot

fastboot flash boot Image.lz4
fastboot reboot

But It did not work?
Please help, and much grateful

vendor overlay breaks stock vendor mount

Describe the bug
I get stuck on the first screen when I first start up after installed this module.

After successfully entering the system, the module has been disabled.

To Reproduce
Steps to reproduce the behavior:

  1. Flash this module 门禁卡.zip
  2. Reboot

Expected behavior
This module is created by cardemulator, allows the app to systemless modify /vendor/etc/libnfc-nxp.conf for the purpose of emulating nfc cards.

Screenshots
If applicable, add screenshots to help explain your problem.
After the second time reboot

Smartphone (please complete the following information):

  • Device: [Oneplus 9RT]
  • OS: [PixelOS]
  • Version [33]

Additional context
Add any other context about the problem here.
KernelSU_bugreport_2023-02-12_14_16.tar.gz

Root状态备份

由于需要手动开启Root权限,是否考虑导出Root状态功能

repo list for non-GKI devices

KernelSU unofficially supports non-GKI devices, maybe we can create a repo list for non-GKI devices maintained by other developers. This makes it easier for user to find proper boot.img to use KernelSU.

Poco x3 pro GKI kernel

[question]
sorry but is possible make one recent gki (version 5...) work in poco x3 pro hardware build miui 14 ?? or in future?.

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.