diff --git a/kernel/core_hook.c b/kernel/core_hook.c index 69d89c23..c527b82b 100644 --- a/kernel/core_hook.c +++ b/kernel/core_hook.c @@ -1007,9 +1007,6 @@ int ksu_handle_setuid(struct cred *new, const struct cred *old) try_umount("/system_ext", true, 0); try_umount("/data/adb/modules", false, MNT_DETACH); - // try umount ksu temp path - try_umount("/debug_ramdisk", false, MNT_DETACH); - return 0; } diff --git a/userspace/ksud/src/init_event.rs b/userspace/ksud/src/init_event.rs index 0632461f..dc551152 100644 --- a/userspace/ksud/src/init_event.rs +++ b/userspace/ksud/src/init_event.rs @@ -87,25 +87,6 @@ pub fn on_post_data_fs() -> Result<()> { warn!("KPM: Failed to load KPM modules: {}", e); } - let tmpfs_path = find_tmp_path(); - // for compatibility - let no_mount = Path::new(NO_TMPFS_PATH).exists() || Path::new(NO_MOUNT_PATH).exists(); - - // mount temp dir - if !no_mount { - if let Err(e) = mount( - KSU_MOUNT_SOURCE, - &tmpfs_path, - "tmpfs", - MountFlags::empty(), - "", - ) { - warn!("do temp dir mount failed: {}", e); - } - } else { - info!("no tmpfs requested"); - } - // exec modules post-fs-data scripts // TODO: Add timeout if let Err(e) = crate::module::exec_stage_script("post-fs-data", true) { @@ -117,9 +98,10 @@ pub fn on_post_data_fs() -> Result<()> { warn!("load system.prop failed: {e}"); } + let tmpfs_path = find_tmp_path(); // mount module systemlessly by magic mount #[cfg(target_os = "android")] - if !no_mount { + if !Path::new(NO_MOUNT_PATH).exists() { if let Err(e) = crate::magic_mount::magic_mount(&tmpfs_path) { warn!("do systemless mount failed: {e}"); } @@ -152,16 +134,6 @@ pub fn on_post_data_fs() -> Result<()> { Ok(()) } -#[cfg(target_os = "android")] -pub fn mount_modules_systemlessly() -> Result<()> { - crate::magic_mount::magic_mount(&find_tmp_path()) -} - -#[cfg(not(target_os = "android"))] -pub fn mount_modules_systemlessly() -> Result<()> { - Ok(()) -} - fn run_stage(stage: &str, block: bool) { utils::umask(0);