Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ksud/installer: /odm handling #2513

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions kernel/core_hook.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,7 @@ int ksu_handle_setuid(struct cred *new, const struct cred *old)

// fixme: use `collect_mounts` and `iterate_mount` to iterate all mountpoint and
// filter the mountpoint whose target is `/data/adb`
try_umount("/odm", true, 0);
try_umount("/system", true, 0);
try_umount("/vendor", true, 0);
try_umount("/product", true, 0);
Expand Down
4 changes: 3 additions & 1 deletion userspace/ksud/src/installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,8 @@ handle_partition() {
return;
fi

if [ -L "/system/$1" ] && [ "$(readlink -f /system/$1)" = "/$1" ]; then
# we move the folder to / only if it is a native folder that is not a symlink
if [ -d "/$1" ] && [ ! -L "/$1" ]; then
ui_print "- Handle partition /$1"
# we create a symlink if module want to access $MODPATH/system/$1
# but it doesn't always work(ie. write it in post-fs-data.sh would fail because it is readonly)
Expand Down Expand Up @@ -406,6 +407,7 @@ install_module() {
handle_partition vendor
handle_partition system_ext
handle_partition product
handle_partition odm

if $BOOTMODE; then
mktouch $NVBASE/modules/$MODID/update
Expand Down