4 Commits
Crowdin ... dev

Author SHA1 Message Date
5ec1cff
8304c54b8c ksud: more verbose log (#3021)
Some checks failed
Build Manager / build-lkm (push) Has been cancelled
Build Manager / build-user_scanner (ubuntu-latest, All-linux-android) (push) Has been cancelled
Build Manager / build-ksud (ubuntu-latest, aarch64-linux-android) (push) Has been cancelled
Build Manager / build-ksud (ubuntu-latest, armv7-linux-androideabi) (push) Has been cancelled
Build Manager / build-ksud (ubuntu-latest, x86_64-linux-android) (push) Has been cancelled
Build Manager / build-manager (false) (push) Has been cancelled
Build Manager / build-manager (true) (push) Has been cancelled
2025-12-01 06:11:14 +08:00
Wang Han
8ddca5f310 ksud: Add process info in bugreport (#3014) 2025-11-30 13:31:39 +08:00
Wang Han
d4d42cae0d ksud: Remove warning for non-tty std 2025-11-29 19:05:40 +08:00
MorStar
cd12337f2a Update README with SukiSU module mounting note
Added note about SukiSU's module mounting delegation.
2025-11-29 19:04:18 +08:00
4 changed files with 9 additions and 6 deletions

View File

@@ -15,6 +15,7 @@ A kernel-based root solution for Android devices, forked from [`tiann/KernelSU`]
1. Kernel-based `su` and root access management 1. Kernel-based `su` and root access management
2. Module system based on [Magic Mount](https://github.com/5ec1cff/KernelSU) 2. Module system based on [Magic Mount](https://github.com/5ec1cff/KernelSU)
> **Note:** SukiSU now delegates all module mounting to the installed *metamodule*; the core no longer handles mount operations.
3. [App Profile](https://kernelsu.org/guide/app-profile.html): Lock up the root power in a cage 3. [App Profile](https://kernelsu.org/guide/app-profile.html): Lock up the root power in a cage
4. Support non-GKI and GKI 1.0 4. Support non-GKI and GKI 1.0
5. KPM Support 5. KPM Support

View File

@@ -17,6 +17,7 @@ fun getBugreportFile(context: Context): File {
val bugreportDir = File(context.cacheDir, "bugreport") val bugreportDir = File(context.cacheDir, "bugreport")
bugreportDir.mkdirs() bugreportDir.mkdirs()
val processFile = File(bugreportDir, "process.txt")
val dmesgFile = File(bugreportDir, "dmesg.txt") val dmesgFile = File(bugreportDir, "dmesg.txt")
val logcatFile = File(bugreportDir, "logcat.txt") val logcatFile = File(bugreportDir, "logcat.txt")
val tombstonesFile = File(bugreportDir, "tombstones.tar.gz") val tombstonesFile = File(bugreportDir, "tombstones.tar.gz")
@@ -40,8 +41,10 @@ fun getBugreportFile(context: Context): File {
val shell = getRootShell(true) val shell = getRootShell(true)
shell.newJob().add("dmesg > ${dmesgFile.absolutePath}").exec() // busybox ps has very few features for embed devices
shell.newJob().add("logcat -d > ${logcatFile.absolutePath}").exec() shell.newJob().add("toybox ps -T -A -w -o PID,TID,UID,COMM,CMDLINE,CMD,LABEL,STAT,WCHAN > ${processFile.absolutePath}").exec()
shell.newJob().add("dmesg -r > ${dmesgFile.absolutePath}").exec()
shell.newJob().add("logcat -b all -v uid -d > ${logcatFile.absolutePath}").exec()
shell.newJob().add("tar -czf ${tombstonesFile.absolutePath} -C /data/tombstones .").exec() shell.newJob().add("tar -czf ${tombstonesFile.absolutePath} -C /data/tombstones .").exec()
shell.newJob().add("tar -czf ${dropboxFile.absolutePath} -C /data/system/dropbox .").exec() shell.newJob().add("tar -czf ${dropboxFile.absolutePath} -C /data/system/dropbox .").exec()
shell.newJob().add("tar -czf ${pstoreFile.absolutePath} -C /sys/fs/pstore .").exec() shell.newJob().add("tar -czf ${pstoreFile.absolutePath} -C /sys/fs/pstore .").exec()

View File

@@ -21,9 +21,9 @@ pub fn on_post_data_fs() -> Result<()> {
} }
#[cfg(unix)] #[cfg(unix)]
let _ = catch_bootlog("logcat", &["logcat"]); let _ = catch_bootlog("logcat", &["logcat", "-b", "all"]);
#[cfg(unix)] #[cfg(unix)]
let _ = catch_bootlog("dmesg", &["dmesg", "-w"]); let _ = catch_bootlog("dmesg", &["dmesg", "-w", "-r"]);
if utils::has_magisk() { if utils::has_magisk() {
warn!("Magisk detected, skip post-fs-data!"); warn!("Magisk detected, skip post-fs-data!");

View File

@@ -5,7 +5,7 @@ use crate::{
use anyhow::{Context, Ok, Result, bail}; use anyhow::{Context, Ok, Result, bail};
use getopts::Options; use getopts::Options;
use libc::c_int; use libc::c_int;
use log::{error, warn}; use log::error;
#[cfg(unix)] #[cfg(unix)]
use std::os::unix::process::CommandExt; use std::os::unix::process::CommandExt;
use std::{ use std::{
@@ -75,7 +75,6 @@ fn set_identity(uid: u32, gid: u32, groups: &[u32]) {
fn wrap_tty(fd: c_int) { fn wrap_tty(fd: c_int) {
let inner_fn = move || -> Result<()> { let inner_fn = move || -> Result<()> {
if unsafe { libc::isatty(fd) != 1 } { if unsafe { libc::isatty(fd) != 1 } {
warn!("not a tty: {fd}");
return Ok(()); return Ok(());
} }
let new_fd = get_wrapped_fd(fd).context("get_wrapped_fd")?; let new_fd = get_wrapped_fd(fd).context("get_wrapped_fd")?;